From cb94e393ea3cd9c1d8bbf1240e44baf084d87bbc Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期五, 16 八月 2024 08:49:24 +0800
Subject: [PATCH] 下片台模块更改图片顺序
---
UI-Project/src/views/UnLoadGlass/Landingindication.vue | 17 +++++++++--------
UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue | 16 ++++++++--------
2 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/UI-Project/src/views/UnLoadGlass/Landingindication.vue b/UI-Project/src/views/UnLoadGlass/Landingindication.vue
index 2dfb8f3..e3d52c3 100644
--- a/UI-Project/src/views/UnLoadGlass/Landingindication.vue
+++ b/UI-Project/src/views/UnLoadGlass/Landingindication.vue
@@ -42,9 +42,10 @@
const racks = ref([
{ x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456',downGlassInfoList:"" } },
+ { x: 140, y: 280, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' ,downGlassInfoList:""} },
+
{ x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678',downGlassInfoList:"" } },
-
- { x: 140, y: 280, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' ,downGlassInfoList:""} }
+
]);
watchEffect(() => {
@@ -54,18 +55,18 @@
if (index === 0 ) {
return rack.x;
} else if (index === 1 ) {
- return rack.x + rack.width - item.width;
- } else {
return rack.x + (rack.width - item.width) / 2;
+ } else {
+ return rack.x + rack.width - item.width;
}
};
const calculateItemYPosition = (rack, item, index) => {
if (index === 0 ) {
return rack.y + (rack.height - item.height) / 2;
} else if (index === 1) {
- return rack.y + (rack.height - item.height) / 2;
- } else {
return rack.y + rack.height - item.height;
+ } else {
+ return rack.y + (rack.height - item.height) / 2;
}
};
const fetchFlowCardId = async () => {
@@ -85,7 +86,7 @@
height: itemData.item.height === 0 ? "" : 90,
downGlassInfoList:itemData.item.downGlassInfoList
};
- if (index === 2 && itemData.item.width > 0) {
+ if (index === 1 && itemData.item.width > 0) {
newItem.width = 100;
newItem.height = 20;
}
@@ -117,7 +118,7 @@
height: itemData.item.height === 0 ? "" : 90,
downGlassInfoList:itemData.item.downGlassInfoList
};
- if (index === 2 && itemData.item.width > 0) {
+ if (index === 1 && itemData.item.width > 0) {
newItem.width = 100;
newItem.height = 20;
}
diff --git a/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue b/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
index 12bb518..1817bb6 100644
--- a/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
+++ b/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
@@ -42,9 +42,9 @@
const racks = ref([
{ x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } },
+ { x: 140, y: 280, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' } },
+
{ x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678' } },
-
- { x: 140, y: 280, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' } }
]);
@@ -56,9 +56,9 @@
if (index === 0) {
return rack.x;
} else if (index === 1) {
- return rack.x + rack.width - item.width;
- } else {
return rack.x + (rack.width - item.width) / 2;
+ } else {
+ return rack.x + rack.width - item.width;
}
};
@@ -66,9 +66,9 @@
if (index === 0) {
return rack.y + (rack.height - item.height) / 2;
} else if (index === 1) {
- return rack.y + (rack.height - item.height) / 2;
- } else {
return rack.y + rack.height - item.height;
+ } else {
+ return rack.y + (rack.height - item.height) / 2;
}
};
@@ -92,7 +92,7 @@
};
console.log(itemData.item.fullCardColor);
- if (index === 2 && itemData.item.width > 0) {
+ if (index === 1 && itemData.item.width > 0) {
newItem.width = 100;
newItem.height = 20;
}
@@ -134,7 +134,7 @@
downGlassInfoList:itemData.item.downGlassInfoList
};
- if (index === 2 && itemData.item.width > 0) {
+ if (index === 1 && itemData.item.width > 0) {
newItem.width = 100;
newItem.height = 20;
}
--
Gitblit v1.8.0