|
@@ -20,6 +20,11 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="thr">
|
|
|
<cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @exam="toExam" @edit="toEdit" @del="toDel">
|
|
|
+ <template #date="{ item, row }">
|
|
|
+ <template v-if="item.model === 'date'">
|
|
|
+ <span>{{ getProps(row, item.model) }}</span>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
<template #is_use="{ row }">
|
|
|
<el-switch
|
|
|
v-model="row.is_use"
|
|
@@ -51,6 +56,7 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
// 基础
|
|
|
+import _ from 'lodash';
|
|
|
import store from '@/stores/counter';
|
|
|
import type { Ref } from 'vue';
|
|
|
import { ref, onMounted, getCurrentInstance } from 'vue';
|
|
@@ -74,7 +80,7 @@ let skip = 0;
|
|
|
let limit: number = proxy.$limit;
|
|
|
let fields: Ref<any[]> = ref([
|
|
|
{ label: '名称', model: 'name', isSearch: true },
|
|
|
- { label: '日期', model: 'date' },
|
|
|
+ { label: '日期', model: 'date', custom: true },
|
|
|
{ label: '销售金额', model: 'money' },
|
|
|
{ label: '出游人群', model: 'person', type: 'select', isSearch: true, format: (i: any) => getDict(i, personList.value) },
|
|
|
{ label: '服务特色', model: 'type', type: 'select', isSearch: true, format: (i: any) => getDict(i, typeList.value) },
|
|
@@ -127,6 +133,10 @@ const getDict = (value: any, model) => {
|
|
|
else return '暂无';
|
|
|
}
|
|
|
};
|
|
|
+const getProps = (data: any, prop: any) => {
|
|
|
+ const date = _.get(data, prop);
|
|
|
+ return date.join('-');
|
|
|
+};
|
|
|
// 审核
|
|
|
const toExam = async (data: any) => {
|
|
|
let res: IQueryResult = await ticketAxios.fetch(data._id);
|