wangfei
2024-08-19 902f423642e0bd17806c9b3c8bcabf4d5787772a
UI-Project/src/views/Identify/identify.vue
@@ -21,7 +21,7 @@
      @click="showDialog(rect.glass_id)"  
      :style="{ position: 'absolute', 
      top: `${rect.y_axis}px`, left: `${rect.x_axis}px`, width: `${rect.width}px`, height: `${rect.height}px`,
      backgroundColor: getRectColor(rect.glass_state)
      backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor(rect.glass_state)
       }"  
    >
     <!-- 箭头 -->  
@@ -34,7 +34,7 @@
  </div> 
   </div>
  </el-scrollbar>
  <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;">
  <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose">
        <el-button type="warning" plain :icon="Delete" @click="handleDamage(currentGlassId)"  style="width: 140px;margin-left: 10px;">
          {{ $t('order.dilapidation') }}
        </el-button>
@@ -76,6 +76,15 @@
function showDialog(glassId: number) {  
  currentGlassId.value = glassId;  
  blind.value = true;  
  adjustedRects.value = adjustedRects.value.map(rect =>
    rect.glass_id === glassId ? { ...rect, isActive: true } : rect
  );
}
const handleDialogClose = () => {
  adjustedRects.value = adjustedRects.value.map(rect => ({
    ...rect,
    isActive: false
  }));
}  
// 破损
const handleDamage = async () => {
@@ -221,7 +230,8 @@
        widtha: rect.width ,
        heighta: rect.height ,
        height: rect.height * 0.165 ,
        glass_state: rect.glass_state
        glass_state: rect.glass_state,
        isActive: false
      }));
    };  
    webSocket.onerror = (error) => {