Compare commits
No commits in common. "a7868107b6f34313ce57a0dc7eb6eeec30532a2c" and "afa2da398e1843f1f390857b8182e7d0a3851bef" have entirely different histories.
a7868107b6
...
afa2da398e
@ -63,7 +63,6 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
|
|
||||||
const originCanvasViewPortTransform = useRef([])
|
const originCanvasViewPortTransform = useRef([])
|
||||||
const [isFold, setIsFold] = useState(false)
|
const [isFold, setIsFold] = useState(false)
|
||||||
const [showHiddenBasicSetting, setShowHiddenBasicSetting] = useState(true)
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
makers,
|
makers,
|
||||||
@ -109,14 +108,6 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
// 모듈/가대설정 팝업을 순간적으로 열었다가 닫아 초기화 로직 실행
|
|
||||||
useEffect(() => {
|
|
||||||
const timer = setTimeout(() => {
|
|
||||||
setShowHiddenBasicSetting(false)
|
|
||||||
}, 300)
|
|
||||||
return () => clearTimeout(timer)
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
// 모듈이 설치된 경우 rack설치 여부에 따라 설치 된 모듈 아래에 작은 모듈이 설치되어 있을 경우는 모듈 설치 메뉴 reopen
|
// 모듈이 설치된 경우 rack설치 여부에 따라 설치 된 모듈 아래에 작은 모듈이 설치되어 있을 경우는 모듈 설치 메뉴 reopen
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const modules = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE)
|
const modules = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE)
|
||||||
@ -1007,70 +998,63 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<WithDraggable isShow={true} pos={{ x: 50, y: 230 }} className="l-2">
|
||||||
{showHiddenBasicSetting && (
|
<WithDraggable.Header
|
||||||
<div style={{ display: 'none' }}>
|
title={getMessage('modal.circuit.trestle.setting')}
|
||||||
<BasicSetting id={`hidden-basic-${id}`} />
|
onClose={() => handleClose()}
|
||||||
</div>
|
isFold={isFold}
|
||||||
)}
|
onFold={() => setIsFold(!isFold)}
|
||||||
<WithDraggable isShow={true} pos={{ x: 50, y: 230 }} className="l-2">
|
/>
|
||||||
<WithDraggable.Header
|
<WithDraggable.Body>
|
||||||
title={getMessage('modal.circuit.trestle.setting')}
|
<div style={{ display: !(tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY) && isFold ? 'none' : 'block' }}>
|
||||||
onClose={() => handleClose()}
|
<div style={{ display: tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && isFold ? 'none' : 'block' }}>
|
||||||
isFold={isFold}
|
<div className="roof-module-tab">
|
||||||
onFold={() => setIsFold(!isFold)}
|
<div className={`module-tab-bx act`}>{getMessage('modal.circuit.trestle.setting.power.conditional.select')}</div>
|
||||||
/>
|
<span className={`tab-arr ${tabNum === 2 ? 'act' : ''}`}></span>
|
||||||
<WithDraggable.Body>
|
<div className={`module-tab-bx ${tabNum === 2 ? 'act' : ''}`}>
|
||||||
<div style={{ display: !(tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY) && isFold ? 'none' : 'block' }}>
|
{getMessage('modal.circuit.trestle.setting.circuit.allocation')}({getMessage('modal.circuit.trestle.setting.step.up.allocation')})
|
||||||
<div style={{ display: tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && isFold ? 'none' : 'block' }}>
|
|
||||||
<div className="roof-module-tab">
|
|
||||||
<div className={`module-tab-bx act`}>{getMessage('modal.circuit.trestle.setting.power.conditional.select')}</div>
|
|
||||||
<span className={`tab-arr ${tabNum === 2 ? 'act' : ''}`}></span>
|
|
||||||
<div className={`module-tab-bx ${tabNum === 2 ? 'act' : ''}`}>
|
|
||||||
{getMessage('modal.circuit.trestle.setting.circuit.allocation')}({getMessage('modal.circuit.trestle.setting.step.up.allocation')})
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{tabNum === 1 && allocationType === ALLOCATION_TYPE.AUTO && <PowerConditionalSelect {...powerConditionalSelectProps} />}
|
|
||||||
{tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && (
|
|
||||||
<PassivityCircuitAllocation {...passivityProps} ref={passivityCircuitAllocationRef} isFold={isFold} />
|
|
||||||
)}
|
|
||||||
{tabNum === 2 && <StepUp {...stepUpProps} onInitialize={handleStepUpInitialize} />}
|
|
||||||
</div>
|
</div>
|
||||||
|
{tabNum === 1 && allocationType === ALLOCATION_TYPE.AUTO && <PowerConditionalSelect {...powerConditionalSelectProps} />}
|
||||||
{tabNum === 1 && allocationType === ALLOCATION_TYPE.AUTO && (
|
|
||||||
<div className="grid-btn-wrap">
|
|
||||||
<button className="btn-frame modal mr5 act" onClick={() => onAutoRecommend()}>
|
|
||||||
{getMessage('modal.circuit.trestle.setting.circuit.allocation.auto')}
|
|
||||||
</button>
|
|
||||||
<button className="btn-frame modal act" onClick={() => onPassivityAllocation()}>
|
|
||||||
{getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity')}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && (
|
{tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && (
|
||||||
<div className="grid-btn-wrap">
|
<PassivityCircuitAllocation {...passivityProps} ref={passivityCircuitAllocationRef} isFold={isFold} />
|
||||||
<button className="btn-frame modal mr5 " onClick={() => onClickPrev()}>
|
|
||||||
{getMessage('modal.common.prev')}
|
|
||||||
</button>
|
|
||||||
<button className="btn-frame modal act" onClick={() => handleStepUp()}>
|
|
||||||
{getMessage('modal.circuit.trestle.setting.circuit.allocation')}({getMessage('modal.circuit.trestle.setting.step.up.allocation')})
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
{tabNum === 2 && (
|
{tabNum === 2 && <StepUp {...stepUpProps} onInitialize={handleStepUpInitialize} />}
|
||||||
<div className="grid-btn-wrap">
|
</div>
|
||||||
<button className="btn-frame modal mr5" onClick={() => onClickPrev()}>
|
|
||||||
{getMessage('modal.common.prev')}
|
{tabNum === 1 && allocationType === ALLOCATION_TYPE.AUTO && (
|
||||||
</button>
|
<div className="grid-btn-wrap">
|
||||||
{/* <button className="btn-frame modal act" onClick={() => apply()}> */}
|
<button className="btn-frame modal mr5 act" onClick={() => onAutoRecommend()}>
|
||||||
<button className="btn-frame modal act" onClick={onApply}>
|
{getMessage('modal.circuit.trestle.setting.circuit.allocation.auto')}
|
||||||
{getMessage('modal.common.save')}({getMessage('modal.circuit.trestle.setting.circuit.allocation')})
|
</button>
|
||||||
</button>
|
<button className="btn-frame modal act" onClick={() => onPassivityAllocation()}>
|
||||||
</div>
|
{getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity')}
|
||||||
)}
|
</button>
|
||||||
</WithDraggable.Body>
|
</div>
|
||||||
</WithDraggable>
|
)}
|
||||||
</>
|
{tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && (
|
||||||
|
<div className="grid-btn-wrap">
|
||||||
|
<button className="btn-frame modal mr5 " onClick={() => onClickPrev()}>
|
||||||
|
{getMessage('modal.common.prev')}
|
||||||
|
</button>
|
||||||
|
<button className="btn-frame modal act" onClick={() => handleStepUp()}>
|
||||||
|
{getMessage('modal.circuit.trestle.setting.circuit.allocation')}({getMessage('modal.circuit.trestle.setting.step.up.allocation')})
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{tabNum === 2 && (
|
||||||
|
<div className="grid-btn-wrap">
|
||||||
|
<button className="btn-frame modal mr5" onClick={() => onClickPrev()}>
|
||||||
|
{getMessage('modal.common.prev')}
|
||||||
|
</button>
|
||||||
|
{/* <button className="btn-frame modal act" onClick={() => apply()}> */}
|
||||||
|
<button className="btn-frame modal act" onClick={onApply}>
|
||||||
|
{getMessage('modal.common.save')}({getMessage('modal.circuit.trestle.setting.circuit.allocation')})
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</WithDraggable.Body>
|
||||||
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user