Compare commits
No commits in common. "d6b9634a898ae31ee95de1c9e4022b1c971fcb8a" and "97ca91aa29932dcc9e9b291e1d29aec566bbe86d" have entirely different histories.
d6b9634a89
...
97ca91aa29
@ -172,7 +172,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
}, [checkedModules])
|
}, [checkedModules])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos} className="ll">
|
<WithDraggable isShow={true} pos={pos} className="lx-2">
|
||||||
<WithDraggable.Header title={getMessage('plan.menu.module.circuit.setting.default')} onClose={() => handleClosePopup(id)} />
|
<WithDraggable.Header title={getMessage('plan.menu.module.circuit.setting.default')} onClose={() => handleClosePopup(id)} />
|
||||||
<WithDraggable.Body>
|
<WithDraggable.Body>
|
||||||
<div className="roof-module-tab">
|
<div className="roof-module-tab">
|
||||||
@ -216,7 +216,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
{getMessage('modal.module.basic.setting.passivity.placement')}
|
{getMessage('modal.module.basic.setting.passivity.placement')}
|
||||||
</button>
|
</button>
|
||||||
<button className={`btn-frame modal mr5 ${isManualModuleLayoutSetup ? 'act' : ''}`} onClick={handleManualModuleLayoutSetup}>
|
<button className={`btn-frame modal mr5 ${isManualModuleLayoutSetup ? 'act' : ''}`} onClick={handleManualModuleLayoutSetup}>
|
||||||
{getMessage('modal.module.basic.setting.layoutpassivity.placement')}
|
레아이웃 수동설치
|
||||||
</button>
|
</button>
|
||||||
<button className="btn-frame modal act" onClick={() => autoModuleSetup()}>
|
<button className="btn-frame modal act" onClick={() => autoModuleSetup()}>
|
||||||
{getMessage('modal.module.basic.setting.auto.placement')}
|
{getMessage('modal.module.basic.setting.auto.placement')}
|
||||||
|
|||||||
@ -8,13 +8,12 @@ import {
|
|||||||
moduleSetupOptionState,
|
moduleSetupOptionState,
|
||||||
toggleManualSetupModeState,
|
toggleManualSetupModeState,
|
||||||
} from '@/store/canvasAtom'
|
} from '@/store/canvasAtom'
|
||||||
import { useRecoilState, useRecoilValue, useResetRecoilState, useSetRecoilState } from 'recoil'
|
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil'
|
||||||
import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions'
|
import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions'
|
||||||
import { isObjectNotEmpty } from '@/util/common-utils'
|
import { isObjectNotEmpty } from '@/util/common-utils'
|
||||||
|
|
||||||
const Placement = forwardRef((props, refs) => {
|
const Placement = forwardRef((props, refs) => {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const [useTab, setUseTab] = useState(true)
|
|
||||||
|
|
||||||
const [isChidoriNotAble, setIsChidoriNotAble] = useState(false)
|
const [isChidoriNotAble, setIsChidoriNotAble] = useState(false)
|
||||||
|
|
||||||
@ -23,7 +22,7 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
|
|
||||||
const setCheckedModules = useSetRecoilState(checkedModuleState)
|
const setCheckedModules = useSetRecoilState(checkedModuleState)
|
||||||
const moduleSelectionData = useRecoilValue(moduleSelectionDataState)
|
const moduleSelectionData = useRecoilValue(moduleSelectionDataState)
|
||||||
const { makeModuleInitArea, roofOutlineColor } = useModuleBasicSetting(3)
|
const { makeModuleInitArea } = useModuleBasicSetting(3)
|
||||||
|
|
||||||
const [isMultiModule, setIsMultiModule] = useState(false)
|
const [isMultiModule, setIsMultiModule] = useState(false)
|
||||||
|
|
||||||
@ -33,9 +32,6 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
const setManualSetupMode = useSetRecoilState(toggleManualSetupModeState)
|
const setManualSetupMode = useSetRecoilState(toggleManualSetupModeState)
|
||||||
|
|
||||||
const [moduleSetupOption, setModuleSetupOption] = useRecoilState(moduleSetupOptionState) //모듈 설치 옵션
|
const [moduleSetupOption, setModuleSetupOption] = useRecoilState(moduleSetupOptionState) //모듈 설치 옵션
|
||||||
const resetModuleSetupOption = useResetRecoilState(moduleSetupOptionState)
|
|
||||||
|
|
||||||
const [colspan, setColspan] = useState(1)
|
|
||||||
|
|
||||||
//모듈 배치면 생성
|
//모듈 배치면 생성
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -48,17 +44,12 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
makeModuleInitArea(moduleSelectionData)
|
makeModuleInitArea(moduleSelectionData)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moduleSelectionData.module.itemList.length > 1) {
|
|
||||||
setColspan(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
// refs.isChidori.current = 'false'
|
refs.isChidori.current = 'false'
|
||||||
// refs.setupLocation.current = 'eaves'
|
refs.setupLocation.current = 'eaves'
|
||||||
setIsManualModuleSetup(false)
|
setIsManualModuleSetup(false)
|
||||||
setIsManualModuleLayoutSetup(false)
|
setIsManualModuleLayoutSetup(false)
|
||||||
setManualSetupMode('off')
|
setManualSetupMode('off')
|
||||||
resetModuleSetupOption()
|
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
@ -75,10 +66,9 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
initCheckedModule = { ...initCheckedModule, [obj.itemId]: true }
|
initCheckedModule = { ...initCheckedModule, [obj.itemId]: true }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
setSelectedItems(initCheckedModule)
|
setSelectedItems(initCheckedModule)
|
||||||
setSelectedModules(moduleSelectionData.module)
|
setSelectedModules(moduleSelectionData.module)
|
||||||
props.setLayoutSetup(moduleSelectionData.module.itemList.map((item) => ({ moduleId: item.itemId, col: 0, row: 0, checked: true })))
|
props.setLayoutSetup(moduleSelectionData.module.itemList.map((item) => ({ moduleId: item.itemId, col: 0, row: 0 })))
|
||||||
}
|
}
|
||||||
|
|
||||||
//모듈 배치면 생성
|
//모듈 배치면 생성
|
||||||
@ -103,9 +93,7 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
header: [
|
header: [
|
||||||
{ type: 'check', name: '', prop: 'check', width: 70 },
|
{ type: 'check', name: '', prop: 'check', width: 70 },
|
||||||
{ type: 'color-box', name: getMessage('module'), prop: 'module' },
|
{ type: 'color-box', name: getMessage('module'), prop: 'module' },
|
||||||
{ type: 'text', name: getMessage('modal.module.basic.setting.module.placement.mix.asg.yn'), prop: 'mixAsgYn', width: 50 },
|
{ type: 'text', name: `${getMessage('output')} (W)`, prop: 'output', width: 70 },
|
||||||
{ type: 'text', name: `単数`, prop: 'rows', width: 60 },
|
|
||||||
{ type: 'text', name: `熱水`, prop: 'cols', width: 60 },
|
|
||||||
],
|
],
|
||||||
rows: [],
|
rows: [],
|
||||||
}
|
}
|
||||||
@ -130,48 +118,38 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//체크된 모듈 아이디 추출
|
//체크된 모듈 아이디 추출
|
||||||
const handleSelectedItem = (e, itemId) => {
|
const handleSelectedItem = (e) => {
|
||||||
setSelectedItems({ ...selectedItems, [e.target.name]: e.target.checked })
|
setSelectedItems({ ...selectedItems, [e.target.name]: e.target.checked })
|
||||||
|
|
||||||
const newLayoutSetup = [...props.layoutSetup]
|
|
||||||
props.layoutSetup.forEach((item, index) => {
|
|
||||||
if (item.moduleId === itemId) {
|
|
||||||
newLayoutSetup[index] = { ...props.layoutSetup[index], checked: e.target.checked }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
props.setLayoutSetup(newLayoutSetup)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleLayoutSetup = (e, itemId, index) => {
|
const handleLayoutSetup = (e, itemId, index) => {
|
||||||
const newLayoutSetup = [...props.layoutSetup]
|
const newLayoutSetup = [...props.layoutSetup]
|
||||||
newLayoutSetup[index] = {
|
newLayoutSetup[index] = { ...newLayoutSetup[index], moduleId: itemId, [e.target.name]: Number(e.target.value) }
|
||||||
...newLayoutSetup[index],
|
|
||||||
moduleId: itemId,
|
|
||||||
[e.target.name]: Number(e.target.value),
|
|
||||||
}
|
|
||||||
props.setLayoutSetup(newLayoutSetup)
|
props.setLayoutSetup(newLayoutSetup)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="module-table-flex-wrap">
|
<div className="module-table-flex-wrap mb10">
|
||||||
<div className="module-table-box">
|
<div className="module-table-box">
|
||||||
<div className="module-table-inner">
|
<div className="module-table-inner">
|
||||||
<div className="roof-module-table">
|
<div className="roof-module-table">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
{moduleData.header.map((data) => (
|
<tr>
|
||||||
<th key={data.prop} style={{ width: data.width ? data.width : '' }}>
|
{moduleData.header.map((data) => (
|
||||||
{data.type === 'check' ? (
|
<th key={data.prop} style={{ width: data.width ? data.width : '' }}>
|
||||||
<div className="d-check-box no-text pop">
|
{data.type === 'check' ? (
|
||||||
<input type="checkbox" id="ch01" disabled />
|
<div className="d-check-box no-text pop">
|
||||||
<label htmlFor="ch01"></label>
|
<input type="checkbox" id="ch01" disabled />
|
||||||
</div>
|
<label htmlFor="ch01"></label>
|
||||||
) : (
|
</div>
|
||||||
data.name
|
) : (
|
||||||
)}
|
data.name
|
||||||
</th>
|
)}
|
||||||
))}
|
</th>
|
||||||
|
))}
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{selectedModules.itemList &&
|
{selectedModules.itemList &&
|
||||||
@ -184,7 +162,7 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
id={item.itemId}
|
id={item.itemId}
|
||||||
name={item.itemId}
|
name={item.itemId}
|
||||||
checked={selectedItems[item.itemId]}
|
checked={selectedItems[item.itemId]}
|
||||||
onChange={(e) => handleSelectedItem(e, item.itemId)}
|
onChange={handleSelectedItem}
|
||||||
/>
|
/>
|
||||||
<label htmlFor={item.itemId}></label>
|
<label htmlFor={item.itemId}></label>
|
||||||
</div>
|
</div>
|
||||||
@ -195,171 +173,103 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
<span className="name">{item.itemNm}</span>
|
<span className="name">{item.itemNm}</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="al-c">
|
<td className="al-r">{item.wpOut}</td>
|
||||||
<div className="color-wrap">
|
<label htmlFor="ra06">행</label>
|
||||||
<span className="name">{item.mixAsgYn}</span>
|
<input
|
||||||
</div>
|
type="text"
|
||||||
</td>
|
className="input-origin block mr10"
|
||||||
<td className="al-r">
|
name="col"
|
||||||
<div className="input-grid">
|
value={props.layoutSetup[index]?.col ?? 1}
|
||||||
<input
|
defaultValue={0}
|
||||||
type="text"
|
onChange={(e) => handleLayoutSetup(e, item.itemId, index)}
|
||||||
className="input-origin block"
|
/>{' '}
|
||||||
name="row"
|
×<label htmlFor="ra07">열</label>
|
||||||
value={props.layoutSetup[index]?.row ?? 1}
|
<input
|
||||||
defaultValue={0}
|
type="text"
|
||||||
onChange={(e) => handleLayoutSetup(e, item.itemId, index)}
|
className="input-origin block"
|
||||||
/>
|
name="row"
|
||||||
</div>
|
value={props.layoutSetup[index]?.row ?? 1}
|
||||||
</td>
|
defaultValue={0}
|
||||||
<td className="al-r">
|
onChange={(e) => handleLayoutSetup(e, item.itemId, index)}
|
||||||
<div className="input-grid">
|
/>
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
className="input-origin block"
|
|
||||||
name="col"
|
|
||||||
value={props.layoutSetup[index]?.col ?? 1}
|
|
||||||
defaultValue={0}
|
|
||||||
onChange={(e) => handleLayoutSetup(e, item.itemId, index)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="module-table-box non-flex">
|
<div className="module-table-box">
|
||||||
<div className="module-table-inner">
|
<div className="module-table-inner">
|
||||||
<div className="roof-module-table">
|
<div className="self-table-tit">{getMessage('modal.module.basic.setting.module.placement.select.fitting.type')}</div>
|
||||||
<table>
|
<div className="module-self-table">
|
||||||
<thead>
|
<div className="self-table-item">
|
||||||
<tr>
|
<div className="self-item-th">{getMessage('modal.module.basic.setting.module.placement.waterfowl.arrangement')}</div>
|
||||||
<th>{getMessage('modal.module.basic.setting.module.placement.waterfowl.arrangement')}</th>
|
<div className="self-item-td">
|
||||||
<th>{getMessage('modal.module.basic.setting.module.placement.arrangement.standard')}</th>
|
<div className="pop-form-radio">
|
||||||
</tr>
|
<div className="d-check-radio pop">
|
||||||
</thead>
|
<input
|
||||||
<tbody>
|
type="radio"
|
||||||
<tr>
|
name="radio01"
|
||||||
<td>
|
id="ra01"
|
||||||
<div className="hexagonal-radio-wrap">
|
checked={moduleSetupOption.isChidori}
|
||||||
<div className="d-check-radio pop mb10">
|
disabled={isChidoriNotAble}
|
||||||
<input
|
value={'true'}
|
||||||
type="radio"
|
onChange={(e) => handleChangeChidori(e)}
|
||||||
name="radio02"
|
/>
|
||||||
id="ra03"
|
<label htmlFor="ra01">{getMessage('modal.module.basic.setting.module.placement.do')}</label>
|
||||||
checked={moduleSetupOption.isChidori}
|
</div>
|
||||||
disabled={isChidoriNotAble}
|
<div className="d-check-radio pop">
|
||||||
value={'true'}
|
<input
|
||||||
onChange={(e) => handleChangeChidori(e)}
|
type="radio"
|
||||||
/>
|
name="radio02"
|
||||||
<label htmlFor="ra03">{getMessage('modal.module.basic.setting.module.placement.do')}</label>
|
id="ra02"
|
||||||
</div>
|
checked={!moduleSetupOption.isChidori}
|
||||||
<div className="d-check-radio pop">
|
value={'false'}
|
||||||
<input
|
onChange={(e) => handleChangeChidori(e)}
|
||||||
type="radio"
|
/>
|
||||||
name="radio02"
|
<label htmlFor="ra02">{getMessage('modal.module.basic.setting.module.placement.do.not')}</label>
|
||||||
id="ra04"
|
</div>
|
||||||
checked={!moduleSetupOption.isChidori}
|
</div>
|
||||||
value={'false'}
|
</div>
|
||||||
onChange={(e) => handleChangeChidori(e)}
|
</div>
|
||||||
/>
|
<div className="self-table-item">
|
||||||
<label htmlFor="ra04">{getMessage('modal.module.basic.setting.module.placement.do.not')}</label>
|
<div className="self-item-th">{getMessage('modal.module.basic.setting.module.placement.arrangement.standard')}</div>
|
||||||
</div>
|
<div className="self-item-td">
|
||||||
</div>
|
<div className="pop-form-radio">
|
||||||
</td>
|
<div className="d-check-radio pop">
|
||||||
<td>
|
<input
|
||||||
<div className="hexagonal-radio-wrap">
|
type="radio"
|
||||||
<div className="d-check-radio pop mb10">
|
name="radio04"
|
||||||
<input
|
id="ra04"
|
||||||
type="radio"
|
checked={moduleSetupOption.setupLocation === 'eaves'}
|
||||||
name="radio03"
|
value={'eaves'}
|
||||||
id="ra05"
|
onChange={handleSetupLocation}
|
||||||
checked={moduleSetupOption.setupLocation === 'eaves'}
|
/>
|
||||||
value={'eaves'}
|
<label htmlFor="ra04">{getMessage('modal.module.basic.setting.module.placement.arrangement.standard.eaves')}</label>
|
||||||
onChange={handleSetupLocation}
|
</div>
|
||||||
/>
|
<div className="d-check-radio pop">
|
||||||
<label htmlFor="ra05">{getMessage('modal.module.basic.setting.module.placement.arrangement.standard.eaves')}</label>
|
<input
|
||||||
</div>
|
type="radio"
|
||||||
<div className="d-check-radio pop">
|
name="radio05"
|
||||||
<input
|
id="ra05"
|
||||||
type="radio"
|
checked={moduleSetupOption.setupLocation === 'ridge'}
|
||||||
name="radio03"
|
value={'ridge'}
|
||||||
id="ra06"
|
onChange={handleSetupLocation}
|
||||||
checked={moduleSetupOption.setupLocation === 'ridge'}
|
disabled={isMultiModule}
|
||||||
value={'ridge'}
|
/>
|
||||||
onChange={handleSetupLocation}
|
<label htmlFor="ra05">{getMessage('modal.module.basic.setting.module.placement.arrangement.standard.ridge')}</label>
|
||||||
disabled={isMultiModule}
|
</div>
|
||||||
/>
|
</div>
|
||||||
<label htmlFor="ra06">{getMessage('modal.module.basic.setting.module.placement.arrangement.standard.ridge')}</label>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
<div className="self-table-flx">
|
||||||
</tr>
|
{/* <div className="d-check-box pop">
|
||||||
</tbody>
|
<input type="checkbox" id="ch04" checked={isMaxSetup === 'true'} value={'true'} onChange={handleMaxSetup} />
|
||||||
</table>
|
<label htmlFor="ch04">{getMessage('modal.module.basic.setting.module.placement.maximum')}</label>
|
||||||
|
</div> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="hide-check-guide">
|
|
||||||
{getMessage('modal.module.basic.setting.module.placement.max.size.check')}
|
|
||||||
<button className={`arr ${!useTab ? 'act' : ''}`} onClick={() => setUseTab(!useTab)}></button>
|
|
||||||
</div>
|
|
||||||
<div className={`module-table-box mt10 ${useTab ? 'hide' : ''}`}>
|
|
||||||
<div className="module-table-inner">
|
|
||||||
<div className="roof-module-table">
|
|
||||||
<table className="">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th rowSpan={2} style={{ width: '22%' }}></th>
|
|
||||||
{selectedModules &&
|
|
||||||
selectedModules.itemList.map((item) => (
|
|
||||||
<th colSpan={colspan}>
|
|
||||||
<div className="color-wrap">
|
|
||||||
<span className="color-box" style={{ backgroundColor: item.color }}></span>
|
|
||||||
<span className="name">{item.itemNm}</span>
|
|
||||||
</div>
|
|
||||||
</th>
|
|
||||||
))}
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
{selectedModules.itemList.map((item) => (
|
|
||||||
<>
|
|
||||||
<th>{getMessage('modal.module.basic.setting.module.placement.max.row')}</th>
|
|
||||||
{colspan > 1 && <th>{getMessage('modal.module.basic.setting.module.placement.max.rows.multiple')}</th>}
|
|
||||||
</>
|
|
||||||
))}
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{moduleSelectionData.roofConstructions.map((item) => (
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div className="color-wrap">
|
|
||||||
<span className="color-box" style={{ backgroundColor: roofOutlineColor(item.roofIndex) }}></span>
|
|
||||||
<span className="name">{item.addRoof.roofMatlNmJp}</span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
{selectedModules.itemList.map((item) => (
|
|
||||||
<>
|
|
||||||
<td className="al-c">7</td>
|
|
||||||
{colspan > 1 && <td className="al-c">5</td>}
|
|
||||||
</>
|
|
||||||
))}
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -114,7 +114,7 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
//육지붕 일경우에는 바로 배치면 설치LL
|
//육지붕 일경우에는 바로 배치면 설치LL
|
||||||
canvas
|
canvas
|
||||||
.getObjects()
|
.getObjects()
|
||||||
.filter((roof) => roof.name === POLYGON_TYPE.ROOF)
|
.filter((roof) => roof.name === 'roof')
|
||||||
.forEach((roof) => {
|
.forEach((roof) => {
|
||||||
makeModuleInstArea(roof, null)
|
makeModuleInstArea(roof, null)
|
||||||
})
|
})
|
||||||
@ -172,13 +172,13 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
|
|
||||||
const roofOutlineColor = (roofIndex) => {
|
const roofOutlineColor = (roofIndex) => {
|
||||||
if (roofIndex === 1) {
|
if (roofIndex === 1) {
|
||||||
return '#FFC000'
|
return 'rgb(86,170,255)'
|
||||||
} else if (roofIndex === 2) {
|
} else if (roofIndex === 2) {
|
||||||
return '#7030A0'
|
return 'rgb(125, 252, 173)'
|
||||||
} else if (roofIndex === 3) {
|
} else if (roofIndex === 3) {
|
||||||
return '#385723'
|
return 'rgb(238, 109, 255)'
|
||||||
} else {
|
} else {
|
||||||
return '#FFFF00'
|
return 'rgb(252, 148, 106)'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -775,7 +775,7 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
const mixAsgYn = trestlePolygon.modules[0].moduleInfo.mixAsgYn
|
const mixAsgYn = trestlePolygon.modules[0].moduleInfo.mixAsgYn
|
||||||
//현재 체크된 모듈기준으로 혼합가능인지 확인 Y === Y, N === N 일때만 설치 가능
|
//현재 체크된 모듈기준으로 혼합가능인지 확인 Y === Y, N === N 일때만 설치 가능
|
||||||
if (checkedModule[0].mixAsgYn !== mixAsgYn) {
|
if (checkedModule[0].mixAsgYn !== mixAsgYn) {
|
||||||
swalFire({ text: getMessage('modal.module.basic.setting.module.placement.mix.asg.yn.error') })
|
swalFire({ text: getMessage('module.place.mix.asg.yn.error') })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -892,11 +892,8 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//숫자 0이 하나라도 있으면 설치 불가
|
|
||||||
const hasZeroLength = checkedModule.some((item) =>
|
const hasZeroLength = checkedModule.some((item) =>
|
||||||
layoutSetupRef.some(
|
layoutSetupRef.some((layoutItem) => item.itemId === layoutItem.moduleId && (layoutItem.row === 0 || layoutItem.col === 0)),
|
||||||
(layoutItem) => layoutItem.checked && item.itemId === layoutItem.moduleId && (layoutItem.row === 0 || layoutItem.col === 0),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (hasZeroLength) {
|
if (hasZeroLength) {
|
||||||
@ -906,16 +903,6 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//혼합 가능 모듈과 혼합 불가능 모듈을 선택했을때 카운트를 해서 확인
|
|
||||||
const mixAsgY = checkedModule.filter((obj) => obj.mixAsgYn === 'Y')
|
|
||||||
const mixAsgN = checkedModule.filter((obj) => obj.mixAsgYn === 'N')
|
|
||||||
|
|
||||||
//Y인 모듈과 N인 모듈이 둘다 존재하면 설치 불가
|
|
||||||
if (mixAsgY.length > 0 && mixAsgN.length > 0) {
|
|
||||||
swalFire({ text: getMessage('modal.module.basic.setting.module.placement.mix.asg.yn.error') })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const batchObjects = canvas?.getObjects().filter((obj) => obj.name === POLYGON_TYPE.OBJECT_SURFACE) //도머s 객체
|
const batchObjects = canvas?.getObjects().filter((obj) => obj.name === POLYGON_TYPE.OBJECT_SURFACE) //도머s 객체
|
||||||
//수동모드 모듈 설치면 선택 잠금
|
//수동모드 모듈 설치면 선택 잠금
|
||||||
moduleSetupSurfaces.forEach((obj) => {
|
moduleSetupSurfaces.forEach((obj) => {
|
||||||
@ -1273,7 +1260,7 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
|
|
||||||
//단수 합단수
|
//단수 합단수
|
||||||
const sumRowCount = isMultipleModules
|
const sumRowCount = isMultipleModules
|
||||||
? layoutSetupRef.filter((item) => item.checked).reduce((acc, cur) => acc + cur.row, 0)
|
? layoutSetupRef.reduce((acc, cur) => acc + cur.row, 0)
|
||||||
: layoutSetupRef.find((item) => item.moduleId === checkedModule[0].itemId).row //멀티모듈이면 전체 합, 체크된 한개의 열
|
: layoutSetupRef.find((item) => item.moduleId === checkedModule[0].itemId).row //멀티모듈이면 전체 합, 체크된 한개의 열
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1286,8 +1273,7 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
|
|
||||||
// 혼합일때 모듈 개별의 row를 체크함
|
// 혼합일때 모듈 개별의 row를 체크함
|
||||||
const isPassedObject =
|
const isPassedObject =
|
||||||
isMultipleModules &&
|
isMultipleModules && layoutSetupRef.find((item, index) => item.row > trestlePolygon.trestleDetail.module[index].mixModuleMaxRows)
|
||||||
layoutSetupRef.find((item, index) => item.checked && item.row > trestlePolygon.trestleDetail.module[index].mixModuleMaxRows)
|
|
||||||
|
|
||||||
if (isPassedObject) {
|
if (isPassedObject) {
|
||||||
swalFire({
|
swalFire({
|
||||||
@ -1746,7 +1732,7 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
|
|
||||||
//Y인 모듈과 N인 모듈이 둘다 존재하면 설치 불가
|
//Y인 모듈과 N인 모듈이 둘다 존재하면 설치 불가
|
||||||
if (mixAsgY.length > 0 && mixAsgN.length > 0) {
|
if (mixAsgY.length > 0 && mixAsgN.length > 0) {
|
||||||
swalFire({ text: getMessage('modal.module.basic.setting.module.placement.mix.asg.yn.error') })
|
swalFire({ text: getMessage('module.place.mix.asg.yn.error') })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3589,6 +3575,5 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
autoFlatroofModuleSetup,
|
autoFlatroofModuleSetup,
|
||||||
checkModuleDisjointObjects,
|
checkModuleDisjointObjects,
|
||||||
makeModuleInitArea,
|
makeModuleInitArea,
|
||||||
roofOutlineColor,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,8 +116,8 @@
|
|||||||
"modal.module.basic.setting.module.placement.do.not": "しない",
|
"modal.module.basic.setting.module.placement.do.not": "しない",
|
||||||
"modal.module.basic.setting.module.placement.arrangement.standard": "配置基準",
|
"modal.module.basic.setting.module.placement.arrangement.standard": "配置基準",
|
||||||
"modal.module.basic.setting.module.placement.arrangement.standard.center": "中央",
|
"modal.module.basic.setting.module.placement.arrangement.standard.center": "中央",
|
||||||
"modal.module.basic.setting.module.placement.arrangement.standard.eaves": "軒側",
|
"modal.module.basic.setting.module.placement.arrangement.standard.eaves": "軒",
|
||||||
"modal.module.basic.setting.module.placement.arrangement.standard.ridge": "棟側",
|
"modal.module.basic.setting.module.placement.arrangement.standard.ridge": "棟",
|
||||||
"modal.module.basic.setting.module.placement.maximum": "最大配置",
|
"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": "配置基準設定",
|
||||||
"modal.module.basic.setting.pitch.module.placement.standard.setting.south": "南向き設置",
|
"modal.module.basic.setting.pitch.module.placement.standard.setting.south": "南向き設置",
|
||||||
@ -1045,11 +1045,5 @@
|
|||||||
"chidory.can.not.install": "千鳥配置できない工法です。",
|
"chidory.can.not.install": "千鳥配置できない工法です。",
|
||||||
"module.layout.setup.max.count": "모듈의 최대 단수는 {0}, 최대 열수는 {1} 입니다. (JA)",
|
"module.layout.setup.max.count": "모듈의 최대 단수는 {0}, 최대 열수는 {1} 입니다. (JA)",
|
||||||
"module.layout.setup.max.count.multiple": "모듈 {0}번의 최대 단수는 {1}, 최대 열수는 {2} 입니다. (JA)",
|
"module.layout.setup.max.count.multiple": "모듈 {0}번의 최대 단수는 {1}, 최대 열수는 {2} 입니다. (JA)",
|
||||||
"roofAllocation.not.found": "할당할 지붕이 없습니다. (JA)",
|
"roofAllocation.not.found": "할당할 지붕이 없습니다. (JA)"
|
||||||
"modal.module.basic.setting.module.placement.max.size.check": "지붕재별 모듈의 최대 단수. 혼합 최대 단수를 확인하십시오. (JA)",
|
|
||||||
"modal.module.basic.setting.module.placement.max.row": "최대 단수 (JA)",
|
|
||||||
"modal.module.basic.setting.module.placement.max.rows.multiple": "혼합 단수 (JA)",
|
|
||||||
"modal.module.basic.setting.module.placement.mix.asg.yn.error": "혼합 설치 불가능한 모듈입니다. (JA)",
|
|
||||||
"modal.module.basic.setting.module.placement.mix.asg.yn": "ミックス. (JA)",
|
|
||||||
"modal.module.basic.setting.layoutpassivity.placement": "layout配置 (JA)"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1045,11 +1045,5 @@
|
|||||||
"chidory.can.not.install": "치조 불가 공법입니다.",
|
"chidory.can.not.install": "치조 불가 공법입니다.",
|
||||||
"module.layout.setup.max.count": "모듈의 최대 단수는 {0}, 최대 열수는 {1} 입니다.",
|
"module.layout.setup.max.count": "모듈의 최대 단수는 {0}, 최대 열수는 {1} 입니다.",
|
||||||
"module.layout.setup.max.count.multiple": "모듈 {0}번의 최대 단수는 {1}, 최대 열수는 {2} 입니다.",
|
"module.layout.setup.max.count.multiple": "모듈 {0}번의 최대 단수는 {1}, 최대 열수는 {2} 입니다.",
|
||||||
"roofAllocation.not.found": "할당할 지붕이 없습니다.",
|
"roofAllocation.not.found": "할당할 지붕이 없습니다."
|
||||||
"modal.module.basic.setting.module.placement.max.size.check": "지붕재별 모듈의 최대 단수. 혼합 최대 단수를 확인하십시오.",
|
|
||||||
"modal.module.basic.setting.module.placement.max.row": "최대 단수",
|
|
||||||
"modal.module.basic.setting.module.placement.max.rows.multiple": "혼합 단수",
|
|
||||||
"modal.module.basic.setting.module.placement.mix.asg.yn.error": "혼합 설치 불가능한 모듈입니다.",
|
|
||||||
"modal.module.basic.setting.module.placement.mix.asg.yn": "혼합",
|
|
||||||
"modal.module.basic.setting.layoutpassivity.placement": "레이아웃 배치"
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user