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/equipmentMaintenance.vue |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
index 75c1e31..cd31ba8 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
@@ -67,11 +67,13 @@
 } from "@/api/cnas/resourceDemand/device";
 import limsTable from "@/components/Table/lims-table.vue";
 import {selectUserCondition} from "@/api/system/user";
+import draftSave from '@/mixins/draftSave'
 
 export default {
   name: '',
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
   components: {limsTable},
+  mixins: [draftSave],
   props: {
     clickNodeVal: {
       type: Object,
@@ -180,6 +182,9 @@
           this.form = {...row}
           this.form['maintenanceContentArr'] = this.form.maintenanceContent.split(',')
         }
+        if (this.operationType !== 'view') {
+          this.draftRestore('equipmentMaintenance', 'form', this.operationType === 'edit' ? this.form.id : this.clickNodeVal.value, 'dialogVisible')
+        }
       })
       this.getDictS()
       this.getUserList()
@@ -259,6 +264,7 @@
           addDeviceMaintenance(this.form).then(res => {
             this.buttonLoading = false;
             this.$message.success('鏂板鎴愬姛')
+            this.draftClear('equipmentMaintenance')
             this.closeDia()
             this.getTableList()
           }).catch(err => {
@@ -268,6 +274,7 @@
       })
     },
     closeDia () {
+      this.draftStop('equipmentMaintenance')
       this.$refs['form'].resetFields();
       this.dialogVisible = false
       this.refreshTableList()

--
Gitblit v1.9.3