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/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
index 67c4236..591a78a 100644
--- a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
+++ b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
@@ -107,7 +107,7 @@
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="industry_type_str" label="任务类型" />
- <el-table-column prop="begin_time" label="任务时间" width="150" />
+ <el-table-column prop="cycle_time_value" label="任务时间" width="150" />
<el-table-column prop="event_number" label="关联事件">
<template #default="scope">
<span>{{ scope.row.event_number ? scope.row.event_number : '/' }}</span>
@@ -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({
@@ -240,6 +241,7 @@
if (res.data.code !== 0) return
taskDetailData.value = res.data.data.records
total.value = res.data.data.total
+
})
}
// 机巢列表数据
@@ -273,17 +275,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(() => {
--
Gitblit v1.9.3