|
@@ -396,14 +396,14 @@ export default {
|
|
// query.select('#440102004920000000010014')
|
|
// query.select('#440102004920000000010014')
|
|
// let a = query.select('#440102004920000000010014');
|
|
// let a = query.select('#440102004920000000010014');
|
|
// console.log('query',query.select('#440102004920000000010014'));
|
|
// console.log('query',query.select('#440102004920000000010014'));
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
// console.log('wx.createSelectorQuery',wx.createSelectorQuery('440102004920000000010014'));
|
|
// console.log('wx.createSelectorQuery',wx.createSelectorQuery('440102004920000000010014'));
|
|
-
|
|
|
|
|
|
+
|
|
// let videoElement1 = document.getElementById('440102004920000000010014');
|
|
// let videoElement1 = document.getElementById('440102004920000000010014');
|
|
// console.log('videoElement1',videoElement1);
|
|
// console.log('videoElement1',videoElement1);
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
// let videoElement = document.getElementById(self.urlList[i].id);
|
|
// let videoElement = document.getElementById(self.urlList[i].id);
|
|
// console.log('videoElement',videoElement);
|
|
// console.log('videoElement',videoElement);
|
|
// videoElement.pause();
|
|
// videoElement.pause();
|
|
@@ -429,7 +429,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//一键灭火-查询设备状态
|
|
//一键灭火-查询设备状态
|
|
- async firedeviceStatus() {
|
|
|
|
|
|
+ async firedeviceStatus(type) {
|
|
let _this = this;
|
|
let _this = this;
|
|
|
|
|
|
const {data} = await firedeviceStatus(_this.subId)
|
|
const {data} = await firedeviceStatus(_this.subId)
|
|
@@ -440,21 +440,34 @@ export default {
|
|
_this.outfireData = data.data
|
|
_this.outfireData = data.data
|
|
_this.$set(this,'fireListType',data.data.online);
|
|
_this.$set(this,'fireListType',data.data.online);
|
|
_this.$set(this,'fireCode',data.data.fireDevice.deviceCode);
|
|
_this.$set(this,'fireCode',data.data.fireDevice.deviceCode);
|
|
- _this.offMQTT('on');
|
|
|
|
|
|
+
|
|
|
|
+ if(type != 'mqtt'){
|
|
|
|
+ _this.offMQTT('on');
|
|
|
|
+ }
|
|
if(data.data.temperature && data.data.smoke){
|
|
if(data.data.temperature && data.data.smoke){
|
|
if(!this.fireStartType){
|
|
if(!this.fireStartType){
|
|
this.$set(this,'fireStartType',true);
|
|
this.$set(this,'fireStartType',true);
|
|
this.sendCode2(data.data.timeDifference);
|
|
this.sendCode2(data.data.timeDifference);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(data.data.timeDifference != -1){
|
|
|
|
+ if(!this.fireStartType){
|
|
|
|
+ this.$set(this,'fireStartType',true);
|
|
|
|
+ this.sendCode2(data.data.timeDifference);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
this.$set(this,'fireListType',false);
|
|
this.$set(this,'fireListType',false);
|
|
this.$set(this,'fireCode',null);
|
|
this.$set(this,'fireCode',null);
|
|
- this.offMQTT('on');
|
|
|
|
|
|
+ if(type != 'mqtt'){
|
|
|
|
+ _this.offMQTT('on');
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
this.$set(this,'fireType',false);
|
|
this.$set(this,'fireType',false);
|
|
- this.offMQTT('on');
|
|
|
|
|
|
+ if(type != 'mqtt'){
|
|
|
|
+ _this.offMQTT('on');
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1002,6 +1015,11 @@ export default {
|
|
this.$set(this,'pageType',2);
|
|
this.$set(this,'pageType',2);
|
|
this.getDeviceList();
|
|
this.getDeviceList();
|
|
this.laboratoryInfo();
|
|
this.laboratoryInfo();
|
|
|
|
+ this.$set(this,'fireStartType',false);
|
|
|
|
+ if(this.conductCountdown){
|
|
|
|
+ this.clearTimer2()
|
|
|
|
+ this.$set(this,'conductCountdown',null);
|
|
|
|
+ }
|
|
this.firedeviceStatus();
|
|
this.firedeviceStatus();
|
|
|
|
|
|
},
|
|
},
|
|
@@ -1363,17 +1381,17 @@ export default {
|
|
}else if(topic == (self.fireTopic + self.fireCode)){
|
|
}else if(topic == (self.fireTopic + self.fireCode)){
|
|
//传感器状态
|
|
//传感器状态
|
|
console.log('传感器状态');
|
|
console.log('传感器状态');
|
|
- self.firedeviceStatus();
|
|
|
|
|
|
+ self.firedeviceStatus('mqtt');
|
|
}else if(topic == (self.fireOnlineTopic + self.fireCode)){
|
|
}else if(topic == (self.fireOnlineTopic + self.fireCode)){
|
|
//设备在线状态
|
|
//设备在线状态
|
|
console.log('设备在线状态');
|
|
console.log('设备在线状态');
|
|
|
|
+ self.firedeviceStatus('mqtt');
|
|
}else if(topic == (self.firePerformTopic + self.fireCode)){
|
|
}else if(topic == (self.firePerformTopic + self.fireCode)){
|
|
console.log('灭火中'+data.fireStatus)
|
|
console.log('灭火中'+data.fireStatus)
|
|
//灭火执行操作
|
|
//灭火执行操作
|
|
if(data.fireStatus == 1){
|
|
if(data.fireStatus == 1){
|
|
if(!self.fireStartType){
|
|
if(!self.fireStartType){
|
|
- self.$set(self,'fireStartType',true);
|
|
|
|
- self.sendCode2(data.direTime);
|
|
|
|
|
|
+ self.firedeviceStatus('mqtt');
|
|
}
|
|
}
|
|
}else if(data.fireStatus == 0){
|
|
}else if(data.fireStatus == 0){
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -1572,11 +1590,11 @@ export default {
|
|
/* 一键灭火 */
|
|
/* 一键灭火 */
|
|
.outfire {
|
|
.outfire {
|
|
width: 710rpx;
|
|
width: 710rpx;
|
|
- height: 80rpx;
|
|
|
|
|
|
+ height: auto;
|
|
background: #FFFFFF;
|
|
background: #FFFFFF;
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
margin: 20rpx 0;
|
|
margin: 20rpx 0;
|
|
- padding: 0 10rpx;
|
|
|
|
|
|
+ padding: 26 10rpx;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|