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/components/echarts/echarts.vue |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/src/components/echarts/echarts.vue b/src/components/echarts/echarts.vue
index 4b85446..6caf970 100644
--- a/src/components/echarts/echarts.vue
+++ b/src/components/echarts/echarts.vue
@@ -210,21 +210,18 @@
     },
 
     generateChart(option) {
-      // 閰嶇疆鎶樼嚎鍥惧拰鏌辩姸鍥剧殑鏍峰紡
+      // 鏍峰紡鍙姞鍦ㄥ壇鏈笂锛屼笉鑳藉洖鍐� this.series锛歴eries 鏄埗椤甸潰鐨勫搷搴斿紡鏁版嵁锛�
+      // 鍥炲啓浼氳Е鍙戞湰缁勪欢 series 鐨� deep watcher 鍐嶆 renderChart锛屾瘡娆$敓鎴愭柊瀵硅薄姘镐笉鏀舵暃锛岄〉闈㈡寰幆鍗℃
       if (option.series && option.series.length > 0) {
-        option.series.forEach((s, index) => {
+        option.series = option.series.map((s, index) => {
           if (s.type === 'line') {
-            s.itemStyle = {
-              color: this.lineColors[index] || this.lineColors[0]
-            }
-            s.lineStyle = {
-              color: this.lineColors[index] || this.lineColors[0]
-            }
+            const color = this.lineColors[index] || this.lineColors[0]
+            return { ...s, itemStyle: { color }, lineStyle: { color } }
           } else if (s.type === 'bar') {
-            s.itemStyle = {
-              color: this.barColors[index] || this.barColors[0]
-            }
+            const color = this.barColors[index] || this.barColors[0]
+            return { ...s, itemStyle: { color } }
           }
+          return s
         })
       }
       this.chartInstance.clear()

--
Gitblit v1.9.3