Merge branch 'iipbs/sn/dev'
This commit is contained in:
@@ -15,7 +15,7 @@ NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
|
|||||||
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
||||||
NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
|
NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
|
||||||
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service
|
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service
|
||||||
NEXT_PUBLIC_NGII_URL = http://172.29.143.87
|
NEXT_PUBLIC_NGII_URL = http://172.29.143.87/poiact
|
||||||
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x}
|
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,5 +16,5 @@ NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
|||||||
NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
|
NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
|
||||||
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service
|
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service
|
||||||
NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/dc-service
|
NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/dc-service
|
||||||
NEXT_PUBLIC_NGII_URL = http://172.29.143.87
|
NEXT_PUBLIC_NGII_URL = http://172.29.143.87/poiact
|
||||||
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x}
|
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x}
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ export const generateYearDates = (searchYear: string) => {
|
|||||||
return dates;
|
return dates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type FacilityType = {
|
||||||
|
bscFctCd: string;
|
||||||
|
bscFctNm: string;
|
||||||
|
fcltyCpc: number | '';
|
||||||
|
trtFrfNm: string | '';
|
||||||
|
efflWqltStndrdNm: string | '';
|
||||||
|
}
|
||||||
|
|
||||||
export default function DashBoard() {
|
export default function DashBoard() {
|
||||||
// 입력값 상태 관리
|
// 입력값 상태 관리
|
||||||
const { Common, initializeCommonData, searchMainGraph, searchRainManage, searchOperationStatus, OperationStatus, RainManage, MainGraph, PlanFclty } = useFoStore((state) => state);
|
const { Common, initializeCommonData, searchMainGraph, searchRainManage, searchOperationStatus, OperationStatus, RainManage, MainGraph, PlanFclty } = useFoStore((state) => state);
|
||||||
@@ -48,26 +56,10 @@ export default function DashBoard() {
|
|||||||
const [filteredSigunData, setFilteredSigunData] = useState<SelectDataType[]>([{ text: "전체", val: '0' }]);
|
const [filteredSigunData, setFilteredSigunData] = useState<SelectDataType[]>([{ text: "전체", val: '0' }]);
|
||||||
const [sidoValue, setSidoValue] = useState<string>('0');
|
const [sidoValue, setSidoValue] = useState<string>('0');
|
||||||
const [sigunValue, setSigunValue] = useState<string>('0');
|
const [sigunValue, setSigunValue] = useState<string>('0');
|
||||||
const {
|
const { isInit, selectSearchYear, btnClass, selectSidoData, selectSigunData, } = Common;
|
||||||
isInit,
|
const { planFcltyList } = PlanFclty;
|
||||||
selectSearchYear,
|
const { operationalStatusList } = OperationStatus;
|
||||||
btnClass,
|
const { excelList } = RainManage;
|
||||||
selectSidoData,
|
|
||||||
selectSigunData,
|
|
||||||
} = Common;
|
|
||||||
|
|
||||||
const {
|
|
||||||
planFcltyList
|
|
||||||
} = PlanFclty;
|
|
||||||
|
|
||||||
const {
|
|
||||||
operationalStatusList
|
|
||||||
} = OperationStatus;
|
|
||||||
|
|
||||||
const {
|
|
||||||
excelList
|
|
||||||
} = RainManage;
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
chart_inflowRain,
|
chart_inflowRain,
|
||||||
chart_bodRain,
|
chart_bodRain,
|
||||||
@@ -79,10 +71,10 @@ export default function DashBoard() {
|
|||||||
} = MainGraph;
|
} = MainGraph;
|
||||||
|
|
||||||
/******************선택된 데이터******************/
|
/******************선택된 데이터******************/
|
||||||
// 연도
|
|
||||||
const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || '0');
|
const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || '0'); // 연도
|
||||||
// 시설명
|
// 시설명
|
||||||
const [fcltyList, setFcltyList] = useState<{ bscFctCd: string, bscFctNm: string, fcltyCpc: number | '', trtFrfNm: string | '', efflWqltStndrdNm: string | '' }>({
|
const [fcltyList, setFcltyList] = useState<FacilityType>({
|
||||||
bscFctCd: '11000SW001R',
|
bscFctCd: '11000SW001R',
|
||||||
bscFctNm: '난지',
|
bscFctNm: '난지',
|
||||||
fcltyCpc: 860000,
|
fcltyCpc: 860000,
|
||||||
@@ -90,7 +82,7 @@ export default function DashBoard() {
|
|||||||
efflWqltStndrdNm: '500톤 이상(Ⅲ지역)'
|
efflWqltStndrdNm: '500톤 이상(Ⅲ지역)'
|
||||||
});
|
});
|
||||||
|
|
||||||
const [searchFcltyList, setSearchFcltyList] = useState<{ bscFctCd: string, bscFctNm: string, fcltyCpc: number | '', trtFrfNm: string | '', efflWqltStndrdNm: string | '' }>({
|
const [searchFcltyList, setSearchFcltyList] = useState<FacilityType>({
|
||||||
bscFctCd: '',
|
bscFctCd: '',
|
||||||
bscFctNm: '',
|
bscFctNm: '',
|
||||||
fcltyCpc: '',
|
fcltyCpc: '',
|
||||||
@@ -111,7 +103,7 @@ export default function DashBoard() {
|
|||||||
}
|
}
|
||||||
}, [isInit, initializeCommonData]);
|
}, [isInit, initializeCommonData]);
|
||||||
|
|
||||||
const handleFacilityChange = (facility: { bscFctCd: string, bscFctNm: string, fcltyCpc: number | '', trtFrfNm: string | '', efflWqltStndrdNm: string | '' }) => {
|
const handleFacilityChange = (facility: FacilityType) => {
|
||||||
setFcltyList(facility);
|
setFcltyList(facility);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -255,60 +247,6 @@ export default function DashBoard() {
|
|||||||
headerRange: 'A1:J1',
|
headerRange: 'A1:J1',
|
||||||
sheetName: '주요그래프'
|
sheetName: '주요그래프'
|
||||||
}
|
}
|
||||||
/* {
|
|
||||||
data: [['날짜', '강수량'],...chart_inflowRain.map((item) => [item.label, roundNumber(item.barVal0, 1)])],
|
|
||||||
headerNum: 1,
|
|
||||||
headerRange: 'A1:B1',
|
|
||||||
sheetName: '강수량'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: [['날짜', '유입하수량'],...chart_inflowRain.map((item) => [item.label, roundNumber(item.lineVal1, 0)])],
|
|
||||||
headerNum: 1,
|
|
||||||
headerRange: 'A1:B1',
|
|
||||||
sheetName: '유입하수량'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: [['날짜', '시설용량'],...chart_inflowRain.map((item) => [item.label, roundNumber(item.lineVal0, 0)])],
|
|
||||||
headerNum: 1,
|
|
||||||
headerRange: 'A1:B1',
|
|
||||||
sheetName: '시설용량'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: [['날짜', '유입BOD'],...chart_bodRain.map((item) => [item.label, roundNumber(item.lineVal0, 1)])],
|
|
||||||
headerNum: 1,
|
|
||||||
headerRange: 'A1:B1',
|
|
||||||
sheetName: '유입BOD'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: [['날짜', '유입T-P'],...chart_inflTp.map((item) => [item.label, roundNumber(item.val, 3)])],
|
|
||||||
headerNum: 1,
|
|
||||||
headerRange: 'A1:B1',
|
|
||||||
sheetName: '유입T-P'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: [['날짜', '총인유입T-P'],...chart_chongInTp.map((item) => [item.label, roundNumber(item.val, 3)])],
|
|
||||||
headerNum: 1,
|
|
||||||
headerRange: 'A1:B1',
|
|
||||||
sheetName: '총인유입T-P'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: [['날짜', '방류T-P'],...chart_efflTp.map((item) => [item.label, roundNumber(item.val, 3)])],
|
|
||||||
headerNum: 1,
|
|
||||||
headerRange: 'A1:B1',
|
|
||||||
sheetName: '방류T-P'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: [['날짜', '유입T-N'],...chart_inflTn.map((item) => [item.label, roundNumber(item.val, 3)])],
|
|
||||||
headerNum: 1,
|
|
||||||
headerRange: 'A1:B1',
|
|
||||||
sheetName: '유입T-N'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: [['날짜', '방류T-N'],...chart_efflTn.map((item) => [item.label, roundNumber(item.val, 3)])],
|
|
||||||
headerNum: 1,
|
|
||||||
headerRange: 'A1:B1',
|
|
||||||
sheetName: '방류T-N'
|
|
||||||
} */
|
|
||||||
];
|
];
|
||||||
|
|
||||||
downloadMultipleExcel('주요그래프', sheetParameter);
|
downloadMultipleExcel('주요그래프', sheetParameter);
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ const commentArray = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export default function PlanSewage() {
|
export default function PlanSewage() {
|
||||||
const {Common
|
const { Common
|
||||||
,PlanSewage
|
, PlanSewage
|
||||||
,PlanSewageSearch
|
, PlanSewageSearch
|
||||||
,initializeCommonData
|
, initializeCommonData
|
||||||
,searchPlanSewageList
|
, searchPlanSewageList
|
||||||
} = useFoStore((state) => state) || { processAreaList: { processAreaList: [] }};
|
} = useFoStore((state) => state) || { processAreaList: { processAreaList: [] } };
|
||||||
|
|
||||||
const {
|
const {
|
||||||
isInit,
|
isInit,
|
||||||
@@ -109,12 +109,12 @@ export default function PlanSewage() {
|
|||||||
input.value = "";
|
input.value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ref.current.sidoValue='11';
|
ref.current.sidoValue = '11';
|
||||||
searchPlanSewage(ref.current, 1, 10);
|
searchPlanSewage(ref.current, 1, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(!excelTrigger) return;
|
if (!excelTrigger) return;
|
||||||
|
|
||||||
if (excelList && excelList.length > 0) {
|
if (excelList && excelList.length > 0) {
|
||||||
downloadExcel({
|
downloadExcel({
|
||||||
@@ -130,29 +130,29 @@ export default function PlanSewage() {
|
|||||||
* 콜백함수
|
* 콜백함수
|
||||||
*/
|
*/
|
||||||
// 조회
|
// 조회
|
||||||
const searchPlanSewage = useCallback(({ partValue, regionValue, unitWaterShedValue, middleRegionValue, envPartValue, sidoValue, sigunValue }: ReturnType, pageNo: number, pageCnt:number=20) => {
|
const searchPlanSewage = useCallback(({ partValue, regionValue, unitWaterShedValue, middleRegionValue, envPartValue, sidoValue, sigunValue }: ReturnType, pageNo: number, pageCnt: number = 20) => {
|
||||||
let nameCd, partStr
|
let nameCd, partStr
|
||||||
switch (partValue) {
|
switch (partValue) {
|
||||||
case 'R':
|
case 'R':
|
||||||
if (regionValue !== '0') {
|
if (regionValue !== '0') {
|
||||||
if(unitWaterShedValue==='0') nameCd = regionValue;
|
if (unitWaterShedValue === '0') nameCd = regionValue;
|
||||||
else if (middleRegionValue==='0') nameCd = unitWaterShedValue;
|
else if (middleRegionValue === '0') nameCd = unitWaterShedValue;
|
||||||
else nameCd = middleRegionValue;
|
else nameCd = middleRegionValue;
|
||||||
}
|
}
|
||||||
partStr = partValue
|
partStr = partValue
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if(sidoValue !== '0') nameCd = ref.current.sidoValue!="0"?ref.current.sidoValue:sidoValue;
|
if (sidoValue !== '0') nameCd = ref.current.sidoValue != "0" ? ref.current.sidoValue : sidoValue;
|
||||||
if(sigunValue !== '0') nameCd = sigunValue;
|
if (sigunValue !== '0') nameCd = sigunValue;
|
||||||
partStr = envPartValue !== '0' ? envPartValue:partValue;
|
partStr = envPartValue !== '0' ? envPartValue : partValue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(partStr === 'G'){
|
if (partStr === 'G') {
|
||||||
partValue = partValue==='G'?'A':partValue;
|
partValue = partValue === 'G' ? 'A' : partValue;
|
||||||
searchPlanSewageList(pageNo, pageCnt, searchYear, partValue);
|
searchPlanSewageList(pageNo, pageCnt, searchYear, partValue);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
searchPlanSewageList(pageNo, pageCnt, searchYear, partStr, nameCd || '0', fcltCpct, operationValue, fcltyName.trim() !== "" || fcltyName.trim() !== null ? fcltyName : undefined);
|
searchPlanSewageList(pageNo, pageCnt, searchYear, partStr, nameCd || '0', fcltCpct, operationValue, fcltyName.trim() !== "" || fcltyName.trim() !== null ? fcltyName : undefined);
|
||||||
}
|
}
|
||||||
}, [operationValue, fcltyName, searchPlanSewageList, searchYear, fcltCpct]);
|
}, [operationValue, fcltyName, searchPlanSewageList, searchYear, fcltCpct]);
|
||||||
@@ -162,7 +162,7 @@ export default function PlanSewage() {
|
|||||||
*/
|
*/
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isInit) {
|
if (!isInit) {
|
||||||
if(!initTrigger){
|
if (!initTrigger) {
|
||||||
initializeCommonData();
|
initializeCommonData();
|
||||||
searchPlanSewage(ref.current, 1, 10);
|
searchPlanSewage(ref.current, 1, 10);
|
||||||
setInitTrigger(true);
|
setInitTrigger(true);
|
||||||
@@ -170,9 +170,9 @@ export default function PlanSewage() {
|
|||||||
}
|
}
|
||||||
}, [isInit, initializeCommonData, searchPlanSewageList, selectSearchYear, initTrigger, searchPlanSewage]);
|
}, [isInit, initializeCommonData, searchPlanSewageList, selectSearchYear, initTrigger, searchPlanSewage]);
|
||||||
|
|
||||||
const chkVal = useCallback((returntype:ReturnType) => {
|
const chkVal = useCallback((returntype: ReturnType) => {
|
||||||
// setWidthSize(returntype.partValue=='A' ?"w-[120%]":"w-[130%]")
|
// setWidthSize(returntype.partValue=='A' ?"w-[120%]":"w-[130%]")
|
||||||
setUpheadList(returntype.partValue == 'R' ? upHeadList2 : returntype.partValue == 'G'?upHeadList3:upHeadList1);
|
setUpheadList(returntype.partValue == 'R' ? upHeadList2 : returntype.partValue == 'G' ? upHeadList3 : upHeadList1);
|
||||||
setResetPage(true);
|
setResetPage(true);
|
||||||
}, [upHeadList1, upHeadList2, upHeadList3]);
|
}, [upHeadList1, upHeadList2, upHeadList3]);
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ export default function PlanSewage() {
|
|||||||
return (
|
return (
|
||||||
<MainDiv>
|
<MainDiv>
|
||||||
<Title title="계획하수량 산정지표 현황" />
|
<Title title="계획하수량 산정지표 현황" />
|
||||||
<SearchBaseForm
|
<SearchBaseForm
|
||||||
leftChildren={<>
|
leftChildren={<>
|
||||||
<SelectBox className="col-span-3" label={labelArray[3] as string} selectArray={selectUpdownData} onSelectValue={(val) => setFcltCpct(val.toString())} value={fcltCpct} selectClass={undefined} />
|
<SelectBox className="col-span-3" label={labelArray[3] as string} selectArray={selectUpdownData} onSelectValue={(val) => setFcltCpct(val.toString())} value={fcltCpct} selectClass={undefined} />
|
||||||
<SearchInput className={"col-span-3"} label={labelArray[4] as string} textValue={fcltyName} setText={setFcltyName} />
|
<SearchInput className={"col-span-3"} label={labelArray[4] as string} textValue={fcltyName} setText={setFcltyName} />
|
||||||
@@ -212,12 +212,12 @@ export default function PlanSewage() {
|
|||||||
queryClick={chkVal}
|
queryClick={chkVal}
|
||||||
excelClick={excelDownload}
|
excelClick={excelDownload}
|
||||||
initClick={resetVal}
|
initClick={resetVal}
|
||||||
ref={ref} isAdmin={false} initSidoValue={"11"}/>
|
ref={ref} isAdmin={false} initSidoValue={"11"} />
|
||||||
<ListDiv>
|
<ListDiv>
|
||||||
<LoadingOverlay isLoading={isLoading} />
|
<LoadingOverlay isLoading={isLoading} />
|
||||||
<div className="h-full w-full overflow-x-scroll min-[1200px]:overflow-x-hidden">
|
<div className="h-full w-full overflow-x-scroll min-[1200px]:overflow-x-hidden">
|
||||||
<div className="w-[120%] min-[1200px]:w-[100%]">
|
<div className="w-[120%] min-[1200px]:w-[100%]">
|
||||||
<UiTable cellClick={ undefined } headName={"계획하수량 산정지표 현황"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true} />
|
<UiTable cellClick={undefined} headName={"계획하수량 산정지표 현황"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true} />
|
||||||
</div>
|
</div>
|
||||||
<UnderComment divHeight={"5"} commentArray={commentArray} />
|
<UnderComment divHeight={"5"} commentArray={commentArray} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -129,14 +129,14 @@ const selectEnvPartSigunData: SelectDataType[] = [
|
|||||||
// ];
|
// ];
|
||||||
|
|
||||||
// 상향 하향 데이터
|
// 상향 하향 데이터
|
||||||
const selectUpdownData:SelectDataType[] = [
|
const selectUpdownData: SelectDataType[] = [
|
||||||
{ text: "전체", val: '0' },
|
{ text: "전체", val: '0' },
|
||||||
{ text: "500미만", val: '400' },
|
{ text: "500미만", val: '400' },
|
||||||
{ text: "500이상", val: '500' },
|
{ text: "500이상", val: '500' },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 운영 상태 데이터
|
// 운영 상태 데이터
|
||||||
const selectOperationData:SelectDataType[] = [
|
const selectOperationData: SelectDataType[] = [
|
||||||
{ text: "전체", val: '0' },
|
{ text: "전체", val: '0' },
|
||||||
{ text: "가동중", val: '1' },
|
{ text: "가동중", val: '1' },
|
||||||
{ text: "재가동", val: '2' },
|
{ text: "재가동", val: '2' },
|
||||||
@@ -145,7 +145,7 @@ const selectOperationData:SelectDataType[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// 시설 구분 데이터
|
// 시설 구분 데이터
|
||||||
const selectFacilityPartData:SelectDataType[] = [
|
const selectFacilityPartData: SelectDataType[] = [
|
||||||
{ text: "전체", val: '0' },
|
{ text: "전체", val: '0' },
|
||||||
{ text: "공공하수처리시설", val: 'SW' },
|
{ text: "공공하수처리시설", val: 'SW' },
|
||||||
{ text: "오수처리장", val: 'SS' },
|
{ text: "오수처리장", val: 'SS' },
|
||||||
@@ -158,12 +158,18 @@ const selectFacilityPartData:SelectDataType[] = [
|
|||||||
|
|
||||||
// 년도 데이터
|
// 년도 데이터
|
||||||
const getYearData = () => {
|
const getYearData = () => {
|
||||||
const year = new Date().getFullYear();
|
const today = new Date();
|
||||||
const year1 = year - 1;
|
const year = today.getFullYear();
|
||||||
const year2 = year - 2;
|
const month = today.getMonth() + 1;
|
||||||
const year3 = year - 3;
|
|
||||||
const year4 = year - 4;
|
// 상반기(6월까지)는 2년 전, 하반기는 1년 전부터 시작
|
||||||
const year5 = year - 5;
|
const startYear = month <= 6 ? (year - 2) : (year - 1);
|
||||||
|
|
||||||
|
const year1 = startYear;
|
||||||
|
const year2 = startYear - 1;
|
||||||
|
const year3 = startYear - 2;
|
||||||
|
const year4 = startYear - 3;
|
||||||
|
const year5 = startYear - 4;
|
||||||
return [
|
return [
|
||||||
{ text: year1 + "년", val: year1.toString() },
|
{ text: year1 + "년", val: year1.toString() },
|
||||||
{ text: year2 + "년", val: year2.toString() },
|
{ text: year2 + "년", val: year2.toString() },
|
||||||
@@ -173,10 +179,10 @@ const getYearData = () => {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectSearchYear:SelectDataType[] = getYearData();
|
const selectSearchYear: SelectDataType[] = getYearData();
|
||||||
|
|
||||||
// 유량 기간 구분
|
// 유량 기간 구분
|
||||||
const selectFlowTerm : SelectDataType[] = [
|
const selectFlowTerm: SelectDataType[] = [
|
||||||
{ text: "연간", val: '0' },
|
{ text: "연간", val: '0' },
|
||||||
{ text: "하절기", val: '01' },
|
{ text: "하절기", val: '01' },
|
||||||
{ text: "동절기", val: '02' },
|
{ text: "동절기", val: '02' },
|
||||||
@@ -185,15 +191,15 @@ const selectFlowTerm : SelectDataType[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// 유량 기간 구분
|
// 유량 기간 구분
|
||||||
const selectFlowPanel : SelectDataType[] = [
|
const selectFlowPanel: SelectDataType[] = [
|
||||||
{ text: "전체", val: '0'},
|
{ text: "전체", val: '0' },
|
||||||
{ text: "3~10mm미만", val: '2'},
|
{ text: "3~10mm미만", val: '2' },
|
||||||
{ text: "10~20mm미만", val: '3'},
|
{ text: "10~20mm미만", val: '3' },
|
||||||
{ text: "20~30mm미만", val: '4'},
|
{ text: "20~30mm미만", val: '4' },
|
||||||
{ text: "30~40mm미만", val: '5'},
|
{ text: "30~40mm미만", val: '5' },
|
||||||
{ text: "40~50mm미만", val: '6'},
|
{ text: "40~50mm미만", val: '6' },
|
||||||
{ text: "50~60mm미만", val: '7'},
|
{ text: "50~60mm미만", val: '7' },
|
||||||
{ text: "60mm이상", val: '8'},
|
{ text: "60mm이상", val: '8' },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 중권역 데이터
|
// 중권역 데이터
|
||||||
@@ -220,9 +226,9 @@ export const roundUp = (value: number, precision: number = 1): number => {
|
|||||||
* @param day : 일수
|
* @param day : 일수
|
||||||
* @param digit : 소수점 자리수
|
* @param digit : 소수점 자리수
|
||||||
*/
|
*/
|
||||||
export const qltyDataSetting = (value: number, day : number, digit: number) => {
|
export const qltyDataSetting = (value: number, day: number, digit: number) => {
|
||||||
const toZero = digit === 1 ? '0.0' : digit === 2 ? '0.00' : '0.000';
|
const toZero = digit === 1 ? '0.0' : digit === 2 ? '0.00' : '0.000';
|
||||||
return value > 0 ? roundUp((value/day), digit).toFixed(digit) : toZero;
|
return value > 0 ? roundUp((value / day), digit).toFixed(digit) : toZero;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const COD_YEAR = 2021;
|
export const COD_YEAR = 2021;
|
||||||
@@ -234,13 +240,13 @@ export const COD_YEAR = 2021;
|
|||||||
// 처리시설 계획정보 호출 (알에스원)
|
// 처리시설 계획정보 호출 (알에스원)
|
||||||
export const planInfoUrl = '/dc-service/api/v1/nowDmgMtncGnsvy';
|
export const planInfoUrl = '/dc-service/api/v1/nowDmgMtncGnsvy';
|
||||||
|
|
||||||
export const fetchPlanInfo = async (targetYear : string | undefined, ctpvNm : string | undefined, sggNm : string | undefined, fcltyCd : string | undefined) => {
|
export const fetchPlanInfo = async (targetYear: string | undefined, ctpvNm: string | undefined, sggNm: string | undefined, fcltyCd: string | undefined) => {
|
||||||
try {
|
try {
|
||||||
const baseUrl = planInfoUrl;
|
const baseUrl = planInfoUrl;
|
||||||
const queryParams = new URLSearchParams();
|
const queryParams = new URLSearchParams();
|
||||||
if (ctpvNm && ctpvNm !== '전체') queryParams.append('ctpvNm', ctpvNm);
|
if (ctpvNm && ctpvNm !== '전체') queryParams.append('ctpvNm', ctpvNm);
|
||||||
if (sggNm && sggNm !== '전체') queryParams.append('sggNm', sggNm);
|
if (sggNm && sggNm !== '전체') queryParams.append('sggNm', sggNm);
|
||||||
if (targetYear) queryParams.append('targetYear',targetYear);
|
if (targetYear) queryParams.append('targetYear', targetYear);
|
||||||
if (fcltyCd) queryParams.append('swtrmtFcltCd', fcltyCd);
|
if (fcltyCd) queryParams.append('swtrmtFcltCd', fcltyCd);
|
||||||
const queryString = queryParams.toString();
|
const queryString = queryParams.toString();
|
||||||
const url = queryString ? `${baseUrl}?${queryString}` : baseUrl;
|
const url = queryString ? `${baseUrl}?${queryString}` : baseUrl;
|
||||||
@@ -258,16 +264,16 @@ const fetchSidoData = async (): Promise<SelectDataType[]> => {
|
|||||||
const res = await getFetch('fo', '/addr/city');
|
const res = await getFetch('fo', '/addr/city');
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
selectSidoData = [
|
selectSidoData = [
|
||||||
{ text: "전체", val: '0'},
|
{ text: "전체", val: '0' },
|
||||||
...data.map((item: sidoDataType) => ({
|
...data.map((item: sidoDataType) => ({
|
||||||
text: item.sido || '',
|
text: item.sido || '',
|
||||||
val: String(item.adstDstrCd) || ''
|
val: String(item.adstDstrCd) || ''
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
return selectSidoData;
|
return selectSidoData;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('시도 데이터를 가져오는데 실패했습니다:', error);
|
console.error('시도 데이터를 가져오는데 실패했습니다:', error);
|
||||||
return selectSidoData;
|
return selectSidoData;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -279,10 +285,10 @@ const fetchSigunData = async (): Promise<SelectDataType[]> => {
|
|||||||
selectSigunData = [
|
selectSigunData = [
|
||||||
{ text: "전체", val: '0' },
|
{ text: "전체", val: '0' },
|
||||||
...data
|
...data
|
||||||
.map((item: sigunDataType) => ({
|
.map((item: sigunDataType) => ({
|
||||||
text: item.gugun || '',
|
text: item.gugun || '',
|
||||||
val: String(item.adstDstrCd) || ''
|
val: String(item.adstDstrCd) || ''
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
return selectSigunData;
|
return selectSigunData;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -297,7 +303,7 @@ const fetchRegionData = async (): Promise<SelectDataType[]> => {
|
|||||||
const res = await getFetch('fo', '/addr/sarea');
|
const res = await getFetch('fo', '/addr/sarea');
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
return [
|
return [
|
||||||
{ text: "전체", val: '0'},
|
{ text: "전체", val: '0' },
|
||||||
...data.map((item: regionDataType) => ({
|
...data.map((item: regionDataType) => ({
|
||||||
text: item.rvbsn || '',
|
text: item.rvbsn || '',
|
||||||
val: String(item.rvbsnCd) || ''
|
val: String(item.rvbsnCd) || ''
|
||||||
@@ -317,10 +323,10 @@ const fetchMiddleRegionData = async (): Promise<SelectDataType[]> => {
|
|||||||
return [
|
return [
|
||||||
{ text: "전체", val: '0' },
|
{ text: "전체", val: '0' },
|
||||||
...data
|
...data
|
||||||
.map((item: middleRegionDataType) => ({
|
.map((item: middleRegionDataType) => ({
|
||||||
text: item.mdmbsn || '',
|
text: item.mdmbsn || '',
|
||||||
val: String(item.rvbsnCd) || ''
|
val: String(item.rvbsnCd) || ''
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('중권역 데이터를 가져오는데 실패했습니다:', error);
|
console.error('중권역 데이터를 가져오는데 실패했습니다:', error);
|
||||||
@@ -336,10 +342,10 @@ const fetchUnitWaterShedData = async (): Promise<SelectDataType[]> => {
|
|||||||
return [
|
return [
|
||||||
{ text: "전체", val: '0' },
|
{ text: "전체", val: '0' },
|
||||||
...data
|
...data
|
||||||
.map((item: unitWaterShedDataType) => ({
|
.map((item: unitWaterShedDataType) => ({
|
||||||
text: item.lgbsn || '',
|
text: item.lgbsn || '',
|
||||||
val: String(item.rvbsnCd) || ''
|
val: String(item.rvbsnCd) || ''
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('단위유역 데이터를 가져오는데 실패했습니다:', error);
|
console.error('단위유역 데이터를 가져오는데 실패했습니다:', error);
|
||||||
@@ -355,11 +361,11 @@ const fetchEnvPartData = async (): Promise<envPartSelectDataType[]> => {
|
|||||||
selectEnvPartData = [
|
selectEnvPartData = [
|
||||||
{ text: "전체", val: '0', adstDliStrCd: '' },
|
{ text: "전체", val: '0', adstDliStrCd: '' },
|
||||||
...data
|
...data
|
||||||
.map((item: envPartDataType) => ({
|
.map((item: envPartDataType) => ({
|
||||||
text: item.lclgvrnmntNm || '',
|
text: item.lclgvrnmntNm || '',
|
||||||
val: String(item.lclgvrnmntCd) || '',
|
val: String(item.lclgvrnmntCd) || '',
|
||||||
adstDliStrCd: item.adstDliStrCd || ''
|
adstDliStrCd: item.adstDliStrCd || ''
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
return selectEnvPartData;
|
return selectEnvPartData;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -372,7 +378,7 @@ const fetchEnvPartData = async (): Promise<envPartSelectDataType[]> => {
|
|||||||
* Store - expaort
|
* Store - expaort
|
||||||
====================================*/
|
====================================*/
|
||||||
export type CommonAction = {
|
export type CommonAction = {
|
||||||
getMenuAuth : (menuCd : number) => Promise<void>;
|
getMenuAuth: (menuCd: number) => Promise<void>;
|
||||||
initializeCommonData: () => Promise<void>;
|
initializeCommonData: () => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,7 +400,7 @@ export type CommonType = {
|
|||||||
selectFlowPanel: SelectDataType[];
|
selectFlowPanel: SelectDataType[];
|
||||||
selectEnvPartData: envPartSelectDataType[];
|
selectEnvPartData: envPartSelectDataType[];
|
||||||
btnClass: string;
|
btnClass: string;
|
||||||
COD_YEAR : number;
|
COD_YEAR: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
auth: {
|
auth: {
|
||||||
@@ -424,7 +430,7 @@ export const commonState: CommonType = {
|
|||||||
selectFlowPanel: selectFlowPanel,
|
selectFlowPanel: selectFlowPanel,
|
||||||
selectEnvPartData: selectEnvPartData,
|
selectEnvPartData: selectEnvPartData,
|
||||||
btnClass: "p-4 m-2 !mr-10 text-white rounded-sm text-lg font-medium",
|
btnClass: "p-4 m-2 !mr-10 text-white rounded-sm text-lg font-medium",
|
||||||
COD_YEAR : COD_YEAR,
|
COD_YEAR: COD_YEAR,
|
||||||
},
|
},
|
||||||
|
|
||||||
auth: {
|
auth: {
|
||||||
@@ -436,10 +442,12 @@ export const commonState: CommonType = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CommonReducer:(set:(fn: (state: CommonType) => CommonType) => void)=>CommonAction=(set: (fn: (state: CommonType) => CommonType) => void) => {
|
export const CommonReducer = (
|
||||||
|
set: (fn: (state: CommonType) => CommonType) => void
|
||||||
|
): CommonAction => {
|
||||||
return {
|
return {
|
||||||
// 메뉴 권한 확인
|
// 메뉴 권한 확인
|
||||||
getMenuAuth : async (menuCd : number) =>{
|
getMenuAuth: async (menuCd: number) => {
|
||||||
const response = await getFetch(
|
const response = await getFetch(
|
||||||
"local",
|
"local",
|
||||||
`/cms-service/api/v1/menu-authrts/pageinfo/${menuCd}`
|
`/cms-service/api/v1/menu-authrts/pageinfo/${menuCd}`
|
||||||
|
|||||||
+1063
-1114
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@ NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
|
|||||||
NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
||||||
NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
|
NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
|
||||||
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
||||||
NEXT_PUBLIC_NGII_URL = http://172.29.143.87
|
NEXT_PUBLIC_NGII_URL = http://172.29.143.87/poiact
|
||||||
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x}
|
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x}
|
||||||
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
||||||
NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
|
|||||||
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
||||||
NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
|
NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
|
||||||
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service
|
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service
|
||||||
NEXT_PUBLIC_NGII_URL = http://172.29.143.87
|
NEXT_PUBLIC_NGII_URL = http://172.29.143.87/poiact
|
||||||
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x}
|
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x}
|
||||||
NEXT_PUBLIC_HASUDOINFO = https://www.hasudoinfo.or.kr
|
NEXT_PUBLIC_HASUDOINFO = https://www.hasudoinfo.or.kr
|
||||||
NEXT_PUBLIC_HASUDOINFO_IN = http://10.101.163.102:8889
|
NEXT_PUBLIC_HASUDOINFO_IN = http://10.101.163.102:8889
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ type UiHeadProps = {
|
|||||||
row?: number;
|
row?: number;
|
||||||
widthPercent?: number;
|
widthPercent?: number;
|
||||||
rowSpan?: number;
|
rowSpan?: number;
|
||||||
|
colSpan?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function UiTable({
|
export function UiTable({
|
||||||
@@ -136,13 +137,13 @@ export function UiTable({
|
|||||||
<></>
|
<></>
|
||||||
)}
|
)}
|
||||||
<div className={`card !p-0r !m-[1.2rem] ${className}`}>
|
<div className={`card !p-0r !m-[1.2rem] ${className}`}>
|
||||||
<Table variant="secondary" className={widthFixed?"table-fixed":""}>
|
<Table variant="secondary" className={widthFixed ? "table-fixed" : ""}>
|
||||||
{widthFixed?
|
{widthFixed ?
|
||||||
<colgroup>
|
<colgroup>
|
||||||
{leafCols.map(col => (
|
{leafCols.map(col => (
|
||||||
<col key={col.id} style={{ width: col.widthPercent ? `${col.widthPercent}%` : undefined }} />
|
<col key={col.id} style={{ width: col.widthPercent ? `${col.widthPercent}%` : undefined }} />
|
||||||
))}
|
))}
|
||||||
</colgroup>:""}
|
</colgroup> : ""}
|
||||||
<TableHeader ref={headerRef} className="font-bold">
|
<TableHeader ref={headerRef} className="font-bold">
|
||||||
{children ? children : <HeadMakeColSpan upHeadList={headlist} />}
|
{children ? children : <HeadMakeColSpan upHeadList={headlist} />}
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
@@ -261,7 +262,8 @@ export function UiTable({
|
|||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell
|
<TableCell
|
||||||
colSpan={
|
colSpan={
|
||||||
headlist.filter((item) => item.visible != false).length
|
headlist.filter((item) => item.visible != false).length -
|
||||||
|
headlist.filter((item) => item.visible != false && item.colSpan).length
|
||||||
}
|
}
|
||||||
className="h-24 text-center text-gray-500"
|
className="h-24 text-center text-gray-500"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user