调整运行图加载方式
This commit is contained in:
parent
313a99260c
commit
f645433696
@ -117,7 +117,6 @@ const training = {
|
|||||||
},
|
},
|
||||||
over: (state) => {
|
over: (state) => {
|
||||||
state.started = false;
|
state.started = false;
|
||||||
state.switchcount += 1;
|
|
||||||
},
|
},
|
||||||
updateMapState: (state, deviceStatus) => {
|
updateMapState: (state, deviceStatus) => {
|
||||||
Vue.prototype.$jlmap && Vue.prototype.$jlmap.update(deviceStatus);
|
Vue.prototype.$jlmap && Vue.prototype.$jlmap.update(deviceStatus);
|
||||||
|
@ -91,7 +91,8 @@ export default {
|
|||||||
swchList: [
|
swchList: [
|
||||||
{ value: '01', name: '现地' },
|
{ value: '01', name: '现地' },
|
||||||
{ value: '02', name: '行调' }
|
{ value: '02', name: '行调' }
|
||||||
]
|
],
|
||||||
|
firstLoad: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -129,7 +130,10 @@ export default {
|
|||||||
if (this.group) {
|
if (this.group) {
|
||||||
if (this.$store.state.training.started) {
|
if (this.$store.state.training.started) {
|
||||||
await this.loadRunData();
|
await this.loadRunData();
|
||||||
|
} else if (this.firstLoad) {
|
||||||
|
await this.loadRunData(this.$route.query);
|
||||||
}
|
}
|
||||||
|
this.firstLoad = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.scriptRecord.bgSet':function (val) {
|
'$store.state.scriptRecord.bgSet':function (val) {
|
||||||
@ -146,7 +150,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
await this.loadRunData();
|
// await this.loadRunData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadRunData() {
|
loadRunData() {
|
||||||
|
@ -87,7 +87,8 @@ export default {
|
|||||||
runing: false,
|
runing: false,
|
||||||
userId: '',
|
userId: '',
|
||||||
faultMode: false,
|
faultMode: false,
|
||||||
directiveMode: false
|
directiveMode: false,
|
||||||
|
firstLoad: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -113,13 +114,16 @@ export default {
|
|||||||
const started = this.$store.state.training.started;
|
const started = this.$store.state.training.started;
|
||||||
if (started) {
|
if (started) {
|
||||||
await this.loadRunData(this.$route.query);
|
await this.loadRunData(this.$route.query);
|
||||||
|
} else if (this.firstLoad) {
|
||||||
|
await this.loadRunData(this.$route.query);
|
||||||
}
|
}
|
||||||
|
this.firstLoad = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.userId = this.$store.state.user.id;
|
this.userId = this.$store.state.user.id;
|
||||||
await this.loadRunData(this.$route.query);
|
// await this.loadRunData(this.$route.query);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadRunData(opt) {
|
loadRunData(opt) {
|
||||||
|
Loading…
Reference in New Issue
Block a user