获取设备状态
parent
227bfc8418
commit
0e6e650b7a
|
|
@ -315,6 +315,7 @@ export default {
|
||||||
change(e) {
|
change(e) {
|
||||||
this.imei = e;
|
this.imei = e;
|
||||||
var clientId = mqttUtil.getMqttState().clientId;
|
var clientId = mqttUtil.getMqttState().clientId;
|
||||||
|
this.connected = mqttUtil.getMqttState().isConnected;
|
||||||
if ((e === 'A' || e==='B' || e==='C')
|
if ((e === 'A' || e==='B' || e==='C')
|
||||||
&& store.getters && store.getters.name === 'admin' ) {
|
&& store.getters && store.getters.name === 'admin' ) {
|
||||||
this.getNewSpecialData(e);
|
this.getNewSpecialData(e);
|
||||||
|
|
@ -344,9 +345,11 @@ export default {
|
||||||
this.getAgriByImei();
|
this.getAgriByImei();
|
||||||
// 备注
|
// 备注
|
||||||
this.getRemarkByImei();
|
this.getRemarkByImei();
|
||||||
|
if (e!=="862538065276939"){
|
||||||
this.message=JSON.stringify({jbk: 0,read:true})
|
this.message=JSON.stringify({jbk: 0,read:true})
|
||||||
this.publishMessage()
|
this.publishMessage()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.selectedText = ''; // 无匹配项时清空
|
this.selectedText = ''; // 无匹配项时清空
|
||||||
this.title='';
|
this.title='';
|
||||||
|
|
@ -525,7 +528,7 @@ export default {
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
// 组装消息
|
// 组装消息
|
||||||
this.message = JSON.stringify({[`${type}1}`]: status})
|
this.message = JSON.stringify({[`${type}1`]: status})
|
||||||
// 控制设备
|
// 控制设备
|
||||||
this.publishMessage();
|
this.publishMessage();
|
||||||
// 设备回执
|
// 设备回执
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue