更新
This commit is contained in:
@@ -142,27 +142,25 @@ export default {
|
||||
const _this = this;
|
||||
dialog
|
||||
.showOpenDialog({
|
||||
properties: ["openFile"],
|
||||
properties: ["multiSelections"],
|
||||
})
|
||||
.then(async (rel) => {
|
||||
console.log(rel);
|
||||
for (const item of rel.filePaths) {
|
||||
const stats = fs.statSync(item);
|
||||
let folder = false
|
||||
if (stats.isFile()) {
|
||||
folder = true
|
||||
}
|
||||
await fs.stat(item, function (err, res) {
|
||||
if (err) {
|
||||
return false;
|
||||
}
|
||||
_this.insertList({
|
||||
name: getFileName(item),
|
||||
path: item,
|
||||
size: res.size,
|
||||
folder: folder,
|
||||
await fs.stat(item, function (err, res) {
|
||||
if (err) {
|
||||
return false;
|
||||
}
|
||||
_this.insertList({
|
||||
name: getFileName(item),
|
||||
path: item,
|
||||
size: res.size,
|
||||
folder: false,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -116,10 +116,10 @@
|
||||
<div class="flex_box flex_row_between work_left_top">
|
||||
<div class="flex_box">
|
||||
<div class="work_left_top_label">内容</div>
|
||||
<!-- <div @click="addFolder" class="flex_box work_left_top_btn">
|
||||
<div @click="addFolder" class="flex_box work_left_top_btn">
|
||||
<img src="@/assets/images/file_icon.png" />
|
||||
<div>添加文件夹</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div @click="addFile" class="flex_box work_left_top_btn">
|
||||
<img src="@/assets/images/paper_icon.png" />
|
||||
<div>添加文件</div>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user