From 54849757852f6ab40eb17afbd03d1d839b60a38d Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 13 Nov 2023 17:09:15 +0800
Subject: [PATCH] 重复定时和连续执行

---
 src/store/index.ts |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/store/index.ts b/src/store/index.ts
index d536696..0c1c5d0 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -6,6 +6,7 @@
 import { LayerType } from '/@/types/mapLayer'
 import { WaylineFile } from '/@/types/wayline'
 import { DevicesCmdExecuteInfo } from '/@/types/device-cmd'
+import createPersistedState from 'vuex-persistedstate' // 导入库
 import map from './map'
 import common from './common'
 
@@ -76,7 +77,10 @@
     visible: false,
     gateway_sn: '',
     is_dock: false,
-    payloads: null
+    payloads: null,
+    device_domain: '',
+    device_sub_type: '',
+    device_type: ''
   } as OSDVisible,
   waylineInfo: {
 
@@ -235,7 +239,6 @@
       }
     })
     state.layerBaseInfo = obj
-    console.log('state.layerBaseInfo', state.layerBaseInfo)
   },
   getLayerInfo ({ state }, id:string) {
     return state.layerBaseInfo[id]
@@ -251,6 +254,11 @@
     map,
     common
   },
+  plugins: [createPersistedState({
+    storage: window.sessionStorage,
+    key: 'drone-client',
+    paths: ['map', 'common'],
+  })]
 }
 
 const rootStore = createStore(storeOptions)

--
Gitblit v1.9.3