From 39154a82354b08c2449918c0665457fdb2701b9b Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期五, 16 十月 2026 16:02:23 +0800
Subject: [PATCH] 设备模块各标签页弹窗新增草稿自动保存与恢复:编辑或录入数据中途关闭/刷新页面,再次打开同一弹窗时自动恢复未保存的编辑内容(弹窗显示"已恢复上次未保存的编辑内容"提示),保存成功后草稿自动清除;新增 src/mixins/draftSave.js 同时清理设备死代码:management.vue 数采配置旧弹窗及其提交方法、calibration.vue 被注释的导出按钮、device.js 中 numberCollect/deviceMetricRecordExport 两个死接口定义

---
 src/views/CNAS/resourceDemand/device/component/check.vue |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/views/CNAS/resourceDemand/device/component/check.vue b/src/views/CNAS/resourceDemand/device/component/check.vue
index e9f048c..19b44b0 100644
--- a/src/views/CNAS/resourceDemand/device/component/check.vue
+++ b/src/views/CNAS/resourceDemand/device/component/check.vue
@@ -250,8 +250,10 @@
 <script>
 import file from '@/utils/file';
 import { mapGetters } from "@/utils/store-compat";
+import draftSave from '@/mixins/draftSave'
 export default {
   components: {},
+  mixins: [draftSave],
   props: {
     clickNodeVal: {
       type: Object,
@@ -385,6 +387,7 @@
     // 鏍″噯椤圭洰缁存姢
     calibrationMaintenance() {
       this.dialogVisible0 = true
+      this.draftRestore('checkMaintenanceDia', 'form0', this.clickNodeVal.value, 'dialogVisible0')
       this.getXmsg();
     },
     addCalibrate() {
@@ -403,6 +406,7 @@
           }).then(res => {
             if (res.code == 200) {
               this.$message.success('淇濆瓨鎴愬姛')
+              this.draftClear('checkMaintenanceDia')
               this.$refs['form0'].resetFields()
               this.getXmsg() // 鍒锋柊璁惧鏍″噯鍙傛暟琛ㄦ牸
             }
@@ -447,6 +451,7 @@
             }).then(res => {
               if (res.code == 200) {
                 this.$message.success('娣诲姞鎴愬姛')
+                this.draftClear('checkAddRecordDia')
                 this.dialogVisible1 = false
                 this.getTableList(this.clickNodeVal.value)
               }
@@ -462,6 +467,7 @@
       })
     },
     resetcalibrationRecord() {
+      this.draftStop('checkAddRecordDia')
       this.$refs.calibrationRecord.resetFields()
     },
     // 闄勪欢涓婁紶
@@ -518,6 +524,7 @@
     add(type) {
       this.operationType = type
       this.dialogVisible1 = true
+      this.draftRestore('checkAddRecordDia', 'calibrationRecord', this.clickNodeVal.value, 'dialogVisible1')
       this.getXmsg()
     },
     // 鏌ョ湅璇︽儏

--
Gitblit v1.9.3