From 98b24fac422bc3f1b67083afdeae5a27b1a19548 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Tue, 23 Jun 2020 11:24:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/map.js | 6 +----- src/jmapNew/utils/parser.js | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 3e92f331f..999ab512a 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -168,7 +168,6 @@ class Jlmap { const arr = []; const rectList = []; let rect = ''; - // console.log(this.mapDevice); for (const i in this.mapDevice) { const element = this.mapDevice[i]; if (element.instance && element._type == 'Section') { @@ -179,7 +178,7 @@ class Jlmap { } } } - const screenSplit = opts.list.length ? opts.list : loadPropConvert(store.state.map.map.skinVO.code).screenSplit; + const screenSplit = opts.list.length ? opts.list : loadPropConvert(this.lineCode).screenSplit; const splitList = JSON.parse(JSON.stringify(screenSplit)); const num = screenSplit.length + 1; const offsetY = (opts.height - 100) / num; // 高度差 @@ -202,9 +201,6 @@ class Jlmap { } // const param = { scaleRate: scale, offsetX: offsetX, offsetY: -(offsetY * i) - offsetHeight}; const param = { scaleRate: scale, offsetX: offsetX, offsetY: -160 - (offsetY * i) }; - // if (i == 0) { - // param.offsetY -= -100; - // } arr.push(param); const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height}; rectList.push(rect); diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js index cabf9e0ac..189a9c3e0 100644 --- a/src/jmapNew/utils/parser.js +++ b/src/jmapNew/utils/parser.js @@ -274,7 +274,7 @@ export function parser(data, skinCode, showConfig) { export function updateForList(model, state, liststr) { const list = state.map[liststr]; if (list && list instanceof Array) { - const i = list.findIndex(elem => { return elem.code == model.code; }); + const i = list.findIndex(elem => elem.code == model.code ); if (model._dispose) { i >= 0 && list.splice(i, 1); // 删除 } else if (!list[i]) {