feat: 침입수 분석결과, RDII 분석결과 화면에 일련번호, 분석 성공여부 구현
This commit is contained in:
@@ -145,7 +145,7 @@ const IrSetting = () => {
|
||||
alert('오수전환율을 입력해주세요.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const numericInput1 = parseFloat(input1);
|
||||
if (isNaN(numericInput1) || numericInput1 < 0 || numericInput1 > 1) {
|
||||
setIsLoadingResult(false);
|
||||
@@ -316,7 +316,8 @@ const IrSetting = () => {
|
||||
<FormSection
|
||||
name='inputdate'
|
||||
form={form}
|
||||
titleNm='▷ 상수사용량 적용기간'>
|
||||
titleNm='▷ 상수사용량 적용월'>
|
||||
{/* 연월 선택 라이브러리로 수정 필요 */}
|
||||
<DatePicker
|
||||
mode={"single"}
|
||||
field={{
|
||||
|
||||
@@ -38,7 +38,7 @@ const formSchema = z.object({
|
||||
})),
|
||||
// osumap: z.instanceof(File).optional(), // 오수관망도
|
||||
// matching: z.instanceof(File).optional(), // 수용가-맨홀 매칭결과
|
||||
aplcnYm: z.string(), // 상수사용량 적용기간 (YYYYMM 형식)
|
||||
aplcnYm: z.string(), // 상수사용량 적용월 (YYYYMM 형식)
|
||||
rate: z.string(), // 오수전환율
|
||||
// rain: z.instanceof(File).optional(), // 강우자료
|
||||
analysisInfo: z.string().optional(), // 분석 정보
|
||||
@@ -447,7 +447,8 @@ export default function RTKForm() {
|
||||
placeholder="예: 0.75"
|
||||
/>
|
||||
</FormSection>
|
||||
<FormSection name='date' form={form} titleNm='○ 상수사용량 적용기간'>
|
||||
<FormSection name='date' form={form} titleNm='○ 상수사용량 적용월'>
|
||||
{/* 연월 선택 라이브러리로 수정 필요 */}
|
||||
{/* <DatePicker
|
||||
selected={form.watch("date")}
|
||||
onSelect={(date: Date | undefined) => {
|
||||
|
||||
@@ -24,6 +24,7 @@ const formSchema = z.object({
|
||||
type ResultFormValues = z.infer<typeof formSchema>
|
||||
|
||||
const tableColumn = [
|
||||
{ id: 'rowNumber', title: '일련번호' },
|
||||
{ id: 'enoNm', title: '환경청' },
|
||||
{ id: 'ctpvNm', title: '시도' },
|
||||
{ id: 'sggNm', title: '시군구' },
|
||||
@@ -35,7 +36,8 @@ const tableColumn = [
|
||||
{ id: 'cntbArea', title: 'RDII 기여면적' },
|
||||
{ id: 'anlsInfo', title: 'RDII 분석정보' },
|
||||
{ id: 'regDt', title: '분석일자' },
|
||||
{ id: 'rgtrNm', title: '분석자' }
|
||||
{ id: 'rgtrNm', title: '분석자' },
|
||||
{ id: 'scsYn', title: '분석성공여부' }
|
||||
]
|
||||
|
||||
const Result = () => {
|
||||
@@ -101,10 +103,18 @@ const Result = () => {
|
||||
console.log("API: ", `v1/rdiiAnls${queryString ? `?${queryString}` : ''}`);
|
||||
try {
|
||||
const data = await getData(`v1/rdiiAnls${queryString ? `?${queryString}` : ''}`);
|
||||
setTableData(data.content || []);
|
||||
setTotalData(tableData.length);
|
||||
// 일련번호를 추가한 데이터로 변환
|
||||
const dataWithRowNumber = (data.content || []).map((item: any, index: number) => ({
|
||||
...item,
|
||||
rowNumber: index + 1, // 1부터 시작하는 일련번호 추가
|
||||
scsYn: item.scsYn === null || item.scsYn === undefined ? 'N' : item.scsYn // scsYn이 null이면 'N'으로 변경
|
||||
}));
|
||||
// setTableData(data.content || []);
|
||||
// setTotalData(tableData.length);
|
||||
setTableData(dataWithRowNumber);
|
||||
setTotalData(dataWithRowNumber.length);
|
||||
console.log("response:", data);
|
||||
console.log("response data:", data.content || []);
|
||||
console.log("response data:", dataWithRowNumber);
|
||||
setIsLoadingResult(false);
|
||||
} catch (error) {
|
||||
setIsLoadingResult(false);
|
||||
|
||||
@@ -24,6 +24,7 @@ const formSchema = z.object({
|
||||
type ResultFormValues = z.infer<typeof formSchema>
|
||||
|
||||
const tableColumn = [
|
||||
{ id: 'rowNumber', title: '일련번호' },
|
||||
{ id: 'enoNm', title: '환경청' },
|
||||
{ id: 'ctpvNm', title: '시도' },
|
||||
{ id: 'sggNm', title: '시군구' },
|
||||
@@ -33,7 +34,8 @@ const tableColumn = [
|
||||
{ id: 'drtwSwtcRt', title: '오수 전환율' },
|
||||
{ id: 'anlsInfo', title: '침입수 분석정보' },
|
||||
{ id: 'regDt', title: '분석일자' },
|
||||
{ id: 'rgtrNm', title: '분석자' }
|
||||
{ id: 'rgtrNm', title: '분석자' },
|
||||
{ id: 'scsYn', title: '분석성공여부' }
|
||||
]
|
||||
|
||||
const Result = () => {
|
||||
@@ -99,10 +101,18 @@ const Result = () => {
|
||||
console.log("API: ", `v1/inftwtAnls${queryString ? `?${queryString}` : ''}`);
|
||||
try {
|
||||
const data = await getData(`v1/inftwtAnls${queryString ? `?${queryString}` : ''}`);
|
||||
setTableData(data.content || []);
|
||||
setTotalData(tableData.length);
|
||||
// 일련번호를 추가한 데이터로 변환
|
||||
const dataWithRowNumber = (data.content || []).map((item: any, index: number) => ({
|
||||
...item,
|
||||
rowNumber: index + 1, // 1부터 시작하는 일련번호 추가
|
||||
scsYn: item.scsYn === null || item.scsYn === undefined ? 'N' : item.scsYn // scsYn이 null이면 'N'으로 변경
|
||||
}));
|
||||
// setTableData(data.content || []);
|
||||
// setTotalData(tableData.length);
|
||||
setTableData(dataWithRowNumber);
|
||||
setTotalData(dataWithRowNumber.length);
|
||||
console.log("response:", data);
|
||||
console.log("response data:", data.content || []);
|
||||
console.log("response data:", dataWithRowNumber);
|
||||
setIsLoadingResult(false);
|
||||
} catch (error) {
|
||||
setIsLoadingResult(false);
|
||||
|
||||
Reference in New Issue
Block a user