任务管理

This commit is contained in:
2025-11-10 09:20:00 +08:00
parent 2cc4abd57d
commit 8211623a1a
3 changed files with 21 additions and 12 deletions

View File

@@ -59,6 +59,11 @@
this._querytasks()
},
methods: {
clearUp () {
this.pkId = ''
this.dataList = []
this.disabled = false
},
toCheck (e) {
this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid
},
@@ -78,26 +83,26 @@
this.dataList = []
}
},
async _taskOperation (type) {
async _taskoperation (type) {
this.disabled = true
if (!this.pkId) {
this.disabled = false
return
}
try {
let res = await taskOperation(this.pkId, type)
let res = await taskoperation(this.pkId, type)
if (res) {
this._queryTask()
uni.showToast({
title: res.message,
icon: 'none'
})
this.clearUp()
setTimeout(()=> {
this._querytasks()
}, 2000)
}
this.disabled = false
this.pkId = ''
} catch (err) {
this.disabled = false
this.pkId = ''
}
}
}