| | |
| | | |
| | | // 计算新的矩形 |
| | | const newRects = data.overGlass[0].map(rect => { |
| | | const scaleFactor = 1621.78/5190; |
| | | const scaleFactor = 1390/5190; |
| | | const scaleFactorY = 750/2800; |
| | | let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta; |
| | | let newX = rect.yCoordinate; |
| | | |
| | |
| | | } |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = widtha * scaleFactor; |
| | | adjustedHeight = heighta * 0.16; |
| | | adjustedHeight = heighta * scaleFactorY; |
| | | } else { |
| | | adjustedWidth = heighta * scaleFactor; |
| | | adjustedHeight = widtha * 0.16; |
| | | adjustedHeight = widtha * scaleFactorY; |
| | | } |
| | | return { |
| | | ...rect, |
| | | xcoordinate: newX * scaleFactor, |
| | | ycoordinate: rect.xCoordinate * 0.16, |
| | | ycoordinate: rect.xCoordinate * scaleFactorY, |
| | | width: adjustedWidth, |
| | | height: adjustedHeight, |
| | | widtha: rect.width, |
| | |
| | | <template> |
| | | <div style="margin-top: 10px;"> |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" v-loading="loading"> |
| | | <!-- <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> --> |
| | | <div v-if="adjustedRects.length > 0"> |
| | | <div style="text-align: center;">炉号:{{ adjustedRects[0].engineerId }}-{{ adjustedRects[0].temperingLayoutId }}</div> |
| | | <el-scrollbar height="550px" width="1200px" style="background-color: #e9e9eb;"> |
| | | <el-scrollbar height="750px" width="1400px" style="background-color: #e9e9eb;"> |
| | | <div style="position: relative;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |