From 4b93a0f677e8c7033500fc736a47f6294948e902 Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期二, 02 十二月 2025 13:11:27 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/watch/console2.html |   48 +++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 43 insertions(+), 5 deletions(-)

diff --git a/src/main/webapp/views/watch/console2.html b/src/main/webapp/views/watch/console2.html
index 1d4560d..dc5b25a 100644
--- a/src/main/webapp/views/watch/console2.html
+++ b/src/main/webapp/views/watch/console2.html
@@ -349,6 +349,47 @@
             }
           })
 
+          map.forEach((item, index) => {
+            for(let idx = 0;idx < item.length;idx++){
+              let val = item[idx];
+              let cellWidth = val.cellWidth / 40;
+              let cellHeight = val.cellHeight / 8;
+
+              val.width = cellWidth;
+              val.height = cellHeight;
+
+              let mergeHeight = cellHeight;
+              if(val.rowSpan  > 1) {
+                for(let i = 1;i < val.rowSpan;i++){
+                  let nextMerge = map[index + i][idx];
+                  if(nextMerge.type != 'merge'){
+                    continue;
+                  }
+                  
+                  let mergeCellHeight = nextMerge.cellHeight / 8;
+                  mergeHeight += mergeCellHeight;
+                }
+                
+                val.height = mergeHeight;
+              }
+
+              let mergeWidth = cellWidth;
+              if(val.colSpan  > 1) {
+                for(let i = 1;i < val.colSpan;i++){
+                  let nextMerge = map[index][idx + i];
+                  if(nextMerge.type != 'merge'){
+                    continue;
+                  }
+                  
+                  let mergeCellWidth = nextMerge.cellWidth / 40;
+                  mergeWidth += mergeCellWidth;
+                }
+                
+                val.width = mergeWidth;
+              }
+            }
+          })
+
           const rowHeightScaled = bayHeightList.map(h => (h != null && h !== -1) ? (h / 8) : (height));
           let yOffsets = [];
           let yCursor = 0;
@@ -361,11 +402,8 @@
             let xCursor = 0;
             for (let colIndex = 0; colIndex < row.length; colIndex++) {
               let val = row[colIndex];
-              let cellWidth = val.cellWidth / 40;
-              let cellHeight = val.cellHeight / 8;
-
-              val.width = cellWidth;
-              val.height = cellHeight;
+              let cellWidth = val.width;
+              let cellHeight = val.height;
 
               val.posX = xCursor;
               val.posY = yOffsets[rowIndex];

--
Gitblit v1.9.1