Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
b164e99a77
@ -956,7 +956,9 @@ class SkinCode extends defaultStyle {
|
|||||||
stroke: '#fff',
|
stroke: '#fff',
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
defaultText: '发车',
|
defaultText: '发车',
|
||||||
defaultColor: '#ccc'
|
defaultColor: '#ccc',
|
||||||
|
occupiedColor:'#f00',
|
||||||
|
noOccupiedColor:'#00ff00',
|
||||||
};
|
};
|
||||||
this[deviceType.PickArrow] = {
|
this[deviceType.PickArrow] = {
|
||||||
triangleLength: 15,
|
triangleLength: 15,
|
||||||
@ -967,7 +969,9 @@ class SkinCode extends defaultStyle {
|
|||||||
stroke: '#fff',
|
stroke: '#fff',
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
defaultText: '接车',
|
defaultText: '接车',
|
||||||
defaultColor: '#ccc'
|
defaultColor: '#ccc',
|
||||||
|
occupiedColor:'#f00',
|
||||||
|
noOccupiedColor:'#ffff00',
|
||||||
};
|
};
|
||||||
this[deviceType.Occlusion] = {
|
this[deviceType.Occlusion] = {
|
||||||
text: {
|
text: {
|
||||||
@ -1043,7 +1047,8 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6,
|
radiusR: 6,
|
||||||
controlColor: '#ccc'
|
controlColor: '#ccc',
|
||||||
|
occupiedColor:'#ffffff',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.SectionOccupied] = {
|
this[deviceType.SectionOccupied] = {
|
||||||
@ -1054,7 +1059,8 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6,
|
radiusR: 6,
|
||||||
controlColor: '#ccc'
|
controlColor: '#ccc',
|
||||||
|
occupiedColor:'#ff0000',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -478,14 +478,21 @@ class Jlmap {
|
|||||||
// store.state.map.map.indicatorLightList;
|
// store.state.map.map.indicatorLightList;
|
||||||
// 改方按钮状态
|
// 改方按钮状态
|
||||||
const signalButtonList = store.state.map.map.signalButtonList;
|
const signalButtonList = store.state.map.map.signalButtonList;
|
||||||
const signalButton = signalButtonList.find(elem=>{
|
const selectButtonList = signalButtonList.filter(elem=>{
|
||||||
return elem.labelEnum === directionData.labelEnum && elem.stationCode == directionData.stationCode;
|
return elem.labelEnum === directionData.labelEnum && elem.stationCode == directionData.stationCode;
|
||||||
});
|
});
|
||||||
if (signalButton && elem.changeDirectionStatus != undefined) {
|
const selectMap = {'ASSIST':'mainAssistStatus', 'PICK_ASSIST':'receiveAssistStatus', 'DEPART_ASSIST':'deliverAssistStatus', 'CHANGE_DIRECTION':'changeDirectionStatus'};
|
||||||
const buttonModel = this.mapDevice[signalButton.code];
|
// { value: 'ASSIST', label: '总辅助按钮' },
|
||||||
buttonModel.pressDown = elem.changeDirectionStatus;
|
// { value: 'PICK_ASSIST', label: '接辅助按钮' },
|
||||||
|
// { value: 'DEPART_ASSIST', label: '发辅助按钮' },
|
||||||
|
selectButtonList.forEach(each=>{
|
||||||
|
const buttonModel = this.mapDevice[each.code];
|
||||||
|
const selectedStatus = selectMap[buttonModel.type];
|
||||||
|
if (selectedStatus != undefined && elem[selectedStatus] != undefined) {
|
||||||
|
buttonModel.pressDown = elem[selectedStatus];
|
||||||
this.$painter.update(buttonModel);
|
this.$painter.update(buttonModel);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 接车 发车 区间占用 辅助状态
|
// 接车 发车 区间占用 辅助状态
|
||||||
const indicatorLightList = store.state.map.map.indicatorLightList;
|
const indicatorLightList = store.state.map.map.indicatorLightList;
|
||||||
@ -497,16 +504,22 @@ class Jlmap {
|
|||||||
switch (each._type) {
|
switch (each._type) {
|
||||||
case 'PickArrow': {
|
case 'PickArrow': {
|
||||||
// 接车灯状态
|
// 接车灯状态
|
||||||
|
if (elem.runStatus != undefined) {
|
||||||
|
model.runStatus = elem.runStatus;
|
||||||
if (elem.receiveAspect != undefined) {
|
if (elem.receiveAspect != undefined) {
|
||||||
model.aspect = elem.receiveAspect;
|
model.aspect = elem.receiveAspect;
|
||||||
|
}
|
||||||
this.$painter.update(model);
|
this.$painter.update(model);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'DepartArrow': {
|
case 'DepartArrow': {
|
||||||
// 发车灯状态
|
// 发车灯状态
|
||||||
|
if (elem.runStatus != undefined) {
|
||||||
|
model.runStatus = elem.runStatus;
|
||||||
if (elem.deliverAspect != undefined) {
|
if (elem.deliverAspect != undefined) {
|
||||||
model.aspect = elem.deliverAspect;
|
model.aspect = elem.deliverAspect;
|
||||||
|
}
|
||||||
this.$painter.update(model);
|
this.$painter.update(model);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -33,8 +33,8 @@ export default class SaidLamp extends Group {
|
|||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain',
|
const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain',
|
||||||
'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist',
|
'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'TotalAssist', 'PickAssist', 'Recovery', 'Accident', 'Occlusion'];
|
||||||
'PickAssist', 'Recovery', 'Accident', 'Occlusion'];
|
|
||||||
if (lampDevice.includes(this._type)) {
|
if (lampDevice.includes(this._type)) {
|
||||||
this.control = new EControl({
|
this.control = new EControl({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
@ -209,17 +209,40 @@ export default class SaidLamp extends Group {
|
|||||||
this.control && this.control.setControlColor(this.deviceStyle.lamp.offColor);
|
this.control && this.control.setControlColor(this.deviceStyle.lamp.offColor);
|
||||||
} else if (datieType.includes(model._type)) {
|
} else if (datieType.includes(model._type)) {
|
||||||
if (model.aspect) {
|
if (model.aspect) {
|
||||||
if (model.aspect == 'WF') {
|
// 接车
|
||||||
this.control && this.control.setControlFlashing('#FFFFFF');
|
if (model._type == deviceType.PickArrow) { // 接车灯
|
||||||
} else {
|
if (model.runStatus == 'R') { // 接车
|
||||||
let defalutColor;
|
// 接车状态:发车灯灭,接车灯默认是黄色,占用时红色
|
||||||
if (model._type == deviceType.PickArrow || model._type == deviceType.DepartArrow) {
|
if (model.aspect == 'O') {
|
||||||
defalutColor = this.deviceStyle.fill;
|
this.control && this.control.setControlColor(this.deviceStyle.occupiedColor);
|
||||||
} else {
|
} else if (model.aspect == 'F') {
|
||||||
defalutColor = this.deviceStyle.lamp.controlColor;
|
this.control && this.control.setControlColor(this.deviceStyle.noOccupiedColor);
|
||||||
|
}
|
||||||
|
} else if (model.runStatus == 'D') { // 发车
|
||||||
|
this.control && this.control.setControlColor(this.deviceStyle.fill);
|
||||||
|
}
|
||||||
|
} else if (model._type == deviceType.DepartArrow) { // 发车灯
|
||||||
|
if (model.runStatus == 'D') { // 发车
|
||||||
|
// 发车状态:接车灯灭,发车灯默认是绿色,占用时红色
|
||||||
|
if (model.aspect == 'O') {
|
||||||
|
this.control && this.control.setControlColor(this.deviceStyle.occupiedColor);
|
||||||
|
} else if (model.aspect == 'F') {
|
||||||
|
this.control && this.control.setControlColor(this.deviceStyle.noOccupiedColor);
|
||||||
|
}
|
||||||
|
} else if (model.runStatus == 'R') { // 接车
|
||||||
|
this.control && this.control.setControlColor(this.deviceStyle.fill);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch (model.aspect) {
|
||||||
|
case 'O':
|
||||||
|
this.control && this.control.setControlColor(this.deviceStyle.lamp.occupiedColor);
|
||||||
|
break;
|
||||||
|
case 'F':
|
||||||
|
this.control && this.control.setControlColor(this.deviceStyle.lamp.controlColor);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
const colorMap = {'No':defalutColor, 'R':'#FF0000', 'G':'#00FF00', 'Y':'#FFFF00', 'W':'#FFFFFF'};
|
|
||||||
this.control && this.control.setControlColor(colorMap[model.aspect]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ export default class SignalButton extends Group {
|
|||||||
x1: model.position.x - 1,
|
x1: model.position.x - 1,
|
||||||
y1: model.position.y + 15,
|
y1: model.position.y + 15,
|
||||||
x2: model.position.x + 15,
|
x2: model.position.x + 15,
|
||||||
y2: model.position.y + 15,
|
y2: model.position.y + 15
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineWidth: 2,
|
lineWidth: 2,
|
||||||
@ -135,7 +135,7 @@ export default class SignalButton extends Group {
|
|||||||
});
|
});
|
||||||
this.add(this.bottomBoard);
|
this.add(this.bottomBoard);
|
||||||
this.bottomBoard.hide();
|
this.bottomBoard.hide();
|
||||||
const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION'];
|
const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', ''];
|
||||||
if (hasTextList.includes(model.type)) {
|
if (hasTextList.includes(model.type)) {
|
||||||
this.buttonText = new Text({
|
this.buttonText = new Text({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
@ -215,7 +215,11 @@ export default class SignalButton extends Group {
|
|||||||
}
|
}
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.recover();
|
this.recover();
|
||||||
if (model.type == 'CHANGE_DIRECTION') {
|
// { value: 'ASSIST', label: '总辅助按钮' },
|
||||||
|
// { value: 'PICK_ASSIST', label: '接辅助按钮' },
|
||||||
|
// { value: 'DEPART_ASSIST', label: '发辅助按钮' },
|
||||||
|
const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION'];
|
||||||
|
if (list.includes(model.type)) {
|
||||||
if (this.rectButton) {
|
if (this.rectButton) {
|
||||||
if (model.pressDown) {
|
if (model.pressDown) {
|
||||||
this.rectButton.setStyle({ fill:'#FFFF00' });
|
this.rectButton.setStyle({ fill:'#FFFF00' });
|
||||||
|
@ -644,11 +644,12 @@ export default {
|
|||||||
this.clearOperate();
|
this.clearOperate();
|
||||||
}
|
}
|
||||||
} else if (!buttonOperation) {
|
} else if (!buttonOperation) {
|
||||||
|
const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST'];
|
||||||
if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) {
|
if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) {
|
||||||
this.handleGuideSignal(model);
|
this.handleGuideSignal(model);
|
||||||
} else if (model._type === 'SignalButton' && model.type === 'CHANGE_DIRECTION') {
|
} else if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
|
||||||
// 改方操作
|
// 改方操作 总辅助操作 接辅助操作 发辅助操作
|
||||||
this.changeDirection(model);
|
this.assistOperateOrChange(model);
|
||||||
} else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
|
} else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
|
||||||
this.deviceList.push(model);
|
this.deviceList.push(model);
|
||||||
this.arrangementRouteOperation(this.deviceList);
|
this.arrangementRouteOperation(this.deviceList);
|
||||||
@ -670,18 +671,57 @@ export default {
|
|||||||
Handler.clear(); // 清空操作组
|
Handler.clear(); // 清空操作组
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
},
|
},
|
||||||
changeDirection(model) {
|
assistOperateOrChange(model) {
|
||||||
const operate = {
|
// mode.type==
|
||||||
|
const modelTypeMap = {
|
||||||
|
// 总辅助按钮
|
||||||
|
'ASSIST':{
|
||||||
|
operation:this.CTCCommand.assistPressMainAssist.menu.operation,
|
||||||
|
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_MAIN_ASSIST,
|
||||||
|
param:{
|
||||||
|
labelEnum:model.labelEnum,
|
||||||
|
stationCode:model.stationCode,
|
||||||
|
pressDown:model.pressDown ? 0 : 1 // 1按下、0弹起
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 改方
|
||||||
|
'CHANGE_DIRECTION':{
|
||||||
operation:this.CTCCommand.assistPressDownTurnDirection.menu.operation,
|
operation:this.CTCCommand.assistPressDownTurnDirection.menu.operation,
|
||||||
code: model.code,
|
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION,
|
||||||
|
param:{
|
||||||
|
labelEnum:model.labelEnum,
|
||||||
|
stationCode:model.stationCode,
|
||||||
|
pressDown:model.pressDown ? 0 : 1 // 1按下、0弹起
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 接辅助按钮
|
||||||
|
'PICK_ASSIST':{
|
||||||
|
// this.CTCCommand.assistPressDownTurnDirection.menu.operation
|
||||||
|
operation:this.CTCCommand.assistPressReceiveAssist.menu.operation,
|
||||||
|
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST,
|
||||||
param:{
|
param:{
|
||||||
labelEnum:model.labelEnum,
|
labelEnum:model.labelEnum,
|
||||||
stationCode:model.stationCode
|
stationCode:model.stationCode
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 发辅助按钮
|
||||||
|
'DEPART_ASSIST':{
|
||||||
|
operation:this.CTCCommand.assistPressDeliverAssist.menu.operation,
|
||||||
|
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST,
|
||||||
|
param:{
|
||||||
|
labelEnum:model.labelEnum,
|
||||||
|
stationCode:model.stationCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const operate = {
|
||||||
|
operation: modelTypeMap[model.type].operation,
|
||||||
|
code: model.code,
|
||||||
|
param: modelTypeMap[model.type].param
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
operate.nextCmdType = CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION;
|
operate.nextCmdType = modelTypeMap[model.type].nextCmdType;
|
||||||
operate['operateNext'] = this.Command.close.password.operation;
|
operate['operateNext'] = this.Command.close.password.operation;
|
||||||
this.$refs.password.doShow(operate);
|
this.$refs.password.doShow(operate);
|
||||||
}
|
}
|
||||||
|
@ -371,6 +371,10 @@ export default {
|
|||||||
CTC_RECEIVING_NOTICE: {value: 'CTC_RECEIVING_NOTICE', label: '接预'},
|
CTC_RECEIVING_NOTICE: {value: 'CTC_RECEIVING_NOTICE', label: '接预'},
|
||||||
CTC_DEPARTURE_NOTICE: {value: 'CTC_DEPARTURE_NOTICE', label: '发预'},
|
CTC_DEPARTURE_NOTICE: {value: 'CTC_DEPARTURE_NOTICE', label: '发预'},
|
||||||
CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION:{value:'ASSIST_PRESS_DOWN_TURN_DIRECTION', label:'改方'},
|
CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION:{value:'ASSIST_PRESS_DOWN_TURN_DIRECTION', label:'改方'},
|
||||||
CTC_AUTO_TRIGGER: {value: 'CTC_AUTO_TRIGGER', label: '自动触发'}
|
CTC_AUTO_TRIGGER: {value: 'CTC_AUTO_TRIGGER', label: '自动触发'},
|
||||||
|
CTC_ASSIST_PRESS_MAIN_ASSIST:{value: 'ASSIST_PRESS_MAIN_ASSIST', label: '总辅助'},
|
||||||
|
CTC_ASSIST_PRESS_RECEIVE_ASSIST:{value: 'ASSIST_PRESS_RECEIVE_ASSIST', label: '接辅助'},
|
||||||
|
CTC_ASSIST_PRESS_DELIVER_ASSIST:{value: 'ASSIST_PRESS_DELIVER_ASSIST', label: '发辅助'}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3561,7 +3561,26 @@ export const OperationEvent = {
|
|||||||
operation: '1103',
|
operation: '1103',
|
||||||
domId: '_Tips-CTC-AutoTrigger-Menu{TOP}'
|
domId: '_Tips-CTC-AutoTrigger-Menu{TOP}'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
assistPressMainAssist:{
|
||||||
|
menu: {
|
||||||
|
operation: '1104',
|
||||||
|
domId: '_Tips-CTC-AssistPressMainAssist-Menu{TOP}'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
assistPressReceiveAssist:{
|
||||||
|
menu: {
|
||||||
|
operation: '1105',
|
||||||
|
domId: '_Tips-CTC-AssistPressReceiveAssist-Menu{TOP}'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
assistPressDeliverAssist:{
|
||||||
|
menu: {
|
||||||
|
operation: '1106',
|
||||||
|
domId: '_Tips-CTC-AssistPressDeliverAssist-Menu{TOP}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user