|
@@ -69,12 +69,13 @@
|
|
v-hasPermi="['community:task:edit']"
|
|
v-hasPermi="['community:task:edit']"
|
|
>结束</el-button>
|
|
>结束</el-button>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="scope.row.status == 0"
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
- icon="el-icon-edit"
|
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
|
|
|
+ icon="el-icon-check"
|
|
|
|
+ @click="start(scope.row)"
|
|
v-hasPermi="['community:task:edit']"
|
|
v-hasPermi="['community:task:edit']"
|
|
- >修改</el-button>
|
|
|
|
|
|
+ >开始</el-button>
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
@@ -228,24 +229,23 @@ export default {
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "添加检测任务管理";
|
|
this.title = "添加检测任务管理";
|
|
},
|
|
},
|
|
- /** 修改按钮操作 */
|
|
|
|
- handleUpdate(row) {
|
|
|
|
- this.reset();
|
|
|
|
- const natTaskId = row.natTaskId || this.ids
|
|
|
|
- getTask(natTaskId).then(response => {
|
|
|
|
- this.form = response.data;
|
|
|
|
- this.open = true;
|
|
|
|
- this.title = "修改检测任务管理";
|
|
|
|
|
|
+ /** 开始按钮操作 */
|
|
|
|
+ start(row) {
|
|
|
|
+ const { natTaskId } = row;
|
|
|
|
+ updateTask({ natTaskId, status: '1' }).then(response => {
|
|
|
|
+ this.$modal.msgSuccess("已结束");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
/** 结束按钮操作 */
|
|
/** 结束按钮操作 */
|
|
close(row) {
|
|
close(row) {
|
|
const { natTaskId } = row;
|
|
const { natTaskId } = row;
|
|
- updateTask({ natTaskId, status: '2' }).then(response => {
|
|
|
|
- this.$modal.msgSuccess("已结束");
|
|
|
|
- this.open = false;
|
|
|
|
- this.getList();
|
|
|
|
- });
|
|
|
|
|
|
+ updateTask({ natTaskId, status: '2' }).then(response => {
|
|
|
|
+ this.$modal.msgSuccess("已结束");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
},
|
|
},
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
submitForm() {
|