Showing
4 changed files
with
15 additions
and
8 deletions
| ... | ... | @@ -50,7 +50,7 @@ export const columns: BasicColumn[] = [ |
| 50 | 50 | dataIndex: 'dataType', |
| 51 | 51 | width: 120, |
| 52 | 52 | format: (_text: string, record: Recordable) => { |
| 53 | - return record.dataType === 0 ? '历史数据' : record.dataType === 1 ? '同比' : '环比'; | |
| 53 | + return record.dataCompare === 0 ? '原始数据' : '聚合数据'; | |
| 54 | 54 | }, |
| 55 | 55 | }, |
| 56 | 56 | { | ... | ... |
| 1 | 1 | import { BasicColumn, FormSchema } from '/@/components/Table'; |
| 2 | 2 | import moment from 'moment'; |
| 3 | +import { h } from 'vue'; | |
| 4 | +import { Tag } from 'ant-design-vue'; | |
| 3 | 5 | |
| 4 | 6 | // 表格配置 |
| 5 | 7 | export const columns: BasicColumn[] = [ |
| ... | ... | @@ -15,10 +17,10 @@ export const columns: BasicColumn[] = [ |
| 15 | 17 | }, |
| 16 | 18 | { |
| 17 | 19 | title: '数据类型', |
| 18 | - dataIndex: 'dataCompare', | |
| 20 | + dataIndex: 'dataType', | |
| 19 | 21 | width: 120, |
| 20 | 22 | format: (_text: string, record: Recordable) => { |
| 21 | - return record.dataCompare === 0 ? '历史数据' : record.dataCompare === 1 ? '同比' : '环比'; | |
| 23 | + return record.dataCompare === 0 ? '原始数据' : '聚合数据'; | |
| 22 | 24 | }, |
| 23 | 25 | }, |
| 24 | 26 | { |
| ... | ... | @@ -33,8 +35,11 @@ export const columns: BasicColumn[] = [ |
| 33 | 35 | title: '执行状态', |
| 34 | 36 | dataIndex: 'status', |
| 35 | 37 | width: 120, |
| 36 | - format: (_text: string, record: Recordable) => { | |
| 37 | - return record.status === 1 ? '成功' : record.status === 0 ? '失败' : '进行中'; | |
| 38 | + customRender: ({ record }) => { | |
| 39 | + const status = record.status; | |
| 40 | + const color = status == 1 ? 'green' : status == 0 ? 'red' : 'blue'; | |
| 41 | + const text = status == 1 ? '成功' : status == 0 ? '失败' : '进行中'; | |
| 42 | + return h(Tag, { color: color }, () => text); | |
| 38 | 43 | }, |
| 39 | 44 | }, |
| 40 | 45 | { | ... | ... |
| ... | ... | @@ -48,7 +48,7 @@ import { Popconfirm } from 'ant-design-vue'; |
| 48 | 48 | import { useModal } from '/@/components/Modal'; |
| 49 | 49 | import ReportPreviewModal from './ReportPreviewModal.vue'; |
| 50 | 50 | import { |
| 51 | - exportPage, | |
| 51 | + // exportPage, | |
| 52 | 52 | deleteExportManage |
| 53 | 53 | } from '/@/api/export/exportManager'; |
| 54 | 54 | |
| ... | ... | @@ -56,7 +56,7 @@ const searchInfo = reactive<Recordable>({}); |
| 56 | 56 | |
| 57 | 57 | const [registerTable, { reload, setProps, setTableData }] = useTable({ |
| 58 | 58 | title: '报表导出列表', |
| 59 | - api: exportPage, | |
| 59 | + // api: exportPage, | |
| 60 | 60 | columns, |
| 61 | 61 | showIndexColumn: false, |
| 62 | 62 | clickToRowSelect: false, |
| ... | ... | @@ -91,12 +91,13 @@ nextTick(() => { |
| 91 | 91 | setProps(selectionOptions); |
| 92 | 92 | setTableData([ |
| 93 | 93 | { |
| 94 | + id:'121212', | |
| 94 | 95 | reportConfigName: '1', |
| 95 | 96 | organizationName: '2', |
| 96 | 97 | dataCompare: 1, |
| 97 | 98 | executeWay: 1, |
| 98 | 99 | executeTime: 1, |
| 99 | - status: 2 | |
| 100 | + status: 1 | |
| 100 | 101 | } |
| 101 | 102 | ]) |
| 102 | 103 | ... | ... |