| | |
| | | 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(() => { |
| | |
| | | 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 () => { |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | | } |
| | |
| | | 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' } } |
| | | |
| | | ]); |
| | | |
| | |
| | | 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; |
| | | } |
| | | }; |
| | | |
| | |
| | | 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; |
| | | } |
| | | }; |
| | | |
| | |
| | | }; |
| | | 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; |
| | | } |
| | |
| | | downGlassInfoList:itemData.item.downGlassInfoList |
| | | }; |
| | | |
| | | if (index === 2 && itemData.item.width > 0) { |
| | | if (index === 1 && itemData.item.width > 0) { |
| | | newItem.width = 100; |
| | | newItem.height = 20; |
| | | } |