From fc32856528eec1bc936fb5e0aa71157e828343ee Mon Sep 17 00:00:00 2001
From: husq <931347610@qq.com>
Date: Mon, 16 Oct 2023 14:38:41 +0800
Subject: [PATCH] 去除console
---
src/store/common.ts | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/src/store/common.ts b/src/store/common.ts
index ea97352..566b858 100644
--- a/src/store/common.ts
+++ b/src/store/common.ts
@@ -1,8 +1,17 @@
import { MutationTree } from 'vuex'
+import { ControlSource } from '/@/types/device'
const state = () => ({
projectId: null as string | null,
dockSns: null as string | null,
+ snList: [] as string[],
+ projectName: '' as string,
+ // 地图setting
+ mapSetting: {
+ mode: 0, // 0为标准地图, 1为卫星地图
+ roadLine: true,
+ },
+ droneControlSource: ControlSource.A
})
export type RootStateType = ReturnType<typeof state>
const mutations: MutationTree<RootStateType> = {
@@ -12,6 +21,25 @@
SET_DOCK_SN (state, dockSns: string) {
state.dockSns = dockSns
+ },
+
+ SET_SN_LIST (state, snList: string[]) {
+ state.snList = snList
+ },
+ SET_PROJECT_NAME (state, projectName: string) {
+ state.projectName = projectName
+ },
+ // 设置地图模式
+ SET_MAP_SETTING_MODE (state, mode: number) {
+ state.mapSetting.mode = mode
+ },
+ // 设置地图路网
+ SET_MAP_SETTING_ROAD_LINE (state, roadLine: boolean) {
+ state.mapSetting.roadLine = roadLine
+ },
+ // 设置飞行控制
+ SET_DRONE_CONTROL_SOURCE (state, droneControlSource: ControlSource) {
+ state.droneControlSource = droneControlSource
}
}
export default {
--
Gitblit v1.9.3