修改菜单处理
This commit is contained in:
parent
cdccd7b41f
commit
c4a6b076da
@ -16,7 +16,7 @@ class TrainWindow extends Group {
|
|||||||
this.setState(state);
|
this.setState(state);
|
||||||
}
|
}
|
||||||
_create(model) {
|
_create(model) {
|
||||||
const prdType = '02';// store.state.map.prdType;
|
const prdType = '02';// store.state.training.prdType;
|
||||||
if (prdType !== '01') {
|
if (prdType !== '01') {
|
||||||
this.createTrainWindow();
|
this.createTrainWindow();
|
||||||
this.setTrainWindowEventShow(model.trainWindowShow);
|
this.setTrainWindowEventShow(model.trainWindowShow);
|
||||||
|
@ -134,10 +134,10 @@
|
|||||||
},
|
},
|
||||||
//取消列车进路
|
//取消列车进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
if (this.$store.state.map.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
/** 现地工作站*/
|
/** 现地工作站*/
|
||||||
this.cancelTrainRouteByLocal();
|
this.cancelTrainRouteByLocal();
|
||||||
} else if (this.$store.state.map.prdType == '02') {
|
} else if (this.$store.state.training.prdType == '02') {
|
||||||
/** 行调工作站*/
|
/** 行调工作站*/
|
||||||
this.cancelTrainRouteByCentral();
|
this.cancelTrainRouteByCentral();
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
return this.$route.params.mode == 'dp'
|
return this.$route.params.mode == 'dp'
|
||||||
},
|
},
|
||||||
isShowMenu() {
|
isShowMenu() {
|
||||||
return this.$store.state.map.prdType != '';
|
return this.$store.state.training.prdType != '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -438,7 +438,7 @@
|
|||||||
'$store.state.training.started': function (val) {
|
'$store.state.training.started': function (val) {
|
||||||
this.closeMenu(true);
|
this.closeMenu(true);
|
||||||
},
|
},
|
||||||
'$store.state.map.prdType': function () {
|
'$store.state.training.prdType': function () {
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -447,7 +447,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initMenu(menu) {
|
initMenu(menu) {
|
||||||
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.map.prdType]], this.$store.state.training.operatemode);
|
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.closeMenu(true);
|
this.closeMenu(true);
|
||||||
},
|
},
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
if (elem.visible) {
|
if (elem.visible) {
|
||||||
let next = elem;
|
let next = elem;
|
||||||
while (!next.centralized) {
|
while (!next.centralized) {
|
||||||
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
next = (this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode) || {}).model;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (station.code == next.code) {
|
if (station.code == next.code) {
|
||||||
|
@ -113,46 +113,48 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setDeviceDisplay() {
|
setDeviceDisplay() {
|
||||||
let show = false;
|
// let show = false;
|
||||||
let deviceList = [];
|
// let deviceList = [];
|
||||||
|
|
||||||
//区段边界设置
|
// //区段边界设置
|
||||||
let sectionList = this.$store.getters['map/sectionList'];
|
// let sectionList = this.$store.getters['map/sectionList'];
|
||||||
if (sectionList && sectionList.length > 0) {
|
// if (sectionList && sectionList.length > 0) {
|
||||||
sectionList.forEach(elem => {
|
// sectionList.forEach(elem => {
|
||||||
//区段边界
|
// //区段边界
|
||||||
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
||||||
elem.borderBorderShow = show;
|
// elem.borderBorderShow = show;
|
||||||
deviceList.push(elem);
|
// elem.type = deviceType.Section;
|
||||||
});
|
// deviceList.push(elem);
|
||||||
}
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
//车次窗设置
|
// //车次窗设置
|
||||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
// let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||||
if (trainWindowList && trainWindowList.length > 0) {
|
// if (trainWindowList && trainWindowList.length > 0) {
|
||||||
trainWindowList.forEach(elem => {
|
// trainWindowList.forEach(elem => {
|
||||||
//车次窗
|
// //车次窗
|
||||||
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
||||||
elem.trainWindowShow = show;
|
// elem.type = deviceType.Section;
|
||||||
deviceList.push(elem);
|
// elem.trainWindowShow = show;
|
||||||
});
|
// deviceList.push(elem);
|
||||||
}
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
//联锁自动进路表示灯和ATS自动触发表示灯设置
|
// //联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||||
let signalList = this.$store.getters['map/signalList'];
|
// let signalList = this.$store.getters['map/signalList'];
|
||||||
if (signalList && signalList.length > 0) {
|
// if (signalList && signalList.length > 0) {
|
||||||
signalList.forEach(elem => {
|
// signalList.forEach(elem => {
|
||||||
//联锁自动进路表示灯
|
// //联锁自动进路表示灯
|
||||||
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
||||||
elem.linkageAutoRouteShow = show;
|
// elem.linkageAutoRouteShow = show;
|
||||||
//ATS自动触发表示灯
|
// //ATS自动触发表示灯
|
||||||
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
||||||
elem.atsAutoTriggerShow = show;
|
// elem.atsAutoTriggerShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', deviceList);
|
// this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,115 +147,115 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setNameDisplay() {
|
setNameDisplay() {
|
||||||
let show = false;
|
// let show = false;
|
||||||
let deviceList = [];
|
// let deviceList = [];
|
||||||
|
|
||||||
//信号机
|
// //信号机
|
||||||
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||||
let signalList = this.$store.getters['map/signalList'];
|
// let signalList = this.$store.getters['map/signalList'];
|
||||||
if (signalList && signalList.length > 0) {
|
// if (signalList && signalList.length > 0) {
|
||||||
signalList.forEach(elem => {
|
// signalList.forEach(elem => {
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//按钮名称
|
// //按钮名称
|
||||||
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||||
|
|
||||||
|
|
||||||
//道岔
|
// //道岔
|
||||||
let switchList = this.$store.getters['map/switchList'];
|
// let switchList = this.$store.getters['map/switchList'];
|
||||||
if (switchList && switchList.length > 0) {
|
// if (switchList && switchList.length > 0) {
|
||||||
switchList.forEach(elem => {
|
// switchList.forEach(elem => {
|
||||||
//道岔名称
|
// //道岔名称
|
||||||
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
//道岔轨名称
|
// //道岔轨名称
|
||||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||||
elem.switchSectionNameShow = show;
|
// elem.switchSectionNameShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//控制模式
|
// //控制模式
|
||||||
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||||
let control = this.$store.getters['map/stationControlList'];
|
// let control = this.$store.getters['map/stationControlList'];
|
||||||
if (control && control.length > 0) {
|
// if (control && control.length > 0) {
|
||||||
control.forEach(elem => {
|
// control.forEach(elem => {
|
||||||
//标识灯名称
|
// //标识灯名称
|
||||||
elem.indicatorShow = show;
|
// elem.indicatorShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//区段
|
// //区段
|
||||||
let sectionList = this.$store.getters['map/sectionList'];
|
// let sectionList = this.$store.getters['map/sectionList'];
|
||||||
if (sectionList && sectionList.length > 0) {
|
// if (sectionList && sectionList.length > 0) {
|
||||||
sectionList.forEach(elem => {
|
// sectionList.forEach(elem => {
|
||||||
if (elem.isSwitchSection && elem.parentCode) {
|
// if (elem.isSwitchSection && elem.parentCode) {
|
||||||
//道岔轨的区段名称默认不显示
|
// //道岔轨的区段名称默认不显示
|
||||||
elem.nameShow = false;
|
// elem.nameShow = false;
|
||||||
} else {
|
// } else {
|
||||||
if (elem.type === '01') {
|
// if (elem.type === '01') {
|
||||||
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
} else if (elem.type === '02') {
|
// } else if (elem.type === '02') {
|
||||||
//股道轨名称
|
// //股道轨名称
|
||||||
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
} else if (elem.type === '03') {
|
// } else if (elem.type === '03') {
|
||||||
//道岔区段名称
|
// //道岔区段名称
|
||||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//站台轨名称
|
// //站台轨名称
|
||||||
if (elem.isStandTrack) {
|
// if (elem.isStandTrack) {
|
||||||
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||||
elem.standTrackNameShow = show;
|
// elem.standTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//折返轨名称
|
// //折返轨名称
|
||||||
if (elem.isReentryTrack) {
|
// if (elem.isReentryTrack) {
|
||||||
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||||
elem.reentryTrackNameShow = show;
|
// elem.reentryTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//转换轨名称
|
// //转换轨名称
|
||||||
if (elem.isTransferTrack) {
|
// if (elem.isTransferTrack) {
|
||||||
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||||
elem.transferTrackNameShow = show;
|
// elem.transferTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//停车点
|
// //停车点
|
||||||
show = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||||
let stopPointList = this.$store.getters['map/stopPointList'];
|
// let stopPointList = this.$store.getters['map/stopPointList'];
|
||||||
if (stopPointList && stopPointList.length > 0) {
|
// if (stopPointList && stopPointList.length > 0) {
|
||||||
stopPointList.forEach(elem => {
|
// stopPointList.forEach(elem => {
|
||||||
//目的地名称
|
// //目的地名称
|
||||||
elem.destCodeShow = show;
|
// elem.destCodeShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//车站
|
// //车站
|
||||||
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||||
let stationList = this.$store.getters['map/stationList'];
|
// let stationList = this.$store.getters['map/stationList'];
|
||||||
if (stationList && stationList.length > 0) {
|
// if (stationList && stationList.length > 0) {
|
||||||
stationList.forEach(elem => {
|
// stationList.forEach(elem => {
|
||||||
//公里标
|
// //公里标
|
||||||
elem.kmPostShow = show;
|
// elem.kmPostShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', deviceList);
|
// this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,17 +155,17 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setTrainDispaly() {
|
setTrainDispaly() {
|
||||||
let trainList = this.$store.getters['training/viewTrainList'];
|
// let trainList = this.$store.getters['training/viewTrainList'];
|
||||||
if (trainList && trainList.length > 0) {
|
// if (trainList && trainList.length > 0) {
|
||||||
let planFormat = this.trainNameFormatBy(this.planMode);
|
// let planFormat = this.trainNameFormatBy(this.planMode);
|
||||||
let nameFontSize = this.fontSize;
|
// let nameFontSize = this.fontSize;
|
||||||
trainList.forEach(elem => {
|
// trainList.forEach(elem => {
|
||||||
elem.nameFormat = planFormat;
|
// elem.nameFormat = planFormat;
|
||||||
elem.nameFontSize = nameFontSize;
|
// elem.nameFontSize = nameFontSize;
|
||||||
});
|
// });
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', trainList);
|
// this.$store.dispatch('map/updateMapDevices', trainList);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
trainNameFormatBy(mode) {
|
trainNameFormatBy(mode) {
|
||||||
switch (mode.toString()) {
|
switch (mode.toString()) {
|
||||||
|
@ -69,10 +69,10 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
targetStatus() {
|
targetStatus() {
|
||||||
if (this.$store.state.map.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
return '01';
|
return '01';
|
||||||
}
|
}
|
||||||
if (this.$store.state.map.prdType == '02') {
|
if (this.$store.state.training.prdType == '02') {
|
||||||
return '02'
|
return '02'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -237,7 +237,7 @@
|
|||||||
type: MapDeviceType.StationControl.type,
|
type: MapDeviceType.StationControl.type,
|
||||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||||
val: this.selection[0].code,
|
val: this.selection[0].code,
|
||||||
prdType: this.$store.state.map.prdType
|
prdType: this.$store.state.training.prdType
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
@ -258,7 +258,7 @@
|
|||||||
type: MapDeviceType.StationControl.type,
|
type: MapDeviceType.StationControl.type,
|
||||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||||
val: this.tableData[0].code,
|
val: this.tableData[0].code,
|
||||||
prdType: this.$store.state.map.prdType
|
prdType: this.$store.state.training.prdType
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
|
@ -474,18 +474,19 @@ export function menuFiltration(menuObj) {
|
|||||||
var selected = store.getters['menuOperation/selected'];
|
var selected = store.getters['menuOperation/selected'];
|
||||||
var control;
|
var control;
|
||||||
var menu = [];
|
var menu = [];
|
||||||
|
|
||||||
if (selected._type == 'StationStand') {
|
if (selected._type == 'StationStand') {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.deviceStationCode);
|
||||||
} else if (selected._type == 'Station') {
|
} else if (selected._type == 'Station') {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.code);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.code);
|
||||||
} else {
|
} else {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (control) {
|
if (control) {
|
||||||
var controlStatus = (control || {}).state;
|
if (store.state.training.prdType != '') {
|
||||||
if (store.state.map.prdType != '') {
|
var type = SystemType[store.state.training.prdType];
|
||||||
var type = SystemType[store.state.map.prdType];
|
var status = StationControlType[control.state.status];
|
||||||
var status = StationControlType[controlStatus.status];
|
|
||||||
menu = [...menuObj[type]];
|
menu = [...menuObj[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
@ -508,8 +509,8 @@ export function menuFiltration(menuObj) {
|
|||||||
*/
|
*/
|
||||||
export function trainMenuFiltration(menuObj) {
|
export function trainMenuFiltration(menuObj) {
|
||||||
var menu = [];
|
var menu = [];
|
||||||
if (store.state.map.prdType != '') {
|
if (store.state.training.prdType != '') {
|
||||||
var type = SystemType[store.state.map.prdType];
|
var type = SystemType[store.state.training.prdType];
|
||||||
menu = [...menuObj[type]];
|
menu = [...menuObj[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
|
@ -114,10 +114,10 @@
|
|||||||
},
|
},
|
||||||
//取消列车进路
|
//取消列车进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
if (this.$store.state.map.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
/** 现地工作站*/
|
/** 现地工作站*/
|
||||||
this.cancelTrainRouteByLocal();
|
this.cancelTrainRouteByLocal();
|
||||||
} else if (this.$store.state.map.prdType == '02') {
|
} else if (this.$store.state.training.prdType == '02') {
|
||||||
/** 行调工作站*/
|
/** 行调工作站*/
|
||||||
this.cancelTrainRouteByCentral();
|
this.cancelTrainRouteByCentral();
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
this.$route.params.mode !== 'plan'
|
this.$route.params.mode !== 'plan'
|
||||||
},
|
},
|
||||||
isShowBar() {
|
isShowBar() {
|
||||||
return this.$store.state.map.prdType != '';
|
return this.$store.state.training.prdType != '';
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -698,7 +698,7 @@
|
|||||||
'$store.state.training.started': function (val) {
|
'$store.state.training.started': function (val) {
|
||||||
this.closeMenu(true);
|
this.closeMenu(true);
|
||||||
},
|
},
|
||||||
'$store.state.map.prdType': function () {
|
'$store.state.training.prdType': function () {
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -730,7 +730,7 @@
|
|||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
initMenu(menu) {
|
initMenu(menu) {
|
||||||
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.map.prdType]], this.$store.state.training.operatemode);
|
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
||||||
this.menu[2].children = this.initStationList();
|
this.menu[2].children = this.initStationList();
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.closeMenu(true);
|
this.closeMenu(true);
|
||||||
|
@ -229,7 +229,7 @@
|
|||||||
return OperationEvent.Signal;
|
return OperationEvent.Signal;
|
||||||
},
|
},
|
||||||
isShowBtn() {
|
isShowBtn() {
|
||||||
return this.$store.state.map.prdType == '01';
|
return this.$store.state.training.prdType == '01';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -114,46 +114,46 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setDeviceDisplay() {
|
setDeviceDisplay() {
|
||||||
let show = false;
|
// let show = false;
|
||||||
let deviceList = [];
|
// let deviceList = [];
|
||||||
|
|
||||||
//区段边界设置
|
// //区段边界设置
|
||||||
let sectionList = this.$store.getters['map/sectionList'];
|
// let sectionList = this.$store.getters['map/sectionList'];
|
||||||
if (sectionList && sectionList.length > 0) {
|
// if (sectionList && sectionList.length > 0) {
|
||||||
sectionList.forEach(elem => {
|
// sectionList.forEach(elem => {
|
||||||
//区段边界
|
// //区段边界
|
||||||
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
||||||
elem.borderBorderShow = show;
|
// elem.borderBorderShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
//车次窗设置
|
// //车次窗设置
|
||||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
// let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||||
if (trainWindowList && trainWindowList.length > 0) {
|
// if (trainWindowList && trainWindowList.length > 0) {
|
||||||
trainWindowList.forEach(elem => {
|
// trainWindowList.forEach(elem => {
|
||||||
//车次窗
|
// //车次窗
|
||||||
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
||||||
elem.trainWindowShow = show;
|
// elem.trainWindowShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
//联锁自动进路表示灯和ATS自动触发表示灯设置
|
// //联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||||
let signalList = this.$store.getters['map/signalList'];
|
// let signalList = this.$store.getters['map/signalList'];
|
||||||
if (signalList && signalList.length > 0) {
|
// if (signalList && signalList.length > 0) {
|
||||||
signalList.forEach(elem => {
|
// signalList.forEach(elem => {
|
||||||
//联锁自动进路表示灯
|
// //联锁自动进路表示灯
|
||||||
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
||||||
elem.linkageAutoRouteShow = show;
|
// elem.linkageAutoRouteShow = show;
|
||||||
//ATS自动触发表示灯
|
// //ATS自动触发表示灯
|
||||||
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
||||||
elem.atsAutoTriggerShow = show;
|
// elem.atsAutoTriggerShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', deviceList);
|
// this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,116 +147,116 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setNameDisplay() {
|
setNameDisplay() {
|
||||||
let show = false;
|
// let show = false;
|
||||||
let deviceList = [];
|
// let deviceList = [];
|
||||||
|
|
||||||
//信号机
|
// //信号机
|
||||||
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||||
let signalList = this.$store.getters['map/signalList'];
|
// let signalList = this.$store.getters['map/signalList'];
|
||||||
if (signalList && signalList.length > 0) {
|
// if (signalList && signalList.length > 0) {
|
||||||
signalList.forEach(elem => {
|
// signalList.forEach(elem => {
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//按钮名称
|
// //按钮名称
|
||||||
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||||
|
|
||||||
|
|
||||||
//道岔
|
// //道岔
|
||||||
let switchList = this.$store.getters['map/switchList'];
|
// let switchList = this.$store.getters['map/switchList'];
|
||||||
if (switchList && switchList.length > 0) {
|
// if (switchList && switchList.length > 0) {
|
||||||
switchList.forEach(elem => {
|
// switchList.forEach(elem => {
|
||||||
//道岔名称
|
// //道岔名称
|
||||||
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
//道岔轨名称
|
// //道岔轨名称
|
||||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||||
elem.switchSectionNameShow = show;
|
// elem.switchSectionNameShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//控制模式
|
// //控制模式
|
||||||
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||||
let control = this.$store.getters['map/stationControlList'];
|
// let control = this.$store.getters['map/stationControlList'];
|
||||||
if (control && control.length > 0) {
|
// if (control && control.length > 0) {
|
||||||
control.forEach(elem => {
|
// control.forEach(elem => {
|
||||||
//标识灯名称
|
// //标识灯名称
|
||||||
elem.indicatorShow = show;
|
// elem.indicatorShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//区段
|
// //区段
|
||||||
let sectionList = this.$store.getters['map/sectionList'];
|
// let sectionList = this.$store.getters['map/sectionList'];
|
||||||
if (sectionList && sectionList.length > 0) {
|
// if (sectionList && sectionList.length > 0) {
|
||||||
sectionList.forEach(elem => {
|
// sectionList.forEach(elem => {
|
||||||
if (elem.isSwitchSection && elem.parentCode) {
|
// if (elem.isSwitchSection && elem.parentCode) {
|
||||||
//道岔轨的区段名称默认不显示
|
// //道岔轨的区段名称默认不显示
|
||||||
elem.nameShow = false;
|
// elem.nameShow = false;
|
||||||
} else {
|
// } else {
|
||||||
if (elem.type === '01') {
|
// if (elem.type === '01') {
|
||||||
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
} else if (elem.type === '02') {
|
// } else if (elem.type === '02') {
|
||||||
//股道轨名称
|
// //股道轨名称
|
||||||
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
} else if (elem.type === '03') {
|
// } else if (elem.type === '03') {
|
||||||
//道岔区段名称
|
// //道岔区段名称
|
||||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//站台轨名称
|
// //站台轨名称
|
||||||
if (elem.isStandTrack) {
|
// if (elem.isStandTrack) {
|
||||||
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||||
elem.standTrackNameShow = show;
|
// elem.standTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//折返轨名称
|
// //折返轨名称
|
||||||
if (elem.isReentryTrack) {
|
// if (elem.isReentryTrack) {
|
||||||
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||||
elem.reentryTrackNameShow = show;
|
// elem.reentryTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//转换轨名称
|
// //转换轨名称
|
||||||
if (elem.isTransferTrack) {
|
// if (elem.isTransferTrack) {
|
||||||
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||||
elem.transferTrackNameShow = show;
|
// elem.transferTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//停车点
|
// //停车点
|
||||||
show = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||||
let stopPointList = this.$store.getters['map/stopPointList'];
|
// let stopPointList = this.$store.getters['map/stopPointList'];
|
||||||
if (stopPointList && stopPointList.length > 0) {
|
// if (stopPointList && stopPointList.length > 0) {
|
||||||
stopPointList.forEach(elem => {
|
// stopPointList.forEach(elem => {
|
||||||
//目的地名称
|
// //目的地名称
|
||||||
elem.destCodeShow = show;
|
// elem.destCodeShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//车站
|
// //车站
|
||||||
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||||
let stationList = this.$store.getters['map/stationList'];
|
// let stationList = this.$store.getters['map/stationList'];
|
||||||
if (stationList && stationList.length > 0) {
|
// if (stationList && stationList.length > 0) {
|
||||||
stationList.forEach(elem => {
|
// stationList.forEach(elem => {
|
||||||
//公里标
|
// //公里标
|
||||||
elem.kmPostShow = show;
|
// elem.kmPostShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
|
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', deviceList);
|
// this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,17 +155,17 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setTrainDispaly() {
|
setTrainDispaly() {
|
||||||
let trainList = this.$store.getters['training/viewTrainList'];
|
// let trainList = this.$store.getters['training/viewTrainList'];
|
||||||
if (trainList && trainList.length > 0) {
|
// if (trainList && trainList.length > 0) {
|
||||||
let planFormat = this.trainNameFormatBy(this.planMode);
|
// let planFormat = this.trainNameFormatBy(this.planMode);
|
||||||
let nameFontSize = this.fontSize;
|
// let nameFontSize = this.fontSize;
|
||||||
trainList.forEach(elem => {
|
// trainList.forEach(elem => {
|
||||||
elem.nameFormat = planFormat;
|
// elem.nameFormat = planFormat;
|
||||||
elem.nameFontSize = nameFontSize;
|
// elem.nameFontSize = nameFontSize;
|
||||||
});
|
// });
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', trainList);
|
// this.$store.dispatch('map/updateMapDevices', trainList);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
trainNameFormatBy(mode) {
|
trainNameFormatBy(mode) {
|
||||||
switch (mode.toString()) {
|
switch (mode.toString()) {
|
||||||
|
@ -69,10 +69,10 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
targetStatus() {
|
targetStatus() {
|
||||||
if (this.$store.state.map.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
return '01';
|
return '01';
|
||||||
}
|
}
|
||||||
if (this.$store.state.map.prdType == '02') {
|
if (this.$store.state.training.prdType == '02') {
|
||||||
return '02'
|
return '02'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -237,7 +237,7 @@
|
|||||||
type: MapDeviceType.StationControl.type,
|
type: MapDeviceType.StationControl.type,
|
||||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||||
val: this.selection[0].code,
|
val: this.selection[0].code,
|
||||||
prdType: this.$store.state.map.prdType
|
prdType: this.$store.state.training.prdType
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
@ -258,7 +258,7 @@
|
|||||||
type: MapDeviceType.StationControl.type,
|
type: MapDeviceType.StationControl.type,
|
||||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||||
val: this.tableData[0].code,
|
val: this.tableData[0].code,
|
||||||
prdType: this.$store.state.map.prdType
|
prdType: this.$store.state.training.prdType
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
|
@ -494,20 +494,19 @@ export function menuFiltration(menuObj) {
|
|||||||
var selected = store.getters['menuOperation/selected'];
|
var selected = store.getters['menuOperation/selected'];
|
||||||
var control;
|
var control;
|
||||||
var menu = [];
|
var menu = [];
|
||||||
|
|
||||||
if (selected._type == 'StationStand') {
|
if (selected._type == 'StationStand') {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.deviceStationCode);
|
||||||
} else if (selected._type == 'Station') {
|
} else if (selected._type == 'Station') {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.code);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.code);
|
||||||
} else if (selected._type == 'LimitControl') {
|
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.code);
|
|
||||||
} else {
|
} else {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (control) {
|
if (control) {
|
||||||
const controlStatus = getStatusObject(control);
|
if (store.state.training.prdType != '') {
|
||||||
if (store.state.map.prdType != '') {
|
const type = SystemType[store.state.training.prdType];
|
||||||
const type = SystemType[store.state.map.prdType];
|
const status = StationControlType[control.state.status];
|
||||||
const status = StationControlType[controlStatus.status];
|
|
||||||
menu = [...menuObj[type]];
|
menu = [...menuObj[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
@ -518,7 +517,7 @@ export function menuFiltration(menuObj) {
|
|||||||
|
|
||||||
if (elem.auth.constructor === Object) {
|
if (elem.auth.constructor === Object) {
|
||||||
elem.show = true;
|
elem.show = true;
|
||||||
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
||||||
elem.show = false;
|
elem.show = false;
|
||||||
}
|
}
|
||||||
elem.defaultDisabled = !elem.auth[status];
|
elem.defaultDisabled = !elem.auth[status];
|
||||||
@ -535,8 +534,8 @@ export function menuFiltration(menuObj) {
|
|||||||
*/
|
*/
|
||||||
export function trainMenuFiltration(menuObj) {
|
export function trainMenuFiltration(menuObj) {
|
||||||
var menu = [];
|
var menu = [];
|
||||||
if (store.state.map.prdType != '') {
|
if (store.state.training.prdType != '') {
|
||||||
const type = SystemType[store.state.map.prdType];
|
const type = SystemType[store.state.training.prdType];
|
||||||
menu = [...menuObj[type]];
|
menu = [...menuObj[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
@ -547,7 +546,7 @@ export function trainMenuFiltration(menuObj) {
|
|||||||
|
|
||||||
if (elem.auth.constructor === Object) {
|
if (elem.auth.constructor === Object) {
|
||||||
elem.show = true;
|
elem.show = true;
|
||||||
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
||||||
elem.show = false;
|
elem.show = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
},
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$store.state.map && this.$store.state.map.map) {
|
if (this.$store.state.map && this.$store.state.map.map) {
|
||||||
params['skinStyle'] = this.$store.state.map.map.skinStyle;
|
params['skinStyle'] = this.$store.getters['map/skinStyle'];
|
||||||
}
|
}
|
||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
},
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$store.state.map && this.$store.state.map.map) {
|
if (this.$store.state.map && this.$store.state.map.map) {
|
||||||
params['skinStyle'] = this.$store.state.map.map.skinStyle;
|
params['skinStyle'] = this.$store.getters['map/skinStyle'];
|
||||||
}
|
}
|
||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
|
@ -140,10 +140,10 @@
|
|||||||
},
|
},
|
||||||
//取消列车进路
|
//取消列车进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
if (this.$store.state.map.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
/** 现地工作站*/
|
/** 现地工作站*/
|
||||||
this.cancelTrainRouteByLocal();
|
this.cancelTrainRouteByLocal();
|
||||||
} else if (this.$store.state.map.prdType == '02') {
|
} else if (this.$store.state.training.prdType == '02') {
|
||||||
/** 行调工作站*/
|
/** 行调工作站*/
|
||||||
this.cancelTrainRouteByCentral();
|
this.cancelTrainRouteByCentral();
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
this.$route.params.mode !== 'plan'
|
this.$route.params.mode !== 'plan'
|
||||||
},
|
},
|
||||||
isShowBar() {
|
isShowBar() {
|
||||||
return this.$store.state.map.prdType != '';
|
return this.$store.state.training.prdType != '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -698,7 +698,7 @@
|
|||||||
'$store.state.training.started': function (val) {
|
'$store.state.training.started': function (val) {
|
||||||
this.closeMenu(true);
|
this.closeMenu(true);
|
||||||
},
|
},
|
||||||
'$store.state.map.prdType': function () {
|
'$store.state.training.prdType': function () {
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -730,7 +730,7 @@
|
|||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
initMenu(menu) {
|
initMenu(menu) {
|
||||||
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.map.prdType]], this.$store.state.training.operatemode);
|
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
||||||
this.menu[2].children = this.initStationList();
|
this.menu[2].children = this.initStationList();
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.closeMenu(true);
|
this.closeMenu(true);
|
||||||
|
@ -114,46 +114,46 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setDeviceDisplay() {
|
setDeviceDisplay() {
|
||||||
let show = false;
|
// let show = false;
|
||||||
let deviceList = [];
|
// let deviceList = [];
|
||||||
|
|
||||||
//区段边界设置
|
// //区段边界设置
|
||||||
let sectionList = this.$store.getters['map/sectionList'];
|
// let sectionList = this.$store.getters['map/sectionList'];
|
||||||
if (sectionList && sectionList.length > 0) {
|
// if (sectionList && sectionList.length > 0) {
|
||||||
sectionList.forEach(elem => {
|
// sectionList.forEach(elem => {
|
||||||
//区段边界
|
// //区段边界
|
||||||
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
||||||
elem.borderBorderShow = show;
|
// elem.borderBorderShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
//车次窗设置
|
// //车次窗设置
|
||||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
// let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||||
if (trainWindowList && trainWindowList.length > 0) {
|
// if (trainWindowList && trainWindowList.length > 0) {
|
||||||
trainWindowList.forEach(elem => {
|
// trainWindowList.forEach(elem => {
|
||||||
//车次窗
|
// //车次窗
|
||||||
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
||||||
elem.trainWindowShow = show;
|
// elem.trainWindowShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
//联锁自动进路表示灯和ATS自动触发表示灯设置
|
// //联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||||
let signalList = this.$store.getters['map/signalList'];
|
// let signalList = this.$store.getters['map/signalList'];
|
||||||
if (signalList && signalList.length > 0) {
|
// if (signalList && signalList.length > 0) {
|
||||||
signalList.forEach(elem => {
|
// signalList.forEach(elem => {
|
||||||
//联锁自动进路表示灯
|
// //联锁自动进路表示灯
|
||||||
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
||||||
elem.linkageAutoRouteShow = show;
|
// elem.linkageAutoRouteShow = show;
|
||||||
//ATS自动触发表示灯
|
// //ATS自动触发表示灯
|
||||||
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
||||||
elem.atsAutoTriggerShow = show;
|
// elem.atsAutoTriggerShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', deviceList);
|
// this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,116 +147,116 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setNameDisplay() {
|
setNameDisplay() {
|
||||||
let show = false;
|
// let show = false;
|
||||||
let deviceList = [];
|
// let deviceList = [];
|
||||||
|
|
||||||
//信号机
|
// //信号机
|
||||||
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||||
let signalList = this.$store.getters['map/signalList'];
|
// let signalList = this.$store.getters['map/signalList'];
|
||||||
if (signalList && signalList.length > 0) {
|
// if (signalList && signalList.length > 0) {
|
||||||
signalList.forEach(elem => {
|
// signalList.forEach(elem => {
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//按钮名称
|
// //按钮名称
|
||||||
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||||
|
|
||||||
|
|
||||||
//道岔
|
// //道岔
|
||||||
let switchList = this.$store.getters['map/switchList'];
|
// let switchList = this.$store.getters['map/switchList'];
|
||||||
if (switchList && switchList.length > 0) {
|
// if (switchList && switchList.length > 0) {
|
||||||
switchList.forEach(elem => {
|
// switchList.forEach(elem => {
|
||||||
//道岔名称
|
// //道岔名称
|
||||||
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
//道岔轨名称
|
// //道岔轨名称
|
||||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||||
elem.switchSectionNameShow = show;
|
// elem.switchSectionNameShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//控制模式
|
// //控制模式
|
||||||
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||||
let control = this.$store.getters['map/stationControlList'];
|
// let control = this.$store.getters['map/stationControlList'];
|
||||||
if (control && control.length > 0) {
|
// if (control && control.length > 0) {
|
||||||
control.forEach(elem => {
|
// control.forEach(elem => {
|
||||||
//标识灯名称
|
// //标识灯名称
|
||||||
elem.indicatorShow = show;
|
// elem.indicatorShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//区段
|
// //区段
|
||||||
let sectionList = this.$store.getters['map/sectionList'];
|
// let sectionList = this.$store.getters['map/sectionList'];
|
||||||
if (sectionList && sectionList.length > 0) {
|
// if (sectionList && sectionList.length > 0) {
|
||||||
sectionList.forEach(elem => {
|
// sectionList.forEach(elem => {
|
||||||
if (elem.isSwitchSection && elem.parentCode) {
|
// if (elem.isSwitchSection && elem.parentCode) {
|
||||||
//道岔轨的区段名称默认不显示
|
// //道岔轨的区段名称默认不显示
|
||||||
elem.nameShow = false;
|
// elem.nameShow = false;
|
||||||
} else {
|
// } else {
|
||||||
if (elem.type === '01') {
|
// if (elem.type === '01') {
|
||||||
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
} else if (elem.type === '02') {
|
// } else if (elem.type === '02') {
|
||||||
//股道轨名称
|
// //股道轨名称
|
||||||
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
} else if (elem.type === '03') {
|
// } else if (elem.type === '03') {
|
||||||
//道岔区段名称
|
// //道岔区段名称
|
||||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//站台轨名称
|
// //站台轨名称
|
||||||
if (elem.isStandTrack) {
|
// if (elem.isStandTrack) {
|
||||||
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||||
elem.standTrackNameShow = show;
|
// elem.standTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//折返轨名称
|
// //折返轨名称
|
||||||
if (elem.isReentryTrack) {
|
// if (elem.isReentryTrack) {
|
||||||
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||||
elem.reentryTrackNameShow = show;
|
// elem.reentryTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//转换轨名称
|
// //转换轨名称
|
||||||
if (elem.isTransferTrack) {
|
// if (elem.isTransferTrack) {
|
||||||
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||||
elem.transferTrackNameShow = show;
|
// elem.transferTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//停车点
|
// //停车点
|
||||||
show = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||||
let stopPointList = this.$store.getters['map/stopPointList'];
|
// let stopPointList = this.$store.getters['map/stopPointList'];
|
||||||
if (stopPointList && stopPointList.length > 0) {
|
// if (stopPointList && stopPointList.length > 0) {
|
||||||
stopPointList.forEach(elem => {
|
// stopPointList.forEach(elem => {
|
||||||
//目的地名称
|
// //目的地名称
|
||||||
elem.destCodeShow = show;
|
// elem.destCodeShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
//车站
|
// //车站
|
||||||
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||||
let stationList = this.$store.getters['map/stationList'];
|
// let stationList = this.$store.getters['map/stationList'];
|
||||||
if (stationList && stationList.length > 0) {
|
// if (stationList && stationList.length > 0) {
|
||||||
stationList.forEach(elem => {
|
// stationList.forEach(elem => {
|
||||||
//公里标
|
// //公里标
|
||||||
elem.kmPostShow = show;
|
// elem.kmPostShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
|
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', deviceList);
|
// this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,17 +155,17 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setTrainDispaly() {
|
setTrainDispaly() {
|
||||||
let trainList = this.$store.getters['training/viewTrainList'];
|
// let trainList = this.$store.getters['training/viewTrainList'];
|
||||||
if (trainList && trainList.length > 0) {
|
// if (trainList && trainList.length > 0) {
|
||||||
let planFormat = this.trainNameFormatBy(this.planMode);
|
// let planFormat = this.trainNameFormatBy(this.planMode);
|
||||||
let nameFontSize = this.fontSize;
|
// let nameFontSize = this.fontSize;
|
||||||
trainList.forEach(elem => {
|
// trainList.forEach(elem => {
|
||||||
elem.nameFormat = planFormat;
|
// elem.nameFormat = planFormat;
|
||||||
elem.nameFontSize = nameFontSize;
|
// elem.nameFontSize = nameFontSize;
|
||||||
});
|
// });
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', trainList);
|
// this.$store.dispatch('map/updateMapDevices', trainList);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
trainNameFormatBy(mode) {
|
trainNameFormatBy(mode) {
|
||||||
switch (mode.toString()) {
|
switch (mode.toString()) {
|
||||||
|
@ -69,10 +69,10 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
targetStatus() {
|
targetStatus() {
|
||||||
if (this.$store.state.map.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
return '01';
|
return '01';
|
||||||
}
|
}
|
||||||
if (this.$store.state.map.prdType == '02') {
|
if (this.$store.state.training.prdType == '02') {
|
||||||
return '02'
|
return '02'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -237,7 +237,7 @@
|
|||||||
type: MapDeviceType.StationControl.type,
|
type: MapDeviceType.StationControl.type,
|
||||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||||
val: this.selection[0].code,
|
val: this.selection[0].code,
|
||||||
prdType: this.$store.state.map.prdType
|
prdType: this.$store.state.training.prdType
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
@ -258,7 +258,7 @@
|
|||||||
type: MapDeviceType.StationControl.type,
|
type: MapDeviceType.StationControl.type,
|
||||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||||
val: this.tableData[0].code,
|
val: this.tableData[0].code,
|
||||||
prdType: this.$store.state.map.prdType
|
prdType: this.$store.state.training.prdType
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
|
@ -514,20 +514,19 @@ export function menuFiltration(menuObj) {
|
|||||||
var selected = store.getters['menuOperation/selected'];
|
var selected = store.getters['menuOperation/selected'];
|
||||||
var control;
|
var control;
|
||||||
var menu = [];
|
var menu = [];
|
||||||
|
|
||||||
if (selected._type == 'StationStand') {
|
if (selected._type == 'StationStand') {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.deviceStationCode);
|
||||||
} else if (selected._type == 'Station') {
|
} else if (selected._type == 'Station') {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.code);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.code);
|
||||||
} else if (selected._type == 'LimitControl') {
|
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.code);
|
|
||||||
} else {
|
} else {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (control) {
|
if (control) {
|
||||||
const controlStatus = (control || {}).state;
|
if (store.state.training.prdType != '') {
|
||||||
if (store.state.map.prdType != '') {
|
const type = SystemType[store.state.training.prdType];
|
||||||
const type = SystemType[store.state.map.prdType];
|
const status = StationControlType[control.state.status];
|
||||||
const status = StationControlType[controlStatus.status];
|
|
||||||
menu = [...menuObj[type]];
|
menu = [...menuObj[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
@ -555,8 +554,8 @@ export function menuFiltration(menuObj) {
|
|||||||
*/
|
*/
|
||||||
export function trainMenuFiltration(menuObj) {
|
export function trainMenuFiltration(menuObj) {
|
||||||
var menu = [];
|
var menu = [];
|
||||||
if (store.state.map.prdType != '') {
|
if (store.state.training.prdType != '') {
|
||||||
var type = SystemType[store.state.map.prdType];
|
var type = SystemType[store.state.training.prdType];
|
||||||
menu = [...menuObj[type]];
|
menu = [...menuObj[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
},
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$store.state.map && this.$store.state.map.map) {
|
if (this.$store.state.map && this.$store.state.map.map) {
|
||||||
params['skinStyle'] = this.$store.state.map.map.skinStyle;
|
params['skinStyle'] = this.$store.getters['map/skinStyle'];
|
||||||
}
|
}
|
||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
},
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$store.state.map && this.$store.state.map.map) {
|
if (this.$store.state.map && this.$store.state.map.map) {
|
||||||
params['skinStyle'] = this.$store.state.map.map.skinStyle;
|
params['skinStyle'] = this.$store.getters['map/skinStyle'];
|
||||||
}
|
}
|
||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
|
@ -132,10 +132,10 @@
|
|||||||
},
|
},
|
||||||
//取消列车进路
|
//取消列车进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
if (this.$store.state.map.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
/** 现地工作站*/
|
/** 现地工作站*/
|
||||||
this.cancelTrainRouteByLocal();
|
this.cancelTrainRouteByLocal();
|
||||||
} else if (this.$store.state.map.prdType == '02') {
|
} else if (this.$store.state.training.prdType == '02') {
|
||||||
/** 行调工作站*/
|
/** 行调工作站*/
|
||||||
this.cancelTrainRouteByCentral();
|
this.cancelTrainRouteByCentral();
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
<menu-cancel ref="menuCancel"></menu-cancel>
|
<menu-cancel ref="menuCancel"></menu-cancel>
|
||||||
<template v-if="isShowAll">
|
<template v-if="isShowAll">
|
||||||
<menu-bar ref="menuBar" v-show="isShowBar" :selected="selected"></menu-bar>
|
<menu-bar ref="menuBar" v-show="isShowBar" :selected="selected"></menu-bar>
|
||||||
<!-- <menu-tool ref="menuTool" :selected="selected"></menu-tool> -->
|
|
||||||
<!-- <status-bar ref="statusBar" :selected="selected"></status-bar> -->
|
|
||||||
|
|
||||||
<menu-station-control ref="menuStationControl" :selected="selected"></menu-station-control>
|
<menu-station-control ref="menuStationControl" :selected="selected"></menu-station-control>
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected"></menu-station-stand>
|
<menu-station-stand ref="menuStationStand" :selected="selected"></menu-station-stand>
|
||||||
<menu-switch ref="menuSwitch" :selected="selected"></menu-switch>
|
<menu-switch ref="menuSwitch" :selected="selected"></menu-switch>
|
||||||
@ -31,8 +28,6 @@
|
|||||||
import MenuTrain from './menuTrain';
|
import MenuTrain from './menuTrain';
|
||||||
import MenuStation from './menuStation';
|
import MenuStation from './menuStation';
|
||||||
import MenuBar from './menuBar';
|
import MenuBar from './menuBar';
|
||||||
// import MenuTool from './menuTool';
|
|
||||||
// import StatusBar from './statusBar';
|
|
||||||
import PassiveAlarm from './passiveDialog/alarm';
|
import PassiveAlarm from './passiveDialog/alarm';
|
||||||
import PassiveContorl from './passiveDialog/control';
|
import PassiveContorl from './passiveDialog/control';
|
||||||
import PassiveTimeout from './passiveDialog/timeout';
|
import PassiveTimeout from './passiveDialog/timeout';
|
||||||
@ -41,8 +36,6 @@
|
|||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
components: {
|
components: {
|
||||||
MenuBar,
|
MenuBar,
|
||||||
// MenuTool,
|
|
||||||
// StatusBar,
|
|
||||||
MenuCancel,
|
MenuCancel,
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
@ -69,7 +62,7 @@
|
|||||||
this.$route.params.mode !== 'plan'
|
this.$route.params.mode !== 'plan'
|
||||||
},
|
},
|
||||||
isShowBar() {
|
isShowBar() {
|
||||||
return this.$store.state.map.prdType != '';
|
return this.$store.state.training.prdType != '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -410,7 +410,7 @@
|
|||||||
'$store.state.training.started': function (val) {
|
'$store.state.training.started': function (val) {
|
||||||
this.closeMenu(true);
|
this.closeMenu(true);
|
||||||
},
|
},
|
||||||
'$store.state.map.prdType': function () {
|
'$store.state.training.prdType': function () {
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -419,7 +419,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initMenu(menu) {
|
initMenu(menu) {
|
||||||
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.map.prdType]], this.$store.state.training.operatemode);
|
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.closeMenu(true);
|
this.closeMenu(true);
|
||||||
},
|
},
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
if (elem.visible) {
|
if (elem.visible) {
|
||||||
let next = elem;
|
let next = elem;
|
||||||
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||||
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
next = (this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode) || {}).model;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (station.code == next.code) {
|
if (station.code == next.code) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
append-to-body v-dialogDrag>
|
append-to-body v-dialogDrag>
|
||||||
<div class="context">
|
<div class="context">
|
||||||
<template v-for="message in messages">
|
<template v-for="message in messages">
|
||||||
<span> {{message}}</span><br>
|
<span>{{message}}</span><br>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
|
@ -228,7 +228,7 @@
|
|||||||
loadTableData() {
|
loadTableData() {
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.stationControlList.forEach(control => {
|
this.stationControlList.forEach(control => {
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
let station = (this.$store.getters['map/getDeviceByCode'](control.stationCode) || {}).model;
|
||||||
this.tableData.push({
|
this.tableData.push({
|
||||||
code: control.code,
|
code: control.code,
|
||||||
operate: station.name || '',
|
operate: station.name || '',
|
||||||
|
@ -114,46 +114,46 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setDeviceDisplay() {
|
setDeviceDisplay() {
|
||||||
let show = false;
|
// let show = false;
|
||||||
let deviceList = [];
|
// let deviceList = [];
|
||||||
|
|
||||||
//区段边界设置
|
// //区段边界设置
|
||||||
let sectionList = this.$store.getters['map/sectionList'];
|
// let sectionList = this.$store.getters['map/sectionList'];
|
||||||
if (sectionList && sectionList.length > 0) {
|
// if (sectionList && sectionList.length > 0) {
|
||||||
sectionList.forEach(elem => {
|
// sectionList.forEach(elem => {
|
||||||
//区段边界
|
// //区段边界
|
||||||
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
||||||
elem.borderBorderShow = show;
|
// elem.borderBorderShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
//车次窗设置
|
// //车次窗设置
|
||||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
// let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||||
if (trainWindowList && trainWindowList.length > 0) {
|
// if (trainWindowList && trainWindowList.length > 0) {
|
||||||
trainWindowList.forEach(elem => {
|
// trainWindowList.forEach(elem => {
|
||||||
//车次窗
|
// //车次窗
|
||||||
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
||||||
elem.trainWindowShow = show;
|
// elem.trainWindowShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
//联锁自动进路表示灯和ATS自动触发表示灯设置
|
// //联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||||
let signalList = this.$store.getters['map/signalList'];
|
// let signalList = this.$store.getters['map/signalList'];
|
||||||
if (signalList && signalList.length > 0) {
|
// if (signalList && signalList.length > 0) {
|
||||||
signalList.forEach(elem => {
|
// signalList.forEach(elem => {
|
||||||
//联锁自动进路表示灯
|
// //联锁自动进路表示灯
|
||||||
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
||||||
elem.linkageAutoRouteShow = show;
|
// elem.linkageAutoRouteShow = show;
|
||||||
//ATS自动触发表示灯
|
// //ATS自动触发表示灯
|
||||||
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
// show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
||||||
elem.atsAutoTriggerShow = show;
|
// elem.atsAutoTriggerShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', deviceList);
|
// this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,117 +147,118 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setNameDisplay() {
|
setNameDisplay() {
|
||||||
let show = false;
|
// let show = false;
|
||||||
let deviceList = [];
|
// let deviceList = [];
|
||||||
|
|
||||||
// 信号机
|
// // 信号机
|
||||||
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||||
let signalList = this.$store.getters['map/signalList'];
|
// let signalList = this.$store.getters['map/signalList'];
|
||||||
if (signalList && signalList.length > 0) {
|
// if (signalList && signalList.length > 0) {
|
||||||
signalList.forEach(elem => {
|
// signalList.forEach(elem => {
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 按钮名称
|
// // 按钮名称
|
||||||
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||||
|
|
||||||
|
|
||||||
// 道岔
|
// // 道岔
|
||||||
let switchList = this.$store.getters['map/switchList'];
|
// let switchList = this.$store.getters['map/switchList'];
|
||||||
if (switchList && switchList.length > 0) {
|
// if (switchList && switchList.length > 0) {
|
||||||
switchList.forEach(elem => {
|
// switchList.forEach(elem => {
|
||||||
// 道岔名称
|
// // 道岔名称
|
||||||
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
// 道岔轨名称
|
// // 道岔轨名称
|
||||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||||
elem.switchSectionNameShow = show;
|
// elem.switchSectionNameShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 控制模式
|
// // 控制模式
|
||||||
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||||
let control = this.$store.getters['map/stationControlList'];
|
// let control = this.$store.getters['map/stationControlList'];
|
||||||
if (control && control.length > 0) {
|
// if (control && control.length > 0) {
|
||||||
control.forEach(elem => {
|
// control.forEach(elem => {
|
||||||
// 标识灯名称
|
// // 标识灯名称
|
||||||
elem.indicatorShow = show;
|
// elem.indicatorShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 区段
|
// // 区段
|
||||||
let sectionList = this.$store.getters['map/sectionList'];
|
// let sectionList = this.$store.getters['map/sectionList'];
|
||||||
if (sectionList && sectionList.length > 0) {
|
// if (sectionList && sectionList.length > 0) {
|
||||||
sectionList.forEach(elem => {
|
// sectionList.forEach(elem => {
|
||||||
if (elem.isSwitchSection && elem.parentCode) {
|
// if (elem.isSwitchSection && elem.parentCode) {
|
||||||
// 道岔轨的区段名称默认不显示
|
// // 道岔轨的区段名称默认不显示
|
||||||
elem.nameShow = false;
|
// elem.nameShow = false;
|
||||||
} else {
|
// } else {
|
||||||
if (elem.type === '01') {
|
// if (elem.type === '01') {
|
||||||
// 计轴区段名称
|
// // 计轴区段名称
|
||||||
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
} else if (elem.type === '02') {
|
// } else if (elem.type === '02') {
|
||||||
// 股道轨名称
|
// // 股道轨名称
|
||||||
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
} else if (elem.type === '03') {
|
// } else if (elem.type === '03') {
|
||||||
// 道岔区段名称
|
// // 道岔区段名称
|
||||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||||
elem.nameShow = show;
|
// elem.nameShow = show;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 站台轨名称
|
// // 站台轨名称
|
||||||
if (elem.isStandTrack) {
|
// if (elem.isStandTrack) {
|
||||||
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||||
elem.standTrackNameShow = show;
|
// elem.standTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 折返轨名称
|
// // 折返轨名称
|
||||||
if (elem.isReentryTrack) {
|
// if (elem.isReentryTrack) {
|
||||||
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||||
elem.reentryTrackNameShow = show;
|
// elem.reentryTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 转换轨名称
|
// // 转换轨名称
|
||||||
if (elem.isTransferTrack) {
|
// if (elem.isTransferTrack) {
|
||||||
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||||
elem.transferTrackNameShow = show;
|
// elem.transferTrackNameShow = show;
|
||||||
}
|
// }
|
||||||
|
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 停车点
|
// // 停车点
|
||||||
show = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||||
let stopPointList = this.$store.getters['map/stopPointList'];
|
// let stopPointList = this.$store.getters['map/stopPointList'];
|
||||||
if (stopPointList && stopPointList.length > 0) {
|
// if (stopPointList && stopPointList.length > 0) {
|
||||||
stopPointList.forEach(elem => {
|
// stopPointList.forEach(elem => {
|
||||||
// 目的地名称
|
// // 目的地名称
|
||||||
elem.destCodeShow = show;
|
// elem.destCodeShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 车站
|
// // 车站
|
||||||
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
// show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||||
let stationList = this.$store.getters['map/stationList'];
|
// let stationList = this.$store.getters['map/stationList'];
|
||||||
if (stationList && stationList.length > 0) {
|
// if (stationList && stationList.length > 0) {
|
||||||
stationList.forEach(elem => {
|
// stationList.forEach(elem => {
|
||||||
// 公里标
|
// // 公里标
|
||||||
elem.kmPostShow = show;
|
// elem.kmPostShow = show;
|
||||||
deviceList.push(elem);
|
// deviceList.push(elem);
|
||||||
|
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', parseDevices);
|
// console.log(deviceList);
|
||||||
|
// this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,17 +155,17 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setTrainDispaly() {
|
setTrainDispaly() {
|
||||||
let trainList = this.$store.getters['training/viewTrainList'];
|
// let trainList = this.$store.getters['training/viewTrainList'];
|
||||||
if (trainList && trainList.length > 0) {
|
// if (trainList && trainList.length > 0) {
|
||||||
let planFormat = this.trainNameFormatBy(this.planMode);
|
// let planFormat = this.trainNameFormatBy(this.planMode);
|
||||||
let nameFontSize = this.fontSize;
|
// let nameFontSize = this.fontSize;
|
||||||
trainList.forEach(elem => {
|
// trainList.forEach(elem => {
|
||||||
elem.nameFormat = planFormat;
|
// elem.nameFormat = planFormat;
|
||||||
elem.nameFontSize = nameFontSize;
|
// elem.nameFontSize = nameFontSize;
|
||||||
});
|
// });
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapView', trainList);
|
// this.$store.dispatch('map/updateMapDevices', trainList);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
trainNameFormatBy(mode) {
|
trainNameFormatBy(mode) {
|
||||||
switch (mode.toString()) {
|
switch (mode.toString()) {
|
||||||
|
@ -1,205 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="menuTool">
|
|
||||||
<div class="nav">
|
|
||||||
<div class="tool" v-for="(item,index) in tools" :key="index">
|
|
||||||
<img :src="item.src" :alt="item.title" />
|
|
||||||
</div>
|
|
||||||
<img class="logo" :src="logoImg" />
|
|
||||||
<system-time class="time" v-if="isShowSystemTime" :time="time" :zoom="2" :width="180" :height="48" :fine="2"
|
|
||||||
:top="6"></system-time>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
|
||||||
import { prefixIntrger } from '@/utils/date';
|
|
||||||
import SystemTime from '@/views/components/systemTime/index';
|
|
||||||
import logo_ from '@/assets/logo_.png';
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'MenuTool',
|
|
||||||
props: {
|
|
||||||
selected: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
SystemTime
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
logoImg: logo_,
|
|
||||||
time: '00:0000',
|
|
||||||
tools: [
|
|
||||||
{
|
|
||||||
title: '服务器1',
|
|
||||||
operate: '',
|
|
||||||
src: logo_,
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '服务器2',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '前置机1',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '前置机2',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '主调',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '调度台1',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '调度台2',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '调度台3',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '大屏',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '维护工作站',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '运行图显示人工站',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '跳停',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '扣车',
|
|
||||||
operate: '',
|
|
||||||
src: '',
|
|
||||||
click: this.undeveloped,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '列车报警',
|
|
||||||
operate: '',
|
|
||||||
src: logo_,
|
|
||||||
click: this.undeveloped,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.training.initTime': function (initTime) {
|
|
||||||
let date = new Date(initTime);
|
|
||||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
isShowSystemTime() {
|
|
||||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.initTools();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initTools() {
|
|
||||||
this.tools = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
$top: 30px;
|
|
||||||
$width: 50px;
|
|
||||||
$height: 50px;
|
|
||||||
|
|
||||||
#menuTool {
|
|
||||||
z-index: 5;
|
|
||||||
position: absolute;
|
|
||||||
top: $top;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav {
|
|
||||||
display: block;
|
|
||||||
height: $height;
|
|
||||||
line-height: $height;
|
|
||||||
color: #0000;
|
|
||||||
background: #ECE9D8;
|
|
||||||
border: 1px solid #B6BCCC !important;
|
|
||||||
border-bottom: 2px solid #B6BCCC !important;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tool {
|
|
||||||
background: #808080;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
float: left;
|
|
||||||
height: $height - 2;
|
|
||||||
width: $width + 15;
|
|
||||||
margin: 1px;
|
|
||||||
|
|
||||||
img {
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
padding-top: 4px;
|
|
||||||
height: $height - 10;
|
|
||||||
width: $width - 10;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.time {
|
|
||||||
position: relative;
|
|
||||||
float: right;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
position: relative;
|
|
||||||
float: right;
|
|
||||||
text-align: center;
|
|
||||||
margin: 1px 10px;
|
|
||||||
height: $height - 4;
|
|
||||||
width: $width - 4;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -70,10 +70,10 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
targetStatus() {
|
targetStatus() {
|
||||||
if (this.$store.state.map.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
return '01';
|
return '01';
|
||||||
}
|
}
|
||||||
if (this.$store.state.map.prdType == '02') {
|
if (this.$store.state.training.prdType == '02') {
|
||||||
return '02'
|
return '02'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -244,7 +244,7 @@
|
|||||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||||
code: this.selection[0].code,
|
code: this.selection[0].code,
|
||||||
val: this.commandId,
|
val: this.commandId,
|
||||||
prdType: this.$store.state.map.prdType
|
prdType: this.$store.state.training.prdType
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
@ -266,7 +266,7 @@
|
|||||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||||
code: this.selection.length ? this.selection[0].code : '',
|
code: this.selection.length ? this.selection[0].code : '',
|
||||||
val: this.commandId,
|
val: this.commandId,
|
||||||
prdType: this.$store.state.map.prdType
|
prdType: this.$store.state.training.prdType
|
||||||
}
|
}
|
||||||
if (!operate.code) {
|
if (!operate.code) {
|
||||||
operate.code = this.tableData[0].code;
|
operate.code = this.tableData[0].code;
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="statusBar"></div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'StatusBar',
|
|
||||||
props: {
|
|
||||||
selected: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
#statusBar {
|
|
||||||
z-index: 2000;
|
|
||||||
position: absolute;
|
|
||||||
height: $height;
|
|
||||||
line-height: $height;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -240,7 +240,7 @@ export const MenuDisabledStatus = {
|
|||||||
// 设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
const device = getCurrentStatusObject();
|
const device = getCurrentStatusObject();
|
||||||
if (store.state.map.prdType == '02') {
|
if (store.state.training.prdType == '02') {
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.Status03) {
|
if (device && device.holdStatus == deviceState.StationStand.holdStatus.Status03) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -253,7 +253,7 @@ export const MenuDisabledStatus = {
|
|||||||
// 取消扣车
|
// 取消扣车
|
||||||
cancelDetainTrain() {
|
cancelDetainTrain() {
|
||||||
const device = getCurrentStatusObject();
|
const device = getCurrentStatusObject();
|
||||||
if (store.state.map.prdType == '02') {
|
if (store.state.training.prdType == '02') {
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.Status03) {
|
if (device && device.holdStatus == deviceState.StationStand.holdStatus.Status03) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -426,7 +426,7 @@ export const MenuDisabledStatus = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function checkOperationValidity() {
|
export function checkOperationValidity() {
|
||||||
if (store.state.map.prdType == '02') {
|
if (store.state.training.prdType == '02') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -502,18 +502,19 @@ export function menuFiltration(menuObj) {
|
|||||||
var selected = store.getters['menuOperation/selected'];
|
var selected = store.getters['menuOperation/selected'];
|
||||||
var control;
|
var control;
|
||||||
var menu = [];
|
var menu = [];
|
||||||
|
|
||||||
if (selected._type == 'StationStand') {
|
if (selected._type == 'StationStand') {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.deviceStationCode);
|
||||||
} else if (selected._type == 'Station') {
|
} else if (selected._type == 'Station') {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.code);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.code);
|
||||||
} else {
|
} else {
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
|
control = store.getters['map/getStationControlByStationCode'](selected.model.stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (control) {
|
if (control) {
|
||||||
const controlStatus = (control || {}).state;
|
if (store.state.training.prdType != '') {
|
||||||
if (store.state.map.prdType != '') {
|
const type = SystemType[store.state.training.prdType];
|
||||||
const type = SystemType[store.state.map.prdType];
|
const status = StationControlType[control.state.status];
|
||||||
const status = StationControlType[controlStatus.status];
|
|
||||||
menu = [...menuObj[type]];
|
menu = [...menuObj[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
@ -533,6 +534,7 @@ export function menuFiltration(menuObj) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -541,8 +543,8 @@ export function menuFiltration(menuObj) {
|
|||||||
*/
|
*/
|
||||||
export function trainMenuFiltration(menuObj) {
|
export function trainMenuFiltration(menuObj) {
|
||||||
var menu = [];
|
var menu = [];
|
||||||
if (store.state.map.prdType != '') {
|
if (store.state.training.prdType != '') {
|
||||||
const type = SystemType[store.state.map.prdType];
|
const type = SystemType[store.state.training.prdType];
|
||||||
menu = [...menuObj[type]];
|
menu = [...menuObj[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
},
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$store.state.map && this.$store.state.map.map) {
|
if (this.$store.state.map && this.$store.state.map.map) {
|
||||||
params['skinStyle'] = this.$store.state.map.map.skinStyle;
|
params['skinStyle'] = this.$store.getters['map/skinStyle'];
|
||||||
}
|
}
|
||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
},
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$store.state.map && this.$store.state.map.map) {
|
if (this.$store.state.map && this.$store.state.map.map) {
|
||||||
params['skinStyle'] = this.$store.state.map.map.skinStyle;
|
params['skinStyle'] = this.$store.getters['map/skinStyle'];
|
||||||
}
|
}
|
||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
|
@ -7,7 +7,7 @@ import Vue from 'vue';
|
|||||||
* @param {Object} device
|
* @param {Object} device
|
||||||
* @param {Array} effectedDeviceList
|
* @param {Array} effectedDeviceList
|
||||||
*/
|
*/
|
||||||
function queryEffectedDevices(map, device, effectedDeviceList) {
|
function queryEffectedModels(map, device, effectedDeviceList) {
|
||||||
if (device && map) {
|
if (device && map) {
|
||||||
effectedDeviceList.push(device);
|
effectedDeviceList.push(device);
|
||||||
switch (device._type) {
|
switch (device._type) {
|
||||||
@ -17,7 +17,7 @@ function queryEffectedDevices(map, device, effectedDeviceList) {
|
|||||||
if (map.sectionList && map.sectionList.length) {
|
if (map.sectionList && map.sectionList.length) {
|
||||||
map.sectionList.forEach(elem => {
|
map.sectionList.forEach(elem => {
|
||||||
if (elem.linkCode === device.code) {
|
if (elem.linkCode === device.code) {
|
||||||
queryEffectedDevices(map, elem, effectedDeviceList);
|
queryEffectedModels(map, elem, effectedDeviceList);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -369,57 +369,52 @@ const map = {
|
|||||||
|
|
||||||
// 查询区段关联的计数器
|
// 查询区段关联的计数器
|
||||||
getCounterBySectionCode: (state) => (code, type) => {
|
getCounterBySectionCode: (state) => (code, type) => {
|
||||||
let obj = null;
|
let device = null;
|
||||||
if (code && type && state.map &&
|
if (Vue.prototype.$jlmap) {
|
||||||
state.map.sectionList && state.map.sectionList.length &&
|
var section = Vue.prototype.$jlmap.mapDevice[code];
|
||||||
state.map.counterList && state.map.counterList.length) {
|
if (section) {
|
||||||
state.map.sectionList.forEach(section => {
|
state.map.counterList.forEach(counter => {
|
||||||
if (section.code === code) {
|
if (counter.stationCode === section.model.stationCode && type == counter.type) {
|
||||||
state.map.counterList.forEach(counter => {
|
device = Vue.prototype.$jlmap.mapDevice[counter.code];
|
||||||
if (counter.stationCode === section.stationCode && type == counter.type) {
|
return;
|
||||||
obj = counter;
|
}
|
||||||
return;
|
});
|
||||||
}
|
}
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return obj;
|
|
||||||
|
return device;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询信号机关联的计数器
|
// 查询信号机关联的计数器
|
||||||
getCounterBySingalCode: (state) => (code, type) => {
|
getCounterBySingalCode: (state) => (code, type) => {
|
||||||
let obj = null;
|
let device = null;
|
||||||
if (code && type && state.map &&
|
if (Vue.prototype.$jlmap) {
|
||||||
state.map.signalList && state.map.signalList.length &&
|
var signal = Vue.prototype.$jlmap.mapDevice[code];
|
||||||
state.map.counterList && state.map.counterList.length) {
|
if (signal) {
|
||||||
state.map.signalList.forEach(signal => {
|
state.map.counterList.forEach(counter => {
|
||||||
if (signal.code === code) {
|
if (counter.stationCode === signal.model.stationCode && type == counter.type) {
|
||||||
state.map.counterList.forEach(counter => {
|
device = Vue.prototype.$jlmap.mapDevice[counter.code];
|
||||||
if (counter.stationCode === signal.stationCode && type == counter.type) {
|
return;
|
||||||
obj = counter;
|
}
|
||||||
return;
|
});
|
||||||
}
|
}
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return obj;
|
return device;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询所属车站关联的控制模式
|
// 查询所属车站关联的控制模式
|
||||||
getStationControlByStationCode: (state) => (code) => {
|
getStationControlByStationCode: (state) => (code) => {
|
||||||
let device = null;
|
let device = null;
|
||||||
if (code && state.map &&
|
if (Vue.prototype.$jlmap && code &&
|
||||||
|
state.map &&
|
||||||
state.map.stationControlList && state.map.stationControlList.length) {
|
state.map.stationControlList && state.map.stationControlList.length) {
|
||||||
state.map.stationControlList.forEach(elem => {
|
state.map.stationControlList.forEach(elem => {
|
||||||
if (elem.stationCode == code) {
|
if (elem.stationCode == code) {
|
||||||
device = elem;
|
device = Vue.prototype.$jlmap.mapDevice[elem.code];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -431,9 +426,6 @@ const map = {
|
|||||||
mapRender: (devices) => {
|
mapRender: (devices) => {
|
||||||
Vue.prototype.$jlmap && Vue.prototype.$jlmap.render(devices);
|
Vue.prototype.$jlmap && Vue.prototype.$jlmap.render(devices);
|
||||||
},
|
},
|
||||||
mapUpdate: (devices) => {
|
|
||||||
Vue.prototype.$jlmap && Vue.prototype.$jlmap.update(devices);
|
|
||||||
},
|
|
||||||
setTrainDetails: (state, details) => {
|
setTrainDetails: (state, details) => {
|
||||||
state.trainDetails = details;
|
state.trainDetails = details;
|
||||||
},
|
},
|
||||||
@ -492,38 +484,34 @@ const map = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updateMapDevices: ({ commit }, devices) => {
|
updateMapDevices: ({ commit }, models) => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
if (!(devices instanceof Array)) {
|
if (!(models instanceof Array)) {
|
||||||
devices = [devices];
|
models = [models];
|
||||||
}
|
}
|
||||||
|
|
||||||
commit('mapRender', devices);
|
commit('mapRender', models);
|
||||||
resolve(devices);
|
resolve(models);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteMapDevices: ({ commit, state }, devices) => {
|
deleteMapDevices: ({ commit, state }, models) => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
if (!(devices instanceof Array)) {
|
if (!(models instanceof Array)) {
|
||||||
devices = [devices];
|
models = [models];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查找向上关联需要一起删除的设备
|
// 查找向上关联需要一起删除的设备
|
||||||
const effectedDeviceList = [];
|
const effectedModelList = [];
|
||||||
devices.forEach((device) => {
|
models.forEach((device) => {
|
||||||
queryEffectedDevices(state.map, device, effectedDeviceList);
|
queryEffectedModels(state.map, device, effectedModelList);
|
||||||
});
|
});
|
||||||
|
|
||||||
commit('mapRender', effectedDeviceList);
|
commit('mapRender', effectedModelList);
|
||||||
resolve(effectedDeviceList);
|
resolve(effectedModelList);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
updateMapView: ({ commit }, devices) => {
|
|
||||||
commit('mapUpdate', devices);
|
|
||||||
},
|
|
||||||
|
|
||||||
saveMapDeviceDefaultConvert({ state }) {
|
saveMapDeviceDefaultConvert({ state }) {
|
||||||
saveMapDeviceDefaultConvert(state);
|
saveMapDeviceDefaultConvert(state);
|
||||||
},
|
},
|
||||||
|
@ -209,7 +209,7 @@ export default {
|
|||||||
this.dataZoom.offsetY = dataZoom.offsetY.toFixed(1) + '';
|
this.dataZoom.offsetY = dataZoom.offsetY.toFixed(1) + '';
|
||||||
this.dataZoom.scaleRate = dataZoom.scaleRate + '';
|
this.dataZoom.scaleRate = dataZoom.scaleRate + '';
|
||||||
|
|
||||||
const skinStyle = this.$store.state.map.map.skinStyle;
|
const skinStyle = this.$store.getters['map/skinStyle'];
|
||||||
if (skinStyle) {
|
if (skinStyle) {
|
||||||
const param = {
|
const param = {
|
||||||
scaleRate: this.dataZoom.scaleRate,
|
scaleRate: this.dataZoom.scaleRate,
|
||||||
|
@ -139,8 +139,10 @@ export default {
|
|||||||
Object.assign(this.editModel, this.map);
|
Object.assign(this.editModel, this.map);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.map.map.skinStyle': function () {
|
'$store.state.map.mapDataLoadedCount': function () {
|
||||||
this.isUpdate = true;
|
if (this.$jlmap.skinStyle) {
|
||||||
|
this.isUpdate = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import JlmapVisual from '@/views/jlmap/index';
|
import JlmapVisual from '@/views/jlmap/index';
|
||||||
import TrainingTips from '@/views/mapsystem/plugin/trainingtip';
|
import TrainingTips from '@/views/mapsystem/plugin/trainingtip';
|
||||||
import ThemeFactory from '@/jmap/theme/factory';
|
import ThemeFactory from '@/jmap/theme/factory';
|
||||||
|
import { debug } from 'util';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LessonCanvas',
|
name: 'LessonCanvas',
|
||||||
@ -46,9 +47,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.map.map.skinStyle': function (code) {
|
'$store.state.map.mapDataLoadedCount': function () {
|
||||||
if (code) {
|
const skinStyle = this.$jlmap.skinStyle;
|
||||||
this.menus = ThemeFactory.loadMenusComponent(code);
|
if (skinStyle) {
|
||||||
|
this.menus = ThemeFactory.loadMenusComponent(skinStyle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -104,18 +106,19 @@
|
|||||||
},
|
},
|
||||||
contextmenu(em) {
|
contextmenu(em) {
|
||||||
var menu = null;
|
var menu = null;
|
||||||
var device = { _type: em.deviceType, code: em.deviceCode };
|
var device = null;
|
||||||
|
|
||||||
this.point = { x: em.clientX, y: em.clientY };
|
this.point = { x: em.clientX, y: em.clientY };
|
||||||
|
|
||||||
if (em.subType === 'TrainWindow') {
|
if (em.subType === 'TrainWindow') {
|
||||||
em = { _type: 'Train', _code: em.deviceCode }
|
em = { _type: deviceType.Trian, _code: em.deviceCode }
|
||||||
this.$store.dispatch('map/setTrainWindowShow', true);
|
this.$store.dispatch('map/setTrainWindowShow', true);
|
||||||
} else if (em.deviceCode && !this.isScreen) {
|
} else if (em.deviceCode && !this.isScreen) {
|
||||||
device = this.getDeviceByEm(em);
|
device = this.getDeviceByEm(em);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device) {
|
if (device) {
|
||||||
this.selected = device = this.getSelectedBySkinStyle(em);
|
this.selected = device = this.getSelectedBySkinStyle(device);
|
||||||
if (!this.buttonOperation) {
|
if (!this.buttonOperation) {
|
||||||
this.$store.dispatch('menuOperation/setSelected', device);
|
this.$store.dispatch('menuOperation/setSelected', device);
|
||||||
if (!this.checkShouldPop(device)) {
|
if (!this.checkShouldPop(device)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user