|
|
@@ -1390,12 +1390,12 @@ export default {
|
|
|
isMulTab(index){
|
|
|
let type = this.deviceType;
|
|
|
if(index == 2){
|
|
|
- if(type == 4 || type == 5){
|
|
|
- return true;
|
|
|
- }
|
|
|
+ if(this.secondMachine){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
if(index == 3){
|
|
|
- if(type == 5){
|
|
|
+ if(this.thirdMachine){
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
@@ -1566,6 +1566,7 @@ export default {
|
|
|
if(!tag){
|
|
|
return;
|
|
|
}
|
|
|
+ debugger;
|
|
|
let type = this.deviceType;
|
|
|
let self = this;
|
|
|
if(index == 2 || index == 3){
|
|
|
@@ -1575,7 +1576,9 @@ export default {
|
|
|
}
|
|
|
this.resetChoose();
|
|
|
if(index == 4){
|
|
|
-
|
|
|
+ if(!this.forthMachine){
|
|
|
+ return;
|
|
|
+ }
|
|
|
uni.showLoading({title:"加载中"});
|
|
|
getDeviceStatus(this.id,0).then(res=>{
|
|
|
let data =res.data;
|
|
|
@@ -1590,7 +1593,7 @@ export default {
|
|
|
}else{
|
|
|
|
|
|
let arr = ["a","b","c"]
|
|
|
- if(type == 4 || type == 5){
|
|
|
+ if(this.isMulTab(index)){
|
|
|
this.childId =arr[index-1];
|
|
|
this.getDeviceStatus(function(){
|
|
|
self.tabIndex = index;
|
|
|
@@ -2443,6 +2446,14 @@ export default {
|
|
|
getDetail(this.id).then(res=>{
|
|
|
self.deviceInfo = res.data;
|
|
|
self.deviceType = res.data.type;
|
|
|
+ let msg = res.msg;
|
|
|
+ if(msg){
|
|
|
+ try{
|
|
|
+ msg = JSON.parse(msg+"");
|
|
|
+ }catch (e){
|
|
|
+ msg = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
let productId = self.deviceInfo.productId;
|
|
|
if(productId === 57){
|
|
|
self.boardType = 5;
|
|
|
@@ -2464,6 +2475,25 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if(msg != null){
|
|
|
+ let b = msg.b;
|
|
|
+ let c = msg.c;
|
|
|
+ let a = msg.a;
|
|
|
+ let d = msg.d;
|
|
|
+ if(a == 1){
|
|
|
+ self.firstMachine = true;
|
|
|
+ }
|
|
|
+ if(b == 1){
|
|
|
+ self.secondMachine = true;
|
|
|
+ }
|
|
|
+ if(c == 1){
|
|
|
+ self.thirdMachine = true;
|
|
|
+ }
|
|
|
+ if(d == 1){
|
|
|
+ self.forthMachine = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
console.log("当前设备类型:"+JSON.stringify(self.deviceInfo.type))
|
|
|
self.location = {
|
|
|
latitude: self.deviceInfo.latitude,
|