wangfei
2024-12-31 a6be747fb2d15cbb8aad9490bacc374a055ed63f
UI-Project/src/views/Identify/identifwu.vue
@@ -9,7 +9,7 @@
              class="rect"
              @click="showDialog(rect.glassId)"
              :style="{ position: 'absolute',
              top: `${rect.yAxis}px`, left: `${rect.xAxis}px`, width: `${rect.width}px`, height: `${rect.height}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">
@@ -140,12 +140,12 @@
          if (existingRect) {
            return {
              ...existingRect,
              xAxis: (6000 - (rect.xAxis + rect.width)) * scaleFactor,
              yAxis: rect.yAxis * scaleFactory,
              width: rect.width * scaleFactor,
              height: rect.height * scaleFactory,
              widtha: rect.width,
              heighta: rect.height,
              xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor,
              yAxisa: rect.yAxis * scaleFactory,
              width: rect.edgWidth * scaleFactor,
              height: rect.edgHeight * scaleFactory,
              widtha: rect.edgWidth,
              heighta: rect.edgHeight,
              state: rect.state,
              // 保持 isActive 状态不变
            };
@@ -153,12 +153,12 @@
            // 如果不存在,则添加新矩形,默认 isActive 为 false
            return {
              ...rect,
              xAxis: (6000 - (rect.xAxis + rect.width)) * scaleFactor,
              yAxis: rect.yAxis * scaleFactory,
              width: rect.width * scaleFactor,
              height: rect.height * scaleFactory,
              widtha: rect.width,
              heighta: rect.height,
              xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor,
              yAxisa: rect.yAxis * scaleFactory,
              width: rect.edgWidth * scaleFactor,
              height: rect.edgHeight * scaleFactory,
              widtha: rect.edgWidth,
              heighta: rect.edgHeight,
              state: rect.state,
              isActive: false,
              glassId: rect.glassId,