forked from drone/command-center-dashboard

罗广辉
2025-04-17 35a3526112292facedc6e4bcd18e92dbf6c5a575
feat: 传入id即可以使用当前任务详情
2 files modified
13 ■■■■■ changed files
src/components/CurrentTaskDetails/CurrentTaskDetails.vue 11 ●●●● patch | view | raw | blame | history
src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue 2 ●●● patch | view | raw | blame | history
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
src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue
@@ -59,7 +59,7 @@
  <!-- 添加任务 -->
  <AddTask v-model:show="isShowAddTask" @refresh="searchClick"/>
  <!-- 当前任务详情 -->
  <CurrentTaskDetails v-if="isShowCurrentTaskDetails"  v-model:show="isShowCurrentTaskDetails" :rowData="rowData"/>
  <CurrentTaskDetails v-if="isShowCurrentTaskDetails"  v-model:show="isShowCurrentTaskDetails" :id="rowData.id"/>
</template>
<script setup>