This commit is contained in:
sunzhenyu 2021-09-15 18:08:47 +08:00
commit 325af74192
34 changed files with 7 additions and 362 deletions

View File

@ -185,14 +185,6 @@ class Painter {
}
}
}
/**
* 更新显示模式
*/
updateShowMode(device) {
if (device && device.instance) {
device.instance.setShowMode();
}
}
/**
* 更新现地显示单独集中站
* */

View File

@ -11,10 +11,8 @@ export default class Arrow extends Group {
this.z = 0;
this.model = model;
// this.style = style;
// this.isShowShape = true;
this.create();
this.setState(model);
this.setShowMode();
}
create() {
@ -50,16 +48,6 @@ export default class Arrow extends Group {
recover() {
this.arrow && this.arrow.hide();
}
// 设置显示模式
setShowMode() {
// const showMode = this.model.showMode;
// const showConditions = this.model.showConditions;
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.arrow.show();
// } else {
// this.arrow.hide();
// }
}
getAnchorPoint() {
const rect = this.arrow.getBoundingRect();
return { x:rect.x, y:rect.y };

View File

@ -22,7 +22,6 @@ export default class AutoTurnBack extends Group {
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
}
create() {
@ -171,15 +170,6 @@ export default class AutoTurnBack extends Group {
}
}
setShowMode() {
// const showConditions = this.style.AutoTurnBack.visibleConditions;
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.showMode();
// } else {
// this.hideMode();
// }
}
setControlColor(color) {
if (color) {
this.control.setStyle('fill', color);

View File

@ -21,7 +21,6 @@ export default class AutomacticRoute extends Group {
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
}
create() {
@ -135,16 +134,6 @@ export default class AutomacticRoute extends Group {
return new BoundingRect(0, 0, 0, 0);
}
}
setShowMode() {
// const showMode = this.model.showMode;
// const showConditions = (this.style.AutomaticRoute || {}).displayCondition;
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.showMode();
// } else {
// this.hideMode();
// }
}
recover() {
this.control && this.control.show();
this.text && this.text.show();

View File

@ -21,7 +21,6 @@ export default class AxleReset extends Group {
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
}
create() {
@ -141,15 +140,6 @@ export default class AxleReset extends Group {
return new BoundingRect(0, 0, 0, 0);
}
}
setShowMode() {
// const showMode = this.model.showMode;
// const showConditions = (this.style.AxleReset || {}).displayCondition;
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.showMode();
// } else {
// this.hideMode();
// }
}
getAnchorPoint() {
return this.model.position;
}

View File

@ -16,7 +16,6 @@ export default class DirectionRod extends Group {
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
}
create() {
const model = this.model;
@ -88,15 +87,6 @@ export default class DirectionRod extends Group {
createMouseEvent() {
}
setShowMode() {
// const showMode = this.model.showMode;
// const showConditions = (this.style.DirectionRod || {}).displayCondition;
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.showMode();
// } else {
// this.hideMode();
// }
}
drawSelected() {
}

View File

@ -19,7 +19,6 @@ export default class FloodGate extends Group {
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
}
create() {
@ -55,16 +54,6 @@ export default class FloodGate extends Group {
createMouseEvent() {
}
setShowMode() {
// const showMode = this.model.showMode;
// const showConditions = (this.style.FloodGate || {}).displayCondition;
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.showMode();
// } else {
// this.hideMode();
// }
}
getAnchorPoint() {
return this.model.position;
}

View File

@ -17,11 +17,9 @@ export default class GuideLock extends Group {
this.zlevel = model.zlevel;
this.model = model;
this.style = style;
// this.isShowShape = true;
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
}
create() {
@ -147,16 +145,6 @@ export default class GuideLock extends Group {
return new BoundingRect(0, 0, 0, 0);
}
}
setShowMode() {
// const showMode = this.model.showMode;
// const showConditions = (this.style.GuideLock || {}).displayCondition;
//
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.showMode();
// } else {
// this.hideMode();
// }
}
getAnchorPoint() {
return this.model.position;
}

View File

@ -15,7 +15,6 @@ export default class LcControl extends Group {
this.zlevel = model.zlevel;
this.model = model;
this.style = style;
this.isShowShape = true;
this.create();
this.createMouseEvent();
this.setState(model);
@ -91,7 +90,6 @@ export default class LcControl extends Group {
}
return null;
}
setShowMode() {}
getAnchorPoint() {
return this.model.position;
}

View File

@ -15,7 +15,6 @@ export default class LimitControl extends Group {
this.zlevel = model.zlevel;
this.model = model;
this.style = style;
this.isShowShape = true;
this.z = 20;
this.create(model);
this.createMouseEvent();
@ -95,7 +94,6 @@ export default class LimitControl extends Group {
}
return null;
}
setShowMode() {}
getAnchorPoint() {
return this.model.position;
}

View File

@ -11,10 +11,8 @@ export default class Line2 extends Group {
this.z = 0;
this.model = model;
this.style = style.Line;
this.isShowShape = true;
this.create();
this.setState(model);
this.setShowMode();
}
create() {
@ -90,7 +88,6 @@ export default class Line2 extends Group {
}
setState(model) {
// if (!this.isShowShape) return;
this.recover();
if (!store.getters['map/checkDeviceShow'](this._code)) {
this.segment && this.segment.hide();
@ -103,21 +100,6 @@ export default class Line2 extends Group {
this.segment && this.segment.show();
this.viceSegment && this.viceSegment.show();
}
// 设置显示模式
setShowMode() {
// const showMode = this.model.showMode;
// const showConditions = this.model.showConditions;
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.segment && this.segment.show();
// this.viceSegment && this.viceSegment.show();
// } else {
// this.segment && this.segment.hide();
// this.viceSegment && this.viceSegment.hide();
// }
// if (store.state.training.prdType === '09') {
// this.text && this.text.hide();
// }
}
getAnchorPoint() {
if (this.segment) {
const rect = this.segment.getBoundingRect();

View File

@ -14,7 +14,6 @@ export default class OutFrame extends Group {
this.z = 0;
this.create();
this.setState(model);
this.setShowMode();
}
create() {
@ -50,21 +49,6 @@ export default class OutFrame extends Group {
this.box && this.box.show();
if (this.isBigScreen) { this.screenShow(); }
}
// 设置显示模式
setShowMode() {
// const showMode = this.model.showMode;
// const showConditions = this.model.showConditions;
// if (showMode == '04') {
// this.box && this.box.hide();
// return;
// }
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.box && this.box.show();
// this.setState(this.model);
// } else {
// this.box && this.box.hide();
// }
}
screenShow() {
this.isBigScreen = true;
this.box && this.box.hide();

View File

@ -12,7 +12,6 @@ export default class OverAp extends Group {
this.model = model;
this.style = style;
this.z = 6;
this.isShowShape = true;
this.create();
this.setState(model);
}
@ -73,13 +72,6 @@ export default class OverAp extends Group {
} else {
return new BoundingRect(0, 0, 0, 0);
}
}
// 设置显示模式
setShowMode() {
}
setShowStation(stationCode) {
}
screenShow() {

View File

@ -17,7 +17,6 @@ export default class Line2 extends Group {
this.create();
this.createTerminal();
this.setState(model);
this.setShowMode();
}
create() {
@ -130,21 +129,6 @@ export default class Line2 extends Group {
this.rightTerminal && this.rightTerminal.show();
if (this.isBigScreen) { this.screenShow(); }
}
// 设置显示模式
setShowMode() {
// const showMode = this.model.showMode;
// const showConditions = this.model.showConditions;
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.eachChild((child) => {
// child.show();
// });
// } else {
// this.eachChild((child) => {
// child.hide();
// });
// }
}
screenShow() {
this.isBigScreen = true;
this.eachChild((child) => {

View File

@ -16,10 +16,8 @@ export default class Line2 extends Group {
this.z = 1;
this.model = model;
this.style = style;
this.isShowShape = true;
this.create();
this.setState(model);
this.setShowMode(true);
this.checkIsDrawMap();
}
@ -86,16 +84,6 @@ export default class Line2 extends Group {
this.on('mouseover', () => { this.highlight.mouseover(); });
}
}
setShowMode() {
const showMode = this.model.showMode;
if (showMode == '05') {
this.eachChild(item => {
item.hide();
});
} else {
this.setState(this.model);
}
}
getAnchorPoint() {
return this.model.position;
}

View File

@ -13,7 +13,6 @@ export default class Resource extends Group {
this.zlevel = model.zlevel;
this.model = model;
this.style = style;
this.isShowShape = true;
this.z = model.zIndex || 1;
this.create();
}
@ -44,7 +43,6 @@ export default class Resource extends Group {
}
setState(model) {
// if (!this.isShowShape) return;
this.recover();
if (!store.getters['map/checkDeviceShow'](this._code)) {
this.image && this.image.hide();
@ -76,7 +74,6 @@ export default class Resource extends Group {
}
return null;
}
setShowMode() {}
getAnchorPoint() {
return this.model.position;
}

View File

@ -32,7 +32,6 @@ export default class Responder extends Group {
this.zlevel = model.zlevel;
this.model = model;
this.style = style;
this.isShowShape = true;
this.anchorPoint = {x: 0, y: 0};
this.z = model.z || 19;
if (model.previewOrMapDraw) {
@ -141,7 +140,6 @@ export default class Responder extends Group {
}
setState(model) {
// if (!this.isShowShape) return;
this.recover();
if (!store.getters['map/checkDeviceShow'](this._code)) {
this.block && this.block.hide();
@ -195,7 +193,6 @@ export default class Responder extends Group {
}
return null;
}
setShowMode() {}
getAnchorPoint() {
return this.anchorPoint;
}

View File

@ -23,11 +23,9 @@ export default class SaidLamp extends Group {
this.style = style;
this.deviceStyle = style[model._type];
if (this.deviceStyle) {
this.isShowShape = true;
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
}
}
@ -183,7 +181,6 @@ export default class SaidLamp extends Group {
// 设置状态
setState(model) {
// if (!this.isShowShape) return;
this.recover();
if (!store.getters['map/checkDeviceShow'](this._code)) {
this.control && this.control.hide();
@ -218,17 +215,6 @@ export default class SaidLamp extends Group {
}
return null;
}
setShowMode() {
// const showMode = this.model.showMode;
// if (this.deviceStyle) {
// const showConditions = (this.deviceStyle || {}).displayCondition;
// if (showConditions === '01' || showMode === showConditions) {
// this.control && this.control.show();
// } else {
// this.control && this.control.hide();
// }
// }
}
setControlColor(color, flag = false) {
this.control && this.control.getControl && this.control.getControl().stopAnimation(false);
this.control && this.control.setControlColor && this.control.setControlColor(color);

View File

@ -63,11 +63,9 @@ export default class Section extends Group {
this.mapDevice = mapDevice;
this.selected = false; // 绘图选中状态
this.selectedType = ''; // 绘图批量选中状态
// this.isShowShape = true;
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode(true);
}
create() {
@ -125,6 +123,7 @@ export default class Section extends Group {
/** 设置区段恢复默认状态*/
recover() {
if (this.line) {
this.line.show();
this.line.setCrossUnBlock();
this.line.stopAnimation(true);
this.sectionMiddle && this.sectionMiddle.hide(); // 因此特殊区段
@ -599,23 +598,6 @@ export default class Section extends Group {
mouseover() {
this.line && this.line.setStyle({ stroke: 'rgba(255,255,255,0.8)' });
}
setShowMode(flag = false) {
if (this.model.showMode === '05') {
this.line.setStyle({stroke: this.style.Section.line.troColor, lineWidth: this.style.Section.line.troWidth});
this.separator && this.separator.hide();
this.name && this.name.hide();
this.logicText && this.logicText.hide();
this.standTrackText && this.standTrackText.hide();
this.reentryTrackText && this.reentryTrackText.hide();
this.transferTrackText && this.transferTrackText.hide();
this.destinationText && this.destinationText.hide();
if (this.model.type === '05') {
this.line.hide();
}
} else {
this.setState(this.model);
}
}
getAnchorPoint() {
const rect = this.getBoundingRect();

View File

@ -212,7 +212,6 @@ class Signal extends Group {
this.checkIsDrawMap();
this.transformRotation(this);
this.setState(model);
this.setShowMode(true);
// this.checkIsDrawMap();
}
@ -1204,33 +1203,6 @@ class Signal extends Group {
});
}
}
setShowMode() {
const showMode = this.model.showMode;
// if (!flag) {
// this.eachChild(item => {
// item.show();
// });
// this.isShowShape = true;
// this.setState(this.model);
// }
// if (showMode == '03') {
// this.lowButton && this.lowButton.show();
// this.model.prdType = '01';
// } else if (showMode == '02') {
// this.lowButton && this.lowButton.hide();
// this.model.prdType = '02';
// } else if (showMode == '05') {
// this.eachChild(item => {
// item.hide();
// });
// }
if (showMode === '05') {
this.eachChild(item => { item.hide(); });
} else {
this.setState(this.model);
}
}
setLowButtonShow() {
this.lowButton.show();
}

View File

@ -15,7 +15,6 @@ export default class SignalButton extends Group {
this.style = style.Line;
this.create();
this.setState(model);
this.setShowMode();
}
create() {
@ -135,9 +134,6 @@ export default class SignalButton extends Group {
}
}
}
// 设置显示模式
setShowMode() {
}
getAnchorPoint() {
}

View File

@ -120,21 +120,6 @@ export default class SplitStation extends Group {
this.add(this.leftText);
this.add(this.rightText);
}
setShowMode() {
// const showMode = this.model.showMode;
// if (showMode == '04') {
// this.eachChild(item => item.hide() );
// return;
// } else {
// this.setState(this.model);
// }
// const showConditions = this.model.showConditions;
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.eachChild(item => item.show() );
// } else {
// this.eachChild(item => item.hide() );
// }
}
setState(model) {
this.recover();
if (!store.getters['map/checkDeviceShow'](this._code)) {

View File

@ -33,7 +33,6 @@ export default class Station extends Group {
this.createControlMode();
this.setState(model);
this.checkIsDrawMap();
this.setShowMode();
}
create() {
@ -765,17 +764,6 @@ export default class Station extends Group {
this.on('mouseover', e => { this.EMouse.mouseover(e); });
}
}
setShowMode() {
if (this.model.showMode === '05') {
if (this.troButton) {
this.troButton.show();
} else {
this.createTroButton(); // 创建轨道预览按钮
}
} else {
this.troButton && this.troButton.hide();
}
}
setVisible() {
if (!this.model.visible) {

View File

@ -98,7 +98,6 @@ export default class StationCounter extends Group {
getShapeTipPoint() {
return null;
}
setShowMode() {}
getAnchorPoint() {
return this.model.position;
}

View File

@ -113,7 +113,6 @@ export default class StationDelayUnlock extends Group {
getShapeTipPoint() {
return null;
}
setShowMode() {}
recover() {
this.text && this.text.show();
this.table && this.table.show();

View File

@ -53,7 +53,6 @@ class StationStand extends Group {
this.create();
this.createMouseEvent();
this.setVisible(model.visible);
this.setShowMode();
this.setState(model);
}
create() {
@ -242,33 +241,6 @@ class StationStand extends Group {
drawSelected(selected) {
this.highlight && this.highlight.drawSelected(selected);
}
// 设置显示模式
setShowMode() {
const showMode = this.model.showMode;
// const showConditions = this.style.StationStand.common.functionButtonShow;
// this.setVisible(this.model.visible);
if (showMode === '05') {
this.eachChild(item => { item.hide(); });
} else {
this.setState(this.model);
}
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.stopJumpLamp && this.stopJumpLamp.show();
// this.cancelStopJumpLamp && this.cancelStopJumpLamp.show();
// this.upDetainLamp && this.upDetainLamp.show();
// this.downDetainLamp && this.downDetainLamp.show();
// } else if (showMode === '05') {
// this.eachChild(item => {
// item.hide();
// });
// } else {
// this.stopJumpLamp && this.stopJumpLamp.hide();
// this.cancelStopJumpLamp && this.cancelStopJumpLamp.hide();
// this.upDetainLamp && this.upDetainLamp.hide();
// this.downDetainLamp && this.downDetainLamp.hide();
// }
}
getAnchorPoint() {
return this.model.position;
}

View File

@ -19,7 +19,6 @@ export default class StationTurnBack extends Group {
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
}
create() {
const model = this.model;
@ -196,15 +195,6 @@ export default class StationTurnBack extends Group {
y: rect.y
};
}
setShowMode() {
// const showMode = this.model.showMode;
// const showConditions = (this.style.StationTurnBack || {}).displayCondition;
// if (!showConditions || showConditions == '01' || showMode === showConditions) {
// this.eachChild(item => item.show() );
// } else {
// this.eachChild(item => item.hide() );
// }
}
getAnchorPoint() {
return this.model.position;
}

View File

@ -31,7 +31,6 @@ export default class Switch extends Group {
this.createMouseEvent();
this.setState(model);
this.checkIsDrawMap();
this.setShowMode(true);
}
createMouseEvent() {
@ -808,20 +807,6 @@ export default class Switch extends Group {
this.on('mouseover', () => { this.highlight.mouseover(); });
}
}
setShowMode(flag = false) {
// if (!flag) {
// this.eachChild(item => {
// item.show();
// });
// this.isShowShape = true;
// this.setState(this.model);
// }
if ( this.model.showMode === '05') {
this.eachChild(item => { item.hide(); });
} else {
this.setState(this.model);
}
}
getAnchorPoint() {
return this.model.intersection;
}

View File

@ -17,7 +17,6 @@ export default class Text2 extends Group {
this.lineCode = lineCode;
this.create();
this.setState(model);
this.setShowMode();
}
create() {
@ -62,23 +61,6 @@ export default class Text2 extends Group {
return new BoundingRect(this.model.position.x, this.model.position.y, 0, 0);
}
}
// 设置显示模式
setShowMode() {
// const showMode = this.model.showMode;
// if (showMode == '04') {
// this.text && this.text.hide();
// return;
// }
// const showConditions = this.model.showConditions;
// if (!showConditions || showConditions === '01' || showMode === showConditions) {
// this.text && this.text.show();
// } else {
// this.text && this.text.hide();
// }
// if (store.state.training.prdType === '09') {
// this.text && this.text.hide();
// }
}
screenShow() {
this.isBigScreen = true;
if (this.lineCode == '06') { // 宁波线路隐藏

View File

@ -453,7 +453,6 @@ export default class Train extends Group {
});
return rect || new BoundingRect(0, 0, 0, 0);
}
setShowMode() { }
initShowStation(model) {
if (model.trainWindowModel && model.trainWindowModel.instance && model.trainWindowModel.instance.stationCode && !store.getters['map/checkDeviceShow'](model.trainWindowModel.instance.stationCode, model.sectionModel.code)) {
this.eachChild(item => {

View File

@ -17,7 +17,6 @@ class TrainWindow extends Group {
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
}
create() {
if (this.prdType !== '01') {
@ -90,15 +89,6 @@ class TrainWindow extends Group {
getInstanceByCode(code) {
return (store.getters['map/getDeviceByCode'](code) || {}).instance;
}
// 设置显示模式
setShowMode() {
const showMode = this.model.showMode;
if (showMode == '05') {
this.eachChild(item => {
item.hide();
});
}
}
getAnchorPoint() {
return this.model.point || this.model.position;
}

View File

@ -109,21 +109,6 @@ export default class ZcControl extends Group {
}
return null;
}
setShowMode() {}
setShowStation(stationCode) {
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
this.eachChild(item => {
item.show();
});
this.isShowShape = true;
this.setState(this.model);
} else {
this.eachChild(item => {
item.hide();
});
this.isShowShape = false;
}
}
getAnchorPoint() {
return this.model.position;
}

View File

@ -30,5 +30,4 @@ export default class checkBox extends Group {
});
this.add(this.box);
}
setShowMode() {}
}

View File

@ -249,12 +249,12 @@ export default {
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
if (this.currentPrdType === '02' && this.courseModel.lineCode === '14') {
this.$router.push({ path: `/displayBaSiDi/demon`, query: query });
} else {
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
}
// this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
// if (this.currentPrdType === '02' && this.courseModel.lineCode === '14') {
// this.$router.push({ path: `/displayBaSiDi/demon`, query: query });
// } else {
// this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
// }
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
launchFullscreen();
}).catch(error=>{
if (error.code == 10003) {