diff --git a/src/views/detection/records/index.vue b/src/views/detection/records/index.vue index 430800d..46cd2ac 100644 --- a/src/views/detection/records/index.vue +++ b/src/views/detection/records/index.vue @@ -73,6 +73,7 @@ import { Records,RecordsRules } from './records.data' import * as RecordsApi from '@/api/detection/records' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { any } from 'vue-types' +import dayjs from 'dayjs' defineOptions({ name: 'DetectionRecords' }) @@ -232,8 +233,15 @@ const handleExport = async () => { } tableObject.params.ids = params; console.info("tableObject.params",tableObject.params) + let str = '华涛SPC检测记录导出-全部.xlsx' + + if(tableObject.params.createTime){ + str = '华涛SPC检测记录导出-'+dayjs(tableObject.params.createTime[0]).format('YYYY-MM-DD')+'_'+dayjs(tableObject.params.createTime[1]).format('YYYY-MM-DD')+'.xlsx' + } + const data = await RecordsApi.exportRecords(tableObject.params); - download.excel(data, '检测记录数据主.xls') + console.log("导出数据",tableObject.params.crateTime); + download.excel(data, str) } catch { } finally { exportLoading.value = false diff --git a/src/views/detection/records/records.data.ts b/src/views/detection/records/records.data.ts index 8ab984c..046b142 100644 --- a/src/views/detection/records/records.data.ts +++ b/src/views/detection/records/records.data.ts @@ -38,7 +38,7 @@ export const Records = useCrudSchemas(reactive([ }, }, { - label: '检测模版类型', + label: '项目编号', field: 'itemCode', isSearch: true, search: { @@ -55,7 +55,7 @@ export const Records = useCrudSchemas(reactive([ }, }, { - label: '物料类型', + label: '检测模版类型', field: 'itemType', dictType: DICT_TYPE.ITEMBASIC_TYPE, dictClass: 'string',