pull/140/head
parent
da8d754fed
commit
986a261270
|
@ -54,12 +54,7 @@ export default {
|
|||
var store = this.$store.state;
|
||||
var item = store.equipmentList[store.equipmentIndex - 1]
|
||||
if(item.deviceName == 10 || item.deviceName == 30){
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
this.dataInit();
|
||||
}
|
||||
},
|
||||
|
@ -86,6 +81,12 @@ export default {
|
|||
}
|
||||
},
|
||||
dataInit() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
var store = this.$store.state;
|
||||
var data = store.equipmentList[store.equipmentIndex - 1].deviceId;
|
||||
this.api.getcontrol_cpermission(data).then((res) => {
|
||||
|
@ -338,6 +339,9 @@ export default {
|
|||
if (router.token && router.userid) {
|
||||
return
|
||||
}
|
||||
if(this.$route.name==this.routerList[0].router){
|
||||
return
|
||||
}
|
||||
this.$router.push({ path: `/${this.routerList[0].router}` });
|
||||
|
||||
|
||||
|
|
|
@ -205,14 +205,16 @@ export default {
|
|||
loading:null,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
'$store.state.equipmentIndex'(newVal, oldVal) {
|
||||
this.dataInit();
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
const that = this;
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
that.dataInit();
|
||||
}, 0);
|
||||
|
@ -292,6 +294,12 @@ export default {
|
|||
this.change(code, sendData)
|
||||
},
|
||||
dataInit() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
|
|
Loading…
Reference in New Issue