From 2e6d45baabfafc3762eb6692d953ff8e6513d3d3 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Wed, 19 Aug 2020 15:50:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=81=E6=B3=A2=E4=B8=89?= =?UTF-8?q?=E5=8F=B7=E7=BA=BF=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_03.js | 10 ++++++---- src/jmapNew/map.js | 3 ++- src/jmapNew/shape/Switch/index.js | 5 +++++ src/views/newMap/jlmapNew/index.vue | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/jmapNew/config/skinCode/ningbo_03.js b/src/jmapNew/config/skinCode/ningbo_03.js index fd349a3ac..d4e7d2128 100644 --- a/src/jmapNew/config/skinCode/ningbo_03.js +++ b/src/jmapNew/config/skinCode/ningbo_03.js @@ -5,6 +5,7 @@ class SkinCode extends defaultStyle { constructor() { super(); this.fontFamily = '宋体'; + this.backgroundColor = '#808080'; this[deviceType.Section] = { active: { routeColor: false // 进路触发颜色 @@ -276,15 +277,16 @@ class SkinCode extends defaultStyle { show: true, // 道岔名称显示 position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 offset: { x: 5, y: -10 }, // 道岔名称与区段距离 - fontSize: 11, // 字体大小 + fontSize: 12, // 字体大小 fontColor: '#C0C0C0', // 道岔名称颜色 - fontWeight: 'normal', // 字体粗细 + fontWeight: '600', // 字体粗细 borderColor: '#FE0000', // 道岔名称边框颜色 lossColor: 'lightgreen', // 道岔名称失去颜色 - locateColor: 'lightgreen', // 道岔定位颜色 + locateColor: '#34DB3E', // 道岔定位颜色 inversionColor: '#FFFF00', // 道岔反位颜色 monolockLocationColor: 'lightgreen', // 道岔单锁'定位'颜色 (浅绿色) monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) + blockText: '#FC5F08', // 道岔 封锁名称 颜色 block: true, // 封锁名称 faultFlashing: true, // 故障闪烁 lossRect: false // 道岔失表矩形 @@ -298,7 +300,7 @@ class SkinCode extends defaultStyle { }, jointImg: { // 道岔 A B C D四元素属性配置 trapezoidLength: 8, // 直角梯形元素默认长度 - block: true, // 联合图形封锁状态 + block: false, // 联合图形封锁状态 flashingColors: '#D600D5', // 联合图形封锁闪烁显示颜色 fork: true, // 挤岔专用(如有挤岔操作 变为true) faultStatus: true, // 宁波失表状态用 挤岔表示 diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index ebdd2812e..486ad6c73 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -58,7 +58,7 @@ class Jlmap { this.$options = new Options(deepAssign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放 this.$painter = new Painter(this); this.$painter.updateZrSize({width: this.$zr.getWidth(), height: this.$zr.getHeight()}); - + this.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000'; this.optionsHandler = this.setOptions.bind(this); this.$mouseController = new MouseController(this); @@ -107,6 +107,7 @@ class Jlmap { this.logicData = logicData; // 加载对应皮肤 this.style = this.loadStyle(this.lineCode); + this.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000'; // 数据加载完成 回调 if (this.methods.dataLoaded instanceof Function) { this.methods.dataLoaded(this.mapDevice); } diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index 63eb5f942..25538af7a 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -424,6 +424,9 @@ export default class Switch extends Group { if (this.style.Switch.text.block) { this.setHasTextBorder(1); } + if (this.style.Switch.text.blockText) { + this.setTextColor(this.style.Switch.text.blockText); + } if (this.style.Switch.jointImg.trapezoidBlock && this.model.reversePosition) { // 范围且封锁时显示 this.sheltertriangle.show(); this.sheltertriangle.getSection().setStyle('fill', '#000080'); @@ -487,6 +490,8 @@ export default class Switch extends Group { if (!this.isShowShape) return; this.recover(); // console.log('定位>', model.normalPosition, '反位>', model.reversePosition); + // model.normalPosition = 0; + // model.reversePosition = 1; if (model.normalPosition) { this.setLocationAction(model); /** 定位*/ } else if (model.reversePosition) { diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue index 5e1ace4dd..efa7649e7 100644 --- a/src/views/newMap/jlmapNew/index.vue +++ b/src/views/newMap/jlmapNew/index.vue @@ -1,7 +1,7 @@