From e135ffaa14f74496402596502d2c1e3be9f38d85 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 21 Apr 2025 11:33:44 +0800
Subject: [PATCH] Merge branch 'test' of http://139.196.74.78:10010/r/drone/command-center-dashboard into test
---
src/components/DeviceJobDetails/JobRelatedEvents.vue | 1
src/views/SignMachineNest/MachineRight/InspectionRaskList.vue | 16 +++++++-
src/components/CommonWeather.vue | 5 ++
src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue | 28 +++++++-------
src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue | 20 +++++-----
src/hooks/useTaskDetails/useTaskDetails.js | 8 ++--
src/components/CurrentTaskDetails/CurrentTaskDetails.vue | 3 +
7 files changed, 49 insertions(+), 32 deletions(-)
diff --git a/src/components/CommonWeather.vue b/src/components/CommonWeather.vue
index 96e48f4..abec0ec 100644
--- a/src/components/CommonWeather.vue
+++ b/src/components/CommonWeather.vue
@@ -40,6 +40,11 @@
flylevel.value = res.data.data.adcode.replace(/0+$/, "").length
})
}
+
+
+
+
+
let intervalTime
onMounted(() => {
getWeatherSuggest()
diff --git a/src/components/CurrentTaskDetails/CurrentTaskDetails.vue b/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
index ea92bd8..8a39167 100644
--- a/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
+++ b/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
@@ -158,7 +158,8 @@
watch(wsInfo, setCurrentLiveUrl, { deep: true })
onMounted(() => {
- initTaskDetails(props?.id)
+ const params = {wayLineJobInfoId:props.id}
+ initTaskDetails(params)
EventBus.on('CurrentTaskDetails-timeStop', changeLineQuality)
EventBus.on('CurrentTaskDetails-getAiLiveUrl', getAiLiveUrl)
EventBus.on('CurrentTaskDetails-getDroneLiveUrl', getDroneLiveUrl)
diff --git a/src/components/DeviceJobDetails/JobRelatedEvents.vue b/src/components/DeviceJobDetails/JobRelatedEvents.vue
index 980e4c3..8c53a87 100644
--- a/src/components/DeviceJobDetails/JobRelatedEvents.vue
+++ b/src/components/DeviceJobDetails/JobRelatedEvents.vue
@@ -72,7 +72,6 @@
const resData = res?.data?.data || {}
list.value = resData.records
total.value = resData.total
-
})
}
diff --git a/src/hooks/useTaskDetails/useTaskDetails.js b/src/hooks/useTaskDetails/useTaskDetails.js
index 1dffb9d..22b88d5 100644
--- a/src/hooks/useTaskDetails/useTaskDetails.js
+++ b/src/hooks/useTaskDetails/useTaskDetails.js
@@ -5,10 +5,10 @@
const taskDetails = ref({})
const workspace_id = ref('')
- const getTaskDetails = async (id) => {
- if (!id) ElMessage.warning('请检查是否传入id')
+ const getTaskDetails = async (params) => {
+ if (!params.wayLineJobInfoId) ElMessage.warning('请检查是否传入id')
try {
- const res = await getJobDetails({ wayLineJobInfoId: id })
+ const res = await getJobDetails(params)
taskDetails.value = res.data.data
cb && await cb()
workspace_id.value = taskDetails.value.way_lines[0]?.workspace_id
@@ -24,4 +24,4 @@
workspace_id,
getTaskDetails
}
-}
\ No newline at end of file
+}
diff --git a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
index 67c4236..860834d 100644
--- a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
+++ b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
@@ -139,13 +139,13 @@
<CurrentTaskDetails
v-if="isShowCurrentTaskDetails"
v-model:show="isShowCurrentTaskDetails"
- :id="currentTaskDetailsId"
+ :id="rowData.id"
/>
<!-- 历史任务详情 -->
<DeviceJobDetails
- v-if="deviceJobDetailsShow"
- v-model:show="deviceJobDetailsShow"
- :wayLineJodInfoId="wayLineJodInfoId"
+ v-if="isShowDeviceJobDetails"
+ v-model:show="isShowDeviceJobDetails"
+ :wayLineJodInfoId="rowData.id"
/>
</template>
<script setup>
@@ -156,6 +156,7 @@
import { getMultipleDictionary } from '@/api/system/dictbiz'
import CurrentTaskDetails from '@/components/CurrentTaskDetails/CurrentTaskDetails.vue'
import DeviceJobDetails from '@/components/DeviceJobDetails/DeviceJobDetails.vue'
+import { ElMessage } from 'element-plus'
const isShowDetailsDialog = defineModel('show')
const dateRange = ref('')
const searchForm = reactive({
@@ -273,17 +274,16 @@
}
// 查看
const isShowCurrentTaskDetails = ref(false)
-const currentTaskDetailsId = ref(null)
-const deviceJobDetailsShow = ref(false)
-const wayLineJodInfoId = ref(null)
+const isShowDeviceJobDetails = ref(false)
+let rowData = ref({});
const viewDetail = row => {
- if (row.status === 1 || row.status === 2) {
- currentTaskDetailsId.value = row.id
- isShowCurrentTaskDetails.value = true
- }
- if (row.status === 3 || row.status === 5) {
- wayLineJodInfoId.value = row.id
- deviceJobDetailsShow.value = true
+ if (!row.device_sns.length) return ElMessage.warning('没有device_sns');
+ if (row.device_sns.length !== 1) return ElMessage.success('即将跳转到集群调度');
+ rowData.value = row? row : {};
+ if (row.status === 2 || row.status === 1){
+ isShowCurrentTaskDetails.value = true;
+ } else{
+ isShowDeviceJobDetails.value = true
}
}
onMounted(() => {
diff --git a/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue b/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
index e7d18bc..2253d3b 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>
@@ -201,6 +201,12 @@
const taskClick = item => {
if (tabIndex.value === 1) {
// 展示当前任务详情
+ if (!item?.device_sns.length) return ElMessage.warning('没有device_sns');
+ if (item?.device_sns?.length !== 1) {
+ // todo 后续开发
+ ElMessage.success('即将跳转到集群调度');
+ return
+ }
currentInfoId.value = item.wayline_job_info_id
isShowCurrentTaskDetails.value = true
} else {
@@ -212,7 +218,13 @@
watch([() => tabIndex.value, () => tableList.value], async ([newTabIndex, newTableList]) => {
if (newTabIndex == 1 && newTableList.length > 0) {
- await getTaskDetails(newTableList[0].wayline_job_info_id)
+ const params = {
+ // 航线信息id
+ wayLineJobInfoId:newTableList[0].wayline_job_info_id,
+ // 当前航线id
+ waylineJobId:newTableList[0].id,
+ }
+ await getTaskDetails(params)
}
})
diff --git a/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue b/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue
index fe788c3..de734ad 100644
--- a/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue
+++ b/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue
@@ -35,7 +35,7 @@
<span>{{ scope.row.event_number ? scope.row.event_number : '/' }}</span>
</template>
</el-table-column>
- <el-table-column prop="begin_time" label="任务时间" />
+ <el-table-column prop="create_time" label="任务时间" />
<el-table-column prop="creator_name" label="创建人" />
<el-table-column label="操作" >
<template #default="scope">
@@ -94,6 +94,8 @@
if (res.data.code !== 0) return;
jobListData.value = res.data.data.records;
total.value = res.data.data.total;
+ console.log('任务管理列表',jobListData.value);
+
});
};
// 状态文字
@@ -111,15 +113,13 @@
// 查看当前任务详情 如果是一台机则显示详情 如果是多台机则进入集群调度(暂未开发)
let rowData = ref({});
const handleDetail = (row) => {
- if (row.device_sns.length === 1){
- rowData.value = row? row : {};
- if (row.status === 2 || row.status === 1){
- isShowCurrentTaskDetails.value = true;
- } else{
- isShowDeviceJobDetails.value = true
- }
- }else{
- ElMessage.warning('即将跳转到集群调度');
+ if (!row.device_sns.length) return ElMessage.warning('没有device_sns');
+ if (row.device_sns.length !== 1) return ElMessage.success('即将跳转到集群调度');
+ rowData.value = row? row : {};
+ if (row.status === 2 || row.status === 1){
+ isShowCurrentTaskDetails.value = true;
+ } else{
+ isShowDeviceJobDetails.value = true
}
};
--
Gitblit v1.9.3