diff --git a/src/jmapNew/shape/Arrow/index.js b/src/jmapNew/shape/Arrow/index.js index f81df67d6..96fa09298 100644 --- a/src/jmapNew/shape/Arrow/index.js +++ b/src/jmapNew/shape/Arrow/index.js @@ -1,5 +1,4 @@ import Group from 'zrender/src/container/Group'; -import {isShowThePrdType} from '../../utils/handlePath'; import Polygon from 'zrender/src/graphic/shape/Polygon'; export default class Arrow extends Group { @@ -12,10 +11,8 @@ export default class Arrow extends Group { this.model = model; // this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, model.showConditions) || model.previewOrMapDraw) { - this.create(); - this.setState(model); - } + this.create(); + this.setState(model); this.setShowMode(); } diff --git a/src/jmapNew/shape/AutoTurnBack/index.js b/src/jmapNew/shape/AutoTurnBack/index.js index b6196a323..592318814 100644 --- a/src/jmapNew/shape/AutoTurnBack/index.js +++ b/src/jmapNew/shape/AutoTurnBack/index.js @@ -7,7 +7,6 @@ import Text from 'zrender/src/graphic/Text'; import Rect from 'zrender/src/graphic/shape/Rect'; import EMouse from './EMouse'; import BoundingRect from 'zrender/src/core/BoundingRect'; -import {isShowThePrdType} from '../../utils/handlePath'; export default class AutoTurnBack extends Group { constructor(model, style) { @@ -19,11 +18,9 @@ export default class AutoTurnBack extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, style.AutoTurnBack.visibleConditions) || model.previewOrMapDraw) { - this.create(); - this.createMouseEvent(); - this.setState(model); - } + this.create(); + this.createMouseEvent(); + this.setState(model); this.setShowMode(); } diff --git a/src/jmapNew/shape/AutomacticRoute/index.js b/src/jmapNew/shape/AutomacticRoute/index.js index 5665bc9da..218af519b 100644 --- a/src/jmapNew/shape/AutomacticRoute/index.js +++ b/src/jmapNew/shape/AutomacticRoute/index.js @@ -6,7 +6,6 @@ import Arc from 'zrender/src/graphic/shape/Arc'; import Text from 'zrender/src/graphic/Text'; import EMouse from './EMouse'; import BoundingRect from 'zrender/src/core/BoundingRect'; -import {isShowThePrdType} from '../../utils/handlePath'; export default class AutomacticRoute extends Group { constructor(model, style) { @@ -18,11 +17,9 @@ export default class AutomacticRoute extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, (style.AutomaticRoute || {}).displayCondition) || model.previewOrMapDraw) { - this.create(); - this.createMouseEvent(); - this.setState(model); - } + this.create(); + this.createMouseEvent(); + this.setState(model); this.setShowMode(); } diff --git a/src/jmapNew/shape/AxleReset/index.js b/src/jmapNew/shape/AxleReset/index.js index 0e36e059f..ed8361b3f 100644 --- a/src/jmapNew/shape/AxleReset/index.js +++ b/src/jmapNew/shape/AxleReset/index.js @@ -6,7 +6,6 @@ import Arc from 'zrender/src/graphic/shape/Arc'; import Text from 'zrender/src/graphic/Text'; import EMouse from './EMouse'; import BoundingRect from 'zrender/src/core/BoundingRect'; -import {isShowThePrdType} from '../../utils/handlePath'; export default class AxleReset extends Group { constructor(model, style) { @@ -18,11 +17,9 @@ export default class AxleReset extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, (style.AxleReset || {}).displayCondition) || model.previewOrMapDraw) { - this.create(); - this.createMouseEvent(); - this.setState(model); - } + this.create(); + this.createMouseEvent(); + this.setState(model); this.setShowMode(); } diff --git a/src/jmapNew/shape/DirectionRod/index.js b/src/jmapNew/shape/DirectionRod/index.js index ea98b3b13..1f9e71681 100644 --- a/src/jmapNew/shape/DirectionRod/index.js +++ b/src/jmapNew/shape/DirectionRod/index.js @@ -1,6 +1,5 @@ import Group from 'zrender/src/container/Group'; import Polygon from 'zrender/src/graphic/shape/Polygon'; -import {isShowThePrdType} from '../../utils/handlePath'; import Text from 'zrender/src/graphic/Text'; export default class DirectionRod extends Group { @@ -13,11 +12,9 @@ export default class DirectionRod extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, (style.DirectionRod || {}).displayCondition) || model.previewOrMapDraw) { - this.create(); - this.createMouseEvent(); - this.setState(model); - } + this.create(); + this.createMouseEvent(); + this.setState(model); this.setShowMode(); } create() { diff --git a/src/jmapNew/shape/FloodGate/index.js b/src/jmapNew/shape/FloodGate/index.js index 5fb6e8d9a..ca2992e10 100644 --- a/src/jmapNew/shape/FloodGate/index.js +++ b/src/jmapNew/shape/FloodGate/index.js @@ -3,7 +3,6 @@ */ import Group from 'zrender/src/container/Group'; import Rect from 'zrender/src/graphic/shape/Rect'; -import {isShowThePrdType} from '../../utils/handlePath'; export default class FloodGate extends Group { constructor(model, style) { @@ -16,11 +15,9 @@ export default class FloodGate extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, (style.FloodGate || {}).displayCondition) || model.previewOrMapDraw) { - this.create(); - this.createMouseEvent(); - this.setState(model); - } + this.create(); + this.createMouseEvent(); + this.setState(model); this.setShowMode(); } diff --git a/src/jmapNew/shape/GuideLock/index.js b/src/jmapNew/shape/GuideLock/index.js index 451110d99..9fee9be78 100644 --- a/src/jmapNew/shape/GuideLock/index.js +++ b/src/jmapNew/shape/GuideLock/index.js @@ -6,7 +6,6 @@ import Arc from 'zrender/src/graphic/shape/Arc'; import Text from 'zrender/src/graphic/Text'; import EMouse from './EMouse'; import BoundingRect from 'zrender/src/core/BoundingRect'; -import {isShowThePrdType} from '../../utils/handlePath'; export default class GuideLock extends Group { constructor(model, style) { @@ -18,11 +17,9 @@ export default class GuideLock extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, (style.GuideLock || {}).displayCondition) || model.previewOrMapDraw) { - this.create(); - this.createMouseEvent(); - this.setState(model); - } + this.create(); + this.createMouseEvent(); + this.setState(model); this.setShowMode(); } diff --git a/src/jmapNew/shape/Line/index.js b/src/jmapNew/shape/Line/index.js index 161b6736b..2f62894be 100644 --- a/src/jmapNew/shape/Line/index.js +++ b/src/jmapNew/shape/Line/index.js @@ -1,5 +1,4 @@ import Group from 'zrender/src/container/Group'; -import {isShowThePrdType} from '../../utils/handlePath'; import Polyline from 'zrender/src/graphic/shape/Polyline'; export default class Line2 extends Group { @@ -12,10 +11,8 @@ export default class Line2 extends Group { this.model = model; this.style = style.Line; this.isShowShape = true; - if (isShowThePrdType(model.prdType, model.showConditions) || model.previewOrMapDraw) { - this.create(); - this.setState(model); - } + this.create(); + this.setState(model); this.setShowMode(); } diff --git a/src/jmapNew/shape/OutFrame/index.js b/src/jmapNew/shape/OutFrame/index.js index 45cbce365..691d66f17 100644 --- a/src/jmapNew/shape/OutFrame/index.js +++ b/src/jmapNew/shape/OutFrame/index.js @@ -1,6 +1,5 @@ import Group from 'zrender/src/container/Group'; import Rect from 'zrender/src/graphic/shape/Rect'; -import {isShowThePrdType} from '../../utils/handlePath'; export default class OutFrame extends Group { constructor(model, style) { @@ -12,10 +11,8 @@ export default class OutFrame extends Group { this.zlevel = model.zlevel; this.isShowShape = true; this.z = 0; - if (isShowThePrdType(model.prdType, model.showConditions) || model.previewOrMapDraw) { - this.create(); - this.setState(model); - } + this.create(); + this.setState(model); this.setShowMode(); } diff --git a/src/jmapNew/shape/OverAp/index.js b/src/jmapNew/shape/OverAp/index.js index af29915e6..a718bf898 100644 --- a/src/jmapNew/shape/OverAp/index.js +++ b/src/jmapNew/shape/OverAp/index.js @@ -1,5 +1,4 @@ import Group from 'zrender/src/container/Group'; -// import {isShowThePrdType} from '../../utils/handlePath'; import ETextName from '../element/ETextName'; // 名称文字 (共有) import BoundingRect from 'zrender/src/core/BoundingRect'; diff --git a/src/jmapNew/shape/Power/index.js b/src/jmapNew/shape/Power/index.js index d621f25f1..8cd14cbd9 100644 --- a/src/jmapNew/shape/Power/index.js +++ b/src/jmapNew/shape/Power/index.js @@ -2,7 +2,6 @@ import Polyline from 'zrender/src/graphic/shape/Polyline'; import Group from 'zrender/src/container/Group'; import JTriangle from '../../utils/JTriangle'; import ESeparator from './ESeparator'; -import {isShowThePrdType} from '../../utils/handlePath'; export default class Line2 extends Group { constructor(model, style) { @@ -14,11 +13,9 @@ export default class Line2 extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, model.showConditions) || model.previewOrMapDraw) { - this.create(); - this.createTerminal(); - this.setState(model); - } + this.create(); + this.createTerminal(); + this.setState(model); this.setShowMode(); } diff --git a/src/jmapNew/shape/SaidLamp/index.js b/src/jmapNew/shape/SaidLamp/index.js index 8a4f585ef..d50500d80 100644 --- a/src/jmapNew/shape/SaidLamp/index.js +++ b/src/jmapNew/shape/SaidLamp/index.js @@ -1,7 +1,6 @@ import Group from 'zrender/src/container/Group'; import EControl from '../element/EControl'; import EMouse from './EMouse'; -import {isShowThePrdType} from '../../utils/handlePath'; import deviceType from '../../constant/deviceType'; import ELampFilament from './ELampFilament'; import EControlSwitch from './EControlSwitch'; @@ -23,11 +22,9 @@ export default class SaidLamp extends Group { this.deviceStyle = style[model._type]; if (this.deviceStyle) { this.isShowShape = true; - if (isShowThePrdType(model.prdType, (this.deviceStyle || {}).displayCondition) || model.previewOrMapDraw) { - this.create(); - this.createMouseEvent(); - this.setState(model); - } + this.create(); + this.createMouseEvent(); + this.setState(model); this.setShowMode(); } } diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index cf5604de0..c8546adde 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -12,7 +12,6 @@ import Group from 'zrender/src/container/Group'; import EHighlight from '../element/EHighlight'; import EVirtualSignal from './EVirtualSignal'; import ELowButton from './ELowButton'; -import {isShowThePrdType} from '../../utils/handlePath'; import Rect from 'zrender/src/graphic/shape/Rect'; import Polygon from 'zrender/src/graphic/shape/Polygon'; import Text from 'zrender/src/graphic/Text'; @@ -735,15 +734,13 @@ class Signal extends Group { this.recover(); /** 信号机进路按钮显示 */ - if (isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) { - /** 终端信号机按钮 */ - if (model.isRouteActive) { - this.setLowButtonActive(); - } else { - this.setLowButtonRecover(); - } - model.isRouteSignal && this.setLowButtonShow(); + /** 终端信号机按钮 */ + if (model.isRouteActive) { + this.setLowButtonActive(); + } else { + this.setLowButtonRecover(); } + model.isRouteSignal && this.setLowButtonShow(); /** 设置灯的颜色 */ model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭 diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index c12625734..f10febd4c 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -36,7 +36,6 @@ import EDownDetainLamp from './functionButton/EDownDetainLamp'; import ETrainSetButton from './ETrainSetButton'; import EStationPlatform from './EStationPlatform'; -import {isShowThePrdType} from '../../utils/handlePath'; import {traverseLineElements, traverseStatusElements} from '../utils/ShapeStatusCovert'; class StationStand extends Group { @@ -99,9 +98,7 @@ class StationStand extends Group { 'downDetainLamp':EDownDetainLamp }; // 遍历后端返回的状态控制的绘图 - if (model.previewOrMapDraw || isShowThePrdType(model.prdType, style.StationStand.common.functionButtonShow)) { - traverseStatusElements(statusElementList, model, style, this); - } + traverseStatusElements(statusElementList, model, style, this); } createMouseEvent() { diff --git a/src/jmapNew/shape/Text/index.js b/src/jmapNew/shape/Text/index.js index 4deda11a3..d9622acf7 100644 --- a/src/jmapNew/shape/Text/index.js +++ b/src/jmapNew/shape/Text/index.js @@ -1,6 +1,5 @@ import Text from 'zrender/src/graphic/Text'; import Group from 'zrender/src/container/Group'; -import {isShowThePrdType} from '../../utils/handlePath'; import BoundingRect from 'zrender/src/core/BoundingRect'; import Vue from 'vue'; @@ -15,10 +14,8 @@ export default class Text2 extends Group { this.style = style; this.z = 6; this.isShowShape = true; - if (isShowThePrdType(model.prdType, model.showConditions) || model.previewOrMapDraw) { - this.create(); - this.setState(model); - } + this.create(); + this.setState(model); this.setShowMode(); } @@ -65,6 +62,7 @@ export default class Text2 extends Group { return; } const showConditions = this.model.showConditions; + console.log(showMode, showConditions); if (!showConditions || showConditions === '01' || showMode === showConditions) { this.text && this.text.show(); } else {