wr: 36 계통도 평면도 외
This commit is contained in:
@@ -215,7 +215,8 @@ export default function Rdi() {
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll min-[1200px]:overflow-x-hidden">
|
||||
<div className="w-[120%] min-[1200px]:w-[100%]">
|
||||
<UiTable cellClick={ undefined } headName={"RDII추정"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true} />
|
||||
<UiTable cellClick={ undefined } headName={"RDII추정"} tableData={mainList} headlist={upheadList}
|
||||
pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true} />
|
||||
</div>
|
||||
<UnderComment divHeight={"0"} commentArray={commentArray} />
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,7 @@ import { Button, Label } from "@common/components/ui";
|
||||
import { useEffect, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import * as XLSX from "xlsx";
|
||||
|
||||
export default function RuseCaseMng() {
|
||||
const { code, ruseCaseMng, selectRuseCaseMng, ruseCaseMngInit } = useWrStore(
|
||||
@@ -76,7 +77,9 @@ export default function RuseCaseMng() {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (excelList !== undefined && excelList.length === 0) {
|
||||
if (!excelList) return;
|
||||
|
||||
if (excelList.length === 0) {
|
||||
toast.error(t("excelDownErrMsg"));
|
||||
return;
|
||||
}
|
||||
@@ -86,74 +89,93 @@ export default function RuseCaseMng() {
|
||||
}
|
||||
// 받은 파일 바인너리 처리
|
||||
const blobRet = await response.arrayBuffer();
|
||||
if (excelList) {
|
||||
const excelData1 = excelList.map((item) => {
|
||||
return [
|
||||
item.ruseBizNm,
|
||||
item.bizBgngDate,
|
||||
item.bizEndDate,
|
||||
item.splyFcltKnd,
|
||||
item.splyFcltNm,
|
||||
item.splyFcltCpct,
|
||||
item.dmdFcltNm,
|
||||
item.dmdFcltAddr,
|
||||
item.ruseFcltCpct,
|
||||
item.ruseFcltPplLen,
|
||||
item.ruseFcltUsg,
|
||||
item.ruseFcltSplyCpct,
|
||||
item.ruseFcltPrcsMsrc,
|
||||
item.grnteWqUsg,
|
||||
item.grnteWqGrssClfg,
|
||||
item.grnteWqCombResdch,
|
||||
item.grnteWqTrbt,
|
||||
item.grnteWqBod,
|
||||
item.grnteWqSmll,
|
||||
item.grnteWqCrmty,
|
||||
item.grnteWqTn,
|
||||
item.grnteWqTp,
|
||||
item.grnteWqPh,
|
||||
item.grnteWqClIonQnt,
|
||||
item.grnteWqCndctStat,
|
||||
item.grnteWqRmrk,
|
||||
item.reqBizGrssCst,
|
||||
item.reqBizReuseFcltCst,
|
||||
item.reqBizPplCst,
|
||||
item.reqBizArchCst,
|
||||
item.reqBizMchnCst,
|
||||
item.reqBizMtrngCst,
|
||||
item.reqBizGisCst,
|
||||
item.reqBizCctvCst,
|
||||
item.reqBizCmcnCst,
|
||||
item.reqBizWstCst,
|
||||
item.reqBizDesignCst,
|
||||
item.reqBizSpvsCst,
|
||||
item.reqBizSbsdCst,
|
||||
item.reqBizEtc,
|
||||
item.prcmPlanGrssCst,
|
||||
item.prcmPlanNlep,
|
||||
item.prcmPlanLcep,
|
||||
item.prcmPlanBrdnCst,
|
||||
item.prcmPlanEcqrRt,
|
||||
item.clclnGrssCst,
|
||||
item.clclnNlep,
|
||||
item.clclnLcep,
|
||||
item.clclnBrdnCst,
|
||||
item.clclnEcqrRt,
|
||||
];
|
||||
});
|
||||
|
||||
const sheetParameter: SheetParameter[] = [
|
||||
{
|
||||
data: excelData1,
|
||||
headerNum: 2,
|
||||
headerRange: "A1:AX1",
|
||||
sheetName: "물재이용사례",
|
||||
startCol: "A",
|
||||
},
|
||||
const replaceHeaderText = (text: string) =>
|
||||
text
|
||||
.replaceAll("사업시작일", "사업시작년")
|
||||
.replaceAll("사업종료일", "사업종료년");
|
||||
|
||||
const wb = XLSX.read(blobRet, { type: "array" });
|
||||
wb.SheetNames.forEach((sheetName) => {
|
||||
const sheet = wb.Sheets[sheetName];
|
||||
if (!sheet) return;
|
||||
|
||||
Object.keys(sheet).forEach((addr) => {
|
||||
if (addr.startsWith("!")) return;
|
||||
const cell = sheet[addr] as XLSX.CellObject | undefined;
|
||||
if (!cell || typeof cell.v !== "string") return;
|
||||
const next = replaceHeaderText(cell.v);
|
||||
if (next !== cell.v) cell.v = next;
|
||||
});
|
||||
});
|
||||
const updatedBlob = XLSX.write(wb, { bookType: "xlsx", type: "array" });
|
||||
|
||||
const excelData1 = excelList.map((item) => {
|
||||
return [
|
||||
item.ruseBizNm,
|
||||
item.bizBgngDate,
|
||||
item.bizEndDate,
|
||||
item.splyFcltKnd,
|
||||
item.splyFcltNm,
|
||||
item.splyFcltCpct,
|
||||
item.dmdFcltNm,
|
||||
item.dmdFcltAddr,
|
||||
item.ruseFcltCpct,
|
||||
item.ruseFcltPplLen,
|
||||
item.ruseFcltUsg,
|
||||
item.ruseFcltSplyCpct,
|
||||
item.ruseFcltPrcsMsrc,
|
||||
item.grnteWqUsg,
|
||||
item.grnteWqGrssClfg,
|
||||
item.grnteWqCombResdch,
|
||||
item.grnteWqTrbt,
|
||||
item.grnteWqBod,
|
||||
item.grnteWqSmll,
|
||||
item.grnteWqCrmty,
|
||||
item.grnteWqTn,
|
||||
item.grnteWqTp,
|
||||
item.grnteWqPh,
|
||||
item.grnteWqClIonQnt,
|
||||
item.grnteWqCndctStat,
|
||||
item.grnteWqRmrk,
|
||||
item.reqBizGrssCst,
|
||||
item.reqBizReuseFcltCst,
|
||||
item.reqBizPplCst,
|
||||
item.reqBizArchCst,
|
||||
item.reqBizMchnCst,
|
||||
item.reqBizMtrngCst,
|
||||
item.reqBizGisCst,
|
||||
item.reqBizCctvCst,
|
||||
item.reqBizCmcnCst,
|
||||
item.reqBizWstCst,
|
||||
item.reqBizDesignCst,
|
||||
item.reqBizSpvsCst,
|
||||
item.reqBizSbsdCst,
|
||||
item.reqBizEtc,
|
||||
item.prcmPlanGrssCst,
|
||||
item.prcmPlanNlep,
|
||||
item.prcmPlanLcep,
|
||||
item.prcmPlanBrdnCst,
|
||||
item.prcmPlanEcqrRt,
|
||||
item.clclnGrssCst,
|
||||
item.clclnNlep,
|
||||
item.clclnLcep,
|
||||
item.clclnBrdnCst,
|
||||
item.clclnEcqrRt,
|
||||
];
|
||||
// 버퍼에 있는 엑셀데이터 전달 후 json으로 변환
|
||||
await filePickedBlobArray(blobRet, "물재이용사례현황", sheetParameter);
|
||||
}
|
||||
});
|
||||
|
||||
const sheetParameter: SheetParameter[] = [
|
||||
{
|
||||
data: excelData1,
|
||||
headerNum: 2,
|
||||
headerRange: "A1:AX1",
|
||||
sheetName: "물재이용사례",
|
||||
startCol: "A",
|
||||
},
|
||||
];
|
||||
// 버퍼에 있는 엑셀데이터 전달 후 json으로 변환
|
||||
await filePickedBlobArray(updatedBlob, "물재이용사례현황", sheetParameter);
|
||||
});
|
||||
}, [excelList]);
|
||||
|
||||
|
||||
@@ -45,6 +45,10 @@ import { useTranslation } from "react-i18next";
|
||||
* indexMng: 시설정보
|
||||
* indexBiz: 차수별 정보
|
||||
* 로 하수재이용 시설에 등록된 시설 및 차수별 정보를 관리한다.
|
||||
* 🔗 사용 API
|
||||
* 하수재이용시설을 등록 /reuseFc/pubFc
|
||||
* 첨부파일 삭제 /attach-service/api/v1/atfl/attachments/atflCd//
|
||||
* 첨부파일 다운로드 /attach-service/api/v1/atflcd/download/
|
||||
* */
|
||||
|
||||
export default function PublicReuseFaciltyInsert() {
|
||||
|
||||
@@ -11,14 +11,14 @@ export const ruseCaseHeadListExport: TableUpperProps[] = [
|
||||
},
|
||||
{
|
||||
id: "bizBgngDate",
|
||||
title: "사업시작일",
|
||||
title: "사업시작년",
|
||||
visible: true,
|
||||
row: 0,
|
||||
rowSpan: 2,
|
||||
},
|
||||
{
|
||||
id: "bizEndDate",
|
||||
title: "사업종료일",
|
||||
title: "사업종료년",
|
||||
visible: true,
|
||||
row: 0,
|
||||
rowSpan: 2,
|
||||
|
||||
@@ -35,10 +35,11 @@ export type FilesType = {
|
||||
file: File;
|
||||
};
|
||||
|
||||
const diagramFileTypes = ".pdf,.jpg,.jpeg,.png,.bmp";
|
||||
|
||||
/**
|
||||
* 재이용시설 등록 - 하수재이용 시설등록
|
||||
* 재이용시설 등록 - 하수재이용 시설현황
|
||||
* 재이용시설 등록 - 하수재이용 시설현황
|
||||
* - layout.tsx에 의해 공통 레이아웃이 적용됨
|
||||
* - with-layout 적용
|
||||
* - 하수처리시설에 하수재이용 시설 시설 정보를 등록한다.
|
||||
@@ -459,7 +460,7 @@ export function PbnstMngForm({
|
||||
setFiles={(files: File[] | null) => {
|
||||
if (files) fileHandler(files, "relation");
|
||||
}}
|
||||
fileTypes=".pdf"
|
||||
fileTypes={diagramFileTypes}
|
||||
onFileClick={(index) => {
|
||||
fileDownLoad(
|
||||
relationfiles?.find(
|
||||
@@ -497,7 +498,7 @@ export function PbnstMngForm({
|
||||
setFiles={(files: File[] | null) => {
|
||||
if (files) fileHandler(files, "plan");
|
||||
}}
|
||||
fileTypes=".pdf"
|
||||
fileTypes={diagramFileTypes}
|
||||
onFileClick={(index) => {
|
||||
fileDownLoad(
|
||||
planFiles?.find(
|
||||
|
||||
@@ -93,6 +93,7 @@ export const FileUploader = forwardRef<
|
||||
".jpeg": "image/jpeg",
|
||||
".png": "image/png",
|
||||
".gif": "image/gif",
|
||||
".bmp": "image/bmp",
|
||||
".doc": "application/msword",
|
||||
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
".xls": "application/vnd.ms-excel",
|
||||
|
||||
@@ -24,7 +24,7 @@ export function SearchAddressModal({ open, onOpenChange, onSelect }: SearchAddre
|
||||
size: PAGE_SIZE
|
||||
});
|
||||
const [isResetPage, setIsResetPage] = useState<boolean>(false);
|
||||
const [isResetSelection, setIsResetSelection] = useState<boolean>(false);
|
||||
const [isResetSelection] = useState<boolean>(false);
|
||||
const [selectedRowIndex, setSelectedRowIndex] = useState<number | undefined>(undefined);
|
||||
const [selectedZip, setSelectedZip] = useState<Zip>();
|
||||
const [isSelectedZip, setIsSelectedZip] = useState<boolean>(false);
|
||||
|
||||
@@ -119,7 +119,6 @@ export function UiTable({
|
||||
};
|
||||
|
||||
const leafCols = getLeafCols(headlist);
|
||||
|
||||
return (
|
||||
<>
|
||||
{headName ? (
|
||||
@@ -263,7 +262,11 @@ export function UiTable({
|
||||
<TableCell
|
||||
colSpan={
|
||||
headlist.filter((item) => item.visible != false).length -
|
||||
headlist.filter((item) => item.visible != false && item.colSpan).length
|
||||
headlist.filter(
|
||||
(item) =>
|
||||
item.visible != false &&
|
||||
(item.colSpan || ["A", "B", "C"].includes(item.id)),
|
||||
).length
|
||||
}
|
||||
className="h-24 text-center text-gray-500"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user