From 266ca8c80300d479351eed50fee5a30751a22fda Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期四, 09 十月 2025 11:46:11 +0800
Subject: [PATCH] 1、中空领取任务界面查询慢解决 2、卧理新增日志记录

---
 UI-Project/src/views/Identify/identifwutwo.vue |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 52 insertions(+), 8 deletions(-)

diff --git a/UI-Project/src/views/Identify/identifwutwo.vue b/UI-Project/src/views/Identify/identifwutwo.vue
index c39e832..229da56 100644
--- a/UI-Project/src/views/Identify/identifwutwo.vue
+++ b/UI-Project/src/views/Identify/identifwutwo.vue
@@ -1,7 +1,10 @@
 <template>
   <div style="height: 500px;">
     <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;">
-    <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}锛歿{ ava }}-{{ avanum }} </div>
+     <div style="display: flex;margin-left: 40%;margin-bottom: 5px;">
+    <div style="text-align: center;"> {{ $t('processCard.layoutID') }}锛歿{ ava }}-{{ avanum }} </div>
+     <el-button @click="handleAllDamage" style="margin-left: 80%;margin-top: -5px;">{{$t('order.dilapidation')}}</el-button>
+    </div>
     <el-scrollbar height="750px" width="1400px" style="background-color: #e9e9eb;">
         <div style="position: relative;">
           <div
@@ -14,9 +17,9 @@
               backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor(rect.state)
                }">
             <div class="centered-text">
-              <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 style="font-size: 10px;font-weight: bold;">{{ rect.glassId }}</div>
+              <div style="font-size: 10px;font-weight: bold;">{{ rect.flowCardId }}</div>
+              <div style="font-size: 15px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
             </div>
           </div>
         </div>
@@ -38,7 +41,7 @@
   </div>
 </template>
 <script setup lang="ts">
-import {ElMessage} from 'element-plus'
+import {avatarEmits,  ElMessage, ElMessageBox } from 'element-plus'
 import {onBeforeUnmount, computed, onMounted, onUnmounted, ref} from 'vue';
 import request from "@/utils/request"
 import {host, WebSocketHost} from '@/utils/constants'
@@ -131,6 +134,47 @@
     isActive: false
   }));
 }
+// 涓�閿牬鎹熸墍鏈夌幓鐠�
+const handleAllDamage = async () => {
+  try {
+      const confirmResult = await ElMessageBox.confirm(
+      t('order.dilapidationWhether'),
+      t('workOrder.prompt'),
+      {
+        confirmButtonText: t('workOrder.yes'),
+        cancelButtonText: t('workOrder.cancel'),
+        type: 'warning',
+      }
+    );
+    // 绛涢�夊嚭state涓嶆槸8鍜�9鐨勭幓鐠僆D
+    const glassIdList = adjustedRects.value
+      .filter(rect => rect.state !== 8 && rect.state !== 9)
+      .map(rect => rect.glassId);
+    if (glassIdList.length === 0) {
+      ElMessage.warning(t('order.noGlassToDamage')); // 娌℃湁鍙牬鎹熺殑鐜荤拑
+      return;
+    }
+    const response = await request.post('/cacheGlass/taskCache/identControlsByPatternSequence', {
+      glassIdList: glassIdList,
+      state: 8,
+      line: 2,
+      workingProcedure: '鍒囧壊',
+      remark: '鎺扮墖'
+    });
+    if (response.code === 200) {
+      ElMessage.success(response.message);
+      // 鏇存柊鎵�鏈夌幓鐠冪姸鎬�
+      glassIdList.forEach(glassId => {
+        updateRectStatus(glassId, 8);
+      });
+    } else {
+      ElMessage.error(response.msg);
+    }
+  } catch (error) {
+    console.error(error);
+    ElMessage.error(t(''));
+  }
+};
 // 鐮存崯
 const handleDamage = async () => {
   try {
@@ -176,7 +220,7 @@
 function getRectColor(state: number): string {
   switch (state) {
     case 0:  
-      return '#7AC5CD';
+      return '#7AC5CD';//鏈繘绗�
     case 1:
       return '#95d475';
     case -1:
@@ -188,9 +232,9 @@
     case 4:  
       return '#CD6090';
     case 8:
-      return '#911005';
+      return '#911005';//鐮存崯
     case 9:
-      return '#4682B4';
+      return '#4682B4';//鎷胯蛋
     default:
       return '#CDAF95'; 
   }

--
Gitblit v1.8.0