|
|
@ -53,7 +53,8 @@
|
|
|
|
<el-table-column prop="action" label="操作" fixed="right" width="240">
|
|
|
|
<el-table-column prop="action" label="操作" fixed="right" width="240">
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
|
<div v-if="scope.row.status == 0">
|
|
|
|
<div v-if="scope.row.status == 0">
|
|
|
|
<el-link type="primary" @click="goEdit(scope.row.id)">编辑</el-link>
|
|
|
|
<el-link type="primary" @click="goEdit(scope.row.id)" style="margin-right: 8px">编辑</el-link>
|
|
|
|
|
|
|
|
<el-link @click="hanlderDelete(scope.row.id)" type="danger">删除</el-link>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-else>
|
|
|
|
<div v-else>
|
|
|
|
<el-link type="primary" @click="goDetail(scope.row.id)" style="margin-right: 8px">查看</el-link>
|
|
|
|
<el-link type="primary" @click="goDetail(scope.row.id)" style="margin-right: 8px">查看</el-link>
|
|
|
@ -156,7 +157,23 @@ export default defineComponent({
|
|
|
|
).then(() => {
|
|
|
|
).then(() => {
|
|
|
|
this.proxy.$post("/task/del", {id: id}).then(res => {
|
|
|
|
this.proxy.$post("/task/del", {id: id}).then(res => {
|
|
|
|
this.getData();
|
|
|
|
this.getData();
|
|
|
|
this.$message.success(res.data);
|
|
|
|
this.$message.success('操作成功');
|
|
|
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
|
|
|
}).catch(() => {})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
hanlderDelete(id) {
|
|
|
|
|
|
|
|
this.$alert(
|
|
|
|
|
|
|
|
'是否删除?', //文字
|
|
|
|
|
|
|
|
'删除', //标题
|
|
|
|
|
|
|
|
{type: 'warning'}
|
|
|
|
|
|
|
|
).then(() => {
|
|
|
|
|
|
|
|
this.proxy.$post("/task/dele", {id: id}).then(res => {
|
|
|
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
|
|
|
this.getData();
|
|
|
|
|
|
|
|
this.$message.success('删除成功');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.msg);
|
|
|
|
|
|
|
|
}
|
|
|
|
}).catch(() => {});
|
|
|
|
}).catch(() => {});
|
|
|
|
}).catch(() => {})
|
|
|
|
}).catch(() => {})
|
|
|
|
},
|
|
|
|
},
|
|
|
|