This commit is contained in:
joylink_cuiweidong 2020-11-02 16:12:29 +08:00
commit b26f3044dc
9 changed files with 15 additions and 14 deletions

View File

@ -3,6 +3,7 @@ const mapDeviceStyle = {
'02': 'fuzhou_01',
'03': 'bejing_01',
'04': 'chengdu_03',
'05': 'fuzhou_01',
'06': 'ningbo_01',
'07': 'haerbin_01',
'08': 'foshan_01',

View File

@ -18,7 +18,7 @@ export default class AutomacticRoute extends Group {
this.model = model;
this.style = style;
this.isShowShape = true;
if (isShowThePrdType(model.prdType, style.AutomaticRoute.displayCondition) || model.previewOrMapDraw) {
if (isShowThePrdType(model.prdType, (style.AutomaticRoute || {}).displayCondition) || model.previewOrMapDraw) {
this.create();
this.createMouseEvent();
this.setState(model);
@ -134,7 +134,7 @@ export default class AutomacticRoute extends Group {
setShowMode() {
const showMode = this.model.showMode;
const showConditions = this.style.AutomaticRoute.displayCondition;
const showConditions = (this.style.AutomaticRoute || {}).displayCondition;
if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.showMode();
} else {

View File

@ -18,7 +18,7 @@ export default class AxleReset extends Group {
this.model = model;
this.style = style;
this.isShowShape = true;
if (isShowThePrdType(model.prdType, style.AxleReset.displayCondition) || model.previewOrMapDraw) {
if (isShowThePrdType(model.prdType, (style.AxleReset || {}).displayCondition) || model.previewOrMapDraw) {
this.create();
this.createMouseEvent();
this.setState(model);
@ -129,7 +129,7 @@ export default class AxleReset extends Group {
}
setShowMode() {
const showMode = this.model.showMode;
const showConditions = this.style.AxleReset.displayCondition;
const showConditions = (this.style.AxleReset || {}).displayCondition;
if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.showMode();
} else {

View File

@ -13,7 +13,7 @@ export default class DirectionRod extends Group {
this.model = model;
this.style = style;
this.isShowShape = true;
if (isShowThePrdType(model.prdType, style.DirectionRod.displayCondition) || model.previewOrMapDraw) {
if (isShowThePrdType(model.prdType, (style.DirectionRod || {}).displayCondition) || model.previewOrMapDraw) {
this.create();
this.createMouseEvent();
this.setState(model);
@ -91,7 +91,7 @@ export default class DirectionRod extends Group {
setShowMode() {
const showMode = this.model.showMode;
const showConditions = this.style.DirectionRod.displayCondition;
const showConditions = (this.style.DirectionRod || {}).displayCondition;
if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.showMode();
} else {

View File

@ -16,7 +16,7 @@ export default class FloodGate extends Group {
this.model = model;
this.style = style;
this.isShowShape = true;
if (isShowThePrdType(model.prdType, style.FloodGate.displayCondition) || model.previewOrMapDraw) {
if (isShowThePrdType(model.prdType, (style.FloodGate || {}).displayCondition) || model.previewOrMapDraw) {
this.create();
this.createMouseEvent();
this.setState(model);
@ -58,7 +58,7 @@ export default class FloodGate extends Group {
setShowMode() {
const showMode = this.model.showMode;
const showConditions = this.style.FloodGate.displayCondition;
const showConditions = (this.style.FloodGate || {}).displayCondition;
if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.showMode();
} else {

View File

@ -18,7 +18,7 @@ export default class GuideLock extends Group {
this.model = model;
this.style = style;
this.isShowShape = true;
if (isShowThePrdType(model.prdType, style.GuideLock.displayCondition) || model.previewOrMapDraw) {
if (isShowThePrdType(model.prdType, (style.GuideLock || {}).displayCondition) || model.previewOrMapDraw) {
this.create();
this.createMouseEvent();
this.setState(model);
@ -134,7 +134,7 @@ export default class GuideLock extends Group {
}
setShowMode() {
const showMode = this.model.showMode;
const showConditions = this.style.GuideLock.displayCondition;
const showConditions = (this.style.GuideLock || {}).displayCondition;
if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.showMode();
} else {

View File

@ -23,7 +23,7 @@ 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) {
if (isShowThePrdType(model.prdType, (this.deviceStyle || {}).displayCondition) || model.previewOrMapDraw) {
this.create();
this.createMouseEvent();
this.setState(model);
@ -206,7 +206,7 @@ export default class SaidLamp extends Group {
setShowMode() {
const showMode = this.model.showMode;
if (this.deviceStyle) {
const showConditions = this.deviceStyle.displayCondition;
const showConditions = (this.deviceStyle || {}).displayCondition;
if (showConditions === '01' || showMode === showConditions) {
this.control && this.control.show();
} else {

View File

@ -89,7 +89,7 @@ export default class ELimitLines extends Group {
const beg = Object.assign({}, model.points[0]);
const end = Object.assign({}, model.points[model.points.length - 1]);
if (model.isSwitchSection && beg.y !== end.y) {
const swch = Vue.prototype.$jlmap.mapDevice[model.switch.code]; // 获取道岔model 及状态数据
const swch = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode]; // 获取道岔model 及状态数据
if (swch && swch.instance) {
const traingle = new JTriangle(swch.intersection, swch.skew);

View File

@ -160,7 +160,7 @@ export default class StationTurnBack extends Group {
setShowMode() {
const showMode = this.model.showMode;
const showConditions = this.style.StationTurnBack.displayCondition;
const showConditions = (this.style.StationTurnBack || {}).displayCondition;
if (!showConditions || showConditions == '01' || showMode === showConditions) {
this.eachChild(item => item.show() );
} else {