代码调整
This commit is contained in:
parent
8ca90b1003
commit
2e0105c390
@ -314,7 +314,7 @@ export default {
|
||||
{ label: '半自动闭塞', value: 'StationDirectionSemi' }
|
||||
],
|
||||
paperStateArr: ['正在编辑', '封存', '失效'], // 试卷定义状态
|
||||
paperStateQueryMap: { '1': '所有', '2': '编辑', /* '3':'可生成试卷', */ '4': '封存', '5': '失效' },// 试卷定义查询状态
|
||||
paperStateQueryMap: { '1': '所有', '2': '编辑', /* '3':'可生成试卷', */ '4': '封存', '5': '失效' }, // 试卷定义查询状态
|
||||
|
||||
projectList:[
|
||||
{label:'西铁院', value: 'XTY'},
|
||||
@ -352,7 +352,8 @@ export default {
|
||||
{ label: '大客流视图', value: 'largePassengerView' },
|
||||
{ label: '行调台', value: 'dispatcherManage' },
|
||||
{ label: '派班工作站', value: 'scheduleWork' },
|
||||
{ label: '应急调度', value: 'emergency' }
|
||||
{ label: '应急调度', value: 'emergency' },
|
||||
{ label: '联锁工作站', value: 'interlockWork' }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -27,6 +27,9 @@
|
||||
<diagram-edit v-else-if="picture === 'diagramEdit'" ref="diagramEdit" />
|
||||
<pis-terminal v-else-if="picture === 'pis'" ref="pisTerminal" />
|
||||
<display-ba-si-di v-else-if="picture === 'basidi'" ref="displayBaSiDi" />
|
||||
|
||||
<interlock-work v-if="picture=='interlockWork'" ref="interlockWork" :centralized-station-map="centralizedStationMap">
|
||||
|
||||
<terminal-menu
|
||||
v-if="menuShow"
|
||||
ref="terminalMenu"
|
||||
@ -34,7 +37,7 @@
|
||||
@pictureChange="pictureChange"
|
||||
@loadingChange="loadingChange"
|
||||
/>
|
||||
</div>
|
||||
</interlock-work></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -44,6 +47,7 @@ import {creatSubscribe, clearSubscribe, getTopic} from '@/utils/stomp';
|
||||
import { defaultCallback, stateCallback } from '@/utils/subscribeCallback';
|
||||
import DispatcherWork from './dispatchWork';
|
||||
import LocalWork from './localWork';
|
||||
import InterlockWork from './interlockWork';
|
||||
import TerminalMenu from './terminalMenu';
|
||||
import DispatchCmd from './dispatchCmd';
|
||||
import DispatcherLoger from './dispatcherLoger/index';
|
||||
@ -75,6 +79,7 @@ export default {
|
||||
components: {
|
||||
DispatcherWork,
|
||||
LocalWork,
|
||||
InterlockWork,
|
||||
TerminalMenu,
|
||||
DispatchCmd,
|
||||
DispatcherLoger,
|
||||
|
128
src/views/newMap/display/terminals/interlockWork.vue
Normal file
128
src/views/newMap/display/terminals/interlockWork.vue
Normal file
@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div>
|
||||
<component :is="menus" :selected="selected" />
|
||||
<station-diagram ref="stationDiagram" @setSelected="setSelected" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import StationDiagram from '../stationDiagram/index';
|
||||
import { clearSubscribe, getTopic} from '@/utils/stomp';
|
||||
import {mapGetters} from 'vuex';
|
||||
export default {
|
||||
name:'InterlockWork',
|
||||
components: {
|
||||
StationDiagram
|
||||
},
|
||||
props: {
|
||||
centralizedStationMap:{
|
||||
type: Object,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
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;
|
||||
},
|
||||
roleDeviceCode() {
|
||||
return this.$store.state.training.roleDeviceCode;
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 地图数据加载完毕
|
||||
'$store.state.map.mapDataLoadedCount': function () {
|
||||
const lineCode = this.$jlmap.lineCode;
|
||||
if (lineCode) {
|
||||
this.menus = this.$theme.loadLocalWorkMenuComponent(lineCode);
|
||||
}
|
||||
},
|
||||
'$store.state.map.initJlmapLoadedCount': function (val) {
|
||||
this.handleLocalWorkData();
|
||||
},
|
||||
'$store.state.training.roleDeviceCode': function (val) {
|
||||
if (this.mapData && this.mapData.pictureList) {
|
||||
const picture = this.mapData.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === 'localWork');
|
||||
if (picture) {
|
||||
this.handlerPictureShow(picture);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearSubscribe(getTopic('ATS_STATUS', this.group));
|
||||
clearSubscribe(getTopic('STATE', this.group));
|
||||
},
|
||||
methods: {
|
||||
setSelected(val) {
|
||||
this.selected = val;
|
||||
},
|
||||
// 新的画面显示逻辑
|
||||
handlerPictureShow(picture) {
|
||||
const list = [];
|
||||
const deviceList = [];
|
||||
for (const key in this.mapDevice) {
|
||||
list.push(this.mapDevice[key]);
|
||||
deviceList.push(key);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
setTimeout(() => {
|
||||
this.$jlmap.updatePicture(deviceList);
|
||||
this.$jlmap.updateTransform(picture.scaling, picture.origin);
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[this.roleDeviceCode]);
|
||||
}, 10);
|
||||
},
|
||||
handleLocalWorkData() {
|
||||
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) {
|
||||
// let type = this.datie ? 'chainStation' : 'localWork';
|
||||
// const station = this.mapDevice[this.roleDeviceCode];
|
||||
// if (station && station.depot) {
|
||||
// type = 'chainStation';
|
||||
// }
|
||||
const type = 'localWork';
|
||||
const picture = this.mapData.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === type);
|
||||
if (picture) {
|
||||
this.handlerPictureShow(picture);
|
||||
} else {
|
||||
this.handlerSwitchStationMode();
|
||||
}
|
||||
} else {
|
||||
this.handlerSwitchStationMode();
|
||||
}
|
||||
},
|
||||
// 旧的分集中站显示逻辑
|
||||
handlerSwitchStationMode() {
|
||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
||||
this.showStation = this.centralizedStationMap[this.roleDeviceCode];
|
||||
const showStation = this.centralizedStationMap[this.roleDeviceCode];
|
||||
const list = [];
|
||||
for (const key in this.mapDevice) {
|
||||
list.push(this.mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list, showStation);
|
||||
this.$jlmap.setCenter(showStation);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -397,7 +397,9 @@ export default {
|
||||
} else if (this.data.type === 'ILW') {
|
||||
this.$refs.dataForm.validateForm(() => {
|
||||
const param = {
|
||||
deviceCode: this.formData.deviceCode
|
||||
deviceCode: this.formData.deviceCode,
|
||||
roleCode: this.formData.roleCode,
|
||||
client: this.formData.client
|
||||
};
|
||||
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
|
||||
setDeviceConfig(data).then(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user