增加起飞接口,并处理缓存问题
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||||
"DroneCtrl": "1.0.1",
|
"DroneCtrl": "1.0.2",
|
||||||
"axios": "^1.13.2",
|
"axios": "^1.13.2",
|
||||||
"element-plus": "^2.12.0",
|
"element-plus": "^2.12.0",
|
||||||
"gcoord": "^1.0.7",
|
"gcoord": "^1.0.7",
|
||||||
|
|||||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@@ -15,8 +15,8 @@ importers:
|
|||||||
specifier: ^1.0.1
|
specifier: ^1.0.1
|
||||||
version: 1.0.1
|
version: 1.0.1
|
||||||
DroneCtrl:
|
DroneCtrl:
|
||||||
specifier: 1.0.1
|
specifier: 1.0.2
|
||||||
version: 1.0.1
|
version: 1.0.2
|
||||||
axios:
|
axios:
|
||||||
specifier: ^1.13.2
|
specifier: ^1.13.2
|
||||||
version: 1.13.2
|
version: 1.13.2
|
||||||
@@ -245,8 +245,8 @@ packages:
|
|||||||
'@vueuse/shared@9.13.0':
|
'@vueuse/shared@9.13.0':
|
||||||
resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==}
|
resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==}
|
||||||
|
|
||||||
DroneCtrl@1.0.1:
|
DroneCtrl@1.0.2:
|
||||||
resolution: {integrity: sha512-3ibzb0sXZGXAkbSTg4Zb8heTx6ASBkWaI2yAO8V+4/Y2ygULruPCzb8o3c89wWlnfQQ/AALWlNmkpVV/ezBujQ==}
|
resolution: {integrity: sha512-EQWN1q8S4mN64gMlBQkQyJIYSBVE75YLPsYI+L/67TPypOyGWnI/kxCYMPY1hNVB8sIxJO0Z3DU3wlKxwg4Qiw==}
|
||||||
|
|
||||||
async-validator@4.2.5:
|
async-validator@4.2.5:
|
||||||
resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==}
|
resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==}
|
||||||
@@ -770,7 +770,7 @@ snapshots:
|
|||||||
- '@vue/composition-api'
|
- '@vue/composition-api'
|
||||||
- vue
|
- vue
|
||||||
|
|
||||||
DroneCtrl@1.0.1: {}
|
DroneCtrl@1.0.2: {}
|
||||||
|
|
||||||
async-validator@4.2.5: {}
|
async-validator@4.2.5: {}
|
||||||
|
|
||||||
|
|||||||
17
src/App.vue
17
src/App.vue
@@ -262,15 +262,16 @@ const initWebSocket = () => {
|
|||||||
// 起飞处理
|
// 起飞处理
|
||||||
const handleTakeoff = () => {
|
const handleTakeoff = () => {
|
||||||
// 检查是否已有围栏
|
// 检查是否已有围栏
|
||||||
if (fences.value.length === 0) {
|
// if (fences.value.length === 0) {
|
||||||
ElMessage.warning('请先绘制电子围栏后再起飞')
|
// ElMessage.warning('请先绘制电子围栏后再起飞')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 如果未连接,先连接
|
// // 如果未连接,先连接
|
||||||
if (!wsConnected.value) {
|
// if (!wsConnected.value) {
|
||||||
initWebSocket()
|
// initWebSocket()
|
||||||
}
|
// }
|
||||||
|
ctrl.TakeoffAndAutoExecTask({});
|
||||||
|
|
||||||
// 设置飞行状态
|
// 设置飞行状态
|
||||||
isFlying.value = true
|
isFlying.value = true
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ function upload(url, params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// export let host = `${window.location.protocol}//${window.location.host}`;
|
// export let host = `${window.location.protocol}//${window.location.host}`;
|
||||||
|
// export let host = "http://192.168.43.97:5678";
|
||||||
export let host = "http://192.168.3.81:5678";
|
export let host = "http://192.168.3.81:5678";
|
||||||
|
|
||||||
export const getConfig = () => {
|
export const getConfig = () => {
|
||||||
|
|||||||
@@ -5,4 +5,7 @@ import vue from '@vitejs/plugin-vue'
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
base: "/web/",
|
base: "/web/",
|
||||||
|
optimizeDeps: {
|
||||||
|
exclude: ['DroneCtrl']
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user