代码调整
This commit is contained in:
parent
a08bce7316
commit
4ae18d502c
67
src/views/newMap/display/terminals/testRunplan.vue
Normal file
67
src/views/newMap/display/terminals/testRunplan.vue
Normal file
@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div>
|
||||
<station-diagram ref="stationDiagram" @setSelected="setSelected" />
|
||||
<el-button class="backTo" type="primary" size="medium" @click="backTo">返回运行图编制</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import StationDiagram from '../stationDiagram/index';
|
||||
import { clearSubscribe, getTopic} from '@/utils/stomp';
|
||||
export default {
|
||||
name: 'TestRunplan',
|
||||
components: {
|
||||
StationDiagram
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selected: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
mapData() {
|
||||
return this.$store.state.map.map;
|
||||
},
|
||||
mapDevice() {
|
||||
return this.$store.state.map.mapDevice;
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.initJlmapLoadedCount': function (val) {
|
||||
this.handleDispatchWorkData();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearSubscribe(getTopic('ATS_STATUS', this.group));
|
||||
},
|
||||
methods: {
|
||||
setSelected(val) {
|
||||
this.selected = val;
|
||||
},
|
||||
handleDispatchWorkData() {
|
||||
const logicData = {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData};
|
||||
const repaint = this.$store.state.map.initJlmapLoadedCount === 1;
|
||||
const width = this.$store.state.app.width;
|
||||
const height = this.$store.state.app.height;
|
||||
this.$store.dispatch('config/resize', { width, height });
|
||||
this.$jlmap.resize({ width, height });
|
||||
this.$nextTick(()=>{
|
||||
console.log(this.$store.state.map.picture, this.$route.query.client, '88888888', this.mapData, width, height);
|
||||
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
|
||||
});
|
||||
},
|
||||
backTo() {
|
||||
this.$emit('pictureChange', 'diagramEdit');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.backTo{
|
||||
position: absolute;
|
||||
right:0px;
|
||||
top:10px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user