Compare commits
No commits in common. "42079d3edff3ed94a9dacd09114f626d00f0c283" and "37a9a70e99a90ff3fdf4eea6c61f4d9f77a8c4fe" have entirely different histories.
42079d3edf
...
37a9a70e99
@ -124,9 +124,6 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
*/
|
*/
|
||||||
const validateModuleSizeForRack = (surface) => {
|
const validateModuleSizeForRack = (surface) => {
|
||||||
const { modules, direction, trestleDetail } = surface
|
const { modules, direction, trestleDetail } = surface
|
||||||
if (!trestleDetail) {
|
|
||||||
return true // 상세 정보 없음
|
|
||||||
}
|
|
||||||
const { rackYn, moduleIntvlHor, moduleIntvlVer } = trestleDetail
|
const { rackYn, moduleIntvlHor, moduleIntvlVer } = trestleDetail
|
||||||
|
|
||||||
if (rackYn === 'N' || !modules || modules.length < 2) {
|
if (rackYn === 'N' || !modules || modules.length < 2) {
|
||||||
|
|||||||
@ -749,7 +749,7 @@ export function useModule() {
|
|||||||
const copyModules = []
|
const copyModules = []
|
||||||
const moduleSetupSurface = canvas.getObjects().find((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE && obj.id === activeModule.surfaceId)
|
const moduleSetupSurface = canvas.getObjects().find((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE && obj.id === activeModule.surfaceId)
|
||||||
let isWarning = false
|
let isWarning = false
|
||||||
const { moduleIntvlHor = 0, moduleIntvlVer = 0 } = moduleSetupSurface.trestleDetail || {}
|
const { moduleIntvlHor, moduleIntvlVer } = moduleSetupSurface.trestleDetail
|
||||||
canvas.discardActiveObject()
|
canvas.discardActiveObject()
|
||||||
targetModules.forEach((module) => {
|
targetModules.forEach((module) => {
|
||||||
const { top, left } = getPosotion(module, type, moduleIntvlHor, true)
|
const { top, left } = getPosotion(module, type, moduleIntvlHor, true)
|
||||||
@ -859,7 +859,7 @@ export function useModule() {
|
|||||||
const copyModules = []
|
const copyModules = []
|
||||||
const moduleSetupSurface = canvas.getObjects().find((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE && obj.id === activeModule.surfaceId)
|
const moduleSetupSurface = canvas.getObjects().find((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE && obj.id === activeModule.surfaceId)
|
||||||
let isWarning = false
|
let isWarning = false
|
||||||
const { moduleIntvlHor = 0, moduleIntvlVer = 0 } = moduleSetupSurface.trestleDetail || {}
|
const { moduleIntvlHor, moduleIntvlVer } = moduleSetupSurface.trestleDetail
|
||||||
canvas.discardActiveObject()
|
canvas.discardActiveObject()
|
||||||
targetModules.forEach((module) => {
|
targetModules.forEach((module) => {
|
||||||
const { top, left } = getPosotion(module, type, moduleIntvlVer, true)
|
const { top, left } = getPosotion(module, type, moduleIntvlVer, true)
|
||||||
|
|||||||
@ -338,27 +338,10 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
let isNorth = false
|
let isNorth = false
|
||||||
const defaultTrestleDetail = {
|
|
||||||
rackYn: 'N',
|
|
||||||
moduleIntvlHor: +roofSizeSet === 3 ? 300 : 0,
|
|
||||||
moduleIntvlVer: +roofSizeSet === 3 ? 100 : 0,
|
|
||||||
rack: null,
|
|
||||||
rackQty: 0,
|
|
||||||
rackIntvlPct: 0,
|
|
||||||
cvrPlvrYn: 'N',
|
|
||||||
lessSupFitIntvlPct: 0,
|
|
||||||
lessSupFitQty: 0,
|
|
||||||
}
|
|
||||||
|
|
||||||
const isExistSurface = canvas.getObjects().find((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE && obj.parentId === roof.id)
|
const isExistSurface = canvas.getObjects().find((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE && obj.parentId === roof.id)
|
||||||
const normalizedTrestleDetail = trestleDetail
|
|
||||||
? { ...defaultTrestleDetail, ...trestleDetail }
|
|
||||||
: isExistSurface?.trestleDetail
|
|
||||||
? { ...defaultTrestleDetail, ...isExistSurface.trestleDetail }
|
|
||||||
: defaultTrestleDetail
|
|
||||||
|
|
||||||
if (isExistSurface) {
|
if (isExistSurface) {
|
||||||
isExistSurface.set({ trestleDetail: normalizedTrestleDetail })
|
|
||||||
if (canvasSetting.roofSizeSet != '3') {
|
if (canvasSetting.roofSizeSet != '3') {
|
||||||
//북면이 있지만
|
//북면이 있지만
|
||||||
if (roof.directionText && roof.directionText.indexOf('北') > -1) {
|
if (roof.directionText && roof.directionText.indexOf('北') > -1) {
|
||||||
@ -441,7 +424,7 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
originY: 'center',
|
originY: 'center',
|
||||||
modules: [],
|
modules: [],
|
||||||
roofMaterial: roof.roofMaterial,
|
roofMaterial: roof.roofMaterial,
|
||||||
trestleDetail: normalizedTrestleDetail,
|
trestleDetail: trestleDetail,
|
||||||
isNorth: isNorth,
|
isNorth: isNorth,
|
||||||
perPixelTargetFind: true,
|
perPixelTargetFind: true,
|
||||||
isSaleStoreNorthFlg: moduleSelectionData.common.saleStoreNorthFlg == '1' ? true : false, //북면설치가능점 여부
|
isSaleStoreNorthFlg: moduleSelectionData.common.saleStoreNorthFlg == '1' ? true : false, //북면설치가능점 여부
|
||||||
|
|||||||
@ -65,10 +65,6 @@ export const useTrestle = () => {
|
|||||||
if (+roofSizeSet === 3) {
|
if (+roofSizeSet === 3) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const trestleDetail = surface.trestleDetail
|
|
||||||
if (!trestleDetail) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const construction = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex).construction
|
const construction = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex).construction
|
||||||
if (!construction) {
|
if (!construction) {
|
||||||
return
|
return
|
||||||
@ -80,8 +76,8 @@ export const useTrestle = () => {
|
|||||||
let isSnowGuard = construction.setupSnowCover
|
let isSnowGuard = construction.setupSnowCover
|
||||||
let cvrLmtRow = construction.cvrLmtRow
|
let cvrLmtRow = construction.cvrLmtRow
|
||||||
const direction = parent.direction
|
const direction = parent.direction
|
||||||
const rack = trestleDetail.rack
|
const rack = surface.trestleDetail.rack
|
||||||
let { rackQty, rackIntvlPct, rackYn, cvrPlvrYn, lessSupFitIntvlPct, lessSupFitQty } = trestleDetail
|
let { rackQty, rackIntvlPct, rackYn, cvrPlvrYn, lessSupFitIntvlPct, lessSupFitQty } = surface.trestleDetail
|
||||||
|
|
||||||
if (!rack && lessSupFitIntvlPct === 0 && lessSupFitQty === 0) {
|
if (!rack && lessSupFitIntvlPct === 0 && lessSupFitQty === 0) {
|
||||||
//25/02/06 가대없음의 경우 랙정보가 없음
|
//25/02/06 가대없음의 경우 랙정보가 없음
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user