단위테스트(Unit Test) #532, 21. 단위테스트(Unit Test) #537 작업중

This commit is contained in:
yjnoh 2025-02-03 15:10:20 +09:00
parent 2a0ae14b3d
commit af56c18704
12 changed files with 191 additions and 115 deletions

View File

@ -1,6 +1,6 @@
import { useMessage } from '@/hooks/useMessage' import { useMessage } from '@/hooks/useMessage'
import WithDraggable from '@/components/common/draggable/WithDraggable' import WithDraggable from '@/components/common/draggable/WithDraggable'
import { useEffect, useRef, useState } from 'react' import { useContext, useEffect, useRef, useState } from 'react'
import Module from '@/components/floor-plan/modal/basic/step/Module' import Module from '@/components/floor-plan/modal/basic/step/Module'
import PitchModule from '@/components/floor-plan/modal/basic/step/pitch/PitchModule' import PitchModule from '@/components/floor-plan/modal/basic/step/pitch/PitchModule'
import PitchPlacement from '@/components/floor-plan/modal/basic/step/pitch/PitchPlacement' import PitchPlacement from '@/components/floor-plan/modal/basic/step/pitch/PitchPlacement'
@ -16,6 +16,9 @@ import { addedRoofsState } from '@/store/settingAtom'
import { isObjectNotEmpty } from '@/util/common-utils' import { isObjectNotEmpty } from '@/util/common-utils'
import Swal from 'sweetalert2' import Swal from 'sweetalert2'
import { useCanvasPopupStatusController } from '@/hooks/common/useCanvasPopupStatusController' import { useCanvasPopupStatusController } from '@/hooks/common/useCanvasPopupStatusController'
import { useMasterController } from '@/hooks/common/useMasterController'
import { loginUserStore } from '@/store/commonAtom'
import { currentCanvasPlanState } from '@/store/canvasAtom'
export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) { export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
const { getMessage } = useMessage() const { getMessage } = useMessage()
@ -27,9 +30,12 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
const [isManualModuleSetup, setIsManualModuleSetup] = useRecoilState(isManualModuleSetupState) const [isManualModuleSetup, setIsManualModuleSetup] = useRecoilState(isManualModuleSetupState)
const moduleSelectionData = useRecoilValue(moduleSelectionDataState) const moduleSelectionData = useRecoilValue(moduleSelectionDataState)
const addedRoofs = useRecoilValue(addedRoofsState) const addedRoofs = useRecoilValue(addedRoofsState)
const loginUserState = useRecoilValue(loginUserStore)
const currentCanvasPlan = useRecoilValue(currentCanvasPlanState)
// const { initEvent } = useContext(EventContext) // const { initEvent } = useContext(EventContext)
const { manualModuleSetup, autoModuleSetup, manualFlatroofModuleSetup, autoFlatroofModuleSetup } = useModuleBasicSetting() const { manualModuleSetup, autoModuleSetup, manualFlatroofModuleSetup, autoFlatroofModuleSetup } = useModuleBasicSetting()
const { updateObjectDate } = useMasterController()
const handleBtnNextStep = () => { const handleBtnNextStep = () => {
if (tabNum === 1) { if (tabNum === 1) {
orientationRef.current.handleNextStep() orientationRef.current.handleNextStep()
@ -49,6 +55,16 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
}) })
return return
} }
//
updateObjectDataApi({
objectNo: currentCanvasPlan.objectNo, //_no
standardWindSpeedId: moduleSelectionData.common.stdWindSpeed, //
verticalSnowCover: moduleSelectionData.common.stdSnowLd, //
surfaceType: moduleSelectionData.common.illuminationTpNm, //
installHeight: moduleSelectionData.common.instHt, //
userId: loginUserState.userId, //
})
} }
setTabNum(tabNum + 1) setTabNum(tabNum + 1)
@ -72,6 +88,10 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
manualModuleSetup() manualModuleSetup()
}, [isManualModuleSetup]) }, [isManualModuleSetup])
const updateObjectDataApi = async (params) => {
const res = await updateObjectDate(params)
}
return ( return (
<WithDraggable isShow={true} pos={pos}> <WithDraggable isShow={true} pos={pos}>
<div className={`modal-pop-wrap lx-2`}> <div className={`modal-pop-wrap lx-2`}>

View File

@ -1,4 +1,4 @@
import { useState } from 'react' import { useState, useEffect } from 'react'
import { useMessage } from '@/hooks/useMessage' import { useMessage } from '@/hooks/useMessage'
import { isObjectNotEmpty } from '@/util/common-utils' import { isObjectNotEmpty } from '@/util/common-utils'
import QSelectBox from '@/components/common/select/QSelectBox' import QSelectBox from '@/components/common/select/QSelectBox'
@ -15,6 +15,7 @@ export default function ModuleTabContents({ tabIndex, addRoof, setAddedRoofs, ro
roofBaseList, roofBaseList,
constructionList, constructionList,
globalPitchText, globalPitchText,
selectedRaftBase,
selectedTrestle, selectedTrestle,
selectedConstMthd, selectedConstMthd,
selectedRoofBase, selectedRoofBase,
@ -27,8 +28,7 @@ export default function ModuleTabContents({ tabIndex, addRoof, setAddedRoofs, ro
hajebichi, hajebichi,
lengthRef, lengthRef,
hajebichiRef, hajebichiRef,
setLengthBase, handleHajebichiAndLength,
setHajebichi,
handleChangeRaftBase, handleChangeRaftBase,
handleChangeTrestle, handleChangeTrestle,
handleChangeConstMthd, handleChangeConstMthd,
@ -59,7 +59,7 @@ export default function ModuleTabContents({ tabIndex, addRoof, setAddedRoofs, ro
type="text" type="text"
className="input-origin block" className="input-origin block"
value={lengthBase} value={lengthBase}
onChange={(e) => setLengthBase(e.target.value)} onChange={(e) => handleHajebichiAndLength(e, 'length')}
disabled={roofMaterial.lenAuth === 'R' ? true : false} disabled={roofMaterial.lenAuth === 'R' ? true : false}
ref={lengthRef} ref={lengthRef}
/> />
@ -77,9 +77,9 @@ export default function ModuleTabContents({ tabIndex, addRoof, setAddedRoofs, ro
{raftCodes.length > 0 && ( {raftCodes.length > 0 && (
<QSelectBox <QSelectBox
options={raftCodes} options={raftCodes}
value={addRoof} value={selectedRaftBase}
sourceKey={'clCode'} sourceKey={'clCode'}
targetKey={'raftBaseCd'} targetKey={'clCode'}
showKey={'clCodeNm'} showKey={'clCodeNm'}
disabled={roofMaterial.raftAuth === 'R' ? true : false} disabled={roofMaterial.raftAuth === 'R' ? true : false}
onChange={handleChangeRaftBase} onChange={handleChangeRaftBase}
@ -100,7 +100,7 @@ export default function ModuleTabContents({ tabIndex, addRoof, setAddedRoofs, ro
type="text" type="text"
className="input-origin block" className="input-origin block"
disabled={roofMaterial.roofPchAuth === 'R' ? true : false} disabled={roofMaterial.roofPchAuth === 'R' ? true : false}
onChange={(e) => setHajebichi(e.target.value)} onChange={(e) => handleHajebichiAndLength(e, 'hajebichi')}
value={hajebichi} value={hajebichi}
ref={hajebichiRef} ref={hajebichiRef}
/> />

View File

@ -57,10 +57,6 @@ const Placement = forwardRef((props, refs) => {
refs.isChidori.current = e.target.value refs.isChidori.current = e.target.value
} }
useEffect(() => {
console.log('isChidori', isChidori)
}, [isChidori])
const handleSetupLocation = (e) => { const handleSetupLocation = (e) => {
setSetupLocation(e.target.value) setSetupLocation(e.target.value)
refs.setupLocation.current = e.target.value refs.setupLocation.current = e.target.value
@ -81,6 +77,20 @@ const Placement = forwardRef((props, refs) => {
setSelectedItems({ ...selectedItems, [e.target.name]: e.target.checked }) setSelectedItems({ ...selectedItems, [e.target.name]: e.target.checked })
} }
useEffect(() => {
if (moduleSelectionData && moduleSelectionData.module.itemList.length > 0) {
let initCheckedModule = {}
moduleSelectionData.module.itemList.forEach((obj, index) => {
if (index === 0) {
initCheckedModule = { [obj.itemId]: true }
} else {
initCheckedModule = { ...initCheckedModule, [obj.itemId]: true }
}
})
setSelectedItems(initCheckedModule)
}
}, [])
return ( return (
<> <>
<div className="module-table-flex-wrap mb10"> <div className="module-table-flex-wrap mb10">
@ -111,7 +121,13 @@ const Placement = forwardRef((props, refs) => {
<tr key={index}> <tr key={index}>
<td className="al-c"> <td className="al-c">
<div className="d-check-box no-text pop"> <div className="d-check-box no-text pop">
<input type="checkbox" id={item.itemId} name={item.itemId} onChange={handleSelectedItem} /> <input
type="checkbox"
id={item.itemId}
name={item.itemId}
checked={selectedItems[item.itemId]}
onChange={handleSelectedItem}
/>
<label htmlFor={item.itemId}></label> <label htmlFor={item.itemId}></label>
</div> </div>
</td> </td>

View File

@ -301,6 +301,8 @@ export function useCommonUtils() {
...commonUtilsState, ...commonUtilsState,
dimension: false, dimension: false,
}) })
initEvent()
} }
// 캔버스 다시 그리기 // 캔버스 다시 그리기

View File

@ -12,7 +12,7 @@ import { useRecoilValue } from 'recoil'
* @returns * @returns
*/ */
export function useMasterController() { export function useMasterController() {
const { get, post } = useAxios() const { get, post, put } = useAxios()
const { getMessage } = useMessage() const { getMessage } = useMessage()
const { swalFire } = useSwal() const { swalFire } = useSwal()
@ -216,6 +216,18 @@ export function useMasterController() {
}) })
} }
/**
* 물건 정보 업데이트 api 호출
* @param {objectNo standardWindSpeedId verticalSnowCover surfaceType installHeight userId} params
* @param {물건번호 기준풍속코드 적설량 면조도구분 설치높이 작성자아아디 } params
* @returns
*/
const updateObjectDate = async (params = null) => {
return await put({ url: '/api/object/update-object-date', data: params }).then((res) => {
return res
})
}
return { return {
getRoofMaterialList, getRoofMaterialList,
getModuleTypeItemList, getModuleTypeItemList,
@ -228,5 +240,6 @@ export function useMasterController() {
getPcsVoltageChk, getPcsVoltageChk,
getPcsManualConfChk, getPcsManualConfChk,
getPcsVoltageStepUpList, getPcsVoltageStepUpList,
updateObjectDate,
} }
} }

View File

@ -394,6 +394,8 @@ export function useModuleBasicSetting() {
return return
} }
console.log('placementRef', placementRef)
const isChidori = placementRef.isChidori.current === 'true' ? true : false const isChidori = placementRef.isChidori.current === 'true' ? true : false
const setupLocation = placementRef.setupLocation.current const setupLocation = placementRef.setupLocation.current
const isMaxSetup = placementRef.isMaxSetup.current === 'true' ? true : false const isMaxSetup = placementRef.isMaxSetup.current === 'true' ? true : false

View File

@ -71,12 +71,16 @@ export function useModulePlace() {
.forEach((roof) => { .forEach((roof) => {
const roofIndex = roof.roofMaterial.index //지붕의 지붕재의 순번 const roofIndex = roof.roofMaterial.index //지붕의 지붕재의 순번
trestleDetailList.forEach((detail) => { trestleDetailList.forEach((detail) => {
if (Number(detail.data.roofIndex) === roofIndex) { if (detail.data !== null) {
//roof에 상세 데이터 추가 if (Number(detail.data.roofIndex) === roofIndex) {
roof.set({ trestleDetail: detail.data }) //roof에 상세 데이터 추가
//배치면 설치 영역 roof.set({ trestleDetail: detail.data })
makeModuleInstArea(roof, detail.data) //배치면 설치 영역
//surface에 상세 데이터 추가 makeModuleInstArea(roof, detail.data)
//surface에 상세 데이터 추가
} else {
console.log('가대 데이터가 없네요...')
}
} }
}) })
}) })

View File

@ -37,6 +37,7 @@ export function useModuleSelection(props) {
bindInitData() bindInitData()
const initParams = { const initParams = {
illuminationTp: managementState?.surfaceTypeValue, //면조도 illuminationTp: managementState?.surfaceTypeValue, //면조도
illuminationTpNm: managementState?.surfaceType, //면조도명
instHt: managementState?.installHeight, //설치높이 instHt: managementState?.installHeight, //설치높이
stdWindSpeed: managementState?.standardWindSpeedId, //기준풍속 stdWindSpeed: managementState?.standardWindSpeedId, //기준풍속
stdSnowLd: managementState?.verticalSnowCover, //기준적설량 stdSnowLd: managementState?.verticalSnowCover, //기준적설량
@ -119,6 +120,7 @@ export function useModuleSelection(props) {
setModuleSelectionInitParams({ setModuleSelectionInitParams({
...moduleSelectionInitParams, ...moduleSelectionInitParams,
illuminationTp: option.clCode, illuminationTp: option.clCode,
illuminationTpNm: option.clCodeNm,
}) })
setManagementState({ setManagementState({

View File

@ -59,9 +59,10 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
const handleChangeRaftBase = (option) => { const handleChangeRaftBase = (option) => {
setSelectedRaftBase(option) setSelectedRaftBase(option)
setTrestleParams({ ...trestleParams, raftBaseCd: option.clCode }) //가대메이커 setTrestleParams({ ...trestleParams, raftBaseCd: option.clCode }) //가대메이커
setConstMthdList([]) //공법 초기화 // setConstMthdList([]) //공법 초기화
setRoofBaseList([]) //지붕밑바탕 초기화 // setRoofBaseList([]) //지붕밑바탕 초기화
setConstructionList([]) //공법 초기화 // setConstructionList([]) //공법 초기화
resetSelected()
} }
//처마력바 체크 //처마력바 체크
@ -85,7 +86,7 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
useEffect(() => { useEffect(() => {
setHajebichi(addRoof.hajebichi) setHajebichi(addRoof.hajebichi)
setLengthBase(addRoof.lenBase) setLengthBase(addRoof.length)
// 202600 경사도 // 202600 경사도
const raftCodeList = findCommonCode('203800') const raftCodeList = findCommonCode('203800')
@ -96,7 +97,13 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
}) })
setRaftCodes(raftCodeList) setRaftCodes(raftCodeList)
console.log('moduleSelectionData', moduleSelectionData) if (addRoof.raft) {
setSelectedRaftBase({
...selectedRaftBase,
raftBaseCd: addRoof.raft,
clCode: addRoof.raft,
})
}
}, []) }, [])
//리코일에 데이터가 담기는 시점에 시작 //리코일에 데이터가 담기는 시점에 시작
@ -116,38 +123,18 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
} }
}, [moduleConstructionSelectionData]) }, [moduleConstructionSelectionData])
//높이를 변경하면 addRoofs에 적용
// useEffect(() => { // useEffect(() => {
// const copyAddRoof = { ...addRoof } // if (isExistData) {
// copyAddRoof.length = Number(lengthBase) // setConstructionListParams({
// copyAddRoof.lenBase = lengthBase // ...moduleSelectionInitParams,
// const index = addRoof.index // ...roofBaseParams,
// const newArray = [...addRoofsArray.slice(0, index), copyAddRoof, ...addRoofsArray.slice(index + 1)] // roofBaseCd: selectedRoofBase.roofBaseCd,
// setAddedRoofs(newArray) // inclCd: addRoof.pitch,
// }, [lengthBase]) // roofPitch: hajebichiRef.current ? hajebichiRef.current.value : 0,
// raftBaseCd: selectedRaftBase.raftBaseCd ? selectedRaftBase.raftBaseCd : '',
// //망둥어 피치를 변경하면 addRoof 변경 // })
// useEffect(() => { // }
// const copyAddRoof = { ...addRoof } // }, [selectedRoofBase])
// copyAddRoof.hajebichi = Number(hajebichi)
// copyAddRoof.roofPchBase = hajebichi
// const index = addRoof.index
// const newArray = [...addRoofsArray.slice(0, index), copyAddRoof, ...addRoofsArray.slice(index + 1)]
// setAddedRoofs(newArray)
// }, [hajebichi])
useEffect(() => {
if (isExistData) {
setConstructionListParams({
...moduleSelectionInitParams,
...roofBaseParams,
roofBaseCd: selectedRoofBase.roofBaseCd,
inclCd: addRoof.pitch,
roofPitch: hajebichiRef.current ? hajebichiRef.current.value : 0,
raftBaseCd: addRoof.raftBaseCd,
})
}
}, [selectedRoofBase])
useEffect(() => { useEffect(() => {
if ( if (
@ -172,7 +159,7 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
setTrestleParams({ setTrestleParams({
moduleTpCd: selectedModules.itemTp, moduleTpCd: selectedModules.itemTp,
roofMatlCd: addRoof.roofMatlCd, roofMatlCd: addRoof.roofMatlCd,
raftBaseCd: addRoof.raftBaseCd, raftBaseCd: selectedRaftBase.raftBaseCd ? selectedRaftBase.raftBaseCd : '',
workingWidth: lengthBase, workingWidth: lengthBase,
}) })
} }
@ -222,7 +209,7 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
roofBaseCd: option.roofBaseCd, roofBaseCd: option.roofBaseCd,
inclCd: addRoof.pitch, inclCd: addRoof.pitch,
roofPitch: hajebichiRef.current ? hajebichiRef.current.value : 0, roofPitch: hajebichiRef.current ? hajebichiRef.current.value : 0,
raftBaseCd: addRoof.raftBaseCd, raftBaseCd: selectedRaftBase.clCode ? selectedRaftBase.clCode : '',
roofMatlCd: addRoof.roofMatlCd, roofMatlCd: addRoof.roofMatlCd,
}) })
setSelectedRoofBase(option) setSelectedRoofBase(option)
@ -309,29 +296,36 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
} }
}, [selectedConstruction]) }, [selectedConstruction])
//거대메이커, 공법, 지붕밑바탕 api 조회
const getModuleOptionsListData = async (params, type) => { const getModuleOptionsListData = async (params, type) => {
const optionsList = await getTrestleList(params) const optionsList = await getTrestleList(params)
if (optionsList.data.length > 0) { if (optionsList.data.length > 0) {
if (type === 'trestle') { if (type === 'trestle') {
setTrestleList(optionsList.data) //가대 메이커일때
setTrestleList(optionsList.data) //가대 목록
if (isExistData) { if (isExistData) {
//데이터가 있으면 선택된 가대 메이커를 선택한다
handleChangeTrestle(moduleConstructionSelectionData?.trestle) handleChangeTrestle(moduleConstructionSelectionData?.trestle)
} else { } else {
setConstMthdList([]) setConstMthdList([]) //공법 목록 초기화
setRoofBaseList([]) setRoofBaseList([]) //지붕밑바탕 목록 초기화
} }
} else if (type === 'construction') { } else if (type === 'construction') {
setConstMthdList(optionsList.data) //공법일때
setConstMthdList(optionsList.data) //공법 목록
if (isExistData) { if (isExistData) {
//데이터가 있으면 선택된 공법을 선택한다
handleChangeConstMthd(moduleConstructionSelectionData?.trestle) handleChangeConstMthd(moduleConstructionSelectionData?.trestle)
} else { } else {
setRoofBaseList([]) setRoofBaseList([]) //지붕밑바탕 목록 초기화
} }
} else if (type === 'roofBase') { } else if (type === 'roofBase') {
setRoofBaseList(optionsList.data) //지붕밑바탕일때
setRoofBaseList(optionsList.data) //지붕밑바탕 목록
if (isExistData) { if (isExistData) {
handleChangeRoofBase(moduleConstructionSelectionData?.trestle) //데이터가 있으면 선택된 지붕밑바탕을 선택한다
handleChangeRoofBase(moduleConstructionSelectionData?.trestle) //선택된 지붕밑바탕을 선택한다
} }
} }
} }
@ -342,51 +336,64 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
if (moduleSelectionInitOriginData.current.moduleItemId && moduleSelectionInitOriginData.current.moduleTpCd) { if (moduleSelectionInitOriginData.current.moduleItemId && moduleSelectionInitOriginData.current.moduleTpCd) {
//초기에 들어온 데이터가 수정된 데이터가 값이 다르다면` //초기에 들어온 데이터가 수정된 데이터가 값이 다르다면`
if (!isEqualObjects(moduleSelectionInitOriginData.current, moduleSelectionInitParams)) { if (!isEqualObjects(moduleSelectionInitOriginData.current, moduleSelectionInitParams)) {
//가대 선택 초기화 resetSelected()
setSelectedTrestle({})
//공법 선택 초기화
setSelectedConstMthd({})
//지붕밑바탕 선택 초기화
setSelectedRoofBase({})
//공법 리스트 초기화
setConstructionList([])
// 기본 정보 초기화
setModuleSelectionData({
...moduleSelectionData,
roofConstructions: [],
})
// 선택 데이터 초 기화
setModuleConstructionSelectionData({
addRoof: addRoof,
trestle: {},
construction: {},
})
//임시 데이터 초기화
setTempModuleSelectionData({
...moduleSelectionData,
roofConstructions: [],
})
//처마커버 해제
setCvrChecked(false)
//눈막이금구 해제
setSnowGdChecked(false)
// 데이터 없음으로 변경
setIsExistData(false)
//변경된 데이터를 ref에 저장
moduleSelectionInitOriginData.current = moduleSelectionInitParams
} }
} }
}, [moduleSelectionInitParams]) }, [moduleSelectionInitParams])
const handleHajebichiAndLength = (e, type) => {
if (type === 'length') {
setLengthBase(e.target.value)
} else {
setHajebichi(e.target.value)
}
resetSelected()
}
const resetSelected = () => {
//가대 선택 초기화
setSelectedTrestle({})
//공법 선택 초기화
setSelectedConstMthd({})
//지붕밑바탕 선택 초기화
setSelectedRoofBase({})
//공법 리스트 초기화
setConstructionList([])
// 기본 정보 초기화
setModuleSelectionData({
...moduleSelectionData,
roofConstructions: [],
})
// 선택 데이터 초 기화
setModuleConstructionSelectionData({
addRoof: addRoof,
trestle: {},
construction: {},
})
//임시 데이터 초기화
setTempModuleSelectionData({
...moduleSelectionData,
roofConstructions: [],
})
//처마커버 해제
setCvrChecked(false)
//눈막이금구 해제
setSnowGdChecked(false)
// 데이터 없음으로 변경
setIsExistData(false)
//변경된 데이터를 ref에 저장
moduleSelectionInitOriginData.current = moduleSelectionInitParams
}
return { return {
raftCodes, raftCodes,
trestleList, trestleList,
@ -394,6 +401,7 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
roofBaseList, roofBaseList,
constructionList, constructionList,
globalPitchText, globalPitchText,
selectedRaftBase,
selectedTrestle, selectedTrestle,
selectedConstMthd, selectedConstMthd,
selectedRoofBase, selectedRoofBase,
@ -406,8 +414,7 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
hajebichi, hajebichi,
lengthRef, lengthRef,
hajebichiRef, hajebichiRef,
setLengthBase, handleHajebichiAndLength,
setHajebichi,
handleChangeRaftBase, handleChangeRaftBase,
handleChangeTrestle, handleChangeTrestle,
handleChangeConstMthd, handleChangeConstMthd,

View File

@ -200,12 +200,8 @@ export function useSurfaceShapeBatch() {
} }
} }
if (surfaceId === 18) { if (surfaceId === 18) {
if (length1 >= length2) { if (length2 >= length3) {
swalFire({ text: getMessage('surface.shape.validate.size.1to2'), icon: 'error' }) swalFire({ text: getMessage('surface.shape.validate.size.3to2'), icon: 'error' })
check = false
}
if (length4 >= length3) {
swalFire({ text: getMessage('surface.shape.validate.size.3to4'), icon: 'error' })
check = false check = false
} }
} }
@ -242,7 +238,7 @@ export function useSurfaceShapeBatch() {
swalFire({ text: getMessage('common.canvas.validate.size'), icon: 'error' }) swalFire({ text: getMessage('common.canvas.validate.size'), icon: 'error' })
check = false check = false
} }
if (surfaceId === 9 || surfaceId === 10 || surfaceId === 11) { if (surfaceId === 9 || surfaceId === 10) {
if (length2 + length3 >= length1) { if (length2 + length3 >= length1) {
swalFire({ text: getMessage('surface.shape.validate.size.1to23'), icon: 'error' }) swalFire({ text: getMessage('surface.shape.validate.size.1to23'), icon: 'error' })
check = false check = false
@ -253,6 +249,17 @@ export function useSurfaceShapeBatch() {
} }
} }
if (surfaceId === 11) {
if (length1 > length2 + length3) {
swalFire({ text: getMessage('surface.shape.validate.size.1to23low'), icon: 'error' })
check = false
}
if (length5 >= length4) {
swalFire({ text: getMessage('surface.shape.validate.size.4to5'), icon: 'error' })
check = false
}
}
if (surfaceId === 14) { if (surfaceId === 14) {
if (length2 + length3 >= length1) { if (length2 + length3 >= length1) {
swalFire({ text: getMessage('surface.shape.validate.size.1to23'), icon: 'error' }) swalFire({ text: getMessage('surface.shape.validate.size.1to23'), icon: 'error' })

View File

@ -851,6 +851,7 @@
"surface.shape.validate.size.1to2": "①길이는 ②보다 큰 값을 넣어주세요.", "surface.shape.validate.size.1to2": "①길이는 ②보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.1to3": "①길이는 ③보다 큰 값을 넣어주세요.", "surface.shape.validate.size.1to3": "①길이는 ③보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.1to23": "①길이는 ②+③보다 큰 값을 넣어주세요.", "surface.shape.validate.size.1to23": "①길이는 ②+③보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.1to23low": "①길이는 ②+③보다 클 수 없습니다..",
"surface.shape.validate.size.2to3": "②길이는 ③보다 큰 값을 넣어주세요.", "surface.shape.validate.size.2to3": "②길이는 ③보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.3to4": "③길이는 ④보다 큰 값을 넣어주세요.", "surface.shape.validate.size.3to4": "③길이는 ④보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.4to5": "④길이는 ⑤보다 큰 값을 넣어주세요.", "surface.shape.validate.size.4to5": "④길이는 ⑤보다 큰 값을 넣어주세요.",

View File

@ -856,7 +856,9 @@
"surface.shape.validate.size.1to2": "①길이는 ②보다 큰 값을 넣어주세요.", "surface.shape.validate.size.1to2": "①길이는 ②보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.1to3": "①길이는 ③보다 큰 값을 넣어주세요.", "surface.shape.validate.size.1to3": "①길이는 ③보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.1to23": "①길이는 ②+③보다 큰 값을 넣어주세요.", "surface.shape.validate.size.1to23": "①길이는 ②+③보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.1to23low": "②+③길이는 ①보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.2to3": "②길이는 ③보다 큰 값을 넣어주세요.", "surface.shape.validate.size.2to3": "②길이는 ③보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.3to2": "③길이는 ②보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.3to4": "③길이는 ④보다 큰 값을 넣어주세요.", "surface.shape.validate.size.3to4": "③길이는 ④보다 큰 값을 넣어주세요.",
"surface.shape.validate.size.4to5": "④길이는 ⑤보다 큰 값을 넣어주세요.", "surface.shape.validate.size.4to5": "④길이는 ⑤보다 큰 값을 넣어주세요.",
"estimate.detail.header.title": "기본정보", "estimate.detail.header.title": "기본정보",