Merge branch 'dev' of https://git.hanasys.jp/qcast3/qcast-front into feature/skeleton-dev
# Conflicts: # src/util/skeleton-utils.js
This commit is contained in:
commit
418e24e080
@ -13,6 +13,7 @@ import { currentMenuState } from '@/store/canvasAtom'
|
|||||||
import { globalLocaleStore } from '@/store/localeAtom'
|
import { globalLocaleStore } from '@/store/localeAtom'
|
||||||
import { useAxios } from '@/hooks/useAxios'
|
import { useAxios } from '@/hooks/useAxios'
|
||||||
import { GlobalDataContext } from '@/app/GlobalDataProvider'
|
import { GlobalDataContext } from '@/app/GlobalDataProvider'
|
||||||
|
import { sessionStore } from '@/store/commonAtom'
|
||||||
|
|
||||||
export default function FloorPlan({ children }) {
|
export default function FloorPlan({ children }) {
|
||||||
const [correntObjectNo, setCurrentObjectNo] = useRecoilState(correntObjectNoState)
|
const [correntObjectNo, setCurrentObjectNo] = useRecoilState(correntObjectNoState)
|
||||||
@ -26,6 +27,7 @@ export default function FloorPlan({ children }) {
|
|||||||
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
||||||
const { promiseGet } = useAxios(globalLocaleState)
|
const { promiseGet } = useAxios(globalLocaleState)
|
||||||
const { setManagementState } = useContext(GlobalDataContext)
|
const { setManagementState } = useContext(GlobalDataContext)
|
||||||
|
const [sessionState, setSessionState] = useRecoilState(sessionStore)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getStuffDetailInfo()
|
getStuffDetailInfo()
|
||||||
@ -51,6 +53,12 @@ export default function FloorPlan({ children }) {
|
|||||||
if (res.data.installHeight === '0') {
|
if (res.data.installHeight === '0') {
|
||||||
res.data.installHeight = ''
|
res.data.installHeight = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setSessionState((prev) => ({
|
||||||
|
...prev,
|
||||||
|
oneTwoStoreId: res.data.saleStoreId
|
||||||
|
}));
|
||||||
|
|
||||||
setManagementState({ ...res.data, surfaceTypeValue: surfaceTypeValue })
|
setManagementState({ ...res.data, surfaceTypeValue: surfaceTypeValue })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -132,7 +132,7 @@ export default function PowerConditionalSelect(props) {
|
|||||||
mixMatlNo: item.mixMatlNo,
|
mixMatlNo: item.mixMatlNo,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
getPcsModelList({ pcsMkrCd, pcsSerList, moduleItemList, storeId: sessionState.storeId }).then((res) => {
|
getPcsModelList({ pcsMkrCd, pcsSerList, moduleItemList, storeId: sessionState.oneTwoStoreId }).then((res) => {
|
||||||
if (res?.result.code === 200 && res?.data) {
|
if (res?.result.code === 200 && res?.data) {
|
||||||
setModels(
|
setModels(
|
||||||
res.data.map((model) => {
|
res.data.map((model) => {
|
||||||
@ -201,6 +201,7 @@ export default function PowerConditionalSelect(props) {
|
|||||||
pcsMkrCd: option.pcsMkrCd,
|
pcsMkrCd: option.pcsMkrCd,
|
||||||
mixMatlNo: moduleSelectionData.module.mixMatlNo,
|
mixMatlNo: moduleSelectionData.module.mixMatlNo,
|
||||||
moduleMatlCds: moduleSelectionData.module.itemList.map((item) => item.itemId).join(','),
|
moduleMatlCds: moduleSelectionData.module.itemList.map((item) => item.itemId).join(','),
|
||||||
|
storeId: sessionState.oneTwoStoreId,
|
||||||
}
|
}
|
||||||
|
|
||||||
getPcsMakerList(param).then((res) => {
|
getPcsMakerList(param).then((res) => {
|
||||||
|
|||||||
@ -45,6 +45,7 @@ export default function PassivityCircuitAllocation(props) {
|
|||||||
.getObjects()
|
.getObjects()
|
||||||
.filter((obj) => obj.name === POLYGON_TYPE.MODULE)
|
.filter((obj) => obj.name === POLYGON_TYPE.MODULE)
|
||||||
.forEach((obj) => {
|
.forEach((obj) => {
|
||||||
|
obj.set({ pcs: null })
|
||||||
obj.on('mousedown', (e) => handleTargetModules(obj))
|
obj.on('mousedown', (e) => handleTargetModules(obj))
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -135,6 +136,14 @@ export default function PassivityCircuitAllocation(props) {
|
|||||||
surfaceType[`${surface.direction}-${surface.roofMaterial.pitch}`] = surface
|
surfaceType[`${surface.direction}-${surface.roofMaterial.pitch}`] = surface
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (Object.keys(surfaceType).length > 1) {
|
||||||
|
swalFire({
|
||||||
|
text: getMessage('module.circuit.fix.not.same.roof.error'),
|
||||||
|
type: 'alert',
|
||||||
|
icon: 'warning',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -341,6 +350,7 @@ export default function PassivityCircuitAllocation(props) {
|
|||||||
obj.circuit = null
|
obj.circuit = null
|
||||||
obj.circuitNumber = null
|
obj.circuitNumber = null
|
||||||
obj.pcsItemId = null
|
obj.pcsItemId = null
|
||||||
|
obj.pcs = null
|
||||||
})
|
})
|
||||||
setCircuitNumber(minCircuitNumber)
|
setCircuitNumber(minCircuitNumber)
|
||||||
setTargetModules([])
|
setTargetModules([])
|
||||||
@ -367,6 +377,7 @@ export default function PassivityCircuitAllocation(props) {
|
|||||||
obj.circuit = null
|
obj.circuit = null
|
||||||
obj.circuitNumber = null
|
obj.circuitNumber = null
|
||||||
obj.pcsItemId = null
|
obj.pcsItemId = null
|
||||||
|
obj.pcs = null
|
||||||
})
|
})
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
setCircuitNumber(1)
|
setCircuitNumber(1)
|
||||||
|
|||||||
@ -37,7 +37,7 @@ export function useMasterController() {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
const paramString = `?${paramArr.map((item) => `arrRoofMatlCd=${item}`).join('&')}`
|
const paramString = `?${paramArr.map((item) => `arrRoofMatlCd=${item}`).join('&')}`
|
||||||
return await get({ url: `/api/v1/master/getModuleTypeItemList${paramString}&storeId=${sessionState.storeId}` }).then((res) => {
|
return await get({ url: `/api/v1/master/getModuleTypeItemList${paramString}&storeId=${sessionState.oneTwoStoreId}` }).then((res) => {
|
||||||
// console.log('🚀🚀 ~ getModuleTypeItemList ~ res:', res)
|
// console.log('🚀🚀 ~ getModuleTypeItemList ~ res:', res)
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
|
|||||||
@ -21,7 +21,9 @@ export const dimmedStore = atom({
|
|||||||
|
|
||||||
export const sessionStore = atom({
|
export const sessionStore = atom({
|
||||||
key: 'sessionState',
|
key: 'sessionState',
|
||||||
default: {},
|
default: {
|
||||||
|
oneTwoStoreId: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
export const slopeSelector = selectorFamily({
|
export const slopeSelector = selectorFamily({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user