From 5985a3693d4d902455b9fd46b052362417b044d7 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期五, 16 八月 2024 16:32:09 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
---
UI-Project/src/views/Identify/identify.vue | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/UI-Project/src/views/Identify/identify.vue b/UI-Project/src/views/Identify/identify.vue
index 58b7421..d973668 100644
--- a/UI-Project/src/views/Identify/identify.vue
+++ b/UI-Project/src/views/Identify/identify.vue
@@ -84,10 +84,10 @@
// console.log(url);
// const response = await request.post(url)
const response = await request.post('/cacheGlass/taskCache/identControls', {
- identId: currentGlassId.value,
- controlsId: 8,
+ glassId: currentGlassId.value,
+ state: 8,
line: 1001,
- machine: '璇嗗埆',
+ workingProcedure: '璇嗗埆',
})
if (response.code == 200) {
ElMessage.success(response.message);
@@ -111,10 +111,10 @@
// console.log(url);
// const response = await request.post(url)
const response = await request.post('/cacheGlass/taskCache/identControls', {
- identId: currentGlassId.value,
- controlsId: 9,
+ glassId: currentGlassId.value,
+ state: 9,
line: 1001,
- machine: '璇嗗埆',
+ workingProcedure: '璇嗗埆',
})
if (response.code == 200) {
// 缁戝畾鎴愬姛锛屽鐞嗛�昏緫
@@ -142,11 +142,12 @@
const rawRects = response.data[0];
rawData.value = response.data;
totalPages.value = rawData.value.length;
+ const scaleFactor = 1621.78/6000;
adjustedRects.value = rawRects.map(rect => ({
...rect,
- x_axis: (6000 -(rect.x_axis + rect.width)) * 0.2085,
+ x_axis: (6000 -(rect.x_axis + rect.width)) * scaleFactor,
y_axis: rect.y_axis * 0.17,
- width: rect.width * 0.2 ,
+ width: rect.width * scaleFactor ,
widtha: rect.width ,
heighta: rect.height ,
height: rect.height * 0.165 ,
@@ -166,12 +167,13 @@
const handleCurrentChange = (val: number) => {
currentPage.value = val;
const page = currentPage.value - 1
+ const scaleFactor = 1621.78/6000;
adjustedRects.value = rawData.value[page]?.map(rect => ({
// adjustedRects.value = rawRects.map(rect => ({
...rect,
- x_axis: (6000 -(rect.x_axis + rect.width)) * 0.2085,
+ x_axis: (6000 -(rect.x_axis + rect.width)) * scaleFactor,
y_axis: rect.y_axis * 0.17,
- width: rect.width * 0.2 ,
+ width: rect.width * scaleFactor ,
widtha: rect.width ,
heighta: rect.height ,
height: rect.height * 0.165 ,
@@ -210,11 +212,12 @@
webSocket = new WebSocket(socketUrl);
webSocket.onmessage = (event) => {
const data = JSON.parse(event.data);
+ const scaleFactor = 1621.78/6000;
adjustedRects.value = data.currentCutTerritory[0].map(rect => ({
...rect,
- x_axis: (6000 -(rect.x_axis + rect.width)) * 0.2085,
+ x_axis: (6000 -(rect.x_axis + rect.width)) * scaleFactor,
y_axis: rect.y_axis * 0.17,
- width: rect.width * 0.2 ,
+ width: rect.width * scaleFactor ,
widtha: rect.width ,
heighta: rect.height ,
height: rect.height * 0.165 ,
--
Gitblit v1.8.0