From c01b26163848dd6beab2b52517bc6cfdd1af0a02 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 17 Mar 2020 18:25:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BC=95=E5=AF=BC=E6=80=BB=E9=94=81?= =?UTF-8?q?=E7=BB=98=E5=88=B6=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/bejing_01.js | 16 ++++ src/jmapNew/config/skinCode/chengdu_03.js | 17 ++++ src/jmapNew/config/skinCode/ningbo_01.js | 2 + src/jmapNew/shape/Automactic/EMouse.js | 94 +++++++++++------------ src/jmapNew/shape/Automactic/index.js | 4 +- 5 files changed, 84 insertions(+), 49 deletions(-) diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index a106dfb77..c1f5e263c 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -242,6 +242,22 @@ class SkinCode extends defaultStyle { } }; + /** 引导总锁 */ + this[deviceType.GuideLock] = { + // 是否显示 + displayCondition: '03', // 显示条件 prdType + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + } + }; + this[deviceType.StationStand] = { common: { // 通用属性 textFontSize: 8, // 站台默认字体大小 diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 70d4ea503..7a2a335f2 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -490,6 +490,23 @@ class SkinCode extends defaultStyle { } }; + + /** 引导总锁 */ + this[deviceType.GuideLock] = { + // 是否显示 + displayCondition: '03', // 显示条件 prdType + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + } + }; + this[deviceType.TrainWindow] = { lineColor: '#4DD43F', // 车次窗颜色 lineDash: null, // 车次窗虚线间隔 diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 63d0ae9db..151496405 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -487,6 +487,8 @@ class SkinCode extends defaultStyle { controlColor: '#b5b3b3' // 控制灯颜色 (灰色) } }; + + /** 引导总锁 */ this[deviceType.GuideLock] = { // 是否显示 displayCondition: '03', // 显示条件 prdType diff --git a/src/jmapNew/shape/Automactic/EMouse.js b/src/jmapNew/shape/Automactic/EMouse.js index fdb639e95..ae2ae8344 100644 --- a/src/jmapNew/shape/Automactic/EMouse.js +++ b/src/jmapNew/shape/Automactic/EMouse.js @@ -2,52 +2,52 @@ import Group from 'zrender/src/container/Group'; import Text from 'zrender/src/graphic/Text'; export default class EMouse extends Group { - constructor(device) { - super(); - this.device = device; - this.create(); - } - create() { - this.text = new Text({ - zlevel: this.device.zlevel, - z: this.device.z+1, - position: [0, 0], - style: { - x: this.device.model.position.x, - y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance-30, - fontWeight: 'normal', - fontSize: this.device.style.LcControl.mouseOverStyle.fontSize, - fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily, - text: this.device.model.name, - textFill: this.device.style.LcControl.mouseOverStyle.fontColor, - textAlign: this.device.style.LcControl.mouseOverStyle.textAlign, - textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign - } - }); - this.add(this.text); - this.text.hide(); - } - mouseover(e) { - if (e.target && e.target._subType == 'Text') { - this.text.show(); - } else { - this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); - this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); - this.device.control.setTextBorder(true); - this.device.control.setArcBorder(true); - } - } + constructor(device) { + super(); + this.device = device; + this.create(); + } + create() { + this.text = new Text({ + zlevel: this.device.zlevel, + z: this.device.z + 1, + position: [0, 0], + style: { + x: this.device.model.position.x, + y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30, + fontWeight: 'normal', + fontSize: this.device.style.LcControl.mouseOverStyle.fontSize, + fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily, + text: this.device.model.name, + textFill: this.device.style.LcControl.mouseOverStyle.fontColor, + textAlign: this.device.style.LcControl.mouseOverStyle.textAlign, + textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign + } + }); + this.add(this.text); + this.text.hide(); + } + mouseover(e) { + if (e.target && e.target._subType == 'Text') { + this.text.show(); + } else { + // this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); + this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); + this.device.control.setTextBorder(true); + this.device.control.setArcBorder(true); + } + } - mouseout(e) { - if (!this.device.model.down) { - if (e.target && e.target._subType == 'Text') { - this.text.hide(); - } else { - this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); - this.device.control.setTextColor('#FFFFFF'); - this.device.control.setTextBorder(false); - this.device.control.setArcBorder(false); - } - } - } + mouseout(e) { + if (!this.device.model.down) { + if (e.target && e.target._subType == 'Text') { + this.text.hide(); + } else { + // this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); + this.device.control.setTextColor('#FFFFFF'); + this.device.control.setTextBorder(false); + this.device.control.setArcBorder(false); + } + } + } } diff --git a/src/jmapNew/shape/Automactic/index.js b/src/jmapNew/shape/Automactic/index.js index 1606a7e05..7151f113f 100644 --- a/src/jmapNew/shape/Automactic/index.js +++ b/src/jmapNew/shape/Automactic/index.js @@ -33,7 +33,7 @@ export default class Automactic extends Group { this.control = new Arc({ _subType: 'Control', zlevel: this.zlevel, - z: this.z, + z: this.z + 1, shape: { cx: model.position.x, cy: model.position.y, @@ -48,7 +48,7 @@ export default class Automactic extends Group { this.text = new Text({ _subType: 'Text', zlevel: this.zlevel, - z: this.z, + z: this.z + 1, position: [0, 0], style: { x: model.position.x, From 3beb346ce14502429d1c63e316208b3a48c8128d Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 17 Mar 2020 18:59:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Automactic/EMouse.js | 12 ++++-------- src/jmapNew/shape/Automactic/index.js | 11 +++++++++++ src/jmapNew/shape/GuideLock/EMouse.js | 12 ++++-------- .../newMap/newMapdraft/mapoperate/ControlDraft.vue | 3 ++- src/views/newMap/newMapdraft/mapoperate/index.vue | 2 +- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/jmapNew/shape/Automactic/EMouse.js b/src/jmapNew/shape/Automactic/EMouse.js index ae2ae8344..967f6094e 100644 --- a/src/jmapNew/shape/Automactic/EMouse.js +++ b/src/jmapNew/shape/Automactic/EMouse.js @@ -31,10 +31,8 @@ export default class EMouse extends Group { if (e.target && e.target._subType == 'Text') { this.text.show(); } else { - // this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); - this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); - this.device.control.setTextBorder(true); - this.device.control.setArcBorder(true); + // this.device.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); + // this.device.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); } } @@ -43,10 +41,8 @@ export default class EMouse extends Group { if (e.target && e.target._subType == 'Text') { this.text.hide(); } else { - // this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); - this.device.control.setTextColor('#FFFFFF'); - this.device.control.setTextBorder(false); - this.device.control.setArcBorder(false); + // this.device.setControlColor(this.device.style.LcControl.lamp.controlColor); + // this.device.setTextColor('#FFFFFF'); } } } diff --git a/src/jmapNew/shape/Automactic/index.js b/src/jmapNew/shape/Automactic/index.js index 7151f113f..bb997649c 100644 --- a/src/jmapNew/shape/Automactic/index.js +++ b/src/jmapNew/shape/Automactic/index.js @@ -170,4 +170,15 @@ export default class Automactic extends Group { this.subtitleText && this.subtitleText.hide(); this.arcBorder && this.arcBorder.hide(); } + + setControlColor(color) { + if (color) { + this.control.setStyle('fill', color); + } + } + setTextColor(color) { + if (color) { + this.text.setStyle('textFill', color); + } + } } diff --git a/src/jmapNew/shape/GuideLock/EMouse.js b/src/jmapNew/shape/GuideLock/EMouse.js index 96e179317..2241f7e1c 100644 --- a/src/jmapNew/shape/GuideLock/EMouse.js +++ b/src/jmapNew/shape/GuideLock/EMouse.js @@ -31,10 +31,8 @@ export default class EMouse extends Group { if (e.target && e.target._subType == 'Text') { this.text.show(); } else { - this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); - this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); - this.device.control.setTextBorder(true); - this.device.control.setArcBorder(true); + // this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); + // this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); } } @@ -43,10 +41,8 @@ export default class EMouse extends Group { if (e.target && e.target._subType == 'Text') { this.text.hide(); } else { - this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); - this.device.control.setTextColor('#FFFFFF'); - this.device.control.setTextBorder(false); - this.device.control.setArcBorder(false); + // this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); + // this.device.control.setTextColor('#FFFFFF'); } } } diff --git a/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue b/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue index 575fa8668..e585ae4c1 100644 --- a/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue +++ b/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue @@ -253,9 +253,10 @@ export default { this.getAutoMaticList(); }, deviceSelect(selected) { + debugger; this.$refs.dataform.resetFields(); this.$refs.make.resetFields(); - if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'MapCycleButtonVO'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase()) { + if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'MapCycleButtonVO'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase() || selected._type.toUpperCase() == 'GuideLock'.toUpperCase()) { this.activeName = 'first'; this.editModel = deepAssign(this.editModel, selected); this.editModel.type = selected._type; diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue index eed9c093f..b16d4ba62 100644 --- a/src/views/newMap/newMapdraft/mapoperate/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/index.vue @@ -301,7 +301,7 @@ export default { this.enabledTab = 'Esp'; } else if (this.feild) { this.enabledTab = 'Section'; - } else if (type == 'AutomaticRoute' || type == 'MapCycleButtonVO' || type == 'AxleReset' || type == 'LimitControl') { + } else if (type == 'AutomaticRoute' || type == 'MapCycleButtonVO' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock') { this.enabledTab = 'ControlDraft'; } else { this.enabledTab = type;