자동할당일 때 모듈의 회로 정보 초기화 적용 및 API 오류 시 메시지 처리

This commit is contained in:
changkyu choi 2025-02-13 11:33:23 +09:00
parent 4a8ebe19af
commit 734636adad
2 changed files with 17 additions and 3 deletions

View File

@ -178,7 +178,11 @@ export default function CircuitTrestleSetting({ id }) {
...params,
pcsItemList: getSelectedPcsItemList(),
}).then((res) => {
setTabNum(2)
if (res?.result.resultCode === 'S' && res?.data) {
setTabNum(2)
} else {
swalFire({ text: getMessage('common.message.send.error') })
}
})
} else {
swalFire({

View File

@ -56,9 +56,19 @@ export default function StepUp(props) {
// }
useEffect(() => {
console.log(allocationType)
if (allocationType === 'auto') {
//
canvas
.getObjects()
.filter((obj) => obj.name === POLYGON_TYPE.MODULE)
.forEach((module) => {
module.circuit = null
module.circuitNumber = null
module.pcsItemId = null
})
canvas.renderAll()
// PCS
fetchAutoStepUpData()
} else {