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 { useAxios } from '@/hooks/useAxios'
|
||||
import { GlobalDataContext } from '@/app/GlobalDataProvider'
|
||||
import { sessionStore } from '@/store/commonAtom'
|
||||
|
||||
export default function FloorPlan({ children }) {
|
||||
const [correntObjectNo, setCurrentObjectNo] = useRecoilState(correntObjectNoState)
|
||||
@ -26,6 +27,7 @@ export default function FloorPlan({ children }) {
|
||||
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
||||
const { promiseGet } = useAxios(globalLocaleState)
|
||||
const { setManagementState } = useContext(GlobalDataContext)
|
||||
const [sessionState, setSessionState] = useRecoilState(sessionStore)
|
||||
|
||||
useEffect(() => {
|
||||
getStuffDetailInfo()
|
||||
@ -51,6 +53,12 @@ export default function FloorPlan({ children }) {
|
||||
if (res.data.installHeight === '0') {
|
||||
res.data.installHeight = ''
|
||||
}
|
||||
|
||||
setSessionState((prev) => ({
|
||||
...prev,
|
||||
oneTwoStoreId: res.data.saleStoreId
|
||||
}));
|
||||
|
||||
setManagementState({ ...res.data, surfaceTypeValue: surfaceTypeValue })
|
||||
}
|
||||
})
|
||||
|
||||
@ -132,7 +132,7 @@ export default function PowerConditionalSelect(props) {
|
||||
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) {
|
||||
setModels(
|
||||
res.data.map((model) => {
|
||||
@ -201,6 +201,7 @@ export default function PowerConditionalSelect(props) {
|
||||
pcsMkrCd: option.pcsMkrCd,
|
||||
mixMatlNo: moduleSelectionData.module.mixMatlNo,
|
||||
moduleMatlCds: moduleSelectionData.module.itemList.map((item) => item.itemId).join(','),
|
||||
storeId: sessionState.oneTwoStoreId,
|
||||
}
|
||||
|
||||
getPcsMakerList(param).then((res) => {
|
||||
|
||||
@ -45,6 +45,7 @@ export default function PassivityCircuitAllocation(props) {
|
||||
.getObjects()
|
||||
.filter((obj) => obj.name === POLYGON_TYPE.MODULE)
|
||||
.forEach((obj) => {
|
||||
obj.set({ pcs: null })
|
||||
obj.on('mousedown', (e) => handleTargetModules(obj))
|
||||
})
|
||||
|
||||
@ -134,7 +135,15 @@ export default function PassivityCircuitAllocation(props) {
|
||||
originSurfaceList.concat(originSurfaceList).forEach((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
|
||||
}
|
||||
@ -341,6 +350,7 @@ export default function PassivityCircuitAllocation(props) {
|
||||
obj.circuit = null
|
||||
obj.circuitNumber = null
|
||||
obj.pcsItemId = null
|
||||
obj.pcs = null
|
||||
})
|
||||
setCircuitNumber(minCircuitNumber)
|
||||
setTargetModules([])
|
||||
@ -367,6 +377,7 @@ export default function PassivityCircuitAllocation(props) {
|
||||
obj.circuit = null
|
||||
obj.circuitNumber = null
|
||||
obj.pcsItemId = null
|
||||
obj.pcs = null
|
||||
})
|
||||
canvas.renderAll()
|
||||
setCircuitNumber(1)
|
||||
|
||||
@ -37,7 +37,7 @@ export function useMasterController() {
|
||||
return null
|
||||
}
|
||||
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)
|
||||
return res
|
||||
})
|
||||
|
||||
@ -21,7 +21,9 @@ export const dimmedStore = atom({
|
||||
|
||||
export const sessionStore = atom({
|
||||
key: 'sessionState',
|
||||
default: {},
|
||||
default: {
|
||||
oneTwoStoreId: '',
|
||||
},
|
||||
})
|
||||
|
||||
export const slopeSelector = selectorFamily({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user