From 12284ed8121752310f32a45f633b17bcebb73d31 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 15 Jun 2026 14:02:30 +0800 Subject: [PATCH] =?UTF-8?q?2026-06-15=20Lab=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/lab/labRecord.vue | 271 +++++++++++++++++++++------- 1 file changed, 202 insertions(+), 69 deletions(-) diff --git a/src/views/modules/lab/labRecord.vue b/src/views/modules/lab/labRecord.vue index ad12d56..bf084d6 100644 --- a/src/views/modules/lab/labRecord.vue +++ b/src/views/modules/lab/labRecord.vue @@ -593,69 +593,170 @@
- - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + +
+ + 暂无测试规范附件 +
+
+
+ +
+ + + + + +
+ + + +
+ + 暂无判断标准附件 +
+
+
+ + + +
- - - - + + + + + + + + + + - + + +
+ + 暂无测试报告附件 +
+
+
+ - +
@@ -664,7 +765,7 @@
- +
@@ -673,12 +774,12 @@
- + - +
@@ -774,6 +875,9 @@ export default { testSpecDialogVisible: false, testReportDialogVisible: false, judgeCriteriaFileList: [], + currentJudgeCriteriaFileList: [], + currentTestSpecFileList: [], + currentTestReportFileList: [], testReportFileList: [], judgeCriteriaFileColumnList: [ { @@ -1117,44 +1221,54 @@ export default { ref.handleQuery() } }, - refreshJudgeCriteriaFileList () { - if (!this.modalData.site || !this.modalData.referenceNo) { - this.judgeCriteriaFileList = [] - return Promise.resolve() + queryAttachmentFileList (site, referenceNo, orderRef3) { + if (!site || !referenceNo || !orderRef3) { + return Promise.resolve([]) } const params = { - orderRef1: this.modalData.site, - orderRef2: this.modalData.referenceNo, - orderRef3: 'judgeCriteria' + orderRef1: site, + orderRef2: referenceNo, + orderRef3: orderRef3 } return queryOss(params).then(({data}) => { if (data && data.code === 0 && Array.isArray(data.rows)) { - this.judgeCriteriaFileList = data.rows - } else { - this.judgeCriteriaFileList = [] + return data.rows } + return [] }).catch(() => { - this.judgeCriteriaFileList = [] + return [] + }) + }, + refreshJudgeCriteriaFileList () { + return this.queryAttachmentFileList(this.modalData.site, this.modalData.referenceNo, 'judgeCriteria').then(rows => { + this.judgeCriteriaFileList = rows }) }, refreshTestReportFileList () { - if (!this.modalData.site || !this.modalData.referenceNo) { - this.testReportFileList = [] + return this.queryAttachmentFileList(this.modalData.site, this.modalData.referenceNo, 'testReport').then(rows => { + this.testReportFileList = rows + }) + }, + loadCurrentAttachmentFileLists (site, referenceNo, requestId) { + if (!site || !referenceNo) { + if (requestId === this.currentDetailRequestId) { + this.currentJudgeCriteriaFileList = [] + this.currentTestSpecFileList = [] + this.currentTestReportFileList = [] + } return Promise.resolve() } - const params = { - orderRef1: this.modalData.site, - orderRef2: this.modalData.referenceNo, - orderRef3: 'testReport' - } - return queryOss(params).then(({data}) => { - if (data && data.code === 0 && Array.isArray(data.rows)) { - this.testReportFileList = data.rows - } else { - this.testReportFileList = [] + return Promise.all([ + this.queryAttachmentFileList(site, referenceNo, 'judgeCriteria'), + this.queryAttachmentFileList(site, referenceNo, 'testSpec'), + this.queryAttachmentFileList(site, referenceNo, 'testReport') + ]).then(([judgeFiles, testSpecFiles, testReportFiles]) => { + if (requestId !== this.currentDetailRequestId) { + return } - }).catch(() => { - this.testReportFileList = [] + this.currentJudgeCriteriaFileList = judgeFiles + this.currentTestSpecFileList = testSpecFiles + this.currentTestReportFileList = testReportFiles }) }, openJudgeCriteriaDialog () { @@ -1655,6 +1769,9 @@ export default { this.currentDetailRequestId += 1 this.currentDetailLoading = false this.currentDetail = this.buildDefaultModalData() + this.currentJudgeCriteriaFileList = [] + this.currentTestSpecFileList = [] + this.currentTestReportFileList = [] this.refreshCurrentTabTable() return } @@ -1668,11 +1785,18 @@ export default { this.currentDetailRequestId += 1 this.currentDetailLoading = false this.currentDetail = this.buildDefaultModalData() + this.currentJudgeCriteriaFileList = [] + this.currentTestSpecFileList = [] + this.currentTestReportFileList = [] return } const requestId = this.currentDetailRequestId + 1 this.currentDetailRequestId = requestId this.currentDetailLoading = true + this.currentJudgeCriteriaFileList = [] + this.currentTestSpecFileList = [] + this.currentTestReportFileList = [] + this.loadCurrentAttachmentFileLists(row.site, row.referenceNo, requestId) api.getLabDetail(row.site, row.referenceNo).then(({data}) => { if (requestId !== this.currentDetailRequestId) { return @@ -1748,6 +1872,9 @@ export default { this.currentDetailRequestId += 1 this.currentDetail = this.buildDefaultModalData() this.currentDetailLoading = false + this.currentJudgeCriteriaFileList = [] + this.currentTestSpecFileList = [] + this.currentTestReportFileList = [] this.approvalList = [] return } @@ -1790,6 +1917,9 @@ export default { this.currentDetailRequestId += 1 this.currentDetail = this.buildDefaultModalData() this.currentDetailLoading = false + this.currentJudgeCriteriaFileList = [] + this.currentTestSpecFileList = [] + this.currentTestReportFileList = [] this.approvalList = [] } this.dataListLoading = false @@ -1798,6 +1928,9 @@ export default { this.currentDetailRequestId += 1 this.currentDetail = this.buildDefaultModalData() this.currentDetailLoading = false + this.currentJudgeCriteriaFileList = [] + this.currentTestSpecFileList = [] + this.currentTestReportFileList = [] this.approvalList = [] this.dataListLoading = false })