From ef2f5051979a188b0922e3c30908bedca1cc7c74 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期二, 18 六月 2024 13:59:58 +0800
Subject: [PATCH] 绑定架子流程卡号选择显示,和出片优化

---
 UI-Project/src/views/Identify/identify.vue |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/UI-Project/src/views/Identify/identify.vue b/UI-Project/src/views/Identify/identify.vue
index 350535f..9316fc9 100644
--- a/UI-Project/src/views/Identify/identify.vue
+++ b/UI-Project/src/views/Identify/identify.vue
@@ -38,12 +38,12 @@
   </el-scrollbar>
   </el-card>
 </template>  
-  
 <script setup lang="ts">  
 import { Delete, Upload } from '@element-plus/icons-vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { ref, onMounted, onBeforeUnmount } from 'vue';  
 import request from "@/utils/request"
+import { WebSocketHost ,host} from '@/utils/constants'
 import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
 const blind = ref(false)
 const olWidth = ref(); 
@@ -76,12 +76,12 @@
 
       adjustedRects.value = rawRects.map(rect => ({  
         ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-        x_axis: (rect.x_axis*100) * 0.005, // 灏唜鍊奸櫎浠�3  
-        y_axis: (rect.y_axis*100) * 0.005,
-        width: (rect.width*100) * 0.004 ,
+        x_axis: (rect.x_axis*100) * 0.004, // 灏唜鍊奸櫎浠�3  
+        y_axis: (rect.y_axis*100) * 0.004,
+        width: (rect.width*100) * 0.002 ,
         widtha: rect.width ,
         heighta: rect.height ,
-        height:( rect.height*100) * 0.004 ,
+        height:( rect.height*100) * 0.002 ,
         glass_state: rect.glass_state
       }));  
       console.log(adjustedRects.value);
@@ -175,7 +175,7 @@
     }  
   });  
 }
-const socketUrl = `ws://10.153.19.150:88/api/cacheGlass/api/talk/cacheGlass`;
+const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
   // 鏇存柊 tableData 鐨勬暟鎹�
@@ -183,12 +183,12 @@
   // adjustedRects.value = data.currentCutTerritory[0]
   adjustedRects.value = data.currentCutTerritory[0].map(rect => ({  
         ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-        x_axis: (rect.x_axis*100) * 0.005, // 灏唜鍊奸櫎浠�3  
-        y_axis: (rect.y_axis*100) * 0.005,
-        width: (rect.width*100) * 0.004 ,
+        x_axis: (rect.x_axis*100) * 0.004, // 灏唜鍊奸櫎浠�3  
+        y_axis: (rect.y_axis*100) * 0.004,
+        width: (rect.width*100) * 0.002 ,
         widtha: rect.width ,
         heighta: rect.height ,
-        height:( rect.height*100) * 0.004 ,
+        height:( rect.height*100) * 0.002 ,
         glass_state: rect.glass_state
       }));  
  // console.log("鏇存柊鍚庢暟鎹�", tableData);

--
Gitblit v1.8.0