From 97486704c3d2d230fa0be89630f0fe950554b16b Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期二, 23 九月 2025 18:30:05 +0800
Subject: [PATCH] #
---
pages/AGV/AGVStart.vue | 90 ++++++++++++++++++++++++++++----------------
1 files changed, 57 insertions(+), 33 deletions(-)
diff --git a/pages/AGV/AGVStart.vue b/pages/AGV/AGVStart.vue
index e48fca6..08012f1 100644
--- a/pages/AGV/AGVStart.vue
+++ b/pages/AGV/AGVStart.vue
@@ -32,7 +32,7 @@
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
<view class="buttom">
<button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">鍚姩</button>
+ <button size="mini" type="primary" @click="combConfirm('warn')" :disabled="isDisabled">鍚姩</button>
</view>
<!-- 寮圭獥 -->
<!-- 淇敼鏁伴噺 -->
@@ -128,7 +128,8 @@
floor: "",
devNo: [],
staList:[],
- sta:''
+ sta:'',
+ isDisabled:false
}
},
onLoad() {
@@ -148,11 +149,19 @@
this.sta = 1040
}else if(this.stationCode.substring(0,1) == 'b'){
this.staList.push(2010)
- this.staList.push(2000)
+ // this.staList.push(2000)
this.sta = 2010
}else if(this.stationCode.substring(0,1) == 'c'){
this.staList.push(3010)
- this.sta = 3010
+ this.sta = 3010
+ }else if(this.stationCode.substring(0,1) == 'd'){
+ this.staList.push(2000)
+ this.sta = 2000
+
+ }else if(this.stationCode.substring(0,1) == 'e'){
+ this.staList.push(1000)
+ this.staList.push(1035)
+ this.sta = 1035
}
@@ -226,7 +235,7 @@
}
});
},
- messageToggle(type) {
+ messageToggle(type) {
this.msgType1 = type
this.$refs.message.open()
},
@@ -430,41 +439,56 @@
},
comb() {
let that = this;
+ that.isDisabled = true
if (that.stationCode === '') {
this.messageText = "璇锋壂鎻忔殏瀛樹綅鏉$爜"
this.messageToggle('error')
+ that.isDisabled = false
return;
}
- uni.request({
- url: that.baseUrl + '/mobile/agv/start',
- data: JSON.stringify({
- sta: that.stationCode,
- inSta: that.sta
- }),
- method: 'POST',
- header: {
- 'token': uni.getStorageSync('token')
- },
- success(result) {
- var res = result.data
- if (res.code === 200) {
- that.resst();
- that.messageText = "鍚姩鎴愬姛"
- that.messageToggle('success')
- } else if (res.code == 403) {
- that.messageText = res.msg
+
+ uni.request({
+ url: that.baseUrl + '/mobile/agv/start',
+ data: JSON.stringify({
+ sta: that.stationCode,
+ inSta: that.sta
+ }),
+ method: 'POST',
+ header: {
+ 'token': uni.getStorageSync('token')
+ },
+ success(result) {
+ var res = result.data
+ if (res.code === 200) {
+ that.resst();
+ that.messageText = "鍚姩鎴愬姛"
+ that.messageToggle('success')
+ } else if (res.code == 403) {
+ that.messageText = res.msg
+ that.messageToggle('error')
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../login/login'
+ });
+ }, 1000);
+ } else {
+ that.messageText = res.msg
+ that.messageToggle('error')
+ }
+ },
+ fail: () => {
+ that.messageText = "鎺ュ彛瓒呮椂"
that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.messageText = res.msg
- that.messageToggle('error')
+ },
+ complete(){
+ that.isDisabled = false
}
- }
- });
+ });
+
+
+
+
+
},
reset(type) {
this.msgType = type
--
Gitblit v1.9.1