Browse Source

更新

master
songguoqiang 12 months ago
parent
commit
95ff09bf3a
  1. 10
      src/views/detection/records/index.vue
  2. 4
      src/views/detection/records/records.data.ts

10
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 RecordsApi from '@/api/detection/records'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { any } from 'vue-types' import { any } from 'vue-types'
import dayjs from 'dayjs'
defineOptions({ name: 'DetectionRecords' }) defineOptions({ name: 'DetectionRecords' })
@ -232,8 +233,15 @@ const handleExport = async () => {
} }
tableObject.params.ids = params; tableObject.params.ids = params;
console.info("tableObject.params",tableObject.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); const data = await RecordsApi.exportRecords(tableObject.params);
download.excel(data, '检测记录数据主.xls') console.log("导出数据",tableObject.params.crateTime);
download.excel(data, str)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

4
src/views/detection/records/records.data.ts

@ -38,7 +38,7 @@ export const Records = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '检测模版类型', label: '项目编号',
field: 'itemCode', field: 'itemCode',
isSearch: true, isSearch: true,
search: { search: {
@ -55,7 +55,7 @@ export const Records = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '物料类型', label: '检测模版类型',
field: 'itemType', field: 'itemType',
dictType: DICT_TYPE.ITEMBASIC_TYPE, dictType: DICT_TYPE.ITEMBASIC_TYPE,
dictClass: 'string', dictClass: 'string',

Loading…
Cancel
Save