From 8e530e440855ab13c98ac02a0b0f1704bd5172ed Mon Sep 17 00:00:00 2001 From: minsik Date: Mon, 14 Oct 2024 17:37:47 +0900 Subject: [PATCH] =?UTF-8?q?-=20=EC=9C=A1=EC=A7=80=EB=B6=95=20=EA=B8=B0?= =?UTF-8?q?=EB=B3=B8=20=EC=84=A4=EC=A0=95=20=EB=AA=A8=EB=8B=AC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/floor-plan/CanvasMenu.jsx | 2 + src/components/floor-plan/FloorPlan.jsx | 1 + src/components/floor-plan/MenuDepth01.jsx | 5 +- .../floor-plan/modal/basic/BasicSetting.jsx | 15 +- .../floor-plan/modal/basic/step/Module.jsx | 15 +- .../modal/basic/step/pitch/PitchModule.jsx | 91 ++++++++++ .../modal/basic/step/pitch/PitchPlacement.jsx | 159 ++++++++++++++++++ src/locales/ja.json | 9 + src/locales/ko.json | 9 + 9 files changed, 296 insertions(+), 10 deletions(-) create mode 100644 src/components/floor-plan/modal/basic/step/pitch/PitchModule.jsx create mode 100644 src/components/floor-plan/modal/basic/step/pitch/PitchPlacement.jsx diff --git a/src/components/floor-plan/CanvasMenu.jsx b/src/components/floor-plan/CanvasMenu.jsx index eae0ea4e..ab445ca9 100644 --- a/src/components/floor-plan/CanvasMenu.jsx +++ b/src/components/floor-plan/CanvasMenu.jsx @@ -48,6 +48,7 @@ export default function CanvasMenu(props) { setShowWallLineOffsetSettingModal, setShowRoofAllocationSettingModal, setShowBasicSettingModal, + setShowPropertiesSettingModal, } = props const [menuNumber, setMenuNumber] = useState(null) @@ -104,6 +105,7 @@ export default function CanvasMenu(props) { setShowRoofAllocationSettingModal, setShowObjectSettingModal, setShowBasicSettingModal, + setShowPropertiesSettingModal, type, } diff --git a/src/components/floor-plan/FloorPlan.jsx b/src/components/floor-plan/FloorPlan.jsx index d614a809..1de51962 100644 --- a/src/components/floor-plan/FloorPlan.jsx +++ b/src/components/floor-plan/FloorPlan.jsx @@ -84,6 +84,7 @@ export default function FloorPlan() { setShowWallLineOffsetSettingModal, setShowRoofAllocationSettingModal, setShowBasicSettingModal, + setShowPropertiesSettingModal, } useEffect(() => { diff --git a/src/components/floor-plan/MenuDepth01.jsx b/src/components/floor-plan/MenuDepth01.jsx index c7642894..21631434 100644 --- a/src/components/floor-plan/MenuDepth01.jsx +++ b/src/components/floor-plan/MenuDepth01.jsx @@ -23,6 +23,7 @@ export default function MenuDepth01(props) { setShowRoofAllocationSettingModal, setShowObjectSettingModal, setShowBasicSettingModal, + setShowPropertiesSettingModal, } = props const { getMessage } = useMessage() const [activeMenu, setActiveMenu] = useState() @@ -42,6 +43,7 @@ export default function MenuDepth01(props) { setShowWallLineOffsetSettingModal(id === 6) setShowRoofAllocationSettingModal(id === 7) setShowPlaceShapeDrawingModal(false) + setShowPropertiesSettingModal(false) } if (type === 'surface') { @@ -53,7 +55,7 @@ export default function MenuDepth01(props) { setShowMovementModal(false) setShowWallLineOffsetSettingModal(false) setShowRoofAllocationSettingModal(false) - + setShowPropertiesSettingModal(false) setShowSlopeSettingModal(id === 0) setShowPlaceShapeDrawingModal(id === 1) setShowPlacementSurfaceSettingModal(id === 2) @@ -69,6 +71,7 @@ export default function MenuDepth01(props) { setShowMovementModal(false) setShowWallLineOffsetSettingModal(false) setShowRoofAllocationSettingModal(false) + setShowPropertiesSettingModal(false) setShowBasicSettingModal(id === 0) } } diff --git a/src/components/floor-plan/modal/basic/BasicSetting.jsx b/src/components/floor-plan/modal/basic/BasicSetting.jsx index d28e3ef5..c6663cba 100644 --- a/src/components/floor-plan/modal/basic/BasicSetting.jsx +++ b/src/components/floor-plan/modal/basic/BasicSetting.jsx @@ -3,12 +3,16 @@ import WithDraggable from '@/components/common/draggable/withDraggable' import { useState } from 'react' import Orientation from '@/components/floor-plan/modal/basic/step/Orientation' import Module from '@/components/floor-plan/modal/basic/step/Module' +import PitchModule from '@/components/floor-plan/modal/basic/step/pitch/PitchModule' +import PitchPlacement from '@/components/floor-plan/modal/basic/step/pitch/PitchPlacement' import Placement from '@/components/floor-plan/modal/basic/step/Placement' +import { useRecoilState } from 'recoil' +import { canvasSettingState } from '@/store/canvasAtom' export default function BasicSetting({ setShowBasicSettingModal }) { const { getMessage } = useMessage() const [tabNum, setTabNum] = useState(1) - + const [canvasSetting, setCanvasSetting] = useRecoilState(canvasSettingState) return (
@@ -27,8 +31,13 @@ export default function BasicSetting({ setShowBasicSettingModal }) {
{getMessage('modal.module.basic.setting.module.placement')}
{tabNum === 1 && } - {tabNum === 2 && } - {tabNum === 3 && } + {/*배치면 초기설정 - 입력방법: 복시도 입력 || 실측값 입력*/} + {canvasSetting.roofSizeSet && canvasSetting.roofSizeSet != 3 && tabNum === 2 && } + {canvasSetting.roofSizeSet && canvasSetting.roofSizeSet != 3 && tabNum === 3 && } + + {/*배치면 초기설정 - 입력방법: 육지붕*/} + {canvasSetting.roofSizeSet && canvasSetting.roofSizeSet == 3 && tabNum === 2 && } + {canvasSetting.roofSizeSet && canvasSetting.roofSizeSet == 3 && tabNum === 3 && }
{tabNum !== 1 && ( diff --git a/src/components/floor-plan/modal/basic/step/Module.jsx b/src/components/floor-plan/modal/basic/step/Module.jsx index 8109da08..f50bb408 100644 --- a/src/components/floor-plan/modal/basic/step/Module.jsx +++ b/src/components/floor-plan/modal/basic/step/Module.jsx @@ -74,12 +74,15 @@ export default function Module({}) { ))} - - - - - - + + {Array.from({ length: 3 - moduleData.rows.length }).map((_, i) => ( + + + + + + + ))}
diff --git a/src/components/floor-plan/modal/basic/step/pitch/PitchModule.jsx b/src/components/floor-plan/modal/basic/step/pitch/PitchModule.jsx new file mode 100644 index 00000000..255833a8 --- /dev/null +++ b/src/components/floor-plan/modal/basic/step/pitch/PitchModule.jsx @@ -0,0 +1,91 @@ +import { useMessage } from '@/hooks/useMessage' +import QSelectBox from '@/components/common/select/QSelectBox' + +export default function PitchModule({}) { + const { getMessage } = useMessage() + const SelectOption01 = [{ name: '0' }, { name: '0' }, { name: '0' }, { name: '0' }] + const moduleData = { + header: [ + { name: getMessage('module'), width: 150, prop: 'module', type: 'color-box' }, + { + name: `${getMessage('높이')} (mm)`, + prop: 'height', + }, + { name: `${getMessage('width')} (mm)`, prop: 'width' }, + { name: `${getMessage('output')} (W)`, prop: 'output' }, + ], + rows: [ + { + module: { name: 'Re.RISE-G3 440', color: '#AA6768' }, + height: { name: '1134' }, + width: { name: '1722' }, + output: { name: '440' }, + }, + { + module: { + name: 'Re.RISE MS-G3 290', + color: '#67A2AA', + }, + height: { name: '1134' }, + width: { name: '1722' }, + output: { name: '240' }, + }, + ], + } + return ( + <> +
+
+
+ {getMessage('modal.module.basic.setting.module.setting')} +
+ +
+
+
+ + + + {moduleData.header.map((data) => ( + + ))} + + + + {moduleData.rows.map((row) => ( + <> + + {moduleData.header.map((header) => ( + <> + {header.type === 'color-box' && ( + + )} + {!header.type && header.type !== 'color-box' && } + + ))} + + + ))} + {Array.from({ length: 3 - moduleData.rows.length }).map((_, i) => ( + + + + + + + ))} + +
+ {data.name} +
+
+ + {row[header.prop].name} +
+
{row[header.prop].name}
+
+
+
+ + ) +} diff --git a/src/components/floor-plan/modal/basic/step/pitch/PitchPlacement.jsx b/src/components/floor-plan/modal/basic/step/pitch/PitchPlacement.jsx new file mode 100644 index 00000000..4c5aef36 --- /dev/null +++ b/src/components/floor-plan/modal/basic/step/pitch/PitchPlacement.jsx @@ -0,0 +1,159 @@ +import { useMessage } from '@/hooks/useMessage' + +export default function PitchPlacement() { + const { getMessage } = useMessage() + const moduleData = { + header: [ + { type: 'check', name: '', prop: 'check', width: 70 }, + { type: 'color-box', name: getMessage('module'), prop: 'module' }, + { type: 'text', name: `${getMessage('output')} (W)`, prop: 'output', width: 70 }, + ], + rows: [ + { + check: false, + module: { name: 'Re.RISE-G3 440', color: '#AA6768' }, + output: { name: '440' }, + }, + { + check: false, + module: { + name: 'Re.RISE MS-G3 290', + color: '#67A2AA', + }, + output: { name: '240' }, + }, + ], + } + return ( + <> +
+
+
+ + + + {moduleData.header.map((data) => ( + + ))} + + + + {moduleData.rows.map((row) => ( + <> + + {moduleData.header.map((header) => ( + <> + {header.type === 'color-box' && ( + + )} + {header.type === 'check' && ( + + )} + {header.type && header.type !== 'color-box' && header.type !== 'check' && } + + ))} + + + ))} + +
+ {data.type === 'check' ? ( +
+ + +
+ ) : ( + data.name + )} +
+
+ + {row[header.prop].name} +
+
+
+ + +
+
{row[header.prop].name}
+
+
+
+
+
+
+
+
{getMessage('modal.module.basic.setting.pitch.module.placement.standard.setting')}
+
+
+
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+
+
+
割り当て設定
+
+
+
+
+ + {getMessage('modal.module.basic.setting.pitch.module.row.amount')} + +
+ +
+ mm +
+
+ + {getMessage('modal.module.basic.setting.pitch.module.row.margin')} + +
+ +
+ mm +
+
+ + {getMessage('modal.module.basic.setting.pitch.module.column.amount')} + +
+ +
+ mm +
+
+ + {getMessage('modal.module.basic.setting.pitch.module.column.margin')} + +
+ +
+ mm +
+
+
+
+
+
{getMessage('modal.module.basic.setting.pitch.module.allocation.setting.info')}
+
+
+
+
+
+ + ) +} diff --git a/src/locales/ja.json b/src/locales/ja.json index f4f1e299..f8f15c2e 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -109,6 +109,15 @@ "modal.module.basic.setting.module.placement.arrangement.standard.eaves": "軒側", "modal.module.basic.setting.module.placement.arrangement.standard.ridge": "龍丸側", "modal.module.basic.setting.module.placement.maximum": "最大配置する。", + "modal.module.basic.setting.pitch.module.placement.standard.setting": "配置基準の設定", + "modal.module.basic.setting.pitch.module.placement.standard.setting.south": "南向きに設置す", + "modal.module.basic.setting.pitch.module.placement.standard.setting.select": "指定した辺を基準に設置する", + "modal.module.basic.setting.pitch.module.allocation.setting": "割り当て設定", + "modal.module.basic.setting.pitch.module.allocation.setting.info": "※バッチパネルの種類が1種類の場合にのみ使用できます。", + "modal.module.basic.setting.pitch.module.row.amount": "単数", + "modal.module.basic.setting.pitch.module.row.margin": "上下間隔", + "modal.module.basic.setting.pitch.module.column.amount": "熱数", + "modal.module.basic.setting.pitch.module.column.margin": "左右間隔", "modal.module.basic.setting.prev": "以前", "modal.module.basic.setting.passivity.placement": "手動配置", "modal.module.basic.setting.auto.placement": "設定値に自動配置", diff --git a/src/locales/ko.json b/src/locales/ko.json index 9d518a5e..ee31c6c3 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -113,6 +113,15 @@ "modal.module.basic.setting.module.placement.arrangement.standard.eaves": "처마쪽", "modal.module.basic.setting.module.placement.arrangement.standard.ridge": "용마루쪽", "modal.module.basic.setting.module.placement.maximum": "최대배치 실시한다.", + "modal.module.basic.setting.pitch.module.placement.standard.setting": "배치 기준 설정", + "modal.module.basic.setting.pitch.module.placement.standard.setting.south": "남향으로 설치한다", + "modal.module.basic.setting.pitch.module.placement.standard.setting.select": "지정한 변을 기준으로 설치한다", + "modal.module.basic.setting.pitch.module.allocation.setting": "할당 설정", + "modal.module.basic.setting.pitch.module.allocation.setting.info": "※배치 패널 종류가 1종류일 경우에만 사용할 수 있습니다.", + "modal.module.basic.setting.pitch.module.row.amount": "단수", + "modal.module.basic.setting.pitch.module.row.margin": "상하간격", + "modal.module.basic.setting.pitch.module.column.amount": "열수", + "modal.module.basic.setting.pitch.module.column.margin": "좌우간격", "modal.module.basic.setting.prev": "이전", "modal.module.basic.setting.passivity.placement": "수동 배치", "modal.module.basic.setting.auto.placement": "설정값으로 자동 배치",