diff --git a/pages/modules/agv-task.vue b/pages/modules/agv-task.vue
index 2f44f3d..feacba2 100644
--- a/pages/modules/agv-task.vue
+++ b/pages/modules/agv-task.vue
@@ -37,23 +37,8 @@
-
+
-
-
-
-
-
- 确认下发任务?
-
-
-
-
-
-
-
-
-
@@ -66,7 +51,6 @@
},
data() {
return {
- show: false,
disabled: false,
options1: [],
index1: '',
@@ -175,35 +159,40 @@
this.options4 = []
this.options5 = []
},
- toPop () {
- if (this.index1 && this.index2 && this.index3 && this.index4) {
- this.show = true
- }
- },
async _callTask () {
- this.disabled = true
- if (!this.index1 || !this.index2) {
- this.disabled = false
- return
- }
try {
let res = await callTask(this.index1, this.index2, '3', '')
- this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
+ this.disabled = false
} catch (e) {
this.disabled = false
}
+ },
+ toSure () {
+ this.disabled = true
+ if (!this.index1 || !this.index2 || !this.index3 || !this.index4 || !this.index5) {
+ this.disabled = false
+ return
+ }
+ uni.showModal({
+ title: '提示',
+ content: '确认下发任务?',
+ confirmColor: '#ff6a00',
+ success: (res) => {
+ if (res.confirm) {
+ this._callTask()
+ } else if (res.cancel) {
+ this.disabled = false
+ }
+ }
+ })
}
}
}