Merge branch 'dev' of ssh://git.jetbrains.space/nalpari/q-cast-iii/qcast-front into dev
This commit is contained in:
commit
898aa6ec78
@ -31,7 +31,7 @@ export default function CanvasFrame() {
|
|||||||
const loadCanvas = () => {
|
const loadCanvas = () => {
|
||||||
if (canvas) {
|
if (canvas) {
|
||||||
canvas?.clear() // 캔버스를 초기화합니다.
|
canvas?.clear() // 캔버스를 초기화합니다.
|
||||||
if (selectedPlan?.canvasStatus && floorPlanState.objectNo === selectedPlan.objectNo) {
|
if (selectedPlan?.canvasStatus && floorPlanState.objectNo === selectedPlan.objectNo && floorPlanState.pid === selectedPlan.planNo) {
|
||||||
canvas?.loadFromJSON(JSON.parse(selectedPlan.canvasStatus), function () {
|
canvas?.loadFromJSON(JSON.parse(selectedPlan.canvasStatus), function () {
|
||||||
canvasLoadInit() //config된 상태로 캔버스 객체를 그린다
|
canvasLoadInit() //config된 상태로 캔버스 객체를 그린다
|
||||||
canvas?.renderAll() // 캔버스를 다시 그립니다.
|
canvas?.renderAll() // 캔버스를 다시 그립니다.
|
||||||
|
|||||||
@ -16,7 +16,7 @@ export default function StepUp({}) {
|
|||||||
const [arrayLength, setArrayLength] = useState(3) //module-table-inner의 반복 개수
|
const [arrayLength, setArrayLength] = useState(3) //module-table-inner의 반복 개수
|
||||||
const [pcsCheck, setPcsCheck] = useRecoilState(pcsCheckState)
|
const [pcsCheck, setPcsCheck] = useRecoilState(pcsCheckState)
|
||||||
const model = useRecoilValue(modelState)
|
const model = useRecoilValue(modelState)
|
||||||
const { getPcsAutoRecommendList } = useMasterController()
|
const { getPcsVoltageStepUpList } = useMasterController()
|
||||||
const { managementState, setManagementState, managementStateLoaded } = useContext(GlobalDataContext)
|
const { managementState, setManagementState, managementStateLoaded } = useContext(GlobalDataContext)
|
||||||
const canvas = useRecoilValue(canvasState)
|
const canvas = useRecoilValue(canvasState)
|
||||||
const selectedModules = useRecoilValue(selectedModuleState)
|
const selectedModules = useRecoilValue(selectedModuleState)
|
||||||
@ -64,7 +64,7 @@ export default function StepUp({}) {
|
|||||||
roofSurfaceList: roofSurfaceList,
|
roofSurfaceList: roofSurfaceList,
|
||||||
pscItemList: pscItemList,
|
pscItemList: pscItemList,
|
||||||
}
|
}
|
||||||
getPcsAutoRecommendList(params)
|
getPcsVoltageStepUpList(null)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
useCanvasPopupStatusController(6)
|
useCanvasPopupStatusController(6)
|
||||||
|
|||||||
@ -147,7 +147,7 @@ export function useMasterController() {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
return await post({ url: '/api/v1/master/getPcsSeriesItemList', data: params }).then((res) => {
|
return await post({ url: '/api/v1/master/getPcsSeriesItemList', data: test }).then((res) => {
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -169,6 +169,82 @@ export function useMasterController() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PCS 승압설정 정보 조회
|
||||||
|
* @param {Max접속(과적)여부} maxConnYn
|
||||||
|
* @param {동일회로도여부} smpCirYn
|
||||||
|
* @param {한랭지여부} coldZoneYn
|
||||||
|
* @param {사용된 모듈아이템 목록} useModuleItemList
|
||||||
|
* @param {지붕면 목록} roofSurfaceList
|
||||||
|
* @param {PCS 아이템 목록} pcsItemList
|
||||||
|
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
const getPcsVoltageStepUpList = async (params2 = null) => {
|
||||||
|
const params = {
|
||||||
|
maxConnYn: 'N',
|
||||||
|
smpCirYn: 'Y',
|
||||||
|
coldZoneYn: 'N',
|
||||||
|
useModuleItemList: [{ itemId: '107077', mixMatlNo: '0' }],
|
||||||
|
roofSurfaceList: [
|
||||||
|
{
|
||||||
|
roofSurfaceId: '1',
|
||||||
|
roofSurface: '남서',
|
||||||
|
roofSurfaceIncl: '5',
|
||||||
|
moduleList: [
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
roofSurfaceId: '2',
|
||||||
|
roofSurface: '남서',
|
||||||
|
roofSurfaceIncl: '5',
|
||||||
|
moduleList: [
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
roofSurfaceId: '3',
|
||||||
|
roofSurface: '남',
|
||||||
|
roofSurfaceIncl: '3',
|
||||||
|
moduleList: [
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
{ itemId: '107077' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
pcsItemList: [
|
||||||
|
{ itemId: '106857', pcsMkrCd: 'MKR001', pcsSerCd: 'SER001' },
|
||||||
|
{ itemId: '106856', pcsMkrCd: 'MKR001', pcsSerCd: 'SER001' },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
return await post({ url: '/api/v1/master/getPcsVoltageStepUpList', data: params }).then((res) => {
|
||||||
|
console.log('🚀🚀 ~ getPcsVoltageStepUpList ~ res:', res)
|
||||||
|
return res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
getRoofMaterialList,
|
getRoofMaterialList,
|
||||||
getModuleTypeItemList,
|
getModuleTypeItemList,
|
||||||
@ -178,5 +254,6 @@ export function useMasterController() {
|
|||||||
getPcsMakerList,
|
getPcsMakerList,
|
||||||
getPcsModelList,
|
getPcsModelList,
|
||||||
getPcsAutoRecommendList,
|
getPcsAutoRecommendList,
|
||||||
|
getPcsVoltageStepUpList,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -316,7 +316,7 @@ export function useCanvasSetting() {
|
|||||||
roofsArray = res.map((item) => {
|
roofsArray = res.map((item) => {
|
||||||
return {
|
return {
|
||||||
roofApply: item.roofApply,
|
roofApply: item.roofApply,
|
||||||
roofSeq: 0,
|
roofSeq: item.roofSeq,
|
||||||
roofMatlCd: item.roofMatlCd,
|
roofMatlCd: item.roofMatlCd,
|
||||||
roofWidth: item.roofWidth,
|
roofWidth: item.roofWidth,
|
||||||
roofHeight: item.roofHeight,
|
roofHeight: item.roofHeight,
|
||||||
@ -381,16 +381,16 @@ export function useCanvasSetting() {
|
|||||||
roofSizeSet: roofsRow[0].roofSizeSet,
|
roofSizeSet: roofsRow[0].roofSizeSet,
|
||||||
roofAngleSet: roofsRow[0].roofAngleSet,
|
roofAngleSet: roofsRow[0].roofAngleSet,
|
||||||
roofsData: roofsArray,
|
roofsData: roofsArray,
|
||||||
selectedRoofMaterial: addRoofs[0],
|
selectedRoofMaterial: addRoofs.find((roof) => roof.selected),
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Data fetching error:', error)
|
console.error('Data fetching error:', error)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(Object.keys(canvasSetting).length === 0 && canvasSetting.constructor === Object)) {
|
// if (!(Object.keys(canvasSetting).length === 0 && canvasSetting.constructor === Object)) {
|
||||||
setBasicSettings({ ...canvasSetting })
|
// setBasicSettings({ ...canvasSetting })
|
||||||
}
|
// }
|
||||||
setCanvasSetting({ ...basicSetting })
|
setCanvasSetting({ ...basicSetting })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -169,6 +169,7 @@ export function useRoofAllocationSetting(id) {
|
|||||||
roofSizeSet: res[0].roofSizeSet,
|
roofSizeSet: res[0].roofSizeSet,
|
||||||
roofAngleSet: res[0].roofAngleSet,
|
roofAngleSet: res[0].roofAngleSet,
|
||||||
roofsData: roofsArray,
|
roofsData: roofsArray,
|
||||||
|
selectedRoofMaterial: selectRoofs.find((roof) => roof.selected),
|
||||||
})
|
})
|
||||||
setBasicInfo({
|
setBasicInfo({
|
||||||
roofSizeSet: '' + res[0].roofSizeSet,
|
roofSizeSet: '' + res[0].roofSizeSet,
|
||||||
@ -188,7 +189,7 @@ export function useRoofAllocationSetting(id) {
|
|||||||
roofSizeSet: Number(basicSetting.roofSizeSet),
|
roofSizeSet: Number(basicSetting.roofSizeSet),
|
||||||
roofAngleSet: basicSetting.roofAngleSet,
|
roofAngleSet: basicSetting.roofAngleSet,
|
||||||
roofAllocationList: currentRoofList.map((item, index) => ({
|
roofAllocationList: currentRoofList.map((item, index) => ({
|
||||||
roofApply: item.selected === null || item.selected === undefined ? 'true' : item.selected,
|
roofApply: item.selected,
|
||||||
roofSeq: index,
|
roofSeq: index,
|
||||||
roofMatlCd: item.roofMatlCd === null || item.roofMatlCd === undefined ? 'ROOF_ID_WA_53A' : item.roofMatlCd,
|
roofMatlCd: item.roofMatlCd === null || item.roofMatlCd === undefined ? 'ROOF_ID_WA_53A' : item.roofMatlCd,
|
||||||
roofWidth: item.width === null || item.width === undefined ? 0 : Number(item.width),
|
roofWidth: item.width === null || item.width === undefined ? 0 : Number(item.width),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user