This commit is contained in:
24kycj
2024-12-03 20:31:02 +08:00
parent 8eee91ee3a
commit 39be1d3f1a
3 changed files with 47 additions and 18 deletions
+33 -2
View File
@@ -242,7 +242,7 @@
<div class="flex_box work_top">
<div class="work_top_text">作业列表</div>
</div>
<el-table row-key="task_uuid" default-expand-all class="work_table" :data="task_list" empty-text="暂无作业列表" :tree-props="{children: 'ass_task', hasChildren: 'hasChildren'}">
<el-table row-key="id" default-expand-all class="work_table" :data="task_list" empty-text="暂无作业列表" :tree-props="{children: 'ass_task', hasChildren: 'hasChildren'}">
<!-- <el-table-column type="index" width="80" label="序号"></el-table-column> -->
<el-table-column prop="task_uuid" label="作业ID"></el-table-column>
<el-table-column prop="task_name" label="任务名称"></el-table-column>
@@ -263,6 +263,7 @@
<template slot-scope="scope">
<div class="flex_box work_status_box">
<div>{{ statusList[scope.row.task_status] }}</div>
<el-button v-if="scope.row.task_status == 5" @click="workRetry(scope.$index)" size="mini" type="primary" class="work_status_retry">重试</el-button>
<!-- <i class="el-icon-caret-bottom"></i> -->
</div>
</template>
@@ -396,8 +397,9 @@ export default {
if (item.ass_task&&item.ass_task.length) {
let task_size = 0
item.cdType = this.$store.state.chat.CDTypes[item.ass_task[0].cd_type]
item.id = item.task_uuid
item.ass_task.forEach((item2, idx) => {
item2.task_uuid = item.task_uuid+'_'+(idx+1)
item2.id = item.task_uuid+'_'+(idx+1)
item2.cdType = this.$store.state.chat.CDTypes[item2.cd_type] + '_' + (idx+1)
task_size = this.$accAdd(task_size, item2.task_size)
})
@@ -702,6 +704,27 @@ export default {
}
that.showAll = !that.showAll
},
// 作业重试
workRetry(e) {
that.$store.dispatch('chat/websocketsend', {
req_name: 'retry task',
req_type: 1,
req_info: {
task_uuid: that.task_list[e].task_uuid
}
}).then(() => {
that.$message({
message: '重试成功',
type: 'success'
})
that.task_list[e].task_status = 1
if (that.task_list[e].ass_task&&that.task_list[e].ass_task.length > 0) {
that.task_list[e].ass_task.forEach(item => {
item.task_status = 1
})
}
})
},
// 跳转设置
goSet(e) {
that.$router.push({ path: e })
@@ -1321,6 +1344,14 @@ $red: #ff0000;
font-size: 14px;
color: #000000;
height: 30px;
.work_status_retry {
width: 40px;
height: 22px;
line-height: 22px;
font-size: 12px;
padding: 0;
margin-left: 12px;
}
}
}
.child_table {