| | |
| | | // 更新 tableData 的数据 |
| | | if(data.overGlass!=null){ |
| | | adjustedRects.value = data.overGlass[0].map(rect => { |
| | | let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta; |
| | | const scaleFactor = 1621.78/5190; |
| | | let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta; |
| | | let newX = rect.yCoordinate; |
| | | if (rect.width < rect.height) { |
| | | widtha = rect.height; |
| | |
| | | heighta = rect.height; |
| | | } |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = widtha * 0.24; |
| | | adjustedWidth = widtha * scaleFactor; |
| | | adjustedHeight = heighta * 0.16; |
| | | adjustedWidtha = widtha; |
| | | adjustedHeighta = heighta; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | // newX = 5190 - (rect.yCoordinate + rect.width); |
| | | } else { |
| | | adjustedWidth = heighta * 0.24; |
| | | adjustedWidth = heighta * scaleFactor; |
| | | adjustedHeight = widtha * 0.16; |
| | | adjustedWidtha = heighta; |
| | | adjustedHeighta = widtha; |
| | | // adjustedWidtha = heighta; |
| | | // adjustedHeighta = widtha; |
| | | // newX = 5190 - (rect.yCoordinate + rect.height); |
| | | } |
| | | return { |
| | | ...rect, |
| | | xcoordinate: newX * 0.24, |
| | | xcoordinate: newX * scaleFactor, |
| | | ycoordinate: rect.xCoordinate * 0.16, |
| | | width: adjustedWidth, |
| | | height: adjustedHeight, |
| | | widtha: adjustedWidtha, |
| | | heighta: adjustedHeighta, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | }; |
| | | }); |
| | | } |
| | | }; |
| | | function updateRectColors() { |
| | | adjustedRectsa.value.forEach(rect => { |
| | | adjustedRects.value.forEach(rect => { |
| | | if (rect.glassId === glassId) { |
| | | rect.state = 5; |
| | | rect.state = 8; |
| | | } |
| | | }); |
| | | } |
| | |
| | | return '#eebe77'; |
| | | case 4: |
| | | return '#CD6090'; |
| | | case 5: |
| | | case 8: |
| | | return '#911005'; |
| | | } |
| | | } |
| | |
| | | glassId: currentGlassId.value, |
| | | // temperingFeedSequence: currenttemperingFeedSequence.value, |
| | | line: 4001, |
| | | status: 2, |
| | | status: 8, |
| | | workingProcedure: '钢化', |
| | | }) |
| | | if (response.code == 200) { |