|
@@ -87,7 +87,16 @@ export default {
|
|
|
}).then(res => {
|
|
|
console.log("设备详情", res)
|
|
|
if (this.cutoff(res.msg)) return;
|
|
|
- this.setTabs(res.data.prodnum)
|
|
|
+
|
|
|
+ if (!res.data.miniapppath) {
|
|
|
+ res.data.miniapppath = require("../../control/pages").getPageName(res.data.prodnum);
|
|
|
+ if (!res.data.miniapppath) {
|
|
|
+ //未匹配到设备控制页
|
|
|
+ this.showTab = '设备日志';
|
|
|
+ this.tabs.shift()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
switch (res.data.status) {
|
|
|
case '在线':
|
|
|
res.data.bgColor = "#007aff";
|
|
@@ -99,19 +108,15 @@ export default {
|
|
|
res.data.bgColor = "#F9AE3D";
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
this.detail = res.data;
|
|
|
+
|
|
|
if (init) {
|
|
|
this.$refs.hd.getList(this.w_deviceid, res.data.prodnum).then(num => this.tabsTop = num)
|
|
|
setTimeout(() => { this.changeTab({ name: this.showTab }, true) }, 100)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- setTabs(prodnum) {
|
|
|
- if (['FW01', '01'].includes(prodnum)) {
|
|
|
- this.showTab = '设备日志';
|
|
|
- this.tabs.shift()
|
|
|
- }
|
|
|
- },
|
|
|
changeTab({ name }, init = false) {
|
|
|
this.showTab = name;
|
|
|
page.show = false;
|