From f6d9825c7fd356694858f0f28a32677d6db0c082 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 21 Apr 2025 08:33:32 +0800
Subject: [PATCH] feat:调整创建任务名称和其他bug
---
src/views/SignMachineNest/MachineRight/MachineMonitor.vue | 18 ++++++++++++++++--
src/views/SignMachineNest/MachineRight/InspectionRaskList.vue | 4 ++++
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue b/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
index e3f3323..895f350 100644
--- a/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
+++ b/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
@@ -457,6 +457,10 @@
.left-b {
height: 21px;
line-height: 21px;
+ width: 260px; // 添加固定宽度
+ white-space: nowrap; // 不换行
+ overflow: hidden; // 超出隐藏
+ text-overflow: ellipsis; // 显示省略号
img {
width: 16px;
height: 16px;
diff --git a/src/views/SignMachineNest/MachineRight/MachineMonitor.vue b/src/views/SignMachineNest/MachineRight/MachineMonitor.vue
index 993dfd4..f689391 100644
--- a/src/views/SignMachineNest/MachineRight/MachineMonitor.vue
+++ b/src/views/SignMachineNest/MachineRight/MachineMonitor.vue
@@ -24,7 +24,7 @@
const osdVisible = computed(() => store.state.home.osdVisible);
// 直播地址
let airPortUrl = ref('')
-// 获取直播地址
+// 获取机巢直播地址
const getVideoUrl = (sn, quality) => {
if (singleUavHome.value.status === 'OFFLINE') return;
liveStart(sn, quality).then(res => {
@@ -33,16 +33,27 @@
})
}
+// 获取无人机直播url
+async function getDroneLiveUrl(sn, quality) {
+ airPortUrl.value = ''
+ await nextTick()
+ const res = await liveStart(sn, quality)
+ airPortUrl.value = res.data.data.rtcs_url
+}
+
const isTakeOff = ref(false)
// 监听ws消息
watch(() => store.state.home.deviceState, async (newValue) => {
+ console.log(osdVisible.value.sn,'333333')
const deviceInfo = newValue?.deviceInfo[osdVisible.value.sn]
if (!deviceInfo) return
+
const currentIsTakeOff = ![14, 0].includes(deviceInfo?.mode_code)
+ console.log(isTakeOff.value, currentIsTakeOff,'8888')
// 如果还是之前的状态,不切换
if (isTakeOff.value === currentIsTakeOff) return
isTakeOff.value = currentIsTakeOff
- isTakeOff.value ? await getVideoUrl(osdVisible.value.sn, 2) : await getVideoUrl(singleUavHome.value.device_sn, 1)
+ isTakeOff.value ? await getDroneLiveUrl(osdVisible.value.sn, 2) : await getVideoUrl(singleUavHome.value.device_sn, 1)
},
{
immediate: true,
@@ -53,6 +64,9 @@
onMounted(() => {
getVideoUrl(singleUavHome.value.device_sn, 1)
})
+onUnmounted(() => {
+ airPortUrl.value = ''
+})
</script>
<style lang="scss" scoped>
--
Gitblit v1.9.3