任务管理

This commit is contained in:
2023-05-11 09:10:02 +08:00
parent 35d7eefc4d
commit 46d846dcf5
3 changed files with 27 additions and 18 deletions

View File

@@ -1,12 +1,15 @@
{ {
"name" : "立讯手持", "name" : "立讯手持",
"appid" : "__UNI__99F80EF", "appid" : "__UNI__A3EEF18",
"description" : "立讯手持系统", "description" : "立讯手持系统",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : 100, "versionCode" : 100,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
"compatible" : {
"ignoreVersion" : true //true表示忽略版本检查提示框HBuilderX1.9.0及以上版本支持
},
"usingComponents" : true, "usingComponents" : true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3, "compilerVersion" : 3,

View File

@@ -60,11 +60,11 @@
}; };
}, },
created () { created () {
this.queryTask(this.keyword, this.startPoint, this.endPoint) this._queryTask(this.keyword, this.startPoint, this.endPoint)
}, },
methods: { methods: {
async queryTask () { async _queryTask () {
let res = await queryInstraction(this.keyword, this.startPoint, this.endPoint) let res = await queryTask(this.keyword, this.startPoint, this.endPoint)
if (res.code === '1') { if (res.code === '1') {
this.dataList = [...res.result] this.dataList = [...res.result]
} else { } else {
@@ -74,20 +74,23 @@
}) })
} }
}, },
async taskOperation (type) { async _taskOperation (type) {
try { try {
let res = await instOperation(this.pkId, type) let res = await taskOperation(this.pkId, type)
if (res.code === '1') { if (res.code === '1') {
this.disabled1 = false this.disabled1 = false
this.disabled2 = false this.disabled2 = false
this.pkId = '' this.pkId = ''
this.queryTask() this._queryTask()
uni.showToast({ uni.showToast({
title: res.desc, title: res.desc,
icon: 'none' icon: 'none'
}) })
} else { } else {
this.Dialog(res.desc) uni.showToast({
title: res.desc,
icon: 'none'
})
this.disabled1 = false this.disabled1 = false
this.disabled2 = false this.disabled2 = false
} }
@@ -105,7 +108,7 @@
this.disabled1 = false this.disabled1 = false
return return
} }
this.instOperation(type) this._taskOperation(type)
}, },
toSure2 (type) { toSure2 (type) {
this.disabled2 = true this.disabled2 = true
@@ -113,7 +116,7 @@
this.disabled2 = false this.disabled2 = false
return return
} }
this.instOperation(type) this._taskOperation(type)
} }
} }
} }

View File

@@ -65,10 +65,10 @@
}; };
}, },
created () { created () {
this.queryInstraction(this.keyword, this.startPoint, this.endPoint) this._queryInstraction(this.keyword, this.startPoint, this.endPoint)
}, },
methods: { methods: {
async queryInstraction () { async _queryInstraction () {
let res = await queryInstraction(this.keyword, this.startPoint, this.endPoint) let res = await queryInstraction(this.keyword, this.startPoint, this.endPoint)
if (res.code === '1') { if (res.code === '1') {
this.dataList = [...res.result] this.dataList = [...res.result]
@@ -79,7 +79,7 @@
}) })
} }
}, },
async instOperation (type) { async _instOperation (type) {
try { try {
let res = await instOperation(this.pkId, type) let res = await instOperation(this.pkId, type)
if (res.code === '1') { if (res.code === '1') {
@@ -87,13 +87,16 @@
this.disabled2 = false this.disabled2 = false
this.disabled3 = false this.disabled3 = false
this.pkId = '' this.pkId = ''
this.queryInstraction() this._queryInstraction()
uni.showToast({ uni.showToast({
title: res.desc, title: res.desc,
icon: 'none' icon: 'none'
}) })
} else { } else {
this.Dialog(res.desc) uni.showToast({
title: res.desc,
icon: 'none'
})
this.disabled1 = false this.disabled1 = false
this.disabled2 = false this.disabled2 = false
this.disabled3 = false this.disabled3 = false
@@ -113,7 +116,7 @@
this.disabled1 = false this.disabled1 = false
return return
} }
this.instOperation(type) this._instOperation(type)
}, },
toSure2 (type) { toSure2 (type) {
this.disabled2 = true this.disabled2 = true
@@ -121,7 +124,7 @@
this.disabled2 = false this.disabled2 = false
return return
} }
this.instOperation(type) this._instOperation(type)
}, },
toSure3 (type) { toSure3 (type) {
this.disabled3 = true this.disabled3 = true
@@ -129,7 +132,7 @@
this.disabled3 = false this.disabled3 = false
return return
} }
this.instOperation(type) this._instOperation(type)
} }
} }
} }