Merge commit 'b85cd78614e9be72cdeaa1a888cbb1cf0ca3bdcb' into iipbs/wr/hasuReg
This commit is contained in:
@@ -106,4 +106,147 @@ export const coRvwNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
|
||||
];
|
||||
];
|
||||
|
||||
export const cmpttnHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpv",
|
||||
title: "구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sgg",
|
||||
title: "처리시설 용량(m³)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "500",
|
||||
title: "500",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "1000",
|
||||
title: "1,000",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},{
|
||||
id: "2000",
|
||||
title: "2,000",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "3000", //바꾸기
|
||||
title: "3,000",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "5000", //바꾸기
|
||||
title: "5,000",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "10000", //바꾸기
|
||||
title: "10,000",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "20000", //바꾸기
|
||||
title: "20,000",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "30000", //바꾸기
|
||||
title: "30,000",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "50000", //바꾸기
|
||||
title: "50,000",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "100000", //바꾸기
|
||||
title: "100,000",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
|
||||
export const coModalHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "gubun",
|
||||
title: "공사비/구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "a",
|
||||
title: "기본조사설계비",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aa",
|
||||
title: "실시설계비",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaa",
|
||||
title: "공사감리비",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaa",
|
||||
title: "시설부대비",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
]
|
||||
@@ -0,0 +1,102 @@
|
||||
import type { CommonTableProps } from "../../common/type/header";
|
||||
|
||||
export const drgtHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpvCd",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sggCd",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "haengjung",
|
||||
title: "행정동",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "normal",
|
||||
title: "정상(횟수)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "attention",
|
||||
title: "관심(횟수)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "caution",
|
||||
title: "주의(횟수)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "warning",
|
||||
title: "관심+주의(횟수)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "ranking",
|
||||
title: "가뭄순위",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
];
|
||||
|
||||
export const drgtDetailHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "year",
|
||||
title: "년",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "month",
|
||||
title: "월",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},{
|
||||
id: "day",
|
||||
title: "일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "state",
|
||||
title: "가뭄상태",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
import type { CommonTableProps } from "../../common/type/header";
|
||||
import { drgtHeadListExport } from "./headList";
|
||||
|
||||
const drgtHeadList = drgtHeadListExport;
|
||||
|
||||
export type drgtState = {
|
||||
drgt:{
|
||||
drgtHeadList: CommonTableProps[];
|
||||
}
|
||||
}
|
||||
|
||||
type drgtActions = {
|
||||
};
|
||||
|
||||
export type drgtType = drgtState & drgtActions;
|
||||
|
||||
export const drgtStateExport: drgtState = {
|
||||
drgt: {
|
||||
drgtHeadList: drgtHeadList,
|
||||
}
|
||||
}
|
||||
|
||||
export const drgtActionsExport: (set: any) => drgtActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {};
|
||||
};
|
||||
@@ -0,0 +1,359 @@
|
||||
import type { CommonTableProps } from "../../common/type/header";
|
||||
|
||||
export const ldrmntHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpvCd",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sggCd",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa1",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa33",
|
||||
title: "공장주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa35",
|
||||
title: "공장관리번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa11",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
]
|
||||
|
||||
export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpvCd",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sggCd",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa",
|
||||
title: "관리기관",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa1",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa2",
|
||||
title: "공장구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa3",
|
||||
title: "단지명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa4",
|
||||
title: "설립구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa5",
|
||||
title: "입주형태",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa6",
|
||||
title: "보유구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa7",
|
||||
title: "최초승인일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa8",
|
||||
title: "최초등록일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa9",
|
||||
title: "등록구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa10",
|
||||
title: "등록일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa11",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa12",
|
||||
title: "남자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa13",
|
||||
title: "여자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa14",
|
||||
title: "외국인남자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa15",
|
||||
title: "외국인여자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa16",
|
||||
title: "종업원합계",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa17",
|
||||
title: "생산품",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa18",
|
||||
title: "원자재",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa19",
|
||||
title: "공장규모",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa20",
|
||||
title: "용도지역",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa21",
|
||||
title: "지목",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa22",
|
||||
title: "용지면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa23",
|
||||
title: "제조시설면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa24",
|
||||
title: "부대시설면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa25",
|
||||
title: "건축면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa26",
|
||||
title: "지식산업센터명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa27",
|
||||
title: "대표업종",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa28",
|
||||
title: "업종명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa29",
|
||||
title: "업종코드",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa30",
|
||||
title: "차수",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa31",
|
||||
title: "법인주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa32",
|
||||
title: "필지수",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa33",
|
||||
title: "공장주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa34",
|
||||
title: "공장주소_지번",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa35",
|
||||
title: "공장관리번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
];
|
||||
@@ -1,67 +1,201 @@
|
||||
import type { CommonTableProps } from "@/app/store/common/type/header";
|
||||
import { coSttHeadListExport, coSttNodeListExport } from "../coSttn/headList";
|
||||
import type { customCoSttnBdst } from "../coSttn";
|
||||
import { z } from "zod";
|
||||
import { ldrmntHeadListExport, ldrmntNodeListExport } from "./headList";
|
||||
import { deleteFectch, fetchType, getFetch, postFectch } from "@/components/lib/api";
|
||||
|
||||
export const ldrmntZod = z.object({
|
||||
ctpvCd: z.number().default(0),
|
||||
sggCd: z.number().default(0),
|
||||
aaaaaa: z.string().default(''),
|
||||
aaaaaa1: z.string().default(''),
|
||||
aaaaaa2: z.string().default(''),
|
||||
aaaaaa3: z.string().default(''),
|
||||
aaaaaa4: z.string().default(''),
|
||||
aaaaaa5: z.string().default(''),
|
||||
aaaaaa6: z.string().default(''),
|
||||
aaaaaa7: z.date().default(() => new Date()),
|
||||
aaaaaa8: z.date().default(() => new Date()),
|
||||
aaaaaa9: z.string().default(''),
|
||||
aaaaaa10: z.date().default(() => new Date()),
|
||||
aaaaaa11: z.string().default(''),
|
||||
aaaaaa12: z.string().default(''),
|
||||
aaaaaa13: z.string().default(''),
|
||||
aaaaaa14: z.string().default(''),
|
||||
aaaaaa15: z.string().default(''),
|
||||
aaaaaa16: z.string().default(''),
|
||||
aaaaaa17: z.string().default(''),
|
||||
aaaaaa18: z.string().default(''),
|
||||
aaaaaa19: z.string().default(''),
|
||||
aaaaaa20: z.string().default(''),
|
||||
aaaaaa21: z.string().default(''),
|
||||
aaaaaa22: z.string().default(''),
|
||||
aaaaaa23: z.string().default(''),
|
||||
aaaaaa24: z.string().default(''),
|
||||
aaaaaa25: z.string().default(''),
|
||||
aaaaaa26: z.string().default(''),
|
||||
aaaaaa27: z.string().default(''),
|
||||
aaaaaa28: z.string().default(''),
|
||||
aaaaaa29: z.string().default(''),
|
||||
aaaaaa30: z.string().default(''),
|
||||
aaaaaa31: z.string().default(''),
|
||||
aaaaaa32: z.string().default(''),
|
||||
aaaaaa33: z.string().default(''),
|
||||
aaaaaa34: z.string().default(''),
|
||||
aaaaaa35: z.string().default(''),
|
||||
})
|
||||
|
||||
// 테이블 헤드 리스트
|
||||
const coSttNodeList = coSttNodeListExport;
|
||||
const coSttHeadList = coSttHeadListExport;
|
||||
|
||||
const ldrmntCoSttnRes: customCoSttnBdst[] = [];
|
||||
const ldrmntHeadList = ldrmntHeadListExport;
|
||||
const ldrmntNodeList = ldrmntNodeListExport;
|
||||
|
||||
const ldrmntCoList = [{
|
||||
ctpvCd: "이거머임",
|
||||
sggCd: "01",
|
||||
dmdCoNm: "회사요",
|
||||
bznmNo: "abc123",
|
||||
dmdInfoPk: "1111",
|
||||
daddr: "서울 강남구",
|
||||
telno: "010-1234-5678"
|
||||
ctpvCd: "서울특별시",
|
||||
sggCd: "종로구",
|
||||
aaaaaa: "서울특별시 종로구",
|
||||
aaaaaa1: "남일문화 (주)",
|
||||
aaaaaa2: "개별입지",
|
||||
aaaaaa3: "",
|
||||
aaaaaa4: "일반",
|
||||
aaaaaa5: "해당없음",
|
||||
aaaaaa6: "임대",
|
||||
aaaaaa7: "19980101",
|
||||
aaaaaa8: "20050202",
|
||||
aaaaaa9: "등록변경",
|
||||
aaaaaa10: "20221207",
|
||||
aaaaaa11: "02-720-1511",
|
||||
aaaaaa12: "0",
|
||||
aaaaaa13: "2",
|
||||
aaaaaa14: "0",
|
||||
aaaaaa15: "0",
|
||||
aaaaaa16: "2",
|
||||
aaaaaa17: "인쇄물",
|
||||
aaaaaa18: "문구, 차드",
|
||||
aaaaaa19: "소기업",
|
||||
aaaaaa20: "도시지역 / 주거지역 / 제2종일반주거지역",
|
||||
aaaaaa21: "대",
|
||||
aaaaaa22: "238",
|
||||
aaaaaa23: "57.12",
|
||||
aaaaaa24: "69.44",
|
||||
aaaaaa25: "126.56",
|
||||
aaaaaa26: "",
|
||||
aaaaaa27: "18111",
|
||||
aaaaaa28: "경 인쇄업 외 2 종",
|
||||
aaaaaa29: "18111, 18113, 18119",
|
||||
aaaaaa30: "10",
|
||||
aaaaaa31: "",
|
||||
aaaaaa32: "1",
|
||||
aaaaaa33: "서울특별시 종로구 자하문로16길 8 (창성동)",
|
||||
aaaaaa34: "서울특별시 종로구 창성동 87-1번지",
|
||||
aaaaaa35: "111102005091210",
|
||||
}]
|
||||
export type ldrmntCoSttnState = {
|
||||
ldrmntCoSttn: {
|
||||
ldrmntCoSttnRes: customCoSttnBdst[];
|
||||
ldrmntCoSttHeadList: CommonTableProps[];
|
||||
ldrmntCoSttNodeList: CommonTableProps[];
|
||||
|
||||
export type customLdrmntBdst = z.infer<typeof ldrmntZod>;
|
||||
|
||||
const ldrmntRes: customLdrmntBdst[] = [];
|
||||
|
||||
export type ldrmntState = {
|
||||
ldrmnt: {
|
||||
ldrmntHeadList: CommonTableProps[];
|
||||
ldrmntNodeList: CommonTableProps[];
|
||||
excelList: [];
|
||||
isInit: boolean;
|
||||
ldrmntCoList: typeof ldrmntCoList;
|
||||
ldrmntRes: customLdrmntBdst[];
|
||||
};
|
||||
};
|
||||
|
||||
type ldrmntCoSttnActions = {
|
||||
type ldrmntActions = {
|
||||
};
|
||||
|
||||
export type ldrmntCoSttnType = ldrmntCoSttnState & ldrmntCoSttnActions;
|
||||
export type ldrmntType = ldrmntState & ldrmntActions;
|
||||
|
||||
export const ldrmntCoSttnStateExport: ldrmntCoSttnState = {
|
||||
ldrmntCoSttn: {
|
||||
ldrmntCoSttHeadList: coSttHeadList,
|
||||
ldrmntCoSttNodeList: coSttNodeList,
|
||||
ldrmntCoSttnRes: ldrmntCoList,
|
||||
export const ldrmntStateExport: ldrmntState = {
|
||||
ldrmnt: {
|
||||
ldrmntHeadList: ldrmntHeadList,
|
||||
ldrmntNodeList: ldrmntNodeList,
|
||||
excelList: [],
|
||||
isInit: false,
|
||||
ldrmntCoList: ldrmntCoList,
|
||||
ldrmntRes: ldrmntRes,
|
||||
},
|
||||
};
|
||||
|
||||
export const ldrmntCoSttnActionsExport: (set: any) => ldrmntCoSttnActions = (
|
||||
export const ldrmntActionsExport: (set: any) => ldrmntActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
ldrmntCoSttnInit: async (code: string | number) => {
|
||||
try{
|
||||
|
||||
set((state: ldrmntCoSttnState) => {
|
||||
return {
|
||||
...state,
|
||||
ldrmntCoSttn: {
|
||||
...state.ldrmntCoSttn,
|
||||
ldrmntCoSttnRes: ldrmntCoSttnRes,
|
||||
isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
ldrmntInit: async (code: string | number) => {
|
||||
try {
|
||||
|
||||
set((state: ldrmntState) => {
|
||||
return {
|
||||
...state,
|
||||
ldrmnt: {
|
||||
...state.ldrmnt,
|
||||
isInit: false,
|
||||
ldrmntCoList: ldrmntCoList,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
ldrmntInsert: async (ldrmntRes: []) => {
|
||||
try {
|
||||
|
||||
const response = await postFectch(
|
||||
`/reuseFc/request`,
|
||||
[]
|
||||
// JSON.stringify(writeRgtrAndMdfr([ldrmntRes]))
|
||||
);
|
||||
|
||||
return set((state: ldrmntState) => ({
|
||||
...state,
|
||||
ldrmnt: {
|
||||
...state.ldrmnt,
|
||||
ldrmntRes: response.data,
|
||||
isInit: false,
|
||||
},
|
||||
}));
|
||||
} catch (error) {
|
||||
console.error("Error updating ldrmnt:", error);
|
||||
}
|
||||
},
|
||||
fileDelete: async (atflCd: string) => {
|
||||
try {
|
||||
const response = await deleteFectch(
|
||||
`/attach-service/api/v1/atfl/attachments/atflCd//${atflCd}`,
|
||||
undefined,
|
||||
fetchType.CS
|
||||
);
|
||||
|
||||
console.log("File deleted successfully:", response);
|
||||
return set((state: ldrmntState) => ({
|
||||
...state,
|
||||
ldrmnt: {
|
||||
...state.ldrmnt,
|
||||
isInit: false,
|
||||
},
|
||||
}));
|
||||
} catch (error) {
|
||||
console.error("Error deleting file:", error);
|
||||
}
|
||||
},
|
||||
fileDownLoad: async (atflCd: string) => {
|
||||
try {
|
||||
const response = await getFetch(
|
||||
fetchType.CS,
|
||||
`/attach-service/api/v1/atflcd/download/${atflCd}`
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Error downloading file: ${response.statusText}`);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error downloading file:", error);
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import { fetchType, getFetch } from "@/components/lib/api";
|
||||
import { fetchType, getFetch, postFectch } from "@/components/lib/api";
|
||||
import type { TableUpperProps } from "../../common/type/header";
|
||||
import { pbnstPrfmncSttnHeadListExport, pbnstYearHeadListExport } from "./headList";
|
||||
import type { FcPrfType, PrfType } from "../../prfmncReg/pbnstPrfmncReg/type";
|
||||
import type { pubHasuType } from "../../ruseFcltMng/fcltReg/pbnstReg/type";
|
||||
import type { pubHasuType, selectLabel } from "../../ruseFcltMng/fcltReg/pbnstReg/type";
|
||||
import type { ReturnType } from "@common/business_components";
|
||||
|
||||
type pbnstPrfmncSttnActions = {
|
||||
@@ -20,7 +20,8 @@ export type pbnstPrfmncSttnState = {
|
||||
pbnstPrfmncRes: PrfType[];
|
||||
prfmncRes: any[];
|
||||
isInit: boolean;
|
||||
rawData:any[];
|
||||
rawData: any[];
|
||||
selectYearList: selectLabel[]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +33,8 @@ export const pbnstPrfmncSttnExport: pbnstPrfmncSttnState = {
|
||||
pbnstPrfmncRes: pbnstPrfmncRes,
|
||||
prfmncRes: prfmncRes,
|
||||
isInit: false,
|
||||
rawData:[]
|
||||
rawData: [],
|
||||
selectYearList: []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,20 +71,29 @@ export const pbnstPrfmncSttnActionsExport: (set: any) => pbnstPrfmncSttnActions
|
||||
return {
|
||||
tableHeadMaker: (startYear: number, endYear: number) => {
|
||||
let yearHeader: TableUpperProps[] = [...pbnstPrfmncSttnHeadListExport];
|
||||
const selectList = [] as unknown as selectLabel[]
|
||||
for (let i = startYear; i <= endYear; i++) {
|
||||
const yearHead = JSON.parse(JSON.stringify(pbnstYearHeadListExport));
|
||||
if (yearHead) {
|
||||
yearHead.forEach((item: { id?: number; }) => {if(item.id)item.id = i + item.id;})
|
||||
yearHead.forEach((item: { id?: number; }) => {
|
||||
if (item.id) {
|
||||
item.id = i + item.id;
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
if (yearHead[0])
|
||||
yearHead[0].title = i + "년도"
|
||||
}
|
||||
yearHeader = [...yearHeader, ...yearHead]
|
||||
selectList.push({text: i + "년도", val: String(i)} )
|
||||
}
|
||||
set((state: pbnstPrfmncSttnState) => {
|
||||
return {
|
||||
...state,
|
||||
pbnstPrfmncSttn: {
|
||||
pbnstPrfHeadList: [...yearHeader]
|
||||
pbnstPrfHeadList: [...yearHeader],
|
||||
selectYearList: selectList
|
||||
},
|
||||
};
|
||||
});
|
||||
@@ -152,27 +163,28 @@ export const pbnstPrfmncSttnActionsExport: (set: any) => pbnstPrfmncSttnActions
|
||||
const yearVal = { year: year, pbnstRuseFcltPk: acc.pbnstRuseFcltFk }
|
||||
yearVal[year + 'inUsage'] = inUsageSum;
|
||||
yearVal[year + 'outUsage'] = outUsageSum;
|
||||
yearVal[year + 'total'] = inUsageSum+outUsageSum;
|
||||
yearVal[year + 'total'] = inUsageSum + outUsageSum;
|
||||
yearsData.push(yearVal);
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
const resData:any[] = []
|
||||
pbnstRes.forEach((acc) => { let data = yearsData.find((item) => item.pbnstRuseFcltPk.substring(0, 11) === acc.bscFctCd)
|
||||
if(data){
|
||||
resData.push({...data, ...acc})
|
||||
const resData: any[] = []
|
||||
pbnstRes.forEach((acc) => {
|
||||
let data = yearsData.find((item) => item.pbnstRuseFcltPk.substring(0, 11) === acc.bscFctCd)
|
||||
if (data) {
|
||||
resData.push({ ...data, ...acc })
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
return set((state: pbnstPrfmncSttnState) => ({
|
||||
...state,
|
||||
pbnstPrfmncSttn: {
|
||||
...state.pbnstPrfmncSttn,
|
||||
prfmncRes:resData,
|
||||
rawData:res.data
|
||||
prfmncRes: resData,
|
||||
rawData: res.data
|
||||
},
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -86,16 +86,17 @@ import {
|
||||
import { rswtChkStateExport, rswtChkSttnActionsExport, type rswtChkSttnState, type rswtChkSttnType } from "./prfmncSttn/chkgdnSttn/rswtChkgdnSttn";
|
||||
import { pbnstSttnActionsExport, pbnstSttnStateExport, type pbnstSttnState, type pbnstSttnType } from "./ruseFcltMng/fcltSttn/pbnstSttn";
|
||||
import { coSttnActionsExport, coSttnStateExport, type coSttnState, type coSttnType } from "./matDmd/coSttn"; // 옮겨야함
|
||||
import { ldrmntCoSttnActionsExport, ldrmntCoSttnStateExport, type ldrmntCoSttnState, type ldrmntCoSttnType } from "./matDmd/ldrmntCoSttn"; // 옮겨야함
|
||||
import { searchActions, type comFcltActions, type comFcltState } from "./common/searchCode";
|
||||
import { pbnstPrfmncActionsExport, pbnstPrfmncStateExport, type pbnstPrfmncState, type pbnstPrfmncType } from "./prfmncReg/pbnstPrfmncReg";
|
||||
import { coRvwActionsExport, coRvwStateExport, type coRvwState, type coRvwType } from "./matDmd/coMatRvw";
|
||||
import { ruseHstryActionsExport, ruseHstryStateExport, type ruseHstryState, type ruseHstryType } from "./matDmd/ruseRvwHstry";
|
||||
import { pbnstPrfmncSttnActionsExport, pbnstPrfmncSttnExport, type pbnstPrfmncSttnState, type pbnstPrfmncSttnType } from "./prfmncSttn/pbnstPrfmncSttn";
|
||||
import { drgtActionsExport, drgtStateExport, type drgtState, type drgtType } from "./matDmd/drgtSttn";
|
||||
import { ruseCaseActionsExport, ruseCaseStateExport, type ruseCaseType, type ruseCaseState } from "./matDmd/ruseCaseMng";
|
||||
import { rainStatActionsExport, rainStatExport, type rainStatState, type rainStatType } from "./stats/rainStat";
|
||||
import { type rswtStatType, type rswtStatState, rswtStatExport, rswtStatActionsExport } from "./stats/rswtStat";
|
||||
import { matStatActionsExport, matStatExport, type matStatState, type matStatType } from "./stats/matStat";
|
||||
import { ldrmntActionsExport, ldrmntStateExport, type ldrmntState, type ldrmntType } from "./matDmd/ldrmntCoSttn";
|
||||
|
||||
export type WrStore = comCodeType &
|
||||
pubFacType &
|
||||
@@ -114,11 +115,12 @@ export type WrStore = comCodeType &
|
||||
pbnstSttnType&
|
||||
comFcltActions&comFcltState&
|
||||
coSttnType& // 옮겨야함
|
||||
ldrmntCoSttnType& // 옮겨야함
|
||||
ldrmntType& // 옮겨야함
|
||||
pbnstPrfmncType&
|
||||
coRvwType&
|
||||
ruseHstryType&
|
||||
pbnstPrfmncSttnType&
|
||||
drgtType&
|
||||
ruseCaseType&
|
||||
rainStatType&
|
||||
rswtStatType&
|
||||
@@ -142,11 +144,12 @@ export const StoreZus = (
|
||||
rswtChkSttnState &
|
||||
pbnstSttnState&
|
||||
coSttnState& // 옮겨야함
|
||||
ldrmntCoSttnState& // 옮겨야함
|
||||
ldrmntState& // 옮겨야함
|
||||
pbnstPrfmncState&
|
||||
coRvwState&
|
||||
ruseHstryState&
|
||||
pbnstPrfmncSttnState&
|
||||
drgtState&
|
||||
ruseCaseState&
|
||||
rainStatState&
|
||||
rswtStatState&
|
||||
@@ -168,11 +171,12 @@ export const StoreZus = (
|
||||
...rswtChkStateExport,
|
||||
...pbnstSttnStateExport,
|
||||
...coSttnStateExport, // 옮겨야함
|
||||
...ldrmntCoSttnStateExport, // 옮겨야함
|
||||
...ldrmntStateExport, // 옮겨야함
|
||||
...pbnstPrfmncStateExport,
|
||||
...coRvwStateExport,
|
||||
...ruseHstryStateExport,
|
||||
...pbnstPrfmncSttnExport,
|
||||
...drgtStateExport,
|
||||
...ruseCaseStateExport,
|
||||
...rainStatExport,
|
||||
...rswtStatExport,
|
||||
@@ -205,11 +209,12 @@ export const StoreZus = (
|
||||
...rswtChkSttnActionsExport(set),
|
||||
...pbnstSttnActionsExport(set),
|
||||
...coSttnActionsExport(set), // 옮겨야함
|
||||
...ldrmntCoSttnActionsExport(set), // 옮겨야함
|
||||
...ldrmntActionsExport(set), // 옮겨야함
|
||||
...pbnstPrfmncActionsExport(set),
|
||||
...coRvwActionsExport(set),
|
||||
...ruseHstryActionsExport(set),
|
||||
...pbnstPrfmncSttnActionsExport(set),
|
||||
...drgtActionsExport(set),
|
||||
...ruseCaseActionsExport(set),
|
||||
...rainStatActionsExport(set),
|
||||
...rswtStatActionsExport(set),
|
||||
|
||||
Reference in New Issue
Block a user