From cbe9f2825593f80b02a8f141bb78d8d73df47853 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 17 Jun 2026 17:39:41 +0800 Subject: [PATCH] =?UTF-8?q?2026-06-17=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 | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/views/modules/lab/labRecord.vue b/src/views/modules/lab/labRecord.vue index 5c837cd..78f62b0 100644 --- a/src/views/modules/lab/labRecord.vue +++ b/src/views/modules/lab/labRecord.vue @@ -210,7 +210,7 @@ - + 内部报告 @@ -858,7 +858,7 @@ export default { height: 400, secondHeight: 200, currentRow: {}, - currentDetail: this.buildDefaultModalData(), + currentDetail: this.buildEmptyDetailData(), currentDetailLoading: false, currentDetailRequestId: 0, nodeOptions: [], @@ -1014,9 +1014,9 @@ export default { } }) }, - buildDefaultModalData () { + buildDefaultModalData (useLoginSite = true) { return { - site: this.$store.state.user.site, + site: useLoginSite ? this.$store.state.user.site : '', referenceNo: '', applicant: '', applicantName: '', @@ -1062,6 +1062,9 @@ export default { propertyItemList: [] } }, + buildEmptyDetailData () { + return this.buildDefaultModalData(false) + }, fetchNodeOptions () { if (!this.menuId) { this.nodeOptions = [] @@ -1777,7 +1780,7 @@ export default { if (!nextSite || !nextReferenceNo) { this.currentDetailRequestId += 1 this.currentDetailLoading = false - this.currentDetail = this.buildDefaultModalData() + this.currentDetail = this.buildEmptyDetailData() this.currentJudgeCriteriaFileList = [] this.currentTestSpecFileList = [] this.currentTestReportFileList = [] @@ -1793,7 +1796,7 @@ export default { if (!row || !row.site || !row.referenceNo) { this.currentDetailRequestId += 1 this.currentDetailLoading = false - this.currentDetail = this.buildDefaultModalData() + this.currentDetail = this.buildEmptyDetailData() this.currentJudgeCriteriaFileList = [] this.currentTestSpecFileList = [] this.currentTestReportFileList = [] @@ -1813,7 +1816,7 @@ export default { if (data && data.code === 0) { const detail = data.data || {} const mergedDetail = { - ...this.buildDefaultModalData(), + ...this.buildEmptyDetailData(), ...row, ...detail } @@ -1823,7 +1826,7 @@ export default { this.currentDetail = mergedDetail } else { const fallbackDetail = { - ...this.buildDefaultModalData(), + ...this.buildEmptyDetailData(), ...row } this.fillDisplayFields(fallbackDetail, row || {}) @@ -1834,7 +1837,7 @@ export default { return } const fallbackDetail = { - ...this.buildDefaultModalData(), + ...this.buildEmptyDetailData(), ...row } this.fillDisplayFields(fallbackDetail, row || {}) @@ -1880,7 +1883,7 @@ export default { this.totalPage = 0 this.currentRow = {} this.currentDetailRequestId += 1 - this.currentDetail = this.buildDefaultModalData() + this.currentDetail = this.buildEmptyDetailData() this.currentDetailLoading = false this.currentJudgeCriteriaFileList = [] this.currentTestSpecFileList = [] @@ -1927,7 +1930,7 @@ export default { this.totalPage = 0 this.currentRow = {} this.currentDetailRequestId += 1 - this.currentDetail = this.buildDefaultModalData() + this.currentDetail = this.buildEmptyDetailData() this.currentDetailLoading = false this.currentJudgeCriteriaFileList = [] this.currentTestSpecFileList = [] @@ -1939,7 +1942,7 @@ export default { this.dataListSelections = [] this.currentRow = {} this.currentDetailRequestId += 1 - this.currentDetail = this.buildDefaultModalData() + this.currentDetail = this.buildEmptyDetailData() this.currentDetailLoading = false this.currentJudgeCriteriaFileList = [] this.currentTestSpecFileList = []