From 2c060bac4185d5aba89ce2562a98a3a7f6a46c4f Mon Sep 17 00:00:00 2001 From: wu <731351411@qq.com> Date: 星期一, 22 七月 2024 14:14:49 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- UI-Project/src/views/PurchaseReturn/purchaseStorage.vue | 34 ++++++++++++++++++++++++---------- 1 files changed, 24 insertions(+), 10 deletions(-) diff --git a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue index ee0d270..c152ac3 100644 --- a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue +++ b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue @@ -30,16 +30,30 @@ const handleMessage = (data) => { // 鏇存柊 tableData 鐨勬暟鎹� if(data.overGlass!=null){ - adjustedRects.value = data.overGlass[0].map(rect => ({ - ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬� - xcoordinate: rect.xCoordinate * 0.4, // 灏唜鍊奸櫎浠�3 - ycoordinate: rect.yCoordinate * 0.4, - width: rect.width * 0.4, - height: rect.height * 0.4, - widtha: rect.width, - heighta: rect.height, - })); - } + adjustedRects.value = data.overGlass[0].map(rect => { + let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta; + if (rect.angle === 90) { + adjustedWidth = rect.height * 0.3; + adjustedHeight = rect.width * 0.3; + adjustedWidtha = rect.height; + adjustedHeighta = rect.width; + } else { + adjustedWidth = rect.width * 0.3; + adjustedHeight = rect.height * 0.3; + adjustedWidtha = rect.width; + adjustedHeighta = rect.height; + } + return { + ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬� + xcoordinate: rect.xCoordinate * 0.3, + ycoordinate: rect.yCoordinate * 0.3, + width: adjustedWidth, + height: adjustedHeight, + widtha: adjustedWidtha, + heighta: adjustedHeighta, + }; +}); + } }; onMounted(() => { // fetchFlowCardId(); -- Gitblit v1.8.0