From c832bf2e80ac465e71b7a1c1f7a59d4252030989 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 05 Aug 2025 17:33:08 +0800
Subject: [PATCH] feat:事件工单滚动条
---
src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue | 37 +++++++++++++++++++++++++++++++++----
1 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue b/src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue
index c01804a..8a16eff 100644
--- a/src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue
+++ b/src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue
@@ -3,15 +3,27 @@
<div class="task-intermediate-content">
<SearchBox @search="searchClick" @addTask="handleAddTask"></SearchBox>
<div class="task-table">
- <el-table border :data="jobListData" class="custom-header" @cell-click="handleCellClick">
+ <el-table border :data="jobListData" class="custom-header">
<el-table-column label="序号" type="index" width="60">
<template #default="{ $index }">
{{ ($index + 1 + (jobListParams.current - 1) * jobListParams.size).toString().padStart(2,
'0') }}
</template>
</el-table-column>
- <el-table-column prop="job_info_num" label="任务编号" show-overflow-tooltip align="center" />
- <el-table-column prop="name" label="任务名称" show-overflow-tooltip align="center" />
+ <el-table-column prop="job_info_num" label="任务编号" width="160">
+ <template #default="scope">
+ <el-tooltip-copy :content="scope.row.job_info_num" :showCopyText="true">
+ {{scope.row.job_info_num}}
+ </el-tooltip-copy>
+ </template>
+ </el-table-column>
+ <el-table-column prop="name" label="任务编号" width="160">
+ <template #default="scope">
+ <el-tooltip-copy :content="scope.row.name" :showCopyText="true">
+ {{scope.row.name}}
+ </el-tooltip-copy>
+ </template>
+ </el-table-column>
<el-table-column prop="dept_name" label="所属部门" width="200" align="center" />
<el-table-column prop="device_names" label="所属机巢" />
<el-table-column prop="ai_type_str" label="关联算法" show-overflow-tooltip align="center" />
@@ -101,12 +113,14 @@
import SearchBox from '../SearchBox.vue'
import AddTask from './AddTask.vue'
// import CurrentTaskDetails from '@/components/CurrentTaskDetails/CurrentTaskDetails.vue'
-import { jobList, cancelJobs, taskReturnLines, returnHomeCluster } from '@/api/job/task'
+import { jobList, cancelJobs, taskReturnLines, returnHomeCluster, statusChangedApi } from '@/api/job/task';
import { ElMessage } from 'element-plus'
import DeviceJobDetails from '../DeviceJobDetails.vue'
import CancelTaskDialog from '../CancelTaskDialog.vue'
import { useStore } from 'vuex'
import { cloneDeep } from 'lodash'
+import { inject, onBeforeUnmount } from 'vue';
+import ElTooltipCopy from '@/components/ElTooltipCopy.vue';
const store = useStore()
const singleUavHome = computed(() => store.state.home.singleUavHome)
const jobListParams = reactive({
@@ -241,6 +255,21 @@
}
}
+
+const changeKey = inject('changeKey')
+// 轮询查询是否刷新
+const polling = setInterval(async () => {
+ const res = await statusChangedApi()
+ if (res.data.data.DEVICE_REFRESH || res.data.data.JOB_REFRESH) {
+ getJobList()
+ changeKey.value++
+ }
+}, 4000)
+
+onBeforeUnmount(() => {
+ clearInterval(polling)
+})
+
onMounted(() => {
// getJobList()
})
--
Gitblit v1.9.3