From 82c36e2b434fa7a1c16b0448aa4cf1483107f79c Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期二, 02 十二月 2025 16:28:20 +0800
Subject: [PATCH] #
---
src/main/webapp/views/watch/console.html | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/src/main/webapp/views/watch/console.html b/src/main/webapp/views/watch/console.html
index 8f678de..37f7242 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,45 @@
},
handleCardClick(tab, event) {
+ },
+ //鑾峰彇搴撲綅鏁版嵁
+ getLocMastData() {
+ let that = this;
+ $.ajax({
+ url: baseUrl + "/console/map/locList",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ method: "get",
+ data: {},
+ success: (res) => {
+ if (res.code === 200) {
+ that.locMastData = res.data;
+ }
+ }
+ })
+ },
+ //鏍规嵁鍦板浘鍧愭爣鑾峰彇搴撲綅鐨勬帓鍒椾俊鎭�
+ 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