任务管理
This commit is contained in:
@@ -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 = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user