| | |
| | | // 更新 tableData 的数据 |
| | | if(data.overGlass!=null){ |
| | | adjustedRects.value = data.overGlass[0].map(rect => { |
| | | let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta; |
| | | let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta; |
| | | let newX = rect.yCoordinate; |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = rect.width * 0.24; |
| | | adjustedHeight = rect.height * 0.16; |
| | | adjustedWidtha = rect.width; |
| | | adjustedHeighta = rect.height; |
| | | newX = 5190 - (rect.yCoordinate + rect.width); |
| | | if (rect.width < rect.height) { |
| | | widtha = rect.height; |
| | | heighta = rect.width; |
| | | }else { |
| | | widtha = rect.width; |
| | | heighta = rect.height; |
| | | } |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = widtha * 0.24; |
| | | adjustedHeight = heighta * 0.16; |
| | | adjustedWidtha = widtha; |
| | | adjustedHeighta = heighta; |
| | | // newX = 5190 - (rect.yCoordinate + rect.width); |
| | | } else { |
| | | adjustedWidth = rect.height * 0.24; |
| | | adjustedHeight = rect.width * 0.16; |
| | | adjustedWidtha = rect.height; |
| | | adjustedHeighta = rect.width; |
| | | newX = 5190 - (rect.yCoordinate + rect.height); |
| | | adjustedWidth = heighta * 0.24; |
| | | adjustedHeight = widtha * 0.16; |
| | | adjustedWidtha = heighta; |
| | | adjustedHeighta = widtha; |
| | | // newX = 5190 - (rect.yCoordinate + rect.height); |
| | | } |
| | | return { |
| | | ...rect, |
| | |
| | | }); |
| | | } |
| | | function getRectColora(state) { |
| | | switch (state) { |
| | | switch (state) { |
| | | case 3: |
| | | return '#f8e3c5'; |
| | | return '#eebe77'; |
| | | case 4: |
| | | return '#F0F8FF'; |
| | | return '#CD6090'; |
| | | case 5: |
| | | return '#911005'; |
| | | } |