From 8792be67cf5791a4a3afc2f72fd8d7cfc3cff353 Mon Sep 17 00:00:00 2001
From: wangjuncheng <1>
Date: 星期二, 15 四月 2025 15:20:28 +0800
Subject: [PATCH] change

---
 src/store/simulation.js |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/src/store/simulation.js b/src/store/simulation.js
index 5976841..44797b3 100644
--- a/src/store/simulation.js
+++ b/src/store/simulation.js
@@ -23,6 +23,7 @@
     const showResultAssess = ref(false)
     const showLayerTree = ref(true)
     const showDangerAssess = ref(false)
+    const schemCard = ref([])
 
     // 鍒濆鍖栨柟娉�
     const init = () => {
@@ -41,6 +42,29 @@
         deviceShow.value = false
         showResultAssess.value = false
         showDangerAssess.value = false
+        schemCard.value = []
+    }
+    // 鏂规鐩稿叧
+    const setSchemCard = (data) => {
+        schemCard.value = data
+    }
+
+    // 娣诲姞鍗曚釜鏂规鏁版嵁
+    const addSchemCard = (item) => {
+        schemCard.value.unshift(item)
+    }
+
+    // 鍒犻櫎鎸囧畾鏂规鏁版嵁
+    const removeSchemCardItem = (id) => {
+        schemCard.value = schemCard.value.filter(item => item.id !== id)
+    }
+
+    // 鏇存柊鎸囧畾鏂规鏁版嵁
+    const updateSchemCardItem = (id, newData) => {
+        const index = schemCard.value.findIndex(item => item.id === id)
+        if (index !== -1) {
+            schemCard.value[index] = { ...schemCard.value[index], ...newData }
+        }
     }
 
 
@@ -109,6 +133,11 @@
         startYHGL,
         startZHJC,
         startMNFZ,
-        startMNPG
+        startMNPG,
+        schemCard,
+        setSchemCard,
+        addSchemCard,
+        removeSchemCardItem,
+        updateSchemCardItem,
     }
 })
\ No newline at end of file

--
Gitblit v1.9.3