From d3d7aa9ebbc8265e8dab321d3cee98c385fa696d Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期四, 03 四月 2025 15:01:43 +0800
Subject: [PATCH] 卧式缓存模块图片小片显示、系统管理模块新增系统配置页面

---
 UI-Project/src/views/Identify/identifwu.vue |   53 +++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 41 insertions(+), 12 deletions(-)

diff --git a/UI-Project/src/views/Identify/identifwu.vue b/UI-Project/src/views/Identify/identifwu.vue
index cdebbc0..3ade8dd 100644
--- a/UI-Project/src/views/Identify/identifwu.vue
+++ b/UI-Project/src/views/Identify/identifwu.vue
@@ -1,6 +1,7 @@
 <template>
   <div style="height: 500px;">
-    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" v-loading="loading">
+    <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>
       <el-scrollbar height="750px" width="1400px" style="background-color: #e9e9eb;">
         <div style="position: relative;">
           <div
@@ -37,7 +38,7 @@
   </div>
 </template>
 <script setup lang="ts">
-import {ElMessage} from 'element-plus'
+import {avatarEmits, ElMessage} from 'element-plus'
 import {onBeforeUnmount, computed, onMounted, onUnmounted, ref} from 'vue';
 import request from "@/utils/request"
 import {host, WebSocketHost} from '@/utils/constants'
@@ -48,6 +49,10 @@
 const blind = ref(false)
 const currentGlassId = ref(null);
 const adjustedRects = ref([]);
+const ava = ref('');
+const avanum = ref('');
+const realwidth = ref('');
+const realheight = ref('');
 let socket = null;
 const currentGlassRect = computed(() => {
   return adjustedRects.value.find(rect => rect.glassId === currentGlassId.value);
@@ -139,18 +144,42 @@
 }
 const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/currentCutDrawingOne`;
 const handleMessage = (data: any) => {
-      const scaleFactor = 1621.78 / 6000;
-      const scaleFactory = 750 / 3300;
+  if (data.engineer != null) {
+  ava.value = data.engineer[0]
+  }else{
+    ava.value = ''
+  }
+  if (data.engineer != null) {
+    avanum.value = data.sequence[0]
+  }else{
+    avanum.value = ''
+  }
+      console.log(data.upPattenUsage);
+      console.log(data.currentCutTerritory);
+      if (data.upPattenUsage && data.upPattenUsage.length > 0) {
+        realwidth.value = data.upPattenUsage[0].width;
+        realheight.value = data.upPattenUsage[0].height;
+        const realx = realwidth.value;
+        const realy = realheight.value;
+      window.localStorage.setItem('widthreturna', realy)
+        const scaleFactora = 1621.78 / realx;
+        const scaleFactorya = 750 / realy;
+      window.localStorage.setItem('scaleFactorb', scaleFactora)
+      window.localStorage.setItem('scaleFactoryb', scaleFactorya)
+      }
       if (data.currentCutTerritory && data.currentCutTerritory.length > 0) {
+        let scaleFactor = window.localStorage.getItem('scaleFactorb')
+        let scaleFactory = window.localStorage.getItem('scaleFactoryb')
+        let widthreturn = window.localStorage.getItem('widthreturna')
         const newRects = data.currentCutTerritory[0].map(rect => {
           const existingRect = adjustedRects.value.find(r => r.glassId === rect.glassId);
           if (existingRect) {
             return {
               ...existingRect,
-              xAxisa: rect.xAxis * scaleFactor * 1.1,
-              yAxisa: (3300 - (rect.yAxis + rect.edgHeight + 300)) * scaleFactory * 1.1,
-              width: rect.edgWidth * scaleFactor * 1.1,
-              height: rect.edgHeight * scaleFactory * 1.1,
+              xAxisa: rect.xAxis * scaleFactor,
+              yAxisa: (widthreturn - (rect.yAxis + rect.edgHeight)) * scaleFactory,
+              width: rect.edgWidth * scaleFactor,
+              height: rect.edgHeight * scaleFactory,
               widtha: rect.edgWidth,
               heighta: rect.edgHeight,
               state: rect.state,
@@ -160,10 +189,10 @@
             // 濡傛灉涓嶅瓨鍦紝鍒欐坊鍔犳柊鐭╁舰锛岄粯璁� isActive 涓� false
             return {
               ...rect,
-              xAxisa: rect.xAxis * scaleFactor * 1.1,
-              yAxisa: (3300 - (rect.yAxis + rect.edgHeight + 300)) * scaleFactory * 1.1,
-              width: rect.edgWidth * scaleFactor * 1.1,
-              height: rect.edgHeight * scaleFactory * 1.1,
+              xAxisa: rect.xAxis * scaleFactor,
+              yAxisa: (widthreturn - (rect.yAxis + rect.edgHeight)) * scaleFactory,
+              width: rect.edgWidth * scaleFactor,
+              height: rect.edgHeight * scaleFactory,
               widtha: rect.edgWidth,
               heighta: rect.edgHeight,
               state: rect.state,

--
Gitblit v1.8.0