From 35a3526112292facedc6e4bcd18e92dbf6c5a575 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Thu, 17 Apr 2025 08:58:55 +0800
Subject: [PATCH] feat: 传入id即可以使用当前任务详情
---
src/components/CurrentTaskDetails/CurrentTaskDetails.vue | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/components/CurrentTaskDetails/CurrentTaskDetails.vue b/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
index 4274cff..79e4a97 100644
--- a/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
+++ b/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
@@ -51,13 +51,7 @@
provide('lineQuality', lineQuality)
const isShow = defineModel('show')
-const props = defineProps({
- rowData: {
- // 任务列表row数据
- type: Object,
- default: () => ({}),
- },
-})
+const props = defineProps(['id'])
const currentLiveUrl = ref('')
const machineNestUrl = ref('')
const droneLiveUrl = ref('')
@@ -106,7 +100,8 @@
// 获取任务详情获取航线文件
const getTaskDetails = () => {
- getJobDetails({ wayLineJobInfoId: props.rowData.id }).then(async res => {
+ if (!props.id) ElMessage.warning('请检查是否传入id')
+ getJobDetails({ wayLineJobInfoId: props.id }).then(async res => {
taskDetails.value = res.data.data
currentLiveUrl.value = await getDeviceLiveUrl()
taskDetails.value.workspace_id = taskDetails.value.way_lines[0]?.workspace_id
--
Gitblit v1.9.3