dev #86
@ -5,7 +5,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "env-cmd -f .env.localhost next dev",
|
"dev": "env-cmd -f .env.localhost next dev",
|
||||||
"local:dev": "env-cmd -f .env.local.dev next dev",
|
"local:dev": "env-cmd -f .env.local.dev next dev",
|
||||||
"build": "env-cmd -f .env.productionnext build",
|
"build": "env-cmd -f .env.production next build",
|
||||||
"build:dev": "env-cmd -f .env.development next build",
|
"build:dev": "env-cmd -f .env.development next build",
|
||||||
"build:local.dev": "env-cmd -f .env.local.dev next build",
|
"build:local.dev": "env-cmd -f .env.local.dev next build",
|
||||||
"start:cluster1": "env-cmd -f .env.production next start -p 5000",
|
"start:cluster1": "env-cmd -f .env.production next start -p 5000",
|
||||||
|
|||||||
@ -45,8 +45,19 @@ const FloorPlanProvider = ({ children }) => {
|
|||||||
// const pathname = usePathname()
|
// const pathname = usePathname()
|
||||||
// const setCorrentObjectNo = useSetRecoilState(correntObjectNoState)
|
// const setCorrentObjectNo = useSetRecoilState(correntObjectNoState)
|
||||||
const searchParams = useSearchParams()
|
const searchParams = useSearchParams()
|
||||||
|
const path = usePathname()
|
||||||
const objectNo = searchParams.get('objectNo')
|
const objectNo = searchParams.get('objectNo')
|
||||||
const pid = searchParams.get('pid')
|
const pid = searchParams.get('pid')
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setFloorPlanState((prev) => {
|
||||||
|
return {
|
||||||
|
...prev,
|
||||||
|
objectNo,
|
||||||
|
pid,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, [path])
|
||||||
// useEffect(() => {
|
// useEffect(() => {
|
||||||
// console.log('🚀 ~ useEffect ~ objectNo:')
|
// console.log('🚀 ~ useEffect ~ objectNo:')
|
||||||
// if (pathname === '/floor-plan') {
|
// if (pathname === '/floor-plan') {
|
||||||
|
|||||||
@ -318,8 +318,10 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="hide-check-guide">
|
<div className="hide-check-guide">
|
||||||
{getMessage('modal.module.basic.setting.module.placement.max.size.check')}
|
<div onClick={() => setUseTab(!useTab)}>
|
||||||
<button className={`arr ${!useTab ? 'act' : ''}`} onClick={() => setUseTab(!useTab)}></button>
|
{getMessage('modal.module.basic.setting.module.placement.max.size.check')}
|
||||||
|
<button className={`arr ${!useTab ? 'act' : ''}`}></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={`module-table-box mt10 ${useTab ? 'hide' : ''}`}>
|
<div className={`module-table-box mt10 ${useTab ? 'hide' : ''}`}>
|
||||||
<div className="module-table-inner">
|
<div className="module-table-inner">
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import { useRecoilState } from 'recoil'
|
|||||||
import { makersState, modelsState, modelState, pcsCheckState, selectedMakerState, selectedModelsState, seriesState } from '@/store/circuitTrestleAtom'
|
import { makersState, modelsState, modelState, pcsCheckState, selectedMakerState, selectedModelsState, seriesState } from '@/store/circuitTrestleAtom'
|
||||||
import { POLYGON_TYPE } from '@/common/common'
|
import { POLYGON_TYPE } from '@/common/common'
|
||||||
import { useSwal } from '@/hooks/useSwal'
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
import { canvasState } from '@/store/canvasAtom'
|
import { canvasState, canvasZoomState } from '@/store/canvasAtom'
|
||||||
|
|
||||||
import { useTrestle } from '@/hooks/module/useTrestle'
|
import { useTrestle } from '@/hooks/module/useTrestle'
|
||||||
import { selectedModuleState } from '@/store/selectedModuleOptions'
|
import { selectedModuleState } from '@/store/selectedModuleOptions'
|
||||||
@ -37,7 +37,7 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
const { swalFire } = useSwal()
|
const { swalFire } = useSwal()
|
||||||
const { saveEstimate } = useEstimate()
|
const { saveEstimate } = useEstimate()
|
||||||
const canvas = useRecoilValue(canvasState)
|
const canvas = useRecoilValue(canvasState)
|
||||||
|
const [canvasZoom, setCanvasZoom] = useRecoilState(canvasZoomState)
|
||||||
const [tabNum, setTabNum] = useState(1)
|
const [tabNum, setTabNum] = useState(1)
|
||||||
const [allocationType, setAllocationType] = useState(ALLOCATION_TYPE.AUTO)
|
const [allocationType, setAllocationType] = useState(ALLOCATION_TYPE.AUTO)
|
||||||
const [circuitAllocationType, setCircuitAllocationType] = useState(1)
|
const [circuitAllocationType, setCircuitAllocationType] = useState(1)
|
||||||
@ -102,6 +102,13 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
const handleZoomClear = () => {
|
||||||
|
setCanvasZoom(100)
|
||||||
|
canvas.set({ zoom: 1 })
|
||||||
|
canvas.viewportTransform = [1, 0, 0, 1, 0, 0]
|
||||||
|
canvas.renderAll()
|
||||||
|
}
|
||||||
|
|
||||||
// 수동할당 시 모듈 삭제
|
// 수동할당 시 모듈 삭제
|
||||||
|
|
||||||
// 시리즈중 자동으로 추천 PCS 정보 조회
|
// 시리즈중 자동으로 추천 PCS 정보 조회
|
||||||
@ -343,6 +350,7 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
|
|
||||||
// 회로할당(승압설정) 저장 버튼 클릭 시
|
// 회로할당(승압설정) 저장 버튼 클릭 시
|
||||||
const onApply = async () => {
|
const onApply = async () => {
|
||||||
|
handleZoomClear()
|
||||||
setAllModuleSurfaceIsComplete(false)
|
setAllModuleSurfaceIsComplete(false)
|
||||||
|
|
||||||
setIsGlobalLoading(true)
|
setIsGlobalLoading(true)
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import configProduction from './config.production'
|
|||||||
|
|
||||||
// 클라이언트에서는 이 함수를 사용하여 config 값을 참조합니다.
|
// 클라이언트에서는 이 함수를 사용하여 config 값을 참조합니다.
|
||||||
const Config = () => {
|
const Config = () => {
|
||||||
|
console.log('🚀 ~ Config ~ process.env.NEXT_PUBLIC_RUN_MODE:', process.env.NEXT_PUBLIC_RUN_MODE)
|
||||||
switch (process.env.NEXT_PUBLIC_RUN_MODE) {
|
switch (process.env.NEXT_PUBLIC_RUN_MODE) {
|
||||||
case 'local':
|
case 'local':
|
||||||
return configLocal
|
return configLocal
|
||||||
|
|||||||
@ -271,8 +271,8 @@ export function useRefFiles() {
|
|||||||
})
|
})
|
||||||
console.log('🚀 ~ handleUploadConvertRefFile ~ result:', result)
|
console.log('🚀 ~ handleUploadConvertRefFile ~ result:', result)
|
||||||
|
|
||||||
// setCurrentBgImage(`${process.env.NEXT_PUBLIC_AWS_S3_BASE_URL}/${result.fileName}`)
|
setCurrentBgImage(`${process.env.NEXT_PUBLIC_AWS_S3_BASE_URL}/${result.fileName}`)
|
||||||
setCurrentBgImage(result.filePath)
|
// setCurrentBgImage(result.filePath)
|
||||||
setRefImage(file)
|
setRefImage(file)
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
|
|||||||
@ -661,7 +661,7 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
|
|
||||||
//가운데 가운데
|
//가운데 가운데
|
||||||
if (Math.abs(smallCenterY - holdCellCenterY) < snapDistance) {
|
if (Math.abs(smallCenterY - holdCellCenterY) < snapDistance) {
|
||||||
tempModule.top = holdCellCenterY - toFixedWithoutRounding(width / 2, 2)
|
tempModule.top = holdCellCenterY - toFixedWithoutRounding(height / 2, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isChidori) {
|
if (isChidori) {
|
||||||
|
|||||||
@ -602,8 +602,10 @@ export function usePlan(params = {}) {
|
|||||||
if (pathname === '/floor-plan/estimate/5' || pathname === '/floor-plan/simulator/6') {
|
if (pathname === '/floor-plan/estimate/5' || pathname === '/floor-plan/simulator/6') {
|
||||||
await getCanvasByObjectNo(objectNo, planNo).then((res) => {
|
await getCanvasByObjectNo(objectNo, planNo).then((res) => {
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
setCurrentCanvasPlan((prev) => ({ ...prev, canvasStatus: res.find((plan) => plan.planNo === planNo).canvasStatus }))
|
// setCurrentCanvasPlan((prev) => ({ ...prev, canvasStatus: res.find((plan) => plan.planNo === planNo).canvasStatus }))
|
||||||
setPlans((plans) => plans.map((plan) => ({ ...plan, canvasStatus: res.find((resPlan) => resPlan.planNo === plan.planNo).canvasStatus })))
|
// setPlans((plans) => plans.map((plan) => ({ ...plan, canvasStatus: res.find((resPlan) => resPlan.planNo === plan.planNo).canvasStatus })))
|
||||||
|
setCurrentCanvasPlan(res.find((plan) => plan.planNo === planNo))
|
||||||
|
setPlans(res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
2
startscript-cluster1.js
Normal file
2
startscript-cluster1.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
var exec = require('child_process').exec
|
||||||
|
exec('yarn start:cluster1', { windowsHide: true })
|
||||||
2
startscript-cluster2.js
Normal file
2
startscript-cluster2.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
var exec = require('child_process').exec
|
||||||
|
exec('yarn start:cluster2', { windowsHide: true })
|
||||||
2
startscript-dev.js
Normal file
2
startscript-dev.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
var exec = require('child_process').exec
|
||||||
|
exec('yarn start:dev', { windowsHide: true })
|
||||||
Loading…
x
Reference in New Issue
Block a user