From 2800fa4f32f3900509cb4d6eefaf2bfaf54efdd7 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Mon, 21 Apr 2025 18:29:09 +0800
Subject: [PATCH] fix: 天气显示

---
 src/views/SignMachineNest/MachineRight/InspectionRaskList.vue |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue b/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
index a04b8a3..8e3384d 100644
--- a/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
+++ b/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
@@ -9,7 +9,7 @@
 					<div :class="tabIndex === 2 ? 'active' : ''" @click="tabClick(2)">历史任务</div>
 				</div>
 				<div class="search-box">
-					<el-input v-model="searchText" placeholder="请输入搜索内容" class="input-with-select">
+					<el-input v-model="searchText" placeholder="请输入关键字" class="input-with-select">
 						<template #append>
 							<el-button :icon="Search" @click="searchNickName" />
 						</template>
@@ -91,6 +91,7 @@
 
 // 单个机巢信息
 const singleUavHome = computed(() => store.state.home.singleUavHome)
+const osdVisible = computed(() => store.state.home.osdVisible);
 
 const isMore = ref(true)
 // 控制加载状态
@@ -226,6 +227,16 @@
 	}
 })
 
+// 监听如果当前任务飞行完毕,当前任务即消失
+watch(() => store.state.home.deviceState, async (newValue) => {
+	const deviceInfo = newValue?.deviceInfo[osdVisible.value.sn];
+	if (!deviceInfo) return
+	// 重新刷新数据
+	if (deviceInfo?.mode_code === 14) {
+		getJobList()
+	}
+});
+
 const { init: initTaskWayline, removeEntitys } = useTaskWayline()
 
 onMounted(async () => {

--
Gitblit v1.9.3