ソースを参照

锁定站隔离点设置6*5排列布局

pm 7 ヶ月 前
コミット
3f52a15b86

+ 9 - 9
src/views/mes/dv/lotoStation/MapData.vue

@@ -581,22 +581,22 @@ export default {
 
           // 底部白色背景
           const bgrect = new Konva.Rect({
-            x: -6,
+            x: -1,
             y: -5,
-            width: 62,
-            height: 80,
+            width: 50,
+            height: 78,
             cornerRadius: 5,
             stroke: 'white',
             strokeWidth: 2,
             fill: 'white'
           })
 
-          // 普通矩形
+          // 普通矩形红色边框
           const rect = new Konva.Rect({
-            x: 0,
+            x: 1,
             y: -1,
-            width: 50,
-            height: 72,
+            width: 45,
+            height: 70,
             cornerRadius: 5,
             stroke: 'red',
             strokeWidth: 2,
@@ -948,7 +948,7 @@ export default {
       })
     },
 
-    // 左侧的列表
+    // 左侧的列表 现在左侧列表通过地图点位接口获取pointList里直接有左侧的数据 不用再去隔离点管理接口拿数据
     addPointsToLeftPointsBox(filterData) {
       // 获取接口返回的 leftPoints 数据
       const pointsData = filterData
@@ -1364,7 +1364,7 @@ export default {
                   (item) => item.pointId !== point.pointId
                 )
                 this.leftPoints.push(point)
-                console.log(point, '左侧区域绑定柜子了')
+                console.log(point, '进入左侧区域进行隔离点绑定操作!')
               } else {
                 // 未进入任何目标区域,保持原状态
                 console.log('未进入目标区域,保持原状态')

+ 10 - 10
src/views/mes/dv/technology/technologyDetail/MapData.vue

@@ -329,10 +329,10 @@ const positions=this.pointList
 
           // 底部白色背景
           const bgrect = new Konva.Rect({
-            x: x - 6,
+            x: x - 2,
             y: y - 5,
-            width: 62,
-            height: 80,
+            width: 50,
+            height: 78,
             cornerRadius: 5,
             stroke: 'white',
             strokeWidth: 2,
@@ -341,12 +341,12 @@ const positions=this.pointList
           this.layer.add(bgrect)
           this.bgrects[labelText] = bgrect // 用文字作为键存储
 
-          // 普通矩形
+          // 普通矩形红色边框
           const rect = new Konva.Rect({
-            x: x + 0,
+            x: x + 1,
             y: y - 1,
-            width: 50,
-            height: 72,
+            width: 45,
+            height: 70,
             cornerRadius: 5,
             stroke: 'red',
             strokeWidth: 2,
@@ -372,10 +372,10 @@ const positions=this.pointList
 
           // 覆盖层(表示选中状态)
           const redrect = new Konva.Rect({
-            x: x - 7,
+            x: x - 3,
             y: y - 6,
-            width: 64.1,
-            height: 82,
+            width: 51,
+            height: 80,
             cornerRadius: 5,
             fill: 'rgba(97, 97, 97, 0.5)', // 半透明灰色
             visible: false, // 初始状态隐藏

+ 5 - 3
src/views/mes/job/jobm/LockDetail.vue

@@ -208,7 +208,7 @@ export default {
         horizontalSpacingFactor = 1.032 // 横向间距放大倍数
         verticalSpacingFactor = 0.53 // 纵向间距缩小倍数
       }else{
-        horizontalSpacingFactor = 0.4 // 横向间距放大倍数
+        horizontalSpacingFactor = 0.6 // 横向间距放大倍数
         verticalSpacingFactor = 0.53 // 纵向间距缩小倍数
       }
 
@@ -231,8 +231,10 @@ export default {
           // 计算点位的实际位置,确保它们位于柜子显示区域内
           const col = pos.x // 当前点位的列
           const row = pos.y // 当前点位的行
-          x = col * cellWidth + 30 // 调整偏移量,使其向左移动
-          y = row * cellHeight - 20 // 调整偏移量,使其向上移动
+          x = col * cellWidth -100;
+          y = row *  2 * 12-1;
+          // x = col * cellWidth - 100 // 调整偏移量,使其向左移动 这里之前是间距比较大的时候使用
+          // y = row * cellHeight - 15 // 调整偏移量,使其向上移动
         }
 
         const labelText = pos.entityName // 对应的文字

+ 6 - 4
src/views/mes/job/jobm/Mapdata.vue

@@ -194,8 +194,8 @@ export default {
         horizontalSpacingFactor = 0.4; // 横向间距放大倍数
         verticalSpacingFactor = 0.4; // 纵向间距缩小倍数
       }else{
-        horizontalSpacingFactor = 0.6; // 横向间距放大倍数
-        verticalSpacingFactor = 0.6; // 纵向间距缩小倍数
+        horizontalSpacingFactor = 0.75; // 横向间距放大倍数
+        verticalSpacingFactor = 0.53; // 纵向间距缩小倍数
       }
 
 
@@ -216,8 +216,10 @@ export default {
           y = col * 2 * 12 ;
           console.log(pos.x,pos.y,x,y,'我打印了')
         }else{
-          x = row *  cellWidth - 60;
-          y = col *  cellHeight + 12;
+          x = row * cellWidth -104;
+          y = col *  2 * 12+8;
+          // x = row *  cellWidth - 105; //这里之前是间距比较大的时候使用
+          // y = col *  cellHeight + 12;
         }