From 62cef2a7790cfc7b2987b676ee2691df759ff896 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Tue, 22 Jul 2025 14:59:36 +0800
Subject: [PATCH] feat:增加提示复制
---
src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue b/src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue
index c30beb7..c01804a 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,
@@ -17,6 +17,7 @@
<el-table-column prop="ai_type_str" label="关联算法" show-overflow-tooltip align="center" />
<el-table-column label="任务状态" align="center">
<template #default="scope">
+ <div class="base_f_c_c">
<span :style="{
color:
scope.row.status === 1
@@ -33,6 +34,16 @@
}">
{{ scope.row.status ? getStatusText(scope.row.status) : '' }}
</span>
+ <el-tooltip
+ class="item"
+ effect="dark"
+ :content="scope.row.reason"
+ placement="top"
+ popper-class="reasonNotFly ztzf-tooltip-box1"
+ >
+ <el-icon v-if="scope.row.status === 5 && scope.row.reason" color="#FF4848"><QuestionFilled /></el-icon>
+ </el-tooltip>
+ </div>
</template>
</el-table-column>
<el-table-column prop="is_circle_job" label="任务类型" align="center">
@@ -218,6 +229,18 @@
})
}
+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('复制任务名称成功')
+ })
+ }
+}
+
onMounted(() => {
// getJobList()
})
--
Gitblit v1.9.3