From e553bf03da95027fc26ac06384e17ef43dd3ccf4 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期三, 26 三月 2025 11:33:56 +0800
Subject: [PATCH] 上片模块整体接口更改。控制台报错及警告
---
UI-Project/src/views/Identify/identifwu.vue | 49 ++++++++++++++++++++++++++++++++++---------------
1 files changed, 34 insertions(+), 15 deletions(-)
diff --git a/UI-Project/src/views/Identify/identifwu.vue b/UI-Project/src/views/Identify/identifwu.vue
index d2ff3fd..6cfefd6 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,8 @@
const blind = ref(false)
const currentGlassId = ref(null);
const adjustedRects = ref([]);
+const ava = ref('');
+const avanum = ref('');
let socket = null;
const currentGlassRect = computed(() => {
return adjustedRects.value.find(rect => rect.glassId === currentGlassId.value);
@@ -109,18 +112,24 @@
}
function getRectColor(state: number): string {
switch (state) {
- case 0:
- return '#e1f3d8';
- case 100:
- return '#c8c9cc';
- case 110:
- return '#b3e19d';
- case 120:
- return '#f89898';
+ case 0:
+ return '#7AC5CD';
+ case 1:
+ return '#95d475';
+ case -1:
+ return '#99BBFF';
+ case 2:
+ return 'lightblue';
+ case 3:
+ return '#eebe77';
+ case 4:
+ return '#CD6090';
case 8:
return '#911005';
case 9:
- return '#f3d19e';
+ return '#4682B4';
+ default:
+ return '#CDAF95';
}
}
// 鏇存柊鐭╁舰鐘舵��
@@ -133,6 +142,16 @@
}
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/currentCutDrawingOne`;
const handleMessage = (data: any) => {
+ if (data.engineer != null) {
+ ava.value = data.engineer[0]
+ }else{
+ ava.value = ''
+ }
+ if (data.engineer != null) {
+ avanum.value = data.sequence[0]
+ }else{
+ avanum.value = ''
+ }
const scaleFactor = 1621.78 / 6000;
const scaleFactory = 750 / 3300;
if (data.currentCutTerritory && data.currentCutTerritory.length > 0) {
@@ -141,8 +160,8 @@
if (existingRect) {
return {
...existingRect,
- xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor * 1.1,
- yAxisa: rect.yAxis * scaleFactory * 1.1,
+ 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,
widtha: rect.edgWidth,
@@ -154,8 +173,8 @@
// 濡傛灉涓嶅瓨鍦紝鍒欐坊鍔犳柊鐭╁舰锛岄粯璁� isActive 涓� false
return {
...rect,
- xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor * 1.1,
- yAxisa: rect.yAxis * scaleFactory * 1.1,
+ 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,
widtha: rect.edgWidth,
--
Gitblit v1.8.0