This commit is contained in:
fan 2019-08-02 16:31:49 +08:00
commit 33c71a20f6
5 changed files with 12 additions and 12 deletions

View File

@ -45,8 +45,8 @@ class TrainWindow extends Group {
stroke: this.style.TrainWindow.trainWindowColor,
fill: this.style.transparentColor
},
onmouseover: () => { if (this.prdType != '') this.setTrainWindowEventShow(true); },
onmouseout: () => { if (this.prdType != '') this.setTrainWindowEventShow(false); }
onmouseover: () => { if (this.prdType) this.setTrainWindowEventShow(true); },
onmouseout: () => { if (this.prdType) this.setTrainWindowEventShow(false); }
});
this.add(this.trainRect);
}

View File

@ -23,7 +23,7 @@ Vue.use(ElementUI);
Vue.config.productionTip = false;
window.eventBus = new Vue({
new Vue({
el: '#app',
router,
store,

View File

@ -27,6 +27,7 @@ import ZoomBox from './zoom/zoom';
import ProgressBar from '@/views/components/progressBar/index';
import { mapGetters } from 'vuex';
import { TrainingMode } from '@/scripts/ConstDic';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'JlmapVisual',
@ -98,24 +99,23 @@ export default {
}
},
created() {
eventBus.$on('viewLoading', (loading) => {
EventBus.$on('viewLoading', (loading) => {
this.mapViewLoaded(loading);
});
eventBus.$on('viewProgressAt', (percentage) => {
EventBus.$on('viewProgressAt', (percentage) => {
this.mapViewProgressAt(percentage);
});
eventBus.$on('refresh', () => {
EventBus.$on('refresh', () => {
this.refresh(this.$store.state.map.map);
});
},
mounted() {
this.initLoadPage();
},
async beforeDestroy() {
await this.$store.dispatch('training/setPrdType', null);
eventBus.$off('refresh');
eventBus.$off('viewLoading');
eventBus.$off('viewProgressAt');
beforeDestroy() {
EventBus.$off('refresh');
EventBus.$off('viewLoading');
EventBus.$off('viewProgressAt');
if (this.$jlmap) {
this.$jlmap.dispose();
}

View File

@ -38,6 +38,7 @@ export default {
}
},
mounted() {
this.$store.dispatch('training/setPrdType', null);
this.resizeHandler();
},
methods: {

View File

@ -16,7 +16,6 @@ import PopMenu from '@/components/PopMenu';
import MapEdit from './edit';
import MapSaveAs from './saveAs';
import MapPublish from './publish';
// import localStore from 'storejs';
export default {
name: 'MapOperateMenu',