This commit is contained in:
24kycj
2024-12-03 00:12:08 +08:00
parent 1dba691ab9
commit 8eee91ee3a
3 changed files with 17 additions and 22 deletions
+12 -17
View File
@@ -242,16 +242,11 @@
<div class="flex_box work_top">
<div class="work_top_text">作业列表</div>
</div>
<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 row-key="task_uuid" 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>
<!-- <el-table-column prop="DataSource" label="来源"></el-table-column> -->
<el-table-column label="类型">
<template slot-scope="scope">
<div>{{ scope.row.ass_task&&scope.row.ass_task[0]&&CDTypes[scope.row.ass_task[0].cd_type] }}</div>
</template>
</el-table-column>
<el-table-column label="类型" prop="cdType"></el-table-column>
<el-table-column prop="task_size" label="大小">
<template slot-scope="scope">
<div>{{ $filterSize(scope.row.task_size) }}</div>
@@ -398,12 +393,12 @@ export default {
let tasks = [...val]
let list = []
tasks.forEach((item, index) => {
item.id = item.task_uuid
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.ass_task.forEach((item2, idx) => {
item2.id = item.task_uuid+'_'+(idx+1)
// item2.task_name = item.task_name+'_'+(idx+1)
item2.task_uuid = 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)
})
item.task_size = task_size
@@ -655,13 +650,13 @@ export default {
},
// 新建作业
showWork() {
// if (!that.workStatus) {
// that.$message({
// message: '请先连接服务',
// type: 'warning'
// })
// return
// }
if (!that.workStatus) {
that.$message({
message: '请先连接服务',
type: 'warning'
})
return
}
that.isNew = true
that.workShow = true
that.$nextTick(() => {