육지붕 대응작업 추가

This commit is contained in:
hyojun.choi 2025-02-24 14:33:26 +09:00
parent 8820711ac6
commit de9e87b586

View File

@ -48,6 +48,9 @@ export const useTrestle = () => {
surfaces.forEach((surface) => { surfaces.forEach((surface) => {
const parent = canvas.getObjects().find((obj) => obj.id === surface.parentId) const parent = canvas.getObjects().find((obj) => obj.id === surface.parentId)
const roofMaterialIndex = parent.roofMaterial.index const roofMaterialIndex = parent.roofMaterial.index
if (+roofSizeSet === 3) {
return true
}
const construction = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex).construction const construction = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex).construction
if (!construction) { if (!construction) {
alert('앞에서 셋팅 안됨') alert('앞에서 셋팅 안됨')
@ -678,14 +681,17 @@ export const useTrestle = () => {
const roofMaterialIndex = parent.roofMaterial.index const roofMaterialIndex = parent.roofMaterial.index
const { nameJp: roofMaterialIdMulti } = roofMaterial const { nameJp: roofMaterialIdMulti } = roofMaterial
const moduleSelection = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex) const moduleSelection = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex)
const { constTp: constructSpecification, constTpJp: constructSpecificationMulti } = moduleSelection.construction let construction = moduleSelection?.construction
const { let constructSpecification = +roofSizeSet === 3 ? null : construction.constTp
trestleMkrCd, let constructSpecificationMulti = +roofSizeSet === 3 ? null : construction.constTpJp
constMthdCd: supportMethodId,
roofBaseCd, const trestle = moduleSelection?.trestle
trestleMkrCdJp: supportMeaker,
constMthdCdJp: supportMethodIdMulti, let trestleMkrCd = +roofSizeSet === 3 ? null : trestle.trestleMkrCd
} = moduleSelection.trestle let supportMethodId = +roofSizeSet === 3 ? null : trestle.constMthdCd
let roofBaseCd = +roofSizeSet === 3 ? null : trestle.roofBaseCd
let supportMeaker = +roofSizeSet === 3 ? null : trestle.trestleMkrCdJp
let supportMethodIdMulti = +roofSizeSet === 3 ? null : trestle.constMthdCdJp
const modules = surface.modules const modules = surface.modules
const moduleList = modules.map((module) => { const moduleList = modules.map((module) => {
@ -700,16 +706,16 @@ export const useTrestle = () => {
return { return {
roofSurfaceId: surface.id, roofSurfaceId: surface.id,
roofSurface: directionText.replace(/[0-9]/g, ''), roofSurface: directionText.replace(/[0-9]/g, ''),
roofMaterialId: roofMaterial.roofMatlCd, roofMaterialId: +roofSizeSet === 3 ? '陸屋根' : roofMaterial.roofMatlCd, // 육지붕의 경우 지붕재 ID 값이 없기 때문에 임의 값 지정
supportMethodId, supportMethodId,
constructSpecification, constructSpecification,
constructSpecificationMulti, constructSpecificationMulti,
roofMaterialIdMulti, roofMaterialIdMulti: +roofSizeSet === 3 ? '陸屋根' : roofMaterialIdMulti,
supportMethodIdMulti, supportMethodIdMulti,
supportMeaker, supportMeaker,
slope, slope: +roofSizeSet === 3 ? 0 : slope,
classType: currentAngleType === 'slope' ? '0' : '1', classType: currentAngleType === 'slope' ? '0' : '1',
angle: getDegreeByChon(slope), angle: +roofSizeSet === 3 ? 0 : getDegreeByChon(slope),
azimuth: getAzimuth(parent), azimuth: getAzimuth(parent),
moduleList, moduleList,
} }