|
|
|
@ -99,10 +99,21 @@
|
|
|
|
|
<el-button type="primary" size="mini" plain icon="el-icon-view"
|
|
|
|
|
>查看</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="warning" size="mini" plain icon="el-icon-s-check"
|
|
|
|
|
<el-button
|
|
|
|
|
type="warning"
|
|
|
|
|
size="mini"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-s-check"
|
|
|
|
|
v-if="scope.row.taskStatus == 1 && scope.row.taskStatus != 0"
|
|
|
|
|
>审核</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="danger" size="mini" plain icon="el-icon-delete"
|
|
|
|
|
<el-button
|
|
|
|
|
type="danger"
|
|
|
|
|
size="mini"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="handleClose(scope.row)"
|
|
|
|
|
v-if="scope.row.taskStatus == 1 && scope.row.taskStatus != 0"
|
|
|
|
|
>关闭</el-button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
@ -167,6 +178,34 @@ export default {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 关闭
|
|
|
|
|
handleClose(row) {
|
|
|
|
|
this.$confirm("此操作将关闭任务, 是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
assetTaskclose({ taskId: row.id, taskName: row.taskName }).then(
|
|
|
|
|
(res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "关闭成功!",
|
|
|
|
|
});
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "info",
|
|
|
|
|
message: "已取消关闭",
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 修改table背景色
|
|
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
|
|
|
if (rowIndex % 2 !== 0) {
|
|
|
|
|