|
@@ -400,7 +400,6 @@ export default {
|
|
|
//报警器开启关闭方法
|
|
|
changeIsNeedCaptchaAlarm(row){
|
|
|
let self = this;
|
|
|
- console.log(row.status)
|
|
|
if(row.status!=3 && row.status!=4){
|
|
|
return
|
|
|
}
|
|
@@ -504,7 +503,6 @@ export default {
|
|
|
let self = this;
|
|
|
let type = 0; //硬件 //0全部
|
|
|
subjectInfo(row.id,type).then(response => {
|
|
|
- console.log(response.data)
|
|
|
this.$set(this,'subjectData',response.data)
|
|
|
this.pageType = 2;
|
|
|
})
|
|
@@ -514,7 +512,6 @@ export default {
|
|
|
let self = this;
|
|
|
let type = 0; //硬件 //0全部
|
|
|
subjectInfo(row.id,type).then(response => {
|
|
|
- // console.log("获取实验室详情",response.data)
|
|
|
this.$set(this,'newData',response.data);
|
|
|
if(response.data.safeUserName){
|
|
|
this.$set(this.newData,'safeUserName',response.data.safeUserName.split(','));
|
|
@@ -554,7 +551,6 @@ export default {
|
|
|
// 开启关闭验证
|
|
|
async changeIsNeedCaptcha (row) {
|
|
|
let self = this;
|
|
|
- console.log(row)
|
|
|
if(row.state.code!=3 && row.state.code!=4){
|
|
|
return
|
|
|
}
|
|
@@ -576,7 +572,6 @@ export default {
|
|
|
switchVal:row.state.code==3?'close':(row.state.code==4?'open':'')
|
|
|
};
|
|
|
hardWareControl(switchData).then(response => {
|
|
|
- console.log(response);
|
|
|
if(response.code==200){
|
|
|
row.state.code = row.state.code==3?4:(row.state.code==4?3:'')
|
|
|
this.msgSuccess("操作成功")
|
|
@@ -692,7 +687,6 @@ export default {
|
|
|
}
|
|
|
getDetalis(obj).then(response => {
|
|
|
this.$set(this.checkedSubject,'doorList',response.rows);
|
|
|
- console.log('res',response);
|
|
|
})
|
|
|
},
|
|
|
//获取实验室详情
|
|
@@ -709,25 +703,20 @@ export default {
|
|
|
handleCommand(command, row){
|
|
|
switch (command) {
|
|
|
case "1":
|
|
|
- console.log('关联配置');
|
|
|
this.clickPage(6,row);
|
|
|
break;
|
|
|
case "2":
|
|
|
- console.log('物联配置');
|
|
|
subjectInfo(row.id,0).then(response => {
|
|
|
this.clickPage(4,response.data);
|
|
|
});
|
|
|
break;
|
|
|
case "3":
|
|
|
- console.log('准入配置');
|
|
|
this.clickPage(5,row);
|
|
|
break;
|
|
|
case "4":
|
|
|
- console.log('编辑');
|
|
|
this.clickPage(3,row);
|
|
|
break;
|
|
|
case "5":
|
|
|
- console.log('删除');
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
@@ -735,7 +724,6 @@ export default {
|
|
|
},
|
|
|
//保存当前排序
|
|
|
liveSort(row){
|
|
|
- console.log("row",row);
|
|
|
let obj = {
|
|
|
sort:row.diyOrder
|
|
|
}
|
|
@@ -815,38 +803,30 @@ export default {
|
|
|
password: localStorage.getItem('mqttPassword')
|
|
|
});
|
|
|
this.client.on("connect", e =>{
|
|
|
- console.log("连接成功");
|
|
|
this.client.subscribe(this.mtopic+self.subId, (err) => {
|
|
|
if (!err) {
|
|
|
- console.log("订阅成功:" + this.mtopic+self.subId);
|
|
|
}
|
|
|
});
|
|
|
this.client.subscribe(this.mtopicOne+self.subId, (err) => {
|
|
|
if (!err) {
|
|
|
- console.log("订阅成功:" + this.mtopicOne+self.subId);
|
|
|
}
|
|
|
});
|
|
|
// for(let i = 0; i< self.mqttIdList.length;i++){
|
|
|
// this.client.subscribe(this.mtopic+self.mqttIdList[i], (err) => {
|
|
|
// if (!err) {
|
|
|
- // console.log("订阅成功:" + this.mtopic+self.mqttIdList[i]);
|
|
|
// }
|
|
|
// });
|
|
|
// this.client.subscribe(this.mtopicOne+self.mqttIdList[i], (err) => {
|
|
|
// if (!err) {
|
|
|
- // console.log("订阅成功:" + this.mtopicOne+self.mqttIdList[i]);
|
|
|
// }
|
|
|
// });
|
|
|
// }
|
|
|
});
|
|
|
this.client.on("message", (topic, message) => {
|
|
|
- // console.log('message',message)
|
|
|
if (message){
|
|
|
let data = JSON.parse(message)
|
|
|
- // console.log("MQTT----message",data)
|
|
|
if(data.data.subId){
|
|
|
//传感器
|
|
|
- // console.log("传感器",data.data.subId,'---------',data);
|
|
|
if(self.checkedSubject.id){
|
|
|
if(data.data.subId&&data.data.subId == self.checkedSubject.id){
|
|
|
self.$set(self.checkedSubject,'sensorFunctionStatusList',data.data.functionStatuses);
|
|
@@ -861,7 +841,6 @@ export default {
|
|
|
}
|
|
|
}else{
|
|
|
//硬件
|
|
|
- // console.log("硬件",data);
|
|
|
for (let i = 0; i < data.data.length; i++) {
|
|
|
if (self.checkedSubject.labHardwareVOList) {
|
|
|
for (let k = 0; k < self.checkedSubject.labHardwareVOList.length; k++) {
|
|
@@ -901,23 +880,19 @@ export default {
|
|
|
// for(let i=0;i<self.mqttIdList.length;i++){
|
|
|
// self.client.unsubscribe(self.mtopic+self.mqttIdList[i], error => {
|
|
|
// if (error) {
|
|
|
- // console.log('Unsubscribe error', error)
|
|
|
// }
|
|
|
// })
|
|
|
// self.client.unsubscribe(self.mtopicOne+self.mqttIdList[i], error => {
|
|
|
// if (error) {
|
|
|
- // console.log('Unsubscribe error', error)
|
|
|
// }
|
|
|
// })
|
|
|
// }
|
|
|
self.client.unsubscribe(self.mtopic+self.subId, error => {
|
|
|
if (error) {
|
|
|
- console.log('Unsubscribe error', error)
|
|
|
}
|
|
|
})
|
|
|
self.client.unsubscribe(self.mtopicOne+self.subId, error => {
|
|
|
if (error) {
|
|
|
- console.log('Unsubscribe error', error)
|
|
|
}
|
|
|
})
|
|
|
self.client.end();
|
|
@@ -954,7 +929,6 @@ export default {
|
|
|
);
|
|
|
self.videoList.push(obj);
|
|
|
// }
|
|
|
- console.log("i",i)
|
|
|
}
|
|
|
|
|
|
for(let i=0;i<self.videoList.length;i++){
|
|
@@ -987,7 +961,6 @@ export default {
|
|
|
let self = this;
|
|
|
self.videoOff();
|
|
|
self.offMQTT();
|
|
|
- console.log("beforeDestroy");
|
|
|
},
|
|
|
}
|
|
|
</script>
|