From 6c797c50e6577944d46f3703d6ac285941a4ef4f Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 6 Mar 2020 16:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9C=B0=E5=9B=BE=E7=BB=98?= =?UTF-8?q?=E5=88=B6=EF=BC=8C=E5=85=AC=E5=85=B1=E5=9C=B0=E5=9B=BE=E8=BD=A6?= =?UTF-8?q?=E7=AB=99=20=EF=BC=8C=E7=AB=99=E5=8F=B0=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_01.js | 2 +- src/jmapNew/shape/Station/index.js | 20 ++++++++++++-------- src/jmapNew/shape/StationStand/index.js | 17 ++++++++++------- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 76614087b..d3ba2ca34 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -353,7 +353,7 @@ class SkinCode extends defaultStyle { lamp: { count: 4, // 控制模式的个数 offset: { x: 20, y: 0 }, // 偏移量 - radiusR: 5, // 控制模式灯的半径 + radiusR: 6, // 控制模式灯的半径 distance: 46, // 控制模式之间灯之间的距离 grayColor: '#C0C0C0', // 控制模式灰色 greenColor: 'green', // 控制模式绿色 diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index 0bd7fc31e..cc0607f97 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -20,19 +20,22 @@ export default class Station extends Group { this.z = 40; this.model = model; this.style = style; - const arr = window.location.href.split('?')[1].split('&'); - this.prdType = ''; - arr.forEach(elem => { - if (elem.split('=')[0] === 'prdType') { - this.prdType = elem.split('=')[1]; - } - }); + this.create(); this.createTurnBack(); // 创建按图折返 const path = window.location.href; if (!path.includes('/map/draw')) { this.createGuideTotalLock(); // 创建引导总锁 } + this.prdType = ''; + if (path.includes('?')) { + const arr = window.location.href.split('?')[1].split('&'); + arr.forEach(elem => { + if (elem.split('=')[0] === 'prdType') { + this.prdType = elem.split('=')[1]; + } + }); + } this.createControlMode(); this.setState(model); this.checkIsDrawMap(); @@ -118,7 +121,8 @@ export default class Station extends Group { createGuideTotalLock() { // 创建引导总锁 const model = this.model; const style = this.style; - if (model.guideTotalLock || !this.prdType || style.Station.functionButtonShow.indexOf(this.prdType) !== -1) { + console.log(model.guideTotalLockPoint); + if (model.guideTotalLock || (!this.prdType && style.Station.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) { this.guideLamp = new EControl({ zlevel: this.zlevel, z: this.z, diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index 98d270187..b5f34e2ae 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -23,16 +23,19 @@ class StationStand extends Group { this.zlevel = model.zlevel; this.z = 1; this.doors = new Group(); - const arr = window.location.href.split('?')[1].split('&'); this.prdType = ''; - arr.forEach(elem => { - if (elem.split('=')[0] === 'prdType') { - this.prdType = elem.split('=')[1]; - } - }); + const path = window.location.href; + if (path.includes('?')) { + const arr = window.location.href.split('?')[1].split('&'); + arr.forEach(elem => { + if (elem.split('=')[0] === 'prdType') { + this.prdType = elem.split('=')[1]; + } + }); + } this.create(); this.createMouseEvent(); - if (!this.prdType || this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1 ) { + if (!this.prdType || (this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) { this.createFunctionButton(); } this.setVisible(model.visible);