From 6b43ab3c3bfc72eb0139f2f136cd6158b542defe Mon Sep 17 00:00:00 2001 From: "Mr.sun" <2290907227@qq.com> Date: Tue, 26 Mar 2024 11:34:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=94=BE=E4=B8=AD=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/util/mapDrawing.js | 2 +- src/views/config.js | 2 +- src/views/libraryManage/warehouseMap/index.vue | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/util/mapDrawing.js b/src/api/util/mapDrawing.js index 626caf9..07bc1ca 100644 --- a/src/api/util/mapDrawing.js +++ b/src/api/util/mapDrawing.js @@ -51,7 +51,7 @@ class MapDrawing extends EventEmitter { pointChild: [], levels: { // nowLevel: localStorage.getItem('level').slice(6, 7) - nowLevel: localStorage.getItem('level').slice(6, 7) + nowLevel:localStorage.getItem('level')?localStorage.getItem('level').slice(6, 7) : 'level-1' } }, textures: [], diff --git a/src/views/config.js b/src/views/config.js index ef5a3e0..7aacc7c 100644 --- a/src/views/config.js +++ b/src/views/config.js @@ -239,7 +239,7 @@ var arrRe=[ rodeYLength: 100, // 通道 standardZLength: 75, // 点位标准高度,用于控制占位, 二维暂时用不到 leftOffset: 500, // 整体向右偏移量 - topOffset: 0, // 整体向下偏移量0 + topOffset: 2200, // 整体向下偏移量0 // leftOffsetCell: -9, // 整体向右偏移单元格个数 // topOffsetCell: -8, // 整体向下偏移单元格个数 leftOffsetCell: 0, // 整体向右偏移单元格个数 diff --git a/src/views/libraryManage/warehouseMap/index.vue b/src/views/libraryManage/warehouseMap/index.vue index a5ea44c..a2e0a22 100644 --- a/src/views/libraryManage/warehouseMap/index.vue +++ b/src/views/libraryManage/warehouseMap/index.vue @@ -390,6 +390,9 @@ export default { mounted() { // this.startMap() this.init('fourwayCar') + if (!localStorage.getItem('level')) { + localStorage.setItem('level', 'level-1') + } var layerId1 = localStorage.getItem('level') || 'level-1' this.mapControl.layerControl(layerId1, this.layer[layerId1], layerId1.slice(6, 7)) // this.init('piler')