From 825172fe39308a3c8a36c4bece5aba7c8761b0db Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期四, 22 十月 2026 20:28:19 +0800
Subject: [PATCH] fix: 完善检验设备显示与报告印章提示

---
 src/views/CNAS/resourceDemand/device/component/inspectionForm.vue |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue b/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
index 894998f..effb8fc 100644
--- a/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
@@ -55,7 +55,7 @@
         </el-col>
       </el-row>
       <div>
-        <el-button v-if="operationType === 'add'" size="small" type="primary" @click="addTableRow">娣诲姞</el-button>
+        <el-button v-if="operationType !== 'check'" size="small" type="primary" @click="addTableRow">娣诲姞</el-button>
       </div>
       <div style="text-align: center">娴嬭瘯鏁版嵁璁板綍</div>
       <div style="margin: 10px 0">
@@ -144,12 +144,10 @@
   reviewDeviceInspectionRecord,
 } from '@/api/cnas/resourceDemand/device.js'
 import { selectUserCondition } from "@/api/business/inspectionTask";
-import draftSave from '@/mixins/draftSave'
 export default {
   name: "inspection-form",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
   components: {},
-  mixins: [draftSave],
   data() {
     // 杩欓噷瀛樻斁鏁版嵁
     return {
@@ -188,8 +186,6 @@
       this.getUserList()
       if (this.form.inspectionRecordId) {
         this.searchInfo()
-      } else if (this.operationType !== 'check') {
-        this.draftRestore('inspectionForm', 'form', this.form.deviceId, 'dialogVisible')
       }
     },
     searchInfo() {
@@ -197,12 +193,8 @@
         inspectionRecordId: this.form.inspectionRecordId
       }).then(res => {
         if (res.code === 200) {
-          const id = this.form.inspectionRecordId
           this.form = { ...res.data }
           this.details = this.form.details || []
-          if (this.operationType !== 'check') {
-            this.draftRestore('inspectionForm', 'form', id, 'dialogVisible')
-          }
         }
       }).catch(error => {
         console.error(error)
@@ -219,7 +211,6 @@
         addDeviceInspectionRecord(this.form).then(res => {
           if (res.code == 200) {
             this.$message.success('鏂板鎴愬姛')
-            this.draftClear('inspectionForm')
             this.resetForm()
           }
           this.submitFormLoading = false
@@ -229,8 +220,7 @@
       } else {
         updateDeviceInspectionRecord(this.form).then(res => {
           if (res.code == 200) {
-            this.$message.success('鏂板鎴愬姛')
-            this.draftClear('inspectionForm')
+            this.$message.success('淇敼鎴愬姛')
             this.resetForm()
           }
           this.submitFormLoading = false
@@ -244,6 +234,7 @@
         inspectionRecordId: this.form.inspectionRecordId,
         status: status,
       }
+      this.submitFormLoading = true
       reviewDeviceInspectionRecord(params).then(res => {
         if (res.code == 200) {
           this.$message.success('瀹℃牳鎴愬姛')
@@ -255,7 +246,6 @@
       })
     },
     resetForm() {
-      this.draftStop('inspectionForm')
       this.dialogVisible = false
       this.$emit('closeDialog')
     },

--
Gitblit v1.9.3