|
@@ -24,9 +24,9 @@
|
|
|
<view class="shinning"></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <PannelItem show="true" words="急停状态" :status="robotInfoVo.emergencyMode==1 ? '急停' : robotInfoVo.emergencyMode==0? '未急停':'—'"
|
|
|
+ <PannelItem show="true" words="急停状态" :status="robotInfoVo.emergencyMode == 1 ? '急停' : robotInfoVo.emergencyMode == 0 ?'未急停' :'—'"
|
|
|
:flag="robotInfoVo.emergencyMode == 0" />
|
|
|
- <PannelItem show="true" words="暂停状态" :status="robotInfoVo.pause ==1 ? '暂停' : robotInfoVo.pause ==0?'未暂停':'—'" handle="true"
|
|
|
+ <PannelItem show="true" words="暂停状态" :status="robotInfoVo.pause == 1 ? '暂停' : robotInfoVo.pause == 0?'未暂停':'—' " handle="true"
|
|
|
@ExchangeMessage='ExchangeMessage' :flag="robotInfoVo.pause == 0" />
|
|
|
</view>
|
|
|
</view>
|
|
@@ -51,7 +51,7 @@
|
|
|
</view>
|
|
|
<view class="carRight">
|
|
|
<PannelTitle words="车牌识别" :value="vehicleInfo.plateState ? '成功' : '未识别'"
|
|
|
- :flag="vehicleInfo.plateComState" />
|
|
|
+ :flag="vehicleInfo.plateComState == 1" />
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
@@ -61,8 +61,8 @@
|
|
|
:flag="vehicleInfo.sensorState" />
|
|
|
</view>
|
|
|
<view class="carRight">
|
|
|
- <PannelTitle words="连接状态" :value="vehicleInfo.conState ? '已连接' : '未连接'"
|
|
|
- :flag="vehicleInfo.conState" />
|
|
|
+ <PannelTitle words="连接状态" :value="vehicleInfo.conState == 1 ? '已连接' : vehicleInfo.conState == 0 ?'未连接':'—'"
|
|
|
+ :flag="vehicleInfo.conState == 1" />
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
@@ -74,7 +74,7 @@
|
|
|
<view class="carRight">
|
|
|
<PannelTitle circle="false" words="解锁状态"
|
|
|
:value="vehicleInfo.lockState==null ? '—': vehicleInfo.lockState?'已上锁' : '已解锁'"
|
|
|
- @ExchangeMessage="ExchangeMessage" :flag="vehicleInfo.lockState == 1" />
|
|
|
+ @ExchangeMessage="ExchangeMessage" :flag="vehicleInfo.lockState == 0" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -322,14 +322,7 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
this.InitWs()
|
|
|
- //检查断开重连
|
|
|
- this.timer = setInterval(() => {
|
|
|
- if (this.ws.readyState != 1) {
|
|
|
- this.ws.close()
|
|
|
- console.log('检查断开重连')
|
|
|
- this.InitWs()
|
|
|
- }
|
|
|
- }, 2000)
|
|
|
+
|
|
|
},
|
|
|
onUnload() {
|
|
|
console.log('onUnload')
|
|
@@ -741,7 +734,7 @@
|
|
|
this.ws = null
|
|
|
}
|
|
|
if (this.timer != null) {
|
|
|
- // clearInterval(this.timer)
|
|
|
+ clearInterval(this.timer)
|
|
|
this.timer = null
|
|
|
}
|
|
|
let token = this.$storage.getJson('token');
|
|
@@ -782,6 +775,7 @@
|
|
|
})
|
|
|
this.ws.onMessage((res) => {
|
|
|
let d = JSON.parse(res.data)
|
|
|
+ console.log(d)
|
|
|
// uni.hideLoading()
|
|
|
//电池仓位列表
|
|
|
if (d.storeInfoList) {
|
|
@@ -844,6 +838,18 @@
|
|
|
this.ws.onError(() => {
|
|
|
console.log("WebSocket连接错误")
|
|
|
})
|
|
|
+ if(this.timer == null){
|
|
|
+ //检查断开重连
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ if (this.ws.readyState != 1) {
|
|
|
+ clearInterval(this.timer)
|
|
|
+ this.timer = null
|
|
|
+ this.ws.close()
|
|
|
+ console.log('检查断开重连')
|
|
|
+ this.InitWs()
|
|
|
+ }
|
|
|
+ }, 2000)
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
}
|