From 95ff09bf3a2615b1ee8f91ad2f44495dc38ef73a Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Tue, 12 Dec 2023 08:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/detection/records/index.vue | 10 +++++++++- src/views/detection/records/records.data.ts | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) 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',