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 |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/store/index.ts b/src/store/index.ts
index 818ab40..0c1c5d0 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -5,8 +5,10 @@
 import { getLayers } from '/@/api/layer'
 import { LayerType } from '/@/types/mapLayer'
 import { WaylineFile } from '/@/types/wayline'
-import getter from './getters'
 import { DevicesCmdExecuteInfo } from '/@/types/device-cmd'
+import createPersistedState from 'vuex-persistedstate' // 导入库
+import map from './map'
+import common from './common'
 
 const initStateFunc = () => ({
   Layers: [
@@ -75,7 +77,10 @@
     visible: false,
     gateway_sn: '',
     is_dock: false,
-    payloads: null
+    payloads: null,
+    device_domain: '',
+    device_sub_type: '',
+    device_type: ''
   } as OSDVisible,
   waylineInfo: {
 
@@ -86,6 +91,7 @@
   hmsInfo: {} as {
     [sn: string]: DeviceHms[]
   },
+  hmsInfoDetailSn: '' as string,
   // 机场指令执行状态信息
   devicesCmdExecuteInfo: {
   } as DevicesCmdExecuteInfo,
@@ -132,6 +138,9 @@
     if (info.host.job_number !== undefined) {
       dock.work_osd = info.host
     }
+  },
+  SET_HMSInfo_DetailSn (state, data) {
+    state.hmsInfoDetailSn = data
   },
   SET_DRAW_VISIBLE_INFO (state, bool) {
     state.drawVisible = bool
@@ -230,7 +239,6 @@
       }
     })
     state.layerBaseInfo = obj
-    console.log('state.layerBaseInfo', state.layerBaseInfo)
   },
   getLayerInfo ({ state }, id:string) {
     return state.layerBaseInfo[id]
@@ -243,8 +251,14 @@
   mutations,
   actions,
   modules: {
-    getter,
+    map,
+    common
   },
+  plugins: [createPersistedState({
+    storage: window.sessionStorage,
+    key: 'drone-client',
+    paths: ['map', 'common'],
+  })]
 }
 
 const rootStore = createStore(storeOptions)

--
Gitblit v1.9.3