레이아웃설치 validation
This commit is contained in:
parent
9285caf422
commit
c704207d2f
@ -1249,6 +1249,34 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
addCanvasMouseEventListener('mouse:up', (e) => {
|
addCanvasMouseEventListener('mouse:up', (e) => {
|
||||||
if (!inside) return
|
if (!inside) return
|
||||||
|
|
||||||
|
//입력받은 값의 합
|
||||||
|
let sumRowCount = layoutSetupRef.reduce((acc, cur) => acc + cur.row, 0)
|
||||||
|
let sumColCount = layoutSetupRef.reduce((acc, cur) => acc + cur.col, 0)
|
||||||
|
let maxRow = 0
|
||||||
|
let maxCol = trestlePolygon.trestleDetail.moduleMaxCols
|
||||||
|
|
||||||
|
if (checkedModule.length > 1) {
|
||||||
|
//모듈이 여러개일때
|
||||||
|
maxRow = trestlePolygon.trestleDetail.moduleMaxRows
|
||||||
|
|
||||||
|
if (sumRowCount > maxRow || sumColCount > maxCol) {
|
||||||
|
swalFire({ text: getMessage('module.layout.setup.max.count', [maxRow, maxCol]) })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//모듈이 하나일때는 module에 list를 조회
|
||||||
|
const checkModuleId = checkedModule[0].itemId
|
||||||
|
const targetModuleRows = trestlePolygon.trestleDetail.module.find((item) => item.itemId === checkModuleId).modulemaxRows
|
||||||
|
const refOption = layoutSetupRef.find((item) => item.moduleId === checkModuleId)
|
||||||
|
|
||||||
|
sumRowCount = refOption.row
|
||||||
|
|
||||||
|
if (sumRowCount > targetModuleRows || sumColCount > maxCol) {
|
||||||
|
swalFire({ text: getMessage('module.layout.setup.max.count', [targetModuleRows, maxCol]) })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (tempModule) {
|
if (tempModule) {
|
||||||
let startX, startY
|
let startX, startY
|
||||||
let installedLastHeightCoord = 0 //마지막으로 설치된 모듈의 좌표
|
let installedLastHeightCoord = 0 //마지막으로 설치된 모듈의 좌표
|
||||||
|
|||||||
@ -1041,5 +1041,6 @@
|
|||||||
"modal.placement.initial.setting.plan.drawing.only.number": "(※数字は[半角]入力のみ可能です。)",
|
"modal.placement.initial.setting.plan.drawing.only.number": "(※数字は[半角]入力のみ可能です。)",
|
||||||
"wall.line.not.found": "外壁がありません",
|
"wall.line.not.found": "外壁がありません",
|
||||||
"roof.line.not.found": "屋根形状がありません",
|
"roof.line.not.found": "屋根形状がありません",
|
||||||
"roof.material.can.not.delete": "割り当てられた配置面があります。"
|
"roof.material.can.not.delete": "割り当てられた配置面があります。",
|
||||||
|
"module.layout.setup.max.count": "모듈의 최대 단수는 {0}, 최대 열수는 {1} 입니다. (JA)"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1041,5 +1041,6 @@
|
|||||||
"modal.placement.initial.setting.plan.drawing.only.number": "(※ 숫자는 [반각]입력만 가능합니다.)",
|
"modal.placement.initial.setting.plan.drawing.only.number": "(※ 숫자는 [반각]입력만 가능합니다.)",
|
||||||
"wall.line.not.found": "외벽선이 없습니다.",
|
"wall.line.not.found": "외벽선이 없습니다.",
|
||||||
"roof.line.not.found": "지붕형상이 없습니다.",
|
"roof.line.not.found": "지붕형상이 없습니다.",
|
||||||
"roof.material.can.not.delete": "할당된 배치면이 있습니다."
|
"roof.material.can.not.delete": "할당된 배치면이 있습니다.",
|
||||||
|
"module.layout.setup.max.count": "모듈의 최대 단수는 {0}, 최대 열수는 {1} 입니다."
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user