From aec00ecc093be803860c8675cbe1c4c776a7cb4e Mon Sep 17 00:00:00 2001
From: GuLiMmo <2820890765@qq.com>
Date: Tue, 19 Mar 2024 17:49:21 +0800
Subject: [PATCH] update: 新建航线、事件编辑、kmz文件问题修改
---
src/store/common.ts | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/src/store/common.ts b/src/store/common.ts
index b886078..c3ebb0c 100644
--- a/src/store/common.ts
+++ b/src/store/common.ts
@@ -1,10 +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
+ projectName: '' as string,
+ // 地图setting
+ mapSetting: {
+ mode: 0, // 0为标准地图, 1为卫星地图
+ roadLine: true,
+ },
+ droneControlSource: ''
})
export type RootStateType = ReturnType<typeof state>
const mutations: MutationTree<RootStateType> = {
@@ -21,6 +28,18 @@
},
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