From b738a53b3c45d6ba801859c7902f2ce12fab7cf6 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Wed, 17 Sep 2025 11:01:20 +0800
Subject: [PATCH] feat:去掉复核状态
---
src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue b/src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue
index 5b3a96a..c9105e0 100644
--- a/src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue
+++ b/src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue
@@ -3,7 +3,7 @@
<div class="task-intermediate-content">
<SearchBox @search="searchClick" @addTask="handleAddTask"></SearchBox>
<div class="task-table">
- <el-table border :data="jobListData" class="custom-header">
+ <el-table border :data="jobListData" class="custom-header" @cell-click="handleCellClick">
<el-table-column label="序号" type="index" width="60">
<template #default="{ $index }">
{{ ($index + 1 + (jobListParams.current - 1) * jobListParams.size).toString().padStart(2,
@@ -101,12 +101,13 @@
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';
const store = useStore()
const singleUavHome = computed(() => store.state.home.singleUavHome)
const jobListParams = reactive({
@@ -229,6 +230,33 @@
})
}
+function handleCellClick(row, column) {
+ if (column.no === 1) {
+ navigator.clipboard.writeText(row.job_info_num).then(() => {
+ ElMessage.success('复制任务编号成功')
+ })
+ } else if (column.no === 2) {
+ navigator.clipboard.writeText(row.name).then(() => {
+ ElMessage.success('复制任务名称成功')
+ })
+ }
+}
+
+
+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