From 559b2e34c983f615b6d6747f52c801022c561803 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期一, 27 十月 2025 23:05:08 +0800
Subject: [PATCH] feat: 优化任务显示列表
---
ruoyi-ui/src/views/task/general/index.vue | 34 +++++++++++++++++++++++++++-------
1 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/ruoyi-ui/src/views/task/general/index.vue b/ruoyi-ui/src/views/task/general/index.vue
index 8988020..44fcef9 100644
--- a/ruoyi-ui/src/views/task/general/index.vue
+++ b/ruoyi-ui/src/views/task/general/index.vue
@@ -94,12 +94,13 @@
<el-table v-loading="loading" :data="taskList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
- <el-table-column label="浠诲姟缂栧彿" align="center" prop="taskCode">
+ <el-table-column label="浠诲姟缂栧彿" align="center" prop="taskCode" min-width="180">
<template slot-scope="scope">
<el-button
type="text"
@click="handleView(scope.row)"
v-hasPermi="['task:general:query']"
+ style="font-family: 'Courier New', monospace; font-size: 13px;"
>{{ scope.row.taskCode }}</el-button>
</template>
</el-table-column>
@@ -108,6 +109,24 @@
<dict-tag :options="dict.type.sys_task_type" :value="scope.row.taskType"/>
<el-tag v-if="scope.row.taskType === 'EMERGENCY_TRANSFER'" type="danger" size="mini" style="margin-left: 5px;">
<i class="el-icon-warning"></i>
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鍚屾鐘舵��" align="center" prop="syncStatus" width="120" v-if="hasEmergencyTask">
+ <template slot-scope="scope">
+ <span v-if="scope.row.taskType !== 'EMERGENCY_TRANSFER'" style="color: #C0C4CC;">--</span>
+ <el-tag v-else-if="!scope.row.emergencyInfo" type="info" size="mini">--</el-tag>
+ <el-tag v-else-if="scope.row.emergencyInfo.syncStatus === 0" type="info" size="mini">
+ <i class="el-icon-warning"></i> 鏈悓姝�
+ </el-tag>
+ <el-tag v-else-if="scope.row.emergencyInfo.syncStatus === 1" type="warning" size="mini">
+ <i class="el-icon-loading"></i> 鍚屾涓�
+ </el-tag>
+ <el-tag v-else-if="scope.row.emergencyInfo.syncStatus === 2" type="success" size="mini">
+ <i class="el-icon-success"></i> 宸插悓姝�
+ </el-tag>
+ <el-tag v-else-if="scope.row.emergencyInfo.syncStatus === 3" type="danger" size="mini">
+ <i class="el-icon-error"></i> 鍚屾澶辫触
</el-tag>
</template>
</el-table-column>
@@ -126,14 +145,11 @@
</el-table-column>
<el-table-column label="璁″垝寮�濮嬫椂闂�" align="center" prop="plannedStartTime" width="180">
<template slot-scope="scope">
- <span>{{ parseTime(scope.row.plannedStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+ <span v-if="scope.row.plannedStartTime">{{ parseTime(scope.row.plannedStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+ <span v-else style="color: #C0C4CC;">--</span>
</template>
</el-table-column>
- <el-table-column label="璁″垝缁撴潫鏃堕棿" align="center" prop="plannedEndTime" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.plannedEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
- </template>
- </el-table-column>
+
<el-table-column label="鍒涘缓浜�" align="center" prop="creatorName" />
<el-table-column label="鎵ц浜�" align="center" prop="assigneeName" />
<el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180">
@@ -400,6 +416,8 @@
total: 0,
// 浠诲姟绠$悊琛ㄦ牸鏁版嵁
taskList: [],
+ // 鏄惁鏈夋�ユ晳杞繍浠诲姟锛堢敤浜庢帶鍒跺悓姝ョ姸鎬佸垪鏄剧ず锛�
+ hasEmergencyTask: false,
// 寮瑰嚭灞傛爣棰�
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
@@ -472,6 +490,8 @@
listTask(this.queryParams).then(response => {
this.taskList = response.rows;
this.total = response.total;
+ // 妫�鏌ユ槸鍚︽湁鎬ユ晳杞繍浠诲姟锛岀敤浜庢帶鍒跺悓姝ョ姸鎬佺浉鍏冲垪鐨勬樉绀�
+ this.hasEmergencyTask = this.taskList.some(task => task.taskType === 'EMERGENCY_TRANSFER');
this.loading = false;
});
},
--
Gitblit v1.9.1