zhoushihao
2025-03-10 976cee4892eec261f6c2927e788e476e5cc5028e
UI-Project/src/views/Identify/identifwutwo.vue
@@ -13,8 +13,9 @@
              backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor(rect.state)
               }">
            <div class="centered-text">
              <div>{{ rect.glassId }}</div>
              <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
              <div style="font-size: 20px;font-weight: bold;">{{ rect.glassId }}</div>
              <div style="font-size: 20px;font-weight: bold;">{{ rect.flowCardId }}</div>
              <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
            </div>
          </div>
        </div>
@@ -58,23 +59,22 @@
          if (existingRect) {
            return {
              ...existingRect,
              xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor,
              yAxisa: rect.yAxis * scaleFactory,
              width: rect.edgWidth * scaleFactor,
              height: rect.edgHeight * scaleFactory,
               xAxisa: rect.xAxis * scaleFactor * 1.1,
               yAxisa: (3300 - (rect.yAxis + rect.edgHeight + 300)) * scaleFactory * 1.1,
              width: rect.edgWidth * scaleFactor * 1.1,
              height: rect.edgHeight * scaleFactory * 1.1,
              widtha: rect.edgWidth,
              heighta: rect.edgHeight,
              state: rect.state,
              // 保持 isActive 状态不变
            };
          } else {
            // 如果不存在,则添加新矩形,默认 isActive 为 false
            return {
              ...rect,
              xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor,
              yAxisa: rect.yAxis * scaleFactory,
              width: rect.edgWidth * scaleFactor,
              height: rect.edgHeight * scaleFactory,
               xAxisa: rect.xAxis * scaleFactor * 1.1,
               yAxisa: (3300 - (rect.yAxis + rect.edgHeight + 300)) * scaleFactory * 1.1,
              width: rect.edgWidth * scaleFactor * 1.1,
              height: rect.edgHeight * scaleFactory * 1.1,
              widtha: rect.edgWidth,
              heighta: rect.edgHeight,
              state: rect.state,
@@ -188,7 +188,7 @@
  justify-content: center;
  align-items: center;
  height: 100%; /* 确保div占据整个矩形的高度 */
  font-size: small;
  /* font-size: large; */
}
#line {
  position: absolute;