[add] 同步前端代码
This commit is contained in:
12
plus-ui/src/store/modules/bigUpload.ts
Normal file
12
plus-ui/src/store/modules/bigUpload.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
export const bigUpload = defineStore('bigUpload', {
|
||||
state: (): { panelShow: boolean } => ({
|
||||
panelShow: false
|
||||
}),
|
||||
actions: {
|
||||
async setPanelShow(bool: boolean) {
|
||||
this.panelShow = bool;
|
||||
}
|
||||
}
|
||||
});
|
||||
42
plus-ui/src/store/modules/drone.ts
Normal file
42
plus-ui/src/store/modules/drone.ts
Normal file
@ -0,0 +1,42 @@
|
||||
// stores/useAirStore.js
|
||||
import { getLocal } from '@/utils';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
export const useAirStore = defineStore('air', {
|
||||
state: () => ({
|
||||
debugValue: false, // 远程调试模式
|
||||
HatchCoverValue: false, // 舱盖
|
||||
AerocraftValue: false, // 飞行器
|
||||
gateWay: JSON.parse(getLocal('airGateway')) || null, //
|
||||
queryParams: {
|
||||
target_height: 100, //目标点高度
|
||||
rth_altitude: 100, //返航高度
|
||||
commander_flight_height: 100, //指点飞行高度
|
||||
rc_lost_action: 2, //遥控器失控动作
|
||||
rth_mode: 1, //返航模式设置值
|
||||
commander_mode_lost_action: 1, //指点飞行失控动作
|
||||
commander_flight_mode: 1, //指点飞行模式设置值
|
||||
max_speed: 12, //一键起飞的飞行过程中能达到的最大速度
|
||||
security_takeoff_height: 100, //安全起飞高度
|
||||
target_latitude: 0, //目标点纬度
|
||||
target_longitude: 0, //目标点经度
|
||||
height: 100
|
||||
}
|
||||
}),
|
||||
|
||||
actions: {
|
||||
UP_debugValue(payload) {
|
||||
localStorage.setItem('debugValue', JSON.stringify(payload));
|
||||
},
|
||||
UP_HatchCoverValue(payload) {
|
||||
localStorage.setItem('HatchCoverValue', JSON.stringify(payload));
|
||||
},
|
||||
UP_AerocraftValue(payload) {
|
||||
localStorage.setItem('AerocraftValue', JSON.stringify(payload));
|
||||
},
|
||||
SET_GATEWAY(gateWay) {
|
||||
this.gateWay = gateWay;
|
||||
localStorage.setItem('airGateway', JSON.stringify(gateWay));
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user