调整区段绘画逻辑
This commit is contained in:
parent
16caa26336
commit
1d46deb12a
@ -87,6 +87,7 @@ class SkinCode extends defaultStyle {
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
line: {
|
||||
isActiveShow: true, // 哈尔滨点击元素显示
|
||||
width: 5, // 区段宽度
|
||||
beyondWidth: 1, // 区段宽超出宽度
|
||||
invadeColor: '#EF0C08', // 区段侵入颜色
|
||||
|
@ -26,6 +26,7 @@ class EMouse extends Group {
|
||||
});
|
||||
this.add(this.sectionTextBorder);
|
||||
this.sectionTextBorder.hide();
|
||||
console.log(this.sectionTextBorder);
|
||||
}
|
||||
|
||||
const fontSize = this.device.model.type == '02' ? this.device.style.Section.text.fontSize + 2 : this.device.style.Section.text.fontSize;
|
||||
|
@ -54,7 +54,7 @@ export default class Section extends Group {
|
||||
|
||||
createMouseEvent() {
|
||||
// 鼠标事件
|
||||
if (this.style.Section.mouseOverStyle) {
|
||||
if (this.style.Section.mouseOverStyle) { // 只有北京线路才会有鼠标事件
|
||||
this.mouseEvent = new EMouse(this, this.model.relSwitchCode);
|
||||
this.add(this.mouseEvent);
|
||||
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
|
||||
@ -69,7 +69,8 @@ export default class Section extends Group {
|
||||
// 创建区段
|
||||
this.section = new ELines({
|
||||
zlevel: this.zlevel,
|
||||
z: model.type == '02' ? this.z + 1 : this.z, // 逻辑区段层级降低一层
|
||||
// z: model.type == '02' ? this.z + 1 : this.z, // 逻辑区段层级降低一层
|
||||
z: this.z, // 逻辑区段层级降低一层
|
||||
isSwitchSection: model.switchSection,
|
||||
isCurve: model.curve,
|
||||
points: model.type == '04' ? [model.namePosition, model.namePosition] : model.points,
|
||||
@ -571,11 +572,12 @@ export default class Section extends Group {
|
||||
});
|
||||
}
|
||||
|
||||
setModelTypeLevel() { // 给含有逻辑区段的 section 层级加一
|
||||
if (this.model.type == '01' && this.model.logicSectionCodeList && this.model.logicSectionCodeList.length > 0) {
|
||||
this.section.setZleve(this.z + 2);
|
||||
}
|
||||
}
|
||||
// setModelTypeLevel() { // 给含有逻辑区段的 section 层级加一
|
||||
// if (this.model.type == '01' && this.model.logicSectionCodeList && this.model.logicSectionCodeList.length > 0) {
|
||||
// console.log(this.section);
|
||||
// this.section.setZleve(this.z + 2);
|
||||
// }
|
||||
// }
|
||||
|
||||
/** 设置区段恢复默认状态*/
|
||||
recover() {
|
||||
@ -629,7 +631,7 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.communicationOccupiedColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
this.setModelTypeLevel();
|
||||
// this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -640,7 +642,7 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.unCommunicationOccupiedColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
this.setModelTypeLevel();
|
||||
// this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -651,7 +653,7 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.routeLockColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
this.setModelTypeLevel();
|
||||
// this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -671,7 +673,7 @@ export default class Section extends Group {
|
||||
{ time: 2000, styles: { stroke: this.style.Section.line.blockColor } }
|
||||
]);
|
||||
}
|
||||
this.setModelTypeLevel();
|
||||
// this.setModelTypeLevel();
|
||||
}
|
||||
|
||||
/** 故障锁定状态 05*/
|
||||
@ -813,16 +815,9 @@ export default class Section extends Group {
|
||||
sectionC && sectionC.instance && sectionC.instance.setState(sectionC, true);
|
||||
}
|
||||
}
|
||||
let numFlag = 0;
|
||||
model.logicSectionNum.forEach(item => {
|
||||
numFlag += item;
|
||||
});
|
||||
if (numFlag) {
|
||||
return;
|
||||
}
|
||||
// 顺序代表优先级
|
||||
/** 道岔保护区段锁闭 */
|
||||
{ model.overlapLock && this.protectiveLock(); }
|
||||
model.overlapLock && this.protectiveLock();
|
||||
/** 空闲锁闭或者叫进路锁闭 */
|
||||
model.routeLock && this.routeLock();
|
||||
/** 轨道封锁 */
|
||||
@ -873,7 +868,11 @@ export default class Section extends Group {
|
||||
drawSelected(selected) {
|
||||
this.selected = selected;
|
||||
if (selected) {
|
||||
!this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb' });
|
||||
if (this.style.Section.line.isActiveShow) {
|
||||
console.log(111);
|
||||
} else {
|
||||
!this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb' });
|
||||
}
|
||||
} else {
|
||||
!this.selectedType && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor });
|
||||
}
|
||||
|
@ -153,12 +153,12 @@ export default {
|
||||
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;
|
||||
// case 'Station':
|
||||
// this.handleStationMenu();
|
||||
// this.deviceHighLight(this.oldDevice, false);
|
||||
// this.deviceHighLight(this.selected, true);
|
||||
// this.oldDevice = this.selected;
|
||||
// break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header" style="line-height: 44px;">
|
||||
{{message}}
|
||||
{{ message }}
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
@ -58,10 +58,10 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ?OperationEvent.Signal.humanTrainRoute.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Signal.cancelGuide.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operate == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
||||
return '人解进路';
|
||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
||||
return '办理引导进路';
|
||||
@ -91,18 +91,18 @@ export default {
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operate == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||
this.humanTrainRoute();
|
||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
||||
this.cancelGuide();
|
||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
||||
this.guide();
|
||||
}
|
||||
},
|
||||
// 人解进路 / 取消进路引导
|
||||
humanTrainRoute() {
|
||||
cancelGuide() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operate,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
|
@ -77,9 +77,9 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '人工解锁进路',
|
||||
label: '人工解锁进路', // 信号机引导取消
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
@ -492,12 +492,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 人工解锁进路
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
humanTrainRoute() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
||||
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
|
@ -76,8 +76,10 @@ export default {
|
||||
CMD_SIGNAL_CLOSE_SIGNAL: {value:'Signal_Close_Signal', label: '信号关灯'},
|
||||
/** 信号重开 */
|
||||
CMD_SIGNAL_REOPEN_SIGNAL: {value:'Signal_Reopen_Signal', label: '信号重开'},
|
||||
/** 引导进路 */
|
||||
CMD_SIGNAL_ROUTE_GUIDE: {value:'Signal_Route_Guide', label: '引导进路'},
|
||||
/** 办理引导 */
|
||||
CMD_SIGNAL_ROUTE_GUIDE: {value:'Signal_Set_Guide', label: '办理引导'},
|
||||
/** 取消引导 */
|
||||
CMD_SIGNAL_CANCEL_GUIDE: {value:'Signal_Cancel_Guide', label: '取消引导'},
|
||||
/** 进路自排开 */
|
||||
CMD_SIGNAL_OPEN_AUTO_SETTING: {value:'Signal_Open_Auto_Setting', label: '进路自排开'},
|
||||
/** 进路自排关 */
|
||||
|
@ -892,7 +892,22 @@ export const OperationEvent = {
|
||||
operation: '317',
|
||||
domId: '_Tips-Signal-SingalPassModel-Menu'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 取消信号机引导
|
||||
cancelGuide: {
|
||||
button: {
|
||||
operation: '3180',
|
||||
domId: '_Tips-Signal-cancelGuide-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '318',
|
||||
domId: '_Tips-Signal-cancelGuide-Menu'
|
||||
},
|
||||
confirm: {
|
||||
operation: '3181',
|
||||
domId: '_Tips-Signal-cancelGuide-Confirm'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// 物理区段操作
|
||||
|
@ -3,10 +3,10 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
Loading…
Reference in New Issue
Block a user