|
@ -83,6 +83,7 @@ import AddForm from './addForm.vue' |
|
|
import * as InspectionSchemeApi from '@/api/qms/inspectionScheme' |
|
|
import * as InspectionSchemeApi from '@/api/qms/inspectionScheme' |
|
|
import ImportForm from '../../../components/ImportForm/src/ImportForm.vue' |
|
|
import ImportForm from '../../../components/ImportForm/src/ImportForm.vue' |
|
|
import * as SampleCodeApi from '@/api/qms/sampleCode' |
|
|
import * as SampleCodeApi from '@/api/qms/sampleCode' |
|
|
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'InspectionScheme' }) |
|
|
defineOptions({ name: 'InspectionScheme' }) |
|
|
|
|
|
|
|
@ -286,8 +287,9 @@ const handleExport = async () => { |
|
|
await message.exportConfirm() |
|
|
await message.exportConfirm() |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
exportLoading.value = true |
|
|
exportLoading.value = true |
|
|
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
const data = await InspectionSchemeApi.exportInspectionScheme(tableObject.params) |
|
|
const data = await InspectionSchemeApi.exportInspectionScheme(tableObject.params) |
|
|
download.excel(data, '检验方案.xlsx') |
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|
exportLoading.value = false |
|
|
exportLoading.value = false |
|
@ -311,7 +313,7 @@ const handleImport = () => { |
|
|
// 导入附件弹窗所需的参数 |
|
|
// 导入附件弹窗所需的参数 |
|
|
const importTemplateData = reactive({ |
|
|
const importTemplateData = reactive({ |
|
|
templateUrl: '', |
|
|
templateUrl: '', |
|
|
templateTitle: '检验方案导入模版.xlsx' |
|
|
templateTitle: `【${route.meta.title}】导入模版.xlsx` |
|
|
}) |
|
|
}) |
|
|
// 导入成功之后 |
|
|
// 导入成功之后 |
|
|
const importSuccess = () => { |
|
|
const importSuccess = () => { |
|
|