물재이용 지도 전반적인 수정 트리에서 클릭시 까지 완료(검색바 해야함)
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
import type { DemandCompType } from "@common/business_components/ui/sdmInsertForm/form";
|
||||
import type { CommonTableProps } from "../../common/type/header";
|
||||
import { coSttHeadListExport, coSttNodeListExport } from "../../matDmd/coSttn/headList";
|
||||
import { fetchType, getFetchWithCount } from "@/components/lib/api";
|
||||
|
||||
const coSttnMapRes: DemandCompType[] = [];
|
||||
|
||||
export const costtnMapSize =20
|
||||
|
||||
export type coSttnMapState = {
|
||||
coSttnMap: {
|
||||
coSttnMapRes: DemandCompType[];
|
||||
coSttMapHeadList: CommonTableProps[];
|
||||
coSttMapNodeList: CommonTableProps[];
|
||||
excelList: [];
|
||||
isInit: boolean;
|
||||
coSttnMapResCount: number;
|
||||
};
|
||||
};
|
||||
|
||||
type coSttnMapActions = {
|
||||
coSttnMapInit: (pageNo: number, pageCnt: number, con: string) => void;
|
||||
coSttnMapSearch: (pageNo: number, pageCnt: number, con: string) => void;
|
||||
coSttnMapTxtSearch: (pageNo: number, pageCnt: number, con: string, txt: string) => void;
|
||||
};
|
||||
|
||||
export type coSttnMapType = coSttnMapState & coSttnMapActions;
|
||||
|
||||
export const coSttnMapStateExport: coSttnMapState = {
|
||||
coSttnMap: {
|
||||
coSttMapHeadList: coSttHeadListExport,
|
||||
coSttMapNodeList: coSttNodeListExport,
|
||||
coSttnMapRes: coSttnMapRes,
|
||||
excelList: [],
|
||||
isInit: false,
|
||||
coSttnMapResCount: 0,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
export const coSttnMapActionsExport: (set: any) => coSttnMapActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
coSttnMapInit: async (pageNo: number, pageCnt: number, con: string) => {
|
||||
try {
|
||||
const coSttnMapRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/reuseFc/request/${pageNo}/${pageCnt}/${con}`
|
||||
);
|
||||
set((state: coSttnMapState) => {
|
||||
return {
|
||||
...state,
|
||||
coSttnMap: {
|
||||
...state.coSttnMap,
|
||||
coSttnMapRes: coSttnMapRes.data,
|
||||
isInit: false,
|
||||
coSttnMapResCount: coSttnMapRes.count,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
coSttnMapSearch: async (pageNo: number, pageCnt: number, con: string) => {
|
||||
try {
|
||||
const coSttnMapRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/reuseFc/request/${pageNo}/${pageCnt}/${con}`
|
||||
);
|
||||
if (Number(pageCnt) >= 10000) {
|
||||
set((state: coSttnMapState) => {
|
||||
return {
|
||||
...state,
|
||||
coSttnMap: {
|
||||
...state.coSttnMap,
|
||||
excelList: coSttnMapRes.data,
|
||||
//isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
} else
|
||||
set((state: coSttnMapState) => {
|
||||
return {
|
||||
...state,
|
||||
coSttnMap: {
|
||||
...state.coSttnMap,
|
||||
coSttnMapRes: coSttnMapRes.data,
|
||||
isInit: false,
|
||||
coSttnMapResCount: coSttnMapRes.count,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (erTxt) {
|
||||
console.log("error", erTxt);
|
||||
}
|
||||
},
|
||||
coSttnMapTxtSearch: async (pageNo: number, pageCnt: number, con: string, txt: string) => {
|
||||
try {
|
||||
const coSttnMapRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/reuseFc/request/${pageNo}/${pageCnt}/${con}/${txt}`)
|
||||
set((state: coSttnMapState) => {
|
||||
return {
|
||||
...state,
|
||||
coSttnMap: {
|
||||
...state.coSttnMap,
|
||||
coSttnMapRes: coSttnMapRes.data,
|
||||
coSttnMapResCount: coSttnMapRes.count,
|
||||
isInit: false,
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (erTxt) {
|
||||
console.log("error", erTxt);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
|
||||
export type comMapState = {
|
||||
comMap: {
|
||||
isFeatured:any
|
||||
isModal:boolean
|
||||
};
|
||||
};
|
||||
|
||||
type comMapActions = {
|
||||
selectFeature:(feature:any)=>void,
|
||||
chModalOpen:(open:boolean) => void,
|
||||
};
|
||||
|
||||
export type comMapType = comMapState & comMapActions;
|
||||
|
||||
export const comMapStateExport: comMapState = {
|
||||
comMap: {
|
||||
isFeatured:{},
|
||||
isModal:false
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
export const commonMapActionsExport: (set: any) => comMapActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
selectFeature:(feature:any) => {
|
||||
try {
|
||||
set((state: comMapState) => {
|
||||
return {
|
||||
...state,
|
||||
comMap: {
|
||||
...state.comMap,
|
||||
isFeatured:feature
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},chModalOpen:(open:boolean) =>{
|
||||
try {
|
||||
set((state: comMapState) => {
|
||||
return {
|
||||
...state,
|
||||
comMap: {
|
||||
...state.comMap,
|
||||
isModal:open
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import { fetchType, getFetchWithCount } from "@/components/lib/api";
|
||||
import type { CommonTableProps } from "../../common/type/header";
|
||||
import type { customHtdflBdst } from "../../ruseFcltMng/fcltReg/htdflReg";
|
||||
import { htdflSttHeadListExport, htdflSttNodeListExport } from "../../ruseFcltMng/fcltSttn/htdflSttn/headList";
|
||||
|
||||
export const htdfMapSize = 15;
|
||||
export type htdfMapState = {
|
||||
htdfMap: {
|
||||
htdfMapRes: customHtdflBdst[];
|
||||
htdfMapCount: number;
|
||||
isInit: boolean;
|
||||
htdfSttHeadList: CommonTableProps[];
|
||||
htdfSttNodeList: CommonTableProps[];
|
||||
};
|
||||
};
|
||||
|
||||
type htdfMapActions = {
|
||||
htdfMapInit: (page: number, total: number, cityOrSgg: string) => void;
|
||||
};
|
||||
|
||||
export type htdfMapType = htdfMapState & htdfMapActions;
|
||||
|
||||
export const htdfMapStateExport: htdfMapState = {
|
||||
htdfMap: {
|
||||
isInit: false,
|
||||
htdfMapRes: [],
|
||||
htdfMapCount: 1,
|
||||
htdfSttHeadList: htdflSttHeadListExport,
|
||||
htdfSttNodeList: htdflSttNodeListExport,
|
||||
},
|
||||
};
|
||||
|
||||
export const htdfMapActionsExport: (set: any) => htdfMapActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
htdfMapInit: async (page: number, total: number, cityOrSgg: string) => {
|
||||
try {
|
||||
const htdfMapRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/drain/facilityList` +
|
||||
(page ? `/${page}` : "/1") +
|
||||
(total ? `/${total}` : "/20") +
|
||||
(cityOrSgg ? `/${cityOrSgg}` : "/0")
|
||||
);
|
||||
|
||||
set((state: htdfMapState) => {
|
||||
return {
|
||||
...state,
|
||||
htdfMap: {
|
||||
...state.htdfMap,
|
||||
htdfMapRes: htdfMapRes.data,
|
||||
htdfMapCount: htdfMapRes.count,
|
||||
isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,102 @@
|
||||
import { fetchType, getFetchWithCount } from "@/components/lib/api";
|
||||
import type { CommonTableProps } from "../../common/type/header";
|
||||
import type { customLdrmnt } from "../../matDmd/ldrmntCoSttn";
|
||||
import {
|
||||
ldrmntHeadListExport,
|
||||
ldrmntNodeListExport,
|
||||
} from "../../matDmd/ldrmntCoSttn/headList";
|
||||
|
||||
|
||||
export const ldrmntMapSize = 20;
|
||||
export type ldrmntMapState = {
|
||||
ldrmntMap: {
|
||||
ldrmntMapHeadList: CommonTableProps[];
|
||||
ldrmntMapNodeList: CommonTableProps[];
|
||||
isInit: boolean;
|
||||
ldrmntMapRes: customLdrmnt[];
|
||||
ldrmntMapResCount: number;
|
||||
};
|
||||
};
|
||||
|
||||
type ldrmntMapActions = {
|
||||
ldrmntMapInit: (page: number, total: number, con: string) => void;
|
||||
ldrmntMapSearch: (
|
||||
page: number,
|
||||
total: number,
|
||||
con: string,
|
||||
coNm: string
|
||||
) => void;
|
||||
};
|
||||
|
||||
export type ldrmntMapType = ldrmntMapState & ldrmntMapActions;
|
||||
|
||||
export const ldrmntMapStateExport: ldrmntMapState = {
|
||||
ldrmntMap: {
|
||||
ldrmntMapHeadList: ldrmntHeadListExport,
|
||||
ldrmntMapNodeList: ldrmntNodeListExport,
|
||||
isInit: false,
|
||||
ldrmntMapRes: [],
|
||||
ldrmntMapResCount: 1,
|
||||
},
|
||||
};
|
||||
|
||||
export const ldrmntMapActionsExport: (set: any) => ldrmntMapActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
ldrmntMapInit: async (page: number, total: number, con: string) => {
|
||||
try {
|
||||
const ldrmntMapRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/reuseFc/request/temp/${page}/${total}/${con}`
|
||||
);
|
||||
|
||||
set((state: ldrmntMapState) => {
|
||||
return {
|
||||
...state,
|
||||
ldrmntMap: {
|
||||
...state.ldrmntMap,
|
||||
ldrmntMapRes: ldrmntMapRes.data,
|
||||
ldrmntMapResCount: ldrmntMapRes.count,
|
||||
isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
ldrmntMapSearch: async (
|
||||
page: number,
|
||||
total: number,
|
||||
con: string,
|
||||
coNm: string
|
||||
) => {
|
||||
let searchUrl = "";
|
||||
|
||||
if (con !== "") {
|
||||
if (coNm !== "") {
|
||||
searchUrl = `/reuseFc/request/temp/${page}/${total}/${con}/${coNm}`;
|
||||
} else {
|
||||
searchUrl = `/reuseFc/request/temp/${page}/${total}/${con}`;
|
||||
}
|
||||
}
|
||||
try {
|
||||
const ldrmntMapRes = await getFetchWithCount(fetchType.WR, searchUrl);
|
||||
set((state: ldrmntMapState) => {
|
||||
return {
|
||||
...state,
|
||||
ldrmntMap: {
|
||||
...state.ldrmntMap,
|
||||
ldrmntMapRes: ldrmntMapRes.data,
|
||||
ldrmntMapResCount: ldrmntMapRes.count,
|
||||
isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,108 @@
|
||||
import { fetchType, postFectch } from "@/components/lib/api";
|
||||
import type { pubHasuType } from "../../ruseFcltMng/fcltReg/pbnstReg/type";
|
||||
import { checkWrRegList } from "../../ruseFcltMng/fcltReg/pbnstReg";
|
||||
import type { ReturnType } from "@common/business_components/ui";
|
||||
import { pubFacHeadListExport } from "../../ruseFcltMng/fcltReg/pbnstReg/headList";
|
||||
import type { TableUpperProps } from "../../common/type/header";
|
||||
|
||||
|
||||
export const pbnMapTableSize =20;
|
||||
|
||||
const hasuListFetch = async (page: number, pageTotal:number, reurnValue: ReturnType, searchNm?:string) => {
|
||||
|
||||
let url = `/prcsFclt/ruseInfo/${page}/${pageTotal}/`;
|
||||
const checkWrRegListRes = await checkWrRegList();
|
||||
|
||||
if (reurnValue.partValue === "A") {
|
||||
url += `${reurnValue.partValue}/${
|
||||
// reurnValue.sidoValue ? reurnValue.sidoValue : reurnValue.sigunValue
|
||||
reurnValue.sigunValue !== '0' ? reurnValue.sigunValue : reurnValue.sidoValue
|
||||
}/0/1/SW`
|
||||
|
||||
|
||||
} else if (reurnValue.partValue === "R") {
|
||||
url += `${reurnValue.partValue}/${reurnValue.regionValue
|
||||
? reurnValue.regionValue
|
||||
: reurnValue.unitWaterShedValue
|
||||
? reurnValue.unitWaterShedValue
|
||||
: reurnValue.middleRegionValue
|
||||
}/0/1/SW`
|
||||
} else if (reurnValue.partValue === 'G') {
|
||||
url += `${reurnValue.envPartValue}/${reurnValue.sigunValue !== '0' ? reurnValue.sigunValue : reurnValue.sidoValue}/0/1/SW`
|
||||
} else {
|
||||
url += `A/0/0/1/SW`
|
||||
}
|
||||
if (searchNm && searchNm?.length > 0) {
|
||||
url += "/" + searchNm
|
||||
}
|
||||
|
||||
|
||||
|
||||
const data = checkWrRegListRes.filter((item:string) => item !== "")
|
||||
|
||||
const rainRes = await postFectch(
|
||||
url,
|
||||
data,
|
||||
fetchType.COMMON
|
||||
);
|
||||
|
||||
const hasuList = rainRes.data.map((item: any) => {
|
||||
return {
|
||||
...item,
|
||||
fctCpc: Number(item.fctCpc) || 0,
|
||||
ruse: item.ruse === false ? "N" : "Y",
|
||||
};
|
||||
});
|
||||
|
||||
return {data: hasuList, count:rainRes.count};
|
||||
};
|
||||
|
||||
export type pbnMapState = {
|
||||
pbnMap: {
|
||||
isInit:boolean,
|
||||
pbnMapRes:pubHasuType[]
|
||||
pbnMapCount:number;
|
||||
pbnMapHeadList:TableUpperProps[];
|
||||
};
|
||||
};
|
||||
|
||||
type pbnMapActions = {
|
||||
pbnMapInit: (page: number, pageTotal:number, reurnValue: ReturnType) => void;
|
||||
};
|
||||
|
||||
export type pbnMapType = pbnMapState & pbnMapActions;
|
||||
|
||||
export const pbnMapStateExport: pbnMapState = {
|
||||
pbnMap: {
|
||||
isInit: false,
|
||||
pbnMapRes:[],
|
||||
pbnMapCount:1,
|
||||
pbnMapHeadList:pubFacHeadListExport
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
export const pbnMapActionsExport: (set: any) => pbnMapActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
pbnMapInit: async (page: number, pageTotal:number, reurnValue: ReturnType) => {
|
||||
try {
|
||||
const pubMapRes = await hasuListFetch(page,pageTotal,reurnValue)
|
||||
set((state: pbnMapState) => {
|
||||
return {
|
||||
...state,
|
||||
pbnMap: {
|
||||
...state.pbnMap,
|
||||
pbnMapRes: pubMapRes.data,
|
||||
pbnMapCount: pubMapRes.count,
|
||||
isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
import { fetchType, getFetchWithCount } from "@/components/lib/api";
|
||||
import type { CommonTableProps } from "../../common/type/header";
|
||||
import {
|
||||
rainSttHeadListExport,
|
||||
rainSttNodeListExport,
|
||||
} from "../../ruseFcltMng/fcltSttn/rainSttn/headList";
|
||||
import type { customRainBdst } from "../../ruseFcltMng/fcltReg/rainReg";
|
||||
|
||||
|
||||
export const rainMapSize = 15
|
||||
export type rainMapState = {
|
||||
rainMap: {
|
||||
rainMapRes: customRainBdst[];
|
||||
rainMapCount: number;
|
||||
isInit: boolean;
|
||||
rainSttHeadList: CommonTableProps[];
|
||||
rainSttNodeList: CommonTableProps[];
|
||||
};
|
||||
};
|
||||
|
||||
type rainMapActions = {
|
||||
rainMapInit: (page: number, total: number, cityOrSgg:string) => void;
|
||||
};
|
||||
|
||||
export type rainMapType = rainMapState & rainMapActions;
|
||||
|
||||
export const rainMapStateExport: rainMapState = {
|
||||
rainMap: {
|
||||
isInit: false,
|
||||
rainMapRes: [],
|
||||
rainMapCount: 1,
|
||||
rainSttHeadList: rainSttHeadListExport,
|
||||
rainSttNodeList: rainSttNodeListExport,
|
||||
},
|
||||
};
|
||||
|
||||
export const rainMapActionsExport: (set: any) => rainMapActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
rainMapInit: async (page: number, total: number, cityOrSgg:string) => {
|
||||
try {
|
||||
const rainMapRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/reuseFc/rainyInfoList` +
|
||||
(page ? `/${page}` : "/1") +
|
||||
(total ? `/${total}` : "/20") +
|
||||
(cityOrSgg ? `/${cityOrSgg}` : "/0")
|
||||
);
|
||||
|
||||
set((state: rainMapState) => {
|
||||
return {
|
||||
...state,
|
||||
rainMap: {
|
||||
...state.rainMap,
|
||||
rainMapRes: rainMapRes.data,
|
||||
rainMapCount: rainMapRes.count,
|
||||
isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,64 @@
|
||||
import { fetchType, getFetchWithCount } from "@/components/lib/api";
|
||||
import type { CommonTableProps } from "../../common/type/header";
|
||||
import type { customRswtBdst } from "../../ruseFcltMng/fcltReg/rswtReg";
|
||||
import { rswtSttHeadListExport, rswtSttNodeListExport } from "../../ruseFcltMng/fcltSttn/rswtSttn/headList";
|
||||
|
||||
|
||||
export const rswtMapSize = 15
|
||||
export type rswtMapState = {
|
||||
rswtMap: {
|
||||
rswtMapRes: customRswtBdst[];
|
||||
rswtMapCount: number;
|
||||
isInit: boolean;
|
||||
rswtSttHeadList: CommonTableProps[];
|
||||
rswtSttNodeList: CommonTableProps[];
|
||||
};
|
||||
};
|
||||
|
||||
type rswtMapActions = {
|
||||
rswtMapInit: (page: number, total: number, cityOrSgg:string) => void;
|
||||
};
|
||||
|
||||
export type rswtMapType = rswtMapState & rswtMapActions;
|
||||
|
||||
export const rswtMapStateExport: rswtMapState = {
|
||||
rswtMap: {
|
||||
isInit: false,
|
||||
rswtMapRes: [],
|
||||
rswtMapCount: 1,
|
||||
rswtSttHeadList: rswtSttHeadListExport,
|
||||
rswtSttNodeList: rswtSttNodeListExport,
|
||||
},
|
||||
};
|
||||
|
||||
export const rswtMapActionsExport: (set: any) => rswtMapActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
rswtMapInit: async (page: number, total: number, cityOrSgg:string) => {
|
||||
try {
|
||||
const rswtMapRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/reuseFc/waterreuseFc` +
|
||||
(page ? `/${page}` : "/1") +
|
||||
(total ? `/${total}` : "/20") +
|
||||
(cityOrSgg ? `/${cityOrSgg}` : "/0")
|
||||
);
|
||||
|
||||
set((state: rswtMapState) => {
|
||||
return {
|
||||
...state,
|
||||
rswtMap: {
|
||||
...state.rswtMap,
|
||||
rswtMapRes: rswtMapRes.data,
|
||||
rswtMapCount: rswtMapRes.count,
|
||||
isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,94 @@
|
||||
import { fetchType, getFetch } from "@/components/lib/api";
|
||||
import type { CommonTableProps } from "../../common/type/header";
|
||||
import type { WaterReuseFacility } from "../../ruseFcltMng/fcltSttn/pbnstSttn/type";
|
||||
import {
|
||||
pbnstSttNodeListExport,
|
||||
pbnSttHeadListExport,
|
||||
} from "../../ruseFcltMng/fcltSttn/pbnstSttn/headList";
|
||||
import type { ReturnType } from "@common/business_components/ui";
|
||||
import { hasuListFetch } from "../../ruseFcltMng/fcltSttn/pbnstSttn";
|
||||
|
||||
export const ruseMapSize = 15;
|
||||
export type ruseMapState = {
|
||||
ruseMap: {
|
||||
ruseMapRes: WaterReuseFacility[];
|
||||
ruseMapCount: number;
|
||||
isInit: boolean;
|
||||
fclts: string[];
|
||||
ruseMapHeadList: CommonTableProps[];
|
||||
ruseMapNodeList: CommonTableProps[];
|
||||
};
|
||||
};
|
||||
|
||||
type ruseMapActions = {
|
||||
getMapFlcts: () => void;
|
||||
ruseMapInit: (
|
||||
page: number,
|
||||
total: number,
|
||||
reurnValue: ReturnType,
|
||||
year: string,
|
||||
fclts: string[]
|
||||
) => void;
|
||||
};
|
||||
|
||||
export type ruseMapType = ruseMapState & ruseMapActions;
|
||||
|
||||
export const ruseMapStateExport: ruseMapState = {
|
||||
ruseMap: {
|
||||
isInit: false,
|
||||
ruseMapRes: [],
|
||||
fclts: [],
|
||||
ruseMapCount: 1,
|
||||
ruseMapHeadList: pbnSttHeadListExport,
|
||||
ruseMapNodeList: pbnstSttNodeListExport,
|
||||
},
|
||||
};
|
||||
|
||||
export const ruseMapActionsExport: (set: any) => ruseMapActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
getMapFlcts: async () => {
|
||||
const fclts = await getFetch(fetchType.WR, "/reuseFc/pubFc");
|
||||
|
||||
return set((state: ruseMapState) => ({
|
||||
ruseMap: {
|
||||
...state.ruseMap,
|
||||
fclts: fclts,
|
||||
},
|
||||
}));
|
||||
},
|
||||
ruseMapInit: async (
|
||||
page: number,
|
||||
total: number,
|
||||
reurnValue: ReturnType,
|
||||
year: string,
|
||||
fclts: string[]
|
||||
) => {
|
||||
try {
|
||||
const ruseMapRes = await hasuListFetch(
|
||||
String(page),
|
||||
String(total),
|
||||
reurnValue,
|
||||
undefined,
|
||||
year,
|
||||
fclts
|
||||
);
|
||||
|
||||
set((state: ruseMapState) => {
|
||||
return {
|
||||
...state,
|
||||
ruseMap: {
|
||||
...state.ruseMap,
|
||||
ruseMapRes: ruseMapRes.data,
|
||||
ruseMapCount: ruseMapRes.count,
|
||||
isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user