调整哈尔滨线路 区段,信号机操作 处理信号机点击高亮
This commit is contained in:
parent
4243d62ab1
commit
6e3dcf6b65
@ -160,6 +160,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号字体
|
||||
},
|
||||
lamp: {
|
||||
bgShow: false, // 是否被选中
|
||||
guidName: 'defult', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
|
@ -160,6 +160,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
bgShow: false, // 是否被选中
|
||||
guidName: 'defult', // 默认引导类型
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
|
@ -163,6 +163,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
bgShow: false, // 是否被选中
|
||||
guidName: 'chengdu_03', // 成都三号线引导类型
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
|
@ -154,6 +154,7 @@ class SkinCode extends defaultStyle {
|
||||
nameBorderShow: true // 信号机名字边框显示
|
||||
},
|
||||
lamp: {
|
||||
bgShow: false, // 是否被选中
|
||||
guidName: 'defult', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
|
@ -155,6 +155,7 @@ class SkinCode extends defaultStyle {
|
||||
nameBorderShow: true // 信号机名字边框显示
|
||||
},
|
||||
lamp: {
|
||||
bgShow: true, // 是否被选中
|
||||
logicDisplayNone: true, // 逻辑点灯斜线不显示
|
||||
guidName: 'defult', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
|
@ -161,6 +161,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
bgShow: false, // 是否被选中
|
||||
guidName: 'ningbo_01', // 默认引导类型
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
|
@ -538,7 +538,6 @@ class Signal extends Group {
|
||||
!model.atsControl && this.setArtificialRouteClose();
|
||||
// 联锁自动进路通过
|
||||
model.fleetMode && this.setAutoRouteOpen();
|
||||
debugger;
|
||||
}
|
||||
|
||||
getBoundingRect() {
|
||||
@ -576,6 +575,10 @@ class Signal extends Group {
|
||||
this.on('mouseout', () => { this.highlight.mouseout(); });
|
||||
this.on('mouseover', () => { this.highlight.mouseover(); });
|
||||
}
|
||||
if (this.style.Signal.lamp.bgShow) {
|
||||
this.highlight = new EHighlight(this);
|
||||
this.add(this.highlight);
|
||||
}
|
||||
}
|
||||
|
||||
drawBatchSelected(selected, type) {
|
||||
|
@ -72,6 +72,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
oldDevice: null, // 上一次点击元素
|
||||
canCommand: true,
|
||||
operate: '',
|
||||
cmdType: '',
|
||||
@ -109,6 +110,16 @@ export default {
|
||||
{ name: '取消联锁', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu.operation, show: false },
|
||||
{ name: '引导进路', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.guide.menu.operation, show: false },
|
||||
{ name: '取消引导', cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, operate: OperationEvent.Signal.humanTrainRoute.menu.operation, show: false }
|
||||
],
|
||||
sectionParamList: [
|
||||
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu.operation, show: false },
|
||||
{ name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu.operation, show: false },
|
||||
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menu.operation, show: false },
|
||||
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menu.operation, show: false },
|
||||
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu.operation, show: false }
|
||||
],
|
||||
stationParamList: [
|
||||
{ name: '关站信号', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu.operation, show: false } // 流程未处理
|
||||
]
|
||||
};
|
||||
},
|
||||
@ -125,6 +136,9 @@ export default {
|
||||
switch (this.selected._type) {
|
||||
case 'Switch':
|
||||
this.handleSwicthMenu();
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
break;
|
||||
case 'Signal':
|
||||
if (this.oldClickObj && this.oldClickObj.code != this.selected.code) {
|
||||
@ -133,11 +147,46 @@ export default {
|
||||
this.handleSingalMenu();
|
||||
}
|
||||
break;
|
||||
case 'Section':
|
||||
this.handleSectionMenu();
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
break;
|
||||
case 'Station':
|
||||
this.handleStationMenu();
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 高亮设备
|
||||
deviceHighLight(device, flag) {
|
||||
if (device && device.instance && typeof device.instance.drawSelected === 'function' ) {
|
||||
if (device._type === 'Section' && device.type === '04') {
|
||||
device.relevanceSectionList.forEach(item => {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
|
||||
sectionModel && sectionModel.instance.drawSelected(flag);
|
||||
});
|
||||
} else if (device._type === 'Section' && device.type === '01' && device.logicSectionCodeList && device.logicSectionCodeList.length) {
|
||||
device.logicSectionCodeList.forEach(item => {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
|
||||
sectionModel && sectionModel.instance.drawSelected(flag);
|
||||
});
|
||||
} else {
|
||||
device.instance.drawSelected(flag);
|
||||
}
|
||||
} else if (device) {
|
||||
const model = this.$store.getters['map/getDeviceByCode'](device.code);
|
||||
if (model.instance) {
|
||||
model.instance.drawSelected(flag);
|
||||
}
|
||||
}
|
||||
},
|
||||
clickCommand(row) {
|
||||
this.clearAllMenuShow();
|
||||
if (this.tempData.length) {
|
||||
@ -166,6 +215,13 @@ export default {
|
||||
};
|
||||
},
|
||||
handleSingalMenu() {
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
if (this.oldClickObj) { // 清除上上次信号机背景
|
||||
this.deviceHighLight(this.oldClickObj, false);
|
||||
}
|
||||
|
||||
this.oldClickObj = deepAssign({}, this.selected);
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.signalParamList.forEach((swicth, index) => {
|
||||
@ -198,10 +254,35 @@ export default {
|
||||
});
|
||||
if (this.route && this.route.code) {
|
||||
this.handleRouteMenu();
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
} else {
|
||||
this.handleSingalMenu();
|
||||
}
|
||||
},
|
||||
handleSectionMenu() {
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.sectionParamList.forEach((swicth, index) => {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
});
|
||||
this.tempData = [];
|
||||
this.tempData.push(this.selected);
|
||||
this.param = {
|
||||
sectionCode: this.selected.code,
|
||||
speedLimitValue: 5
|
||||
};
|
||||
},
|
||||
handleStationMenu() {
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.stationParamList.forEach((swicth, index) => {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
});
|
||||
this.tempData = [];
|
||||
this.tempData.push(this.selected);
|
||||
this.param = {
|
||||
sectionCode: this.selected.code
|
||||
};
|
||||
},
|
||||
handleParam() {
|
||||
if (this.operate == OperationEvent.Signal.cancelTrainRoute.menu.operation || this.operate == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||
this.param = {
|
||||
@ -217,7 +298,6 @@ export default {
|
||||
operation: this.operate,
|
||||
param: this.param
|
||||
};
|
||||
// console.log(step);
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -228,12 +308,16 @@ export default {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.deviceHighLight(this.selected, false); // 当前选中
|
||||
this.operate = ''; // 清空指令
|
||||
this.cmdType = '';
|
||||
this.oldClickObj = null; // 清空上次点击信号机
|
||||
if (this.oldClickObj) {
|
||||
this.deviceHighLight(this.oldClickObj, false);
|
||||
}
|
||||
this.param = {};
|
||||
this.tempData = []; // 清空执行栏
|
||||
this.canCommand = true; // 执行变为禁用
|
||||
this.oldClickObj = null; // 清空上次点击信号机
|
||||
this.clearAllMenuShow();
|
||||
}
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// Handler.execute(CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, {}).then(resp => {
|
||||
// const tempData = resp.data;
|
||||
// const tempData = resp.data;
|
||||
this.$refs.speedCmdControl.doShow(step, this.selected);
|
||||
// });
|
||||
}
|
||||
|
@ -182,7 +182,9 @@ export default {
|
||||
/** 设置引导总锁 */
|
||||
CMD_STATION_SET_MASTER_GUIDE_LOCK: {value: 'Station_Set_Master_Guide_Lock', label: '设置引导总锁'},
|
||||
/** 取消引导总锁 */
|
||||
CMD_STATION_CANCEL_MASTER_GUIDE_LOCK: {value: 'Station_Cancel_Master_Guide_Lock', label: '取消引导总锁'}
|
||||
CMD_STATION_CANCEL_MASTER_GUIDE_LOCK: {value: 'Station_Cancel_Master_Guide_Lock', label: '取消引导总锁'},
|
||||
/** 封锁车站所有信号机 */
|
||||
CMD_STATION_CANCEL_MASTER_GUIDE: {value: 'Station_Cancel_Master_Guide_Lock', label: '封锁集中站信号'}
|
||||
},
|
||||
|
||||
// 列车
|
||||
|
Loading…
Reference in New Issue
Block a user