任务创建关闭功能以及操作按钮权限

main
许宏杰 2 months ago
parent 43d52a9111
commit cac1b71c14

@ -99,10 +99,21 @@
<el-button type="primary" size="mini" plain icon="el-icon-view" <el-button type="primary" size="mini" plain icon="el-icon-view"
>查看</el-button >查看</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
> >
<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 >关闭</el-button
> >
</template> </template>
@ -167,6 +178,34 @@ export default {
this.getList(); this.getList();
}, },
methods: { 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 // table
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) { if (rowIndex % 2 !== 0) {

Loading…
Cancel
Save