From 1d40b1b5a6c3ebcdda71aa99d5c866129e669bc9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E5=A6=8D?= <1455167345@qq.com>
Date: Fri, 18 Jul 2025 14:41:28 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/plugin/video/index.ts | 33 +++++++++----------
src/views/demo/workmanagement/ceshi/index.vue | 6 ++++
.../flightoperation/src/AirportLive.vue | 23 +++++++++++--
.../flightoperation/src/LoadControl.vue | 12 +++----
4 files changed, 48 insertions(+), 26 deletions(-)
diff --git a/src/plugin/video/index.ts b/src/plugin/video/index.ts
index c5db646..073fe85 100644
--- a/src/plugin/video/index.ts
+++ b/src/plugin/video/index.ts
@@ -138,7 +138,7 @@ class LiveStreamPlugin {
* zpkzxx:照片扩展信息
*/
console.log('LiveStreamPlugin takePicture', callback);
- servicesTopic(sn, {
+ const querys = {
bid: bid,
method: 'camera_photo_take',
tid: buildGUID(),
@@ -146,7 +146,9 @@ class LiveStreamPlugin {
data: {
payload_index: uav.camera_index,
},
- });
+ };
+ console.log(querys);
+ servicesTopic(sn, querys);
const data = {};
callback(data);
}
@@ -212,25 +214,20 @@ class LiveStreamPlugin {
client.subscribe('thing/product/' + serialNum + '/events', { qos: 2 }, () => {});
// 接收消息
let id = '';
- client.on('message', async (topic, message) => {
- const rs = JSON.parse(message);
- if (
- rs.method == 'flighttask_progress' &&
- rs.data.output.status == 'in_progress' &&
- id == ''
- ) {
- console.log(rs);
- id = rs.data.output.ext.flight_id;
- return new Promise((resolve, reject) => {
+ return new Promise((resolve, reject) => {
+ client.on('message', async (topic, message) => {
+ const rs = JSON.parse(message);
+ if (
+ rs.method == 'flighttask_progress' &&
+ rs.data.output.status == 'in_progress' &&
+ id == ''
+ ) {
+ id = rs.data.output.ext.flight_id;
getDroneDockflightInfos(id).then((res) => {
- console.log(res);
resolve(res);
});
- });
- return await getDroneDockflightInfos(id).then((res) => {
- return res;
- });
- }
+ }
+ });
});
}
}
diff --git a/src/views/demo/workmanagement/ceshi/index.vue b/src/views/demo/workmanagement/ceshi/index.vue
index 031bf64..813c961 100644
--- a/src/views/demo/workmanagement/ceshi/index.vue
+++ b/src/views/demo/workmanagement/ceshi/index.vue
@@ -7,6 +7,7 @@