This commit is contained in:
xiongchengqiang 2020-12-14 17:35:41 +08:00
parent 9143738641
commit 5488b5949a

View File

@ -469,16 +469,27 @@ export default {
return Number((_process * 100).toFixed(2)) return Number((_process * 100).toFixed(2))
}, },
async handleDetele (id) { async handleDetele (id) {
let res = await apiDeleteTask({ taskId: id }) this.$confirm('此操作不可撤回, 是否继续?', '提示', {
if (res.code !== 200) { confirmButtonText: '确定',
this.$message.error(res.msg) cancelButtonText: '取消',
return type: 'warning'
} }).then(async () => {
this.taskInfo = await this.$parent.handleGetTaskDetail(this.taskInfo.detailId) let res = await apiDeleteTask({ taskId: id })
this.$parent.handleGetTable(true) if (res.code !== 200) {
this.$message({ this.$message.error(res.msg)
message: res.msg, return
type: 'success' }
this.taskInfo = await this.$parent.handleGetTaskDetail(this.taskInfo.detailId)
this.$parent.handleGetTable(true)
this.$message({
message: res.msg,
type: 'success'
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
}) })
}, },
// //