모듈 최대 단수 계산 추가
This commit is contained in:
parent
10bfc1d389
commit
a11867a49d
@ -182,6 +182,8 @@ export const useTrestle = () => {
|
||||
const horizontal = ['south', 'north'].includes(direction) ? surface.trestleDetail.moduleIntvlHor : surface.trestleDetail.moduleIntvlVer
|
||||
|
||||
const vertical = ['south', 'north'].includes(direction) ? surface.trestleDetail.moduleIntvlVer : surface.trestleDetail.moduleIntvlHor
|
||||
|
||||
let mostRowsModule = 0 // 가장 많은 모듈의 줄 수
|
||||
// 가대 설치를 위한 가장 아래 모듈로부터 위로 몇단인지 계산
|
||||
// 오른쪽,왼쪽 둘 다 아래에 아무것도 없는, 처마 커버를 필요로 하는 모듈
|
||||
exposedBottomModules.forEach((module) => {
|
||||
@ -299,7 +301,7 @@ export const useTrestle = () => {
|
||||
return rack.value.moduleRows === centerRows
|
||||
})?.value.racks
|
||||
|
||||
moduleRowsTotCnt = Math.max(leftRows, rightRows, centerRows)
|
||||
mostRowsModule = Math.max(leftRows, rightRows, centerRows, mostRowsModule)
|
||||
|
||||
if (rackYn === 'Y') {
|
||||
drawRacks(leftRacks, rackQty, rackIntvlPct, module, direction, 'L', rackYn)
|
||||
@ -361,7 +363,7 @@ export const useTrestle = () => {
|
||||
const leftRacks = rackInfos.find((rack) => {
|
||||
return rack.value.moduleRows === leftRows
|
||||
})?.value.racks
|
||||
moduleRowsTotCnt = Math.max(leftRows, moduleRowsTotCnt)
|
||||
mostRowsModule = Math.max(leftRows, mostRowsModule)
|
||||
if (rackYn === 'Y') {
|
||||
drawRacks(leftRacks, rackQty, rackIntvlPct, module, direction, 'L', rackYn)
|
||||
}
|
||||
@ -415,7 +417,7 @@ export const useTrestle = () => {
|
||||
return rack.value.moduleRows === rightRows
|
||||
})?.value.racks
|
||||
|
||||
moduleRowsTotCnt = Math.max(rightRows, moduleRowsTotCnt)
|
||||
mostRowsModule = Math.max(rightRows, mostRowsModule)
|
||||
// 해당 rack으로 그려준다.
|
||||
if (rackYn === 'Y') {
|
||||
drawRacks(rightRacks, rackQty, rackIntvlPct, module, direction, 'R', rackYn)
|
||||
@ -424,7 +426,7 @@ export const useTrestle = () => {
|
||||
module.set({ rightRows })
|
||||
})
|
||||
|
||||
surface.set({ moduleRowsTotCnt })
|
||||
surface.set({ moduleRowsTotCnt: mostRowsModule })
|
||||
|
||||
if (rackYn === 'N') {
|
||||
// rack이 없을경우
|
||||
@ -1642,6 +1644,7 @@ export const useTrestle = () => {
|
||||
if (cvrPlvrYn === 'Y') {
|
||||
moduleRowResultData.eavesHalfCnt++
|
||||
if (bottomLeftModule || bottomRightModule || halfBottomLeftModule || halfBottomRightModule) {
|
||||
//처마커버 한개 노출 추가
|
||||
moduleRowResultData.exposedSideEavesCnt++
|
||||
}
|
||||
}
|
||||
@ -1649,10 +1652,10 @@ export const useTrestle = () => {
|
||||
moduleRowResultData.exposedBottomCnt++
|
||||
if (isEaveBar) {
|
||||
moduleRowResultData.eavesCnt++
|
||||
}
|
||||
|
||||
if (!(leftModule && rightModule)) {
|
||||
moduleRowResultData.exposedSideEavesCnt++
|
||||
if ((rightModule && !leftModule) || (!rightModule && leftModule)) {
|
||||
// 둘중 하나가 없는경우는 처마커버 노출 추가
|
||||
moduleRowResultData.exposedSideEavesCnt++
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user