From 9eec798af5c509bb27446371c59327afba86da8a Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Fri, 1 Dec 2023 14:29:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=95=B0=E6=8D=AE=E6=A8=A1?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/detection/records/index.ts | 14 +- src/api/spc/templateItemDetails/index.ts | 4 +- src/components/ImportForm/src/DetForm.vue | 548 ++++++++++++++++++ .../ImportForm/src/DetecImportForm.vue | 243 +++++--- src/views/detection/records/index.vue | 6 +- src/views/detection/records/records.data.ts | 12 +- .../importRecordsDetails.data.ts | 65 +++ src/views/detection/recordsDetails/index.vue | 395 +++++++++++-- .../detectionTemplate.data.ts | 2 +- src/views/spc/itembasic/itembasic.data.ts | 1 - 10 files changed, 1146 insertions(+), 144 deletions(-) create mode 100644 src/components/ImportForm/src/DetForm.vue create mode 100644 src/views/detection/recordsDetails/importRecordsDetails.data.ts diff --git a/src/api/detection/records/index.ts b/src/api/detection/records/index.ts index fa0de3a..f903aca 100644 --- a/src/api/detection/records/index.ts +++ b/src/api/detection/records/index.ts @@ -56,6 +56,16 @@ export const exportRecords = async (params) => { } // 下载导入模板 -export const importTemplate = () => { - return request.download({ url: '/detection/records/get-import-template' }) +export const importTemplate = (itemType:string) => { + return request.download({ url: '/detection/records/get-import-template?itemType='+itemType }) +} + +// 提交导入记录 +export const saveRecords = async (id: number) => { + return await request.get({ url: `/detection/records/saveRecords?id=` + id }) +} + +//每次导入前会传模版id后端会根据模版id和用户id把草稿状态的数据逻辑删除 +export const deleteStatus = async (templateId: number) => { + return await request.delete({ url: `/detection/records/deleteStatus?id=` + templateId }) } \ No newline at end of file diff --git a/src/api/spc/templateItemDetails/index.ts b/src/api/spc/templateItemDetails/index.ts index ff1d75c..cdc594e 100644 --- a/src/api/spc/templateItemDetails/index.ts +++ b/src/api/spc/templateItemDetails/index.ts @@ -19,7 +19,9 @@ export interface TemplateItemDetailsVO { deleterId: string extraProperties: string concurrencyStamp: string - siteId: string + siteId: string, + recodeColumns?:number, + recodeLines?:number, } // 查询检测记录明细列表 export const getTemplateItemDetailsPage = async (params) => { diff --git a/src/components/ImportForm/src/DetForm.vue b/src/components/ImportForm/src/DetForm.vue new file mode 100644 index 0000000..ac672a3 --- /dev/null +++ b/src/components/ImportForm/src/DetForm.vue @@ -0,0 +1,548 @@ + + + + diff --git a/src/components/ImportForm/src/DetecImportForm.vue b/src/components/ImportForm/src/DetecImportForm.vue index 6ef2ff9..96bf3fa 100644 --- a/src/components/ImportForm/src/DetecImportForm.vue +++ b/src/components/ImportForm/src/DetecImportForm.vue @@ -1,6 +1,6 @@