From 5d0461e985b9244cfbea910bc6df9e3f62caaed2 Mon Sep 17 00:00:00 2001
From: DELL <DELL@qq.com>
Date: 星期五, 28 十一月 2025 13:37:31 +0800
Subject: [PATCH] #
---
src/main/webapp/views/watch/console.html | 52 +++++++++++++++++++++++++-
src/main/java/com/zy/asrs/controller/LocMastController.java | 5 --
src/main/webapp/static/css/watch/console_vue.css | 7 +++
3 files changed, 58 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/LocMastController.java b/src/main/java/com/zy/asrs/controller/LocMastController.java
index 737d0ad..35488c6 100644
--- a/src/main/java/com/zy/asrs/controller/LocMastController.java
+++ b/src/main/java/com/zy/asrs/controller/LocMastController.java
@@ -17,12 +17,9 @@
import com.zy.asrs.service.BasMapService;
import com.zy.asrs.service.LocMastService;
import com.zy.asrs.utils.Utils;
-import com.zy.common.model.NavigateNode;
import com.zy.common.utils.RedisUtil;
import com.zy.common.web.BaseController;
import com.zy.core.enums.LocStsType;
-import com.zy.core.enums.MapNodeType;
-
import com.zy.core.enums.RedisKeyType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -165,7 +162,7 @@
String nodeType = map.getString("type");
if("shelf".equals(nodeType)) {
if(initBay == -1) {
- initBay = 1;
+ initBay = 2;
}
HashMap<String, Object> locNoMap = new HashMap<>();
diff --git a/src/main/webapp/static/css/watch/console_vue.css b/src/main/webapp/static/css/watch/console_vue.css
index 5349f63..2232316 100644
--- a/src/main/webapp/static/css/watch/console_vue.css
+++ b/src/main/webapp/static/css/watch/console_vue.css
@@ -28,12 +28,19 @@
cursor: default;
color: rgb(194, 76, 65);
display: flex;
+ flex-direction: column;
justify-content: center;
align-items: center;
user-select: none;
background: #fff;
}
+.shelf-loc-info {
+ font-size: 12px;
+ color: #666;
+ margin-top: 2px;
+}
+
.track-item {
width: 100%;
height: 35px;
diff --git a/src/main/webapp/views/watch/console.html b/src/main/webapp/views/watch/console.html
index 8f678de..ae8659c 100644
--- a/src/main/webapp/views/watch/console.html
+++ b/src/main/webapp/views/watch/console.html
@@ -53,7 +53,9 @@
<div class="item" style="visibility: hidden">{{idx}}</div>
</div>
<div v-else-if="col.type == 'shelf'">
- <div class="shelf">{{col.shelfIdx}}</div>
+ <div class="shelf">
+ <div class="shelf-loc-info" v-if="getShelfLocInfo(index, idx)">{{getShelfLocInfo(index, idx)}}</div>
+ </div>
</div>
<div v-else-if="col.type == 'devp'">
<div class="site" :style="{height: col.rowPx}" :id="'site-' + getStationId(col.value)" @click="openSite(getStationId(col.value))">{{getStationId(col.value)}}</div>
@@ -103,7 +105,8 @@
},
rgvParam: {
rgvNo: 0
- }
+ },
+ locMastData: []//搴撲綅鏁版嵁
},
created() {
this.init()
@@ -116,6 +119,7 @@
this.getMap()
this.getSystemRunningStatus() //鑾峰彇绯荤粺杩愯鐘舵��
this.getLevList() //鑾峰彇鍦板浘灞傜骇鍒楄〃
+ this.getLocMastData() //鑾峰彇搴撲綅鏁版嵁
this.consoleInterval = setInterval(() => {
this.getCrnInfo() //鑾峰彇鍫嗗灈鏈烘暟鎹�
@@ -173,6 +177,7 @@
switchLev(lev) {
this.currentLev = lev;
this.getMap()
+ this.getLocMastData() //鍒囨崲灞傜骇鏃堕噸鏂拌幏鍙栧簱浣嶆暟鎹�
},
openCrn(id) {
this.crnParam.crnNo = id;
@@ -502,6 +507,49 @@
},
handleCardClick(tab, event) {
+ },
+ //鑾峰彇搴撲綅鏁版嵁
+ getLocMastData() {
+ let that = this;
+ $.ajax({
+ url: baseUrl + "/locMast/list/auth",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ method: "get",
+ data: {
+ curr: 1,
+ limit: 10000,
+ lev1: this.currentLev
+ },
+ success: (res) => {
+ if (res.code === 200) {
+ that.locMastData = res.data.records;
+ }
+ }
+ })
+ },
+ //鏍规嵁鍦板浘鍧愭爣鑾峰彇搴撲綅鐨勬帓鍒椾俊鎭�
+ getShelfLocInfo(rowIdx, colIdx) {
+ if (!this.locMastData || this.locMastData.length === 0) {
+ return '';
+ }
+ // 鍦╨ocMastData涓煡鎵惧尮閰嶇殑搴撲綅
+ // locType瀛楁瀛樺偍鐨勬槸鍦板浘鍧愭爣淇℃伅
+ let locInfo = this.locMastData.find(loc => {
+ if (!loc.locType) return false;
+ // locType鏍煎紡绫讳技 "0-1-1" (mapX-mapY-lev)
+ let parts = loc.locType.split('-');
+ if (parts.length >= 2) {
+ return parseInt(parts[0]) === rowIdx && parseInt(parts[1]) === colIdx;
+ }
+ return false;
+ });
+
+ if (locInfo && locInfo.row1 && locInfo.bay1) {
+ return locInfo.row1 + '-' + locInfo.bay1;
+ }
+ return '';
}
}
})
--
Gitblit v1.9.1