From 5fdaf3cff8add48bb5c1f0da74378b271f3cdbdf Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Mon, 07 Apr 2025 21:41:03 +0800
Subject: [PATCH] feat: 选择性清除实体

---
 src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue b/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue
index 5e15016..05beb46 100644
--- a/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue
+++ b/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue
@@ -1,6 +1,6 @@
 <!-- 任务统计表格 -->
 <template>
-  <SearchBox @search="searchClick"></SearchBox>
+  <SearchBox @search="searchClick" @addTask="handleAddTask"></SearchBox>
   <div class="task-intermediate-content">
     <el-table :data="jobListData" style="width: 100%" height="calc(100vh - 180px)">
       <el-table-column label="序号" width="60">
@@ -15,9 +15,7 @@
       <el-table-column prop="ai_type_str" label="关联算法"  />
       <el-table-column prop="status" label="任务状态" >
         <template #default="scope">
-          <el-tag :type="getStatusType(scope.row.status)">
-            {{ getStatusText(scope.row.status) }}
-          </el-tag>
+          {{ scope.row.status ? getStatusText(scope.row.status) : ''  }}
         </template>
       </el-table-column>
       <el-table-column prop="industry_type_str" label="任务类型" />
@@ -42,10 +40,12 @@
       />
     </div>
   </div>
+  <AddTask v-model:show="isShowAddTask" @refresh="searchClick"/>
 </template>
 
 <script setup>
 import SearchBox from '../SearchBox.vue';
+import AddTask from './AddTask.vue';
 import { jobList } from '@/api/home/task';
 
 const jobListParams = reactive({
@@ -66,6 +66,7 @@
 };
 // 状态文字
 const getStatusText = (status) => {
+  console.log('哒哒哒',status)
   const statusMap = {
     1: '待执行',
     2: '执行中',  
@@ -113,6 +114,12 @@
   getJobList();
 };
 
+// 新建任务
+const isShowAddTask = ref(false);
+const handleAddTask = () => {
+  isShowAddTask.value = true;
+};
+
 onMounted(() => {
   getJobList();
 });

--
Gitblit v1.9.3