지붕재할당 수정 후 배치면초기설정 적용 수정
This commit is contained in:
parent
b0f145ef4e
commit
b5f702b74b
@ -59,11 +59,11 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, set
|
||||
if (!basicSetting || !currentRoof || Object.keys(currentRoof).length === 0 || Object.keys(basicSetting).length === 0) return
|
||||
const raftCodeList = findCommonCode('203800')
|
||||
setRaftCodes(raftCodeList)
|
||||
|
||||
if (addedRoofs.length > 0) {
|
||||
setCurrentRoof({ ...currentRoof, roofSizeSet: addedRoofs[0].roofSizeSet, roofAngleSet: addedRoofs[0].roofAngleSet })
|
||||
} else if (basicSetting.roofSizeSet.length > 0) {
|
||||
setCurrentRoof({ ...currentRoof, roofSizeSet: basicSetting.roofSizeSet, roofAngleSet: basicSetting.roofAngleSet })
|
||||
|
||||
if (addedRoofs[0].roofAngleSet && addedRoofs[0].roofAngleSet?.length > 0) {
|
||||
setCurrentRoof({ ...currentRoof, roofSizeSet: String(addedRoofs[0].roofSizeSet), roofAngleSet: addedRoofs[0].roofAngleSet })
|
||||
} else if (basicSetting.roofAngleSet && basicSetting.roofAngleSet?.length > 0) {
|
||||
setCurrentRoof({ ...currentRoof, roofSizeSet: String(basicSetting.roofSizeSet), roofAngleSet: basicSetting.roofAngleSet })
|
||||
}
|
||||
}, [])
|
||||
|
||||
|
||||
@ -156,7 +156,13 @@ export function useRoofAllocationSetting(id) {
|
||||
}
|
||||
|
||||
setCurrentRoofList(selectRoofs)
|
||||
setBasicSetting({ ...basicSetting, roofsData: roofsArray })
|
||||
//setBasicSetting({ ...basicSetting, roofsData: roofsArray })
|
||||
setBasicSetting({
|
||||
...basicSetting,
|
||||
roofSizeSet: res[0].roofSizeSet,
|
||||
roofAngleSet: res[0].roofAngleSet,
|
||||
roofsData: roofsArray,
|
||||
})
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('Data fetching error:', error)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user