电子沙盘界面添加退出和消息监听
This commit is contained in:
parent
9a4591effd
commit
8096076be3
File diff suppressed because it is too large
Load Diff
@ -80,6 +80,11 @@ export default {
|
||||
token:null
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.simulationOver':function(val) {
|
||||
this.back();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
// console.log("destroy");
|
||||
if (this.jlmap3d) {
|
||||
@ -183,7 +188,15 @@ export default {
|
||||
},
|
||||
|
||||
back() {
|
||||
window.close();
|
||||
if (this.$route.query.projectDevice) {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
window.close();
|
||||
}
|
||||
// this.$emit('showpanel');
|
||||
// this.jlmap3d.eventoff();
|
||||
// this.jlmap3d.animateoff();
|
||||
|
@ -475,7 +475,9 @@ export default {
|
||||
mapid: query.mapId,
|
||||
group: query.group,
|
||||
project: getSessionStorage('project'),
|
||||
token: getToken()
|
||||
token: getToken(),
|
||||
projectDevice: this.$route.query.projectDevice,
|
||||
type: this.$route.query.type
|
||||
};
|
||||
this.$router.push({ path: `/jlmap3d/sandbox`, query: sandboxQuery });
|
||||
} else {
|
||||
|
@ -721,6 +721,10 @@ function timedCount() {
|
||||
postMessage(data);
|
||||
return;
|
||||
}
|
||||
if (data.type == 'Simulation_Over') {
|
||||
postMessage(data);
|
||||
return;
|
||||
}
|
||||
if ( data.body.length > 300) {
|
||||
// console.log(data);
|
||||
postMessage(data);
|
||||
|
Loading…
Reference in New Issue
Block a user