zhoushihao
2025-03-03 bd21c609d3e0f325f10f20bb1f59ae24a4b35dc2
UI-Project/src/views/Identify/identifwutwo.vue
@@ -9,12 +9,13 @@
              class="rect"
              @click="showDialog(rect.glassId)"
              :style="{ position: 'absolute',
              top: `${rect.yAxis}px`, left: `${rect.xAxis}px`, width: `${rect.edgWidth}px`, height: `${rect.edgHeight}px`,
              top: `${rect.yAxisa}px`, left: `${rect.xAxisa}px`, width: `${rect.width}px`, height: `${rect.height}px`,
              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,10 +59,10 @@
          if (existingRect) {
            return {
              ...existingRect,
              xAxis: (6000 - (rect.xAxis + rect.edgWidth)) * scaleFactor,
              yAxis: rect.yAxis * scaleFactory,
              edgWidth: rect.edgWidth * scaleFactor,
              edgHeight: rect.edgHeight * scaleFactory,
              xAxisa: (6000 - (rect.xAxis + rect.edgWidth)) * scaleFactor * 1.1,
              yAxisa: rect.yAxis * scaleFactory * 1.1,
              width: rect.edgWidth * scaleFactor * 1.1,
              height: rect.edgHeight * scaleFactory * 1.1,
              widtha: rect.edgWidth,
              heighta: rect.edgHeight,
              state: rect.state,
@@ -71,10 +72,10 @@
            // 如果不存在,则添加新矩形,默认 isActive 为 false
            return {
              ...rect,
              xAxis: (6000 - (rect.xAxis + rect.edgWidth)) * scaleFactor,
              yAxis: rect.yAxis * scaleFactory,
              edgWidth: rect.edgWidth * scaleFactor,
              edgHeight: rect.edgHeight * scaleFactory,
              xAxisa: (6000 - (rect.xAxis + rect.edgWidth)) * scaleFactor * 1.1,
              yAxisa: rect.yAxis * 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 +189,7 @@
  justify-content: center;
  align-items: center;
  height: 100%; /* 确保div占据整个矩形的高度 */
  font-size: small;
  /* font-size: large; */
}
#line {
  position: absolute;