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 |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/store/index.ts b/src/store/index.ts
index 56d32af..0c1c5d0 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -5,15 +5,15 @@
 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 '/@/store/common'
+import common from './common'
 
 const initStateFunc = () => ({
   Layers: [
     {
-      name: '默认',
+      name: 'default',
       id: '',
       is_distributed: true,
       elements: [],
@@ -22,7 +22,7 @@
       type: 1
     },
     {
-      name: '共享',
+      name: 'share',
       id: '',
       is_distributed: true,
       elements: [],
@@ -77,7 +77,10 @@
     visible: false,
     gateway_sn: '',
     is_dock: false,
-    payloads: null
+    payloads: null,
+    device_domain: '',
+    device_sub_type: '',
+    device_type: ''
   } as OSDVisible,
   waylineInfo: {
 
@@ -88,6 +91,7 @@
   hmsInfo: {} as {
     [sn: string]: DeviceHms[]
   },
+  hmsInfoDetailSn: '' as string,
   // 机场指令执行状态信息
   devicesCmdExecuteInfo: {
   } as DevicesCmdExecuteInfo,
@@ -134,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
@@ -232,7 +239,6 @@
       }
     })
     state.layerBaseInfo = obj
-    console.log('state.layerBaseInfo', state.layerBaseInfo)
   },
   getLayerInfo ({ state }, id:string) {
     return state.layerBaseInfo[id]
@@ -245,10 +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