rt-sim-training-client/src/views/newMap/displayNew/demon/runPlanLoad.vue

81 lines
2.1 KiB
Vue
Raw Normal View History

2019-12-30 09:00:16 +08:00
<template>
2020-08-05 13:16:58 +08:00
<div v-show="show" class="run-plan-dialog" :style="{width: width + 'px',height:height + 'px'}">
<plan-schedule ref="planSchedule" :group="group" @back="doClose" />
2019-12-30 09:00:16 +08:00
</div>
</template>
<script>
import PlanSchedule from '@/views/planSchedule/index';
2020-12-24 15:33:06 +08:00
import { getSimulationInfoNew } from '@/api/simulation';
import { loadRunPlanData } from '@/utils/loaddata';
2020-04-21 18:43:10 +08:00
2019-12-30 09:00:16 +08:00
// 运行图加载
export default {
name: 'RunPlanLoad',
components: {
PlanSchedule
},
2019-12-30 09:00:16 +08:00
props: {
group: {
type: String,
required: true
}
},
data() {
return {
menus: null,
show: false
};
},
computed: {
title() {
return this.$t('display.runPlan.runDiagramPlanTool');
2020-08-05 13:16:58 +08:00
},
width() {
return this.$store.state.app.width > 1920 ? 1920 : this.$store.state.app.width;
},
height() {
return this.$store.state.app.height > 1080 ? 1080 : this.$store.state.app.height;
2019-12-30 09:00:16 +08:00
}
},
watch: {
'$store.state.socket.runPlanReloadCount': function (val) {
2020-12-15 18:15:48 +08:00
getSimulationInfoNew(this.group).then(res => {
this.$store.dispatch('runPlan/setRunPlanInfo', res.data.runPlan);
2020-12-24 15:33:06 +08:00
loadRunPlanData(this.group);
2020-04-21 18:43:10 +08:00
});
2019-12-30 09:00:16 +08:00
}
},
2020-11-25 18:28:20 +08:00
beforeDestroy() {
this.$store.dispatch('runPlan/setPlanData', []);
},
2019-12-30 09:00:16 +08:00
mounted() {
// this.menus = this.$theme.loadPlanComponent(this.$route.query.lineCode);
2019-12-30 09:00:16 +08:00
},
methods: {
doShow() {
this.show = true;
this.$refs.planSchedule.setPosition();
2019-12-30 09:00:16 +08:00
},
doClose() {
this.show = false;
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.run-plan-dialog {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
position: absolute;
2021-01-25 10:30:43 +08:00
z-index: 38;
2019-12-30 09:00:16 +08:00
top: 0px;
2020-08-05 13:16:58 +08:00
right: 0px;
2019-12-30 09:00:16 +08:00
background: white;
}
</style>