오류 수정
This commit is contained in:
parent
22c115c92d
commit
10cd2fdda5
@ -56,6 +56,7 @@ export default function Module({ setTabNum }) {
|
|||||||
}, [installHeight, verticalSnowCover])
|
}, [installHeight, verticalSnowCover])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (isObjectNotEmpty(tempModuleSelectionData)) {
|
||||||
if (tempModuleSelectionData.roofConstructions.length > 0) {
|
if (tempModuleSelectionData.roofConstructions.length > 0) {
|
||||||
if (tempModuleSelectionData.common.moduleItemId && isObjectNotEmpty(tempModuleSelectionData.module)) {
|
if (tempModuleSelectionData.common.moduleItemId && isObjectNotEmpty(tempModuleSelectionData.module)) {
|
||||||
//저장된 temp데이터가 지붕재(addedRoofs) 개수와 같으면 모듈 선택 저장
|
//저장된 temp데이터가 지붕재(addedRoofs) 개수와 같으면 모듈 선택 저장
|
||||||
@ -65,6 +66,7 @@ export default function Module({ setTabNum }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, [tempModuleSelectionData])
|
}, [tempModuleSelectionData])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@ -360,7 +360,7 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (canvasSetting.roofSizeSet !== '3') {
|
if (canvasSetting.roofSizeSet !== '3') {
|
||||||
if (moduleSelectionData.common.saleStoreNorthFlg === '1') {
|
if (isObjectNotEmpty(moduleSelectionData) && moduleSelectionData.common.saleStoreNorthFlg === '1') {
|
||||||
setSaleStoreNorthFlg(true)
|
setSaleStoreNorthFlg(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -287,7 +287,7 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
|
|||||||
construction: selectedConstruction,
|
construction: selectedConstruction,
|
||||||
}
|
}
|
||||||
|
|
||||||
const index = tempModuleSelectionData.roofConstructions.findIndex((obj) => obj.roofIndex === tabIndex)
|
const index = moduleSelectionData.roofConstructions.findIndex((obj) => obj.roofIndex === tabIndex)
|
||||||
|
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
const newArray = [
|
const newArray = [
|
||||||
|
|||||||
@ -476,7 +476,7 @@ export function useCanvasSetting() {
|
|||||||
|
|
||||||
//모듈 선택 데이터 초기화
|
//모듈 선택 데이터 초기화
|
||||||
resetModuleSelectionData()
|
resetModuleSelectionData()
|
||||||
moduleSelectedDataTrigger('')
|
moduleSelectedDataTrigger({ common: {}, module: {}, roofConstructions: [] })
|
||||||
|
|
||||||
const isModuleExist = canvas.getObjects().some((obj) => obj.name === POLYGON_TYPE.MODULE)
|
const isModuleExist = canvas.getObjects().some((obj) => obj.name === POLYGON_TYPE.MODULE)
|
||||||
if (!isModuleExist) {
|
if (!isModuleExist) {
|
||||||
|
|||||||
@ -193,12 +193,12 @@ export function useCircuitTrestle() {
|
|||||||
const tempHeader = [
|
const tempHeader = [
|
||||||
{ name: getMessage('simulator.table.sub1'), prop: 'name' },
|
{ name: getMessage('simulator.table.sub1'), prop: 'name' },
|
||||||
{ name: getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.circuit'), prop: 'circuit' },
|
{ name: getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.circuit'), prop: 'circuit' },
|
||||||
...moduleSelectionData.module?.itemList?.map((module) => {
|
// ...moduleSelectionData.module?.itemList?.map((module) => {
|
||||||
return {
|
// return {
|
||||||
name: module.itemNm,
|
// name: module.itemNm,
|
||||||
prop: module.itemId,
|
// prop: module.itemId,
|
||||||
}
|
// }
|
||||||
}),
|
// }),
|
||||||
{ name: `${getMessage('modal.panel.batch.statistic.power.generation.amount')}(kW)`, prop: 'wpOut' },
|
{ name: `${getMessage('modal.panel.batch.statistic.power.generation.amount')}(kW)`, prop: 'wpOut' },
|
||||||
]
|
]
|
||||||
const surfaceObjects = {}
|
const surfaceObjects = {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user