剧本代码调整

This commit is contained in:
joylink_cuiweidong 2020-06-19 18:58:55 +08:00
parent b1439d4903
commit 32f4ead036
2 changed files with 20 additions and 16 deletions

View File

@ -52,7 +52,7 @@
@showScheduling="showScheduling"
/>
<menu-script v-if="isScript" ref="menuScript" @script3ddriveshow="script3ddriveshow" :offset-bottom="offsetBottom" :group="group" :data-error="dataError" />
<menu-script v-if="isScript" ref="menuScript" :offset-bottom="offsetBottom" :group="group" :data-error="dataError" @script3ddriveshow="script3ddriveshow" />
<menu-practice
v-if="isPractice"
@ -181,6 +181,7 @@ export default {
questId: 0, // Id
showStation: '',
stationList: [],
grouper:'',
showSelectStation: false, // select
prdTypeMap: {
'01': '01', // =>
@ -326,6 +327,9 @@ export default {
'$store.state.map.map': function (val) {
this.showSelectStation = val.skinVO.code === '06' && this.$store.state.training.prdType === '01';
this.showSelectStation && this.setStationList(val);
},
'group':function(group) {
this.grouper = group;
}
},
async created() {
@ -335,15 +339,15 @@ export default {
EventBus.$on('clearCheckLogin', () => {
this.clearCheckLogin();
});
this.grouper = this.group;
await this.setWindowSize();
await this.initLoadData();
},
async beforeDestroy() {
await this.clearAllTimer();
await this.quit();
await this.$store.dispatch('training/reset');
await this.$store.dispatch('map/mapClear');
beforeDestroy() {
this.quit(this.grouper);
this.clearAllTimer();
this.$store.dispatch('training/reset');
this.$store.dispatch('map/mapClear');
EventBus.$off('clearCheckLogin');
},
methods: {
@ -577,9 +581,9 @@ export default {
},
// 仿
async quit() {
await clearSimulation(this.group);
await this.$store.dispatch('training/over');
quit(group) {
clearSimulation(group);
this.$store.dispatch('training/over');
},
// 仿退
async back() {
@ -624,7 +628,7 @@ export default {
window.open(routeData.href, '_blank', 'noopener noreferrer');
}
},
script3ddriveshow(){
script3ddriveshow() {
this.panelShow = false;
this.drivingShow = true;
this.$refs.Jl3dDrive.show(this.mapId, this.group);