diff --git a/src/api/npcIqc/npcIqc.js b/src/api/npcIqc/npcIqc.js index 7c00327..011d5b1 100644 --- a/src/api/npcIqc/npcIqc.js +++ b/src/api/npcIqc/npcIqc.js @@ -2,3 +2,29 @@ import { createAPI } from '@/utils/httpRequest.js' export const searchNpcIqc = (data) => createAPI(`/npcIqc/search`, 'post', data) +// 下载导入模板 +export const downloadTemplate = () => { + return createAPI('/npcIqc/downloadTemplate', 'post', {}, { responseType: 'blob' }) +} + +// 预览上传数据 +export const previewUpload = (file) => { + const formData = new FormData() + formData.append('file', file) + return createAPI('/npcIqc/previewUpload', 'post', formData, { + headers: { + 'Content-Type': 'multipart/form-data' + } + }) +} + +// 批量保存 +export const batchSave = (file) => { + const formData = new FormData() + formData.append('file', file) + return createAPI('/npcIqc/batchSave', 'post', formData, { + headers: { + 'Content-Type': 'multipart/form-data' + } + }) +} \ No newline at end of file diff --git a/src/views/modules/npcIqc/npcIqcList.vue b/src/views/modules/npcIqc/npcIqcList.vue index c5d5796..83496b3 100644 --- a/src/views/modules/npcIqc/npcIqcList.vue +++ b/src/views/modules/npcIqc/npcIqcList.vue @@ -107,18 +107,76 @@ - - -
+ + +
+ + + + +
+ 请选择文件 + + + 选择文件 + + 上传 + + 下载模板 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 保存 + 关闭 +
+