ncc客户端调整
This commit is contained in:
parent
a188121aac
commit
1faf4fadc5
@ -6,6 +6,7 @@
|
||||
<jl3d-drive v-else-if="picture === 'drivingPlan'" ref="jl3dDrive" />
|
||||
<jl3d-device v-else-if="picture === 'jl3dModle'" ref="jl3dModle" />
|
||||
<cctv-view v-else-if="picture === 'cctvView'" ref="cctvView" />
|
||||
<line-monitor v-else-if="picture === 'lineMonitor'" ref="lineMonitor" />
|
||||
|
||||
<digital-stand v-else-if="picture === 'digitalStand'" ref="digitalStand" />
|
||||
<iscs-system v-else-if="picture === 'iscsView'" ref="IscsSystem" />
|
||||
@ -87,6 +88,7 @@ import TroDetailWork from './troDetailWork';
|
||||
import TestRunplan from './testRunplan';
|
||||
import DriverAtsWork from './driverAtsWork';
|
||||
import NccWork from './nccWork';
|
||||
import LineMonitor from './lineMonitor';
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
@ -124,7 +126,8 @@ export default {
|
||||
Jl3dMaintainerSelect,
|
||||
TestRunplan,
|
||||
DriverAtsWork,
|
||||
NccWork
|
||||
NccWork,
|
||||
LineMonitor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
110
src/views/newMap/display/terminals/lineMonitor.vue
Normal file
110
src/views/newMap/display/terminals/lineMonitor.vue
Normal file
@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<div>
|
||||
<station-diagram ref="stationDiagram" @setSelected="setSelected" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import StationDiagram from '../stationDiagram/index';
|
||||
import {mapGetters} from 'vuex';
|
||||
import { clearSubscribe, getTopic} from '@/utils/stomp';
|
||||
export default {
|
||||
name: 'LineMonitor',
|
||||
components: {
|
||||
StationDiagram
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menus: null,
|
||||
selected: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList',
|
||||
'signalList',
|
||||
'trainWindowList'
|
||||
]),
|
||||
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;
|
||||
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
|
||||
if (this.mapData && this.mapData.pictureList) {
|
||||
const picture = this.mapData.pictureList.find(picture => picture.type === 'dispatchWork');
|
||||
if (picture) {
|
||||
this.handlerPictureShow(picture);
|
||||
} else {
|
||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
||||
const list = [];
|
||||
for (const key in this.mapDevice) {
|
||||
list.push(this.mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list);
|
||||
this.initLocation();
|
||||
}
|
||||
} else {
|
||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
||||
const list = [];
|
||||
for (const key in this.mapDevice) {
|
||||
list.push(this.mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list);
|
||||
this.initLocation();
|
||||
}
|
||||
},
|
||||
initLocation() {
|
||||
const trainingDetail = this.$store.state.trainingNew.trainingDetail;
|
||||
if (trainingDetail && trainingDetail.mapLocationJson) { // 客户端切换后如有实训重新定位
|
||||
const mapLocation = JSON.parse(trainingDetail.mapLocationJson);
|
||||
this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});
|
||||
}
|
||||
},
|
||||
// 新的画面显示逻辑
|
||||
handlerPictureShow(picture) {
|
||||
const list = [];
|
||||
const deviceList = [];
|
||||
for (const key in this.mapDevice) {
|
||||
list.push(this.mapDevice[key]);
|
||||
deviceList.push(key);
|
||||
}
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
setTimeout(() => {
|
||||
this.$jlmap.updatePicture(deviceList);
|
||||
const trainingDetail = this.$store.state.trainingNew.trainingDetail;
|
||||
if (trainingDetail && trainingDetail.mapLocationJson) { // 客户端切换后如有实训重新定位
|
||||
const mapLocation = JSON.parse(trainingDetail.mapLocationJson);
|
||||
this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});
|
||||
} else {
|
||||
this.$jlmap.updateTransform(picture.scaling, picture.origin);
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -41,9 +41,16 @@ export default {
|
||||
click: this.changePictureShow
|
||||
},
|
||||
{
|
||||
name: 'Ncc',
|
||||
name: '线网监控',
|
||||
code: 'nccWork',
|
||||
roleList: ['DISPATCHER'],
|
||||
roleList: ['NCC_DISPATCHER'],
|
||||
isShow: () => this.$route.query.simType === 'METRO',
|
||||
click: this.changePictureShow
|
||||
},
|
||||
{
|
||||
name: '线路监控',
|
||||
code: 'lineMonitor',
|
||||
roleList: ['NCC_DISPATCHER'],
|
||||
isShow: () => this.$route.query.simType === 'METRO',
|
||||
click: this.changePictureShow
|
||||
},
|
||||
@ -113,7 +120,7 @@ export default {
|
||||
{
|
||||
name: '运行图预览',
|
||||
code: 'diagramPreview',
|
||||
roleList: ['DISPATCHER', 'STATION_SUPERVISOR', 'DRIVER'],
|
||||
roleList: ['DISPATCHER', 'STATION_SUPERVISOR', 'DRIVER', 'NCC_DISPATCHER'],
|
||||
isShow: () => this.$route.query.simType === 'METRO',
|
||||
click: this.changePictureShow
|
||||
},
|
||||
@ -313,6 +320,8 @@ export default {
|
||||
// 司机模拟
|
||||
const trainingDesign = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.trainingDesign : false;
|
||||
this.changePictureShow(trainingDesign ? 'driverAtsWork' : 'drivingPlan');
|
||||
} else if (this.roles === 'NCC_DISPATCHER') {
|
||||
this.changePictureShow('nccWork');
|
||||
}
|
||||
},
|
||||
changePictureShow(code) {
|
||||
|
@ -361,6 +361,9 @@ export default {
|
||||
case 'STATION_ELECTRIC_WORKER':
|
||||
data.label = '电力工务 ' + (member.name ? `-${member.name}` : '');
|
||||
break;
|
||||
case 'NCC_DISPATCHER':
|
||||
data.label = 'NCC调度' + (member.name ? `-${member.name}` : '');
|
||||
break;
|
||||
}
|
||||
return data;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user