diff --git a/src/api/qms/sampleCode/index.ts b/src/api/qms/sampleCode/index.ts index 9f7f9f13e..a0d1f70cb 100644 --- a/src/api/qms/sampleCode/index.ts +++ b/src/api/qms/sampleCode/index.ts @@ -48,7 +48,12 @@ export const deleteSampleCode = async (id: number) => { // 导出样本字码 Excel export const exportSampleCode = async (params) => { - return await request.download({ url: `/qms/sample-code/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/qms/sample-code/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/qms/sample-code/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/qms/samplingScheme/index.ts b/src/api/qms/samplingScheme/index.ts index fdf76e455..32ec93a07 100644 --- a/src/api/qms/samplingScheme/index.ts +++ b/src/api/qms/samplingScheme/index.ts @@ -40,7 +40,12 @@ export const deleteSamplingScheme = async (id: number) => { // 导出采样方案 Excel export const exportSamplingScheme = async (params) => { - return await request.download({ url: `/qms/sampling-scheme/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/qms/sampling-scheme/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/qms/sampling-scheme/export-excel`, params }) + } } // 下载用户导入模板