[1146] 발전 시뮬레이션에서 견적서로 이동할 수 없습니다. #172
@ -118,7 +118,7 @@ export default function CanvasMenu(props) {
|
|||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
objectNo: objectNo,
|
objectNo: objectNo,
|
||||||
planNo: selectedPlan.planNo,
|
planNo: selectedPlan?.planNo ? selectedPlan.planNo : pid,
|
||||||
schDownload: donwloadType,
|
schDownload: donwloadType,
|
||||||
schDrawingFlg: drawingFlg,
|
schDrawingFlg: drawingFlg,
|
||||||
pwrGnrSimType: pwrGnrSimTypeRecoil.type,
|
pwrGnrSimType: pwrGnrSimTypeRecoil.type,
|
||||||
@ -238,10 +238,13 @@ export default function CanvasMenu(props) {
|
|||||||
await reloadCanvasStatus(objectNo, currentCanvasPlan?.planNo ?? pid)
|
await reloadCanvasStatus(objectNo, currentCanvasPlan?.planNo ?? pid)
|
||||||
break
|
break
|
||||||
case 'estimate':
|
case 'estimate':
|
||||||
if (!isAllComplete()) {
|
if (selectedMenu !== 'simulation') {
|
||||||
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
if (!isAllComplete()) {
|
||||||
return
|
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsGlobalLoading(true)
|
setIsGlobalLoading(true)
|
||||||
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan?.planNo ?? pid}/detail` }).then((res) => {
|
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan?.planNo ?? pid}/detail` }).then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
@ -312,7 +315,6 @@ export default function CanvasMenu(props) {
|
|||||||
const settingsModalOptions = useRecoilState(settingModalFirstOptionsState)
|
const settingsModalOptions = useRecoilState(settingModalFirstOptionsState)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log(selectedMenu)
|
|
||||||
if (selectedMenu === 'placement') {
|
if (selectedMenu === 'placement') {
|
||||||
onClickPlacementInitialMenu()
|
onClickPlacementInitialMenu()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import { usePlan } from '@/hooks/usePlan'
|
|||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
|
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
||||||
export default function Simulator() {
|
export default function Simulator() {
|
||||||
// global 로딩바
|
// global 로딩바
|
||||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||||
@ -34,6 +34,7 @@ export default function Simulator() {
|
|||||||
|
|
||||||
const { get } = useAxios()
|
const { get } = useAxios()
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
|
const { setSelectedMenu } = useCanvasMenu()
|
||||||
|
|
||||||
// 차트 관련
|
// 차트 관련
|
||||||
const [chartData, setChartData] = useState([])
|
const [chartData, setChartData] = useState([])
|
||||||
@ -103,6 +104,7 @@ export default function Simulator() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
setSelectedMenu('simulation')
|
||||||
/* 초기화 작업 */
|
/* 초기화 작업 */
|
||||||
setChartData([])
|
setChartData([])
|
||||||
setObjectDetail({})
|
setObjectDetail({})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user