Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b65c50c5f9 | ||
|
|
eb37728532 | ||
|
|
c41a7bf3d3 | ||
|
|
774f3a5507 | ||
|
|
6e95e372a8 | ||
|
|
1ccd502e3a |
Vendored
+20
@@ -23,6 +23,26 @@
|
||||
"NODE_OPTIONS": "--inspect"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node-terminal",
|
||||
"request": "launch",
|
||||
"name": "dev:as 서버 컴포넌트 디버그 (node-terminal)",
|
||||
"command": "pnpm --filter as dev",
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "node-terminal",
|
||||
"request": "launch",
|
||||
"name": "dev:as 통합 디버그 (Server + Client)",
|
||||
"command": "pnpm --filter as dev",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"serverReadyAction": {
|
||||
"action": "debugWithChrome",
|
||||
"pattern": "- Local:\\s+(https?://.+)",
|
||||
"uriFormat": "%s",
|
||||
"webRoot": "${workspaceFolder}/apps/as"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
|
||||
|
||||
Sentry.init({
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT ?? "local",
|
||||
tracesSampleRate: 1.0,
|
||||
replaysSessionSampleRate: 1.0,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
integrations: [Sentry.replayIntegration()],
|
||||
debug: process.env.NEXT_PUBLIC_SENTRY_DEBUG === "true",
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
export async function register() {
|
||||
if (process.env.NEXT_RUNTIME === "nodejs") {
|
||||
await import("./sentry.server.config");
|
||||
}
|
||||
|
||||
if (process.env.NEXT_RUNTIME === "edge") {
|
||||
await import("./sentry.edge.config");
|
||||
}
|
||||
}
|
||||
|
||||
export const onRequestError = Sentry.captureRequestError;
|
||||
+17
-1
@@ -1,8 +1,24 @@
|
||||
import type { NextConfig } from "next";
|
||||
import { withSentryConfig } from "@sentry/nextjs";
|
||||
import path from "path";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
reactStrictMode: true,
|
||||
transpilePackages: ["@common/assets"],
|
||||
outputFileTracingRoot: path.join(__dirname, "../../"),
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
export default withSentryConfig(nextConfig, {
|
||||
org: process.env.SENTRY_ORG,
|
||||
project: process.env.SENTRY_PROJECT,
|
||||
silent: true,
|
||||
widenClientFileUpload: true,
|
||||
tunnelRoute: "/monitoring",
|
||||
webpack: {
|
||||
treeshake: {
|
||||
removeDebugLogging: process.env.NEXT_PUBLIC_SENTRY_DEBUG === "true" ? false : true,
|
||||
},
|
||||
automaticVercelMonitors: false,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -20,6 +20,13 @@
|
||||
"@faker-js/faker": "^9.9.0",
|
||||
"@frontend-opensource/use-react-hooks": "^1.1.4",
|
||||
"@hookform/resolvers": "^4.1.3",
|
||||
"@opentelemetry/api": "^1.9.1",
|
||||
"@opentelemetry/context-zone": "^2.8.0",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.219.0",
|
||||
"@opentelemetry/instrumentation-fetch": "^0.219.0",
|
||||
"@opentelemetry/instrumentation-xml-http-request": "^0.219.0",
|
||||
"@opentelemetry/sdk-trace-web": "^2.8.0",
|
||||
"@sentry/nextjs": "^10.57.0",
|
||||
"@tanstack/react-query": "^5.75.5",
|
||||
"@tanstack/react-query-devtools": "^5.75.5",
|
||||
"@tanstack/react-table": "^8.21.2",
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
Sentry.init({
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT ?? "local",
|
||||
tracesSampleRate: 1.0,
|
||||
debug: process.env.NEXT_PUBLIC_SENTRY_DEBUG === "true",
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
Sentry.init({
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT ?? "local",
|
||||
tracesSampleRate: 1.0,
|
||||
debug: process.env.NEXT_PUBLIC_SENTRY_DEBUG === "true",
|
||||
});
|
||||
@@ -865,7 +865,7 @@ function CnfmViewPage({ id }: { id: string }) {
|
||||
<tr key={f.atflId}>
|
||||
<td>
|
||||
{f.orgnlFileNm ? (
|
||||
<a className="text-blue-600" href={`${PROXY_HOST}/attach-service/api/v1/atflcd/download/${f.atflCd}`} target="_blank" rel="noreferrer">{f.orgnlFileNm}</a>
|
||||
<a className="text-blue-600" href={`${PROXY_HOST}/attach-service/api/v1/download/${f.atflId}`} target="_blank" rel="noreferrer">{f.orgnlFileNm}</a>
|
||||
) : (
|
||||
<span className="text-gray-700">{f.physFileNm || f.atflId}</span>
|
||||
)}
|
||||
|
||||
@@ -20,6 +20,16 @@ async function handler(
|
||||
"Content-Type": "application/json",
|
||||
"X-Site-Id": SITE_ID,
|
||||
};
|
||||
|
||||
// X-Device-Id 중계 로직 (헤더 또는 쿠키에서 획득)
|
||||
const deviceId =
|
||||
request.headers.get("x-device-id") ||
|
||||
request.headers.get("X-Device-Id") ||
|
||||
cookieStore.get("device-id")?.value;
|
||||
if (deviceId) {
|
||||
headers["X-Device-Id"] = deviceId;
|
||||
}
|
||||
|
||||
let body = {};
|
||||
const isRefreshHandler = params.url.includes("refresh");
|
||||
|
||||
@@ -45,6 +55,11 @@ async function handler(
|
||||
});
|
||||
|
||||
if (!result.ok) {
|
||||
console.error(`[BFF Proxy Error] Backend returned status ${result.status} for ${params.url.join("/")}`);
|
||||
try {
|
||||
const errorText = await result.text();
|
||||
console.error(`[BFF Proxy Error Body] ${errorText}`);
|
||||
} catch (err) {}
|
||||
return NextResponse.json(
|
||||
{ message: "Invalid Credentials" },
|
||||
{ status: 401 },
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
|
||||
|
||||
Sentry.init({
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT ?? "local",
|
||||
tracesSampleRate: 1.0,
|
||||
replaysSessionSampleRate: 1.0,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
integrations: [Sentry.replayIntegration()],
|
||||
debug: process.env.NEXT_PUBLIC_SENTRY_DEBUG === "true",
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
export async function register() {
|
||||
if (process.env.NEXT_RUNTIME === "nodejs") {
|
||||
await import("./sentry.server.config");
|
||||
}
|
||||
|
||||
if (process.env.NEXT_RUNTIME === "edge") {
|
||||
await import("./sentry.edge.config");
|
||||
}
|
||||
}
|
||||
|
||||
export const onRequestError = Sentry.captureRequestError;
|
||||
+14
-1
@@ -1,4 +1,5 @@
|
||||
import type { NextConfig } from "next";
|
||||
import { withSentryConfig } from "@sentry/nextjs";
|
||||
|
||||
const subDomain =
|
||||
process.env.NEXT_PUBLIC_SUB_DOMAIN || "http://localhost:13000";
|
||||
@@ -58,4 +59,16 @@ const nextConfig: NextConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
export default withSentryConfig(nextConfig, {
|
||||
org: process.env.SENTRY_ORG,
|
||||
project: process.env.SENTRY_PROJECT,
|
||||
silent: true,
|
||||
widenClientFileUpload: true,
|
||||
tunnelRoute: "/monitoring",
|
||||
webpack: {
|
||||
treeshake: {
|
||||
removeDebugLogging: process.env.NEXT_PUBLIC_SENTRY_DEBUG === "true" ? false : true,
|
||||
},
|
||||
automaticVercelMonitors: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
"lint": "next lint",
|
||||
"test:playwright": "playwright test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@common/assets": "workspace:*",
|
||||
@@ -26,6 +27,7 @@
|
||||
"@radix-ui/react-label": "^2.1.2",
|
||||
"@radix-ui/react-slot": "^1.1.2",
|
||||
"@radix-ui/react-tooltip": "^1.1.8",
|
||||
"@sentry/nextjs": "^10.57.0",
|
||||
"@tanstack/react-query": "^5.75.5",
|
||||
"@tanstack/react-query-devtools": "^5.75.5",
|
||||
"@tanstack/react-table": "^8.21.2",
|
||||
@@ -49,6 +51,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.0.0",
|
||||
"@playwright/test": "^1.61.1",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/node": "^22.13.1",
|
||||
"@types/webpack": "^5.28.5",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,60 @@
|
||||
import { defineConfig, devices } from "@playwright/test";
|
||||
|
||||
/**
|
||||
* Playwright 설정 파일
|
||||
* https://playwright.dev/docs/test-configuration
|
||||
*/
|
||||
export default defineConfig({
|
||||
testDir: "./tests",
|
||||
/* 하나의 테스트 파일 내에서 병렬 실행 금지 및 직렬 실행으로 세션 상태 격리 보장 */
|
||||
fullyParallel: false,
|
||||
/* Redis 및 PostgreSQL 공유 자원의 세션 정렬을 위해 워커를 1개로 제한 */
|
||||
workers: 1,
|
||||
/* 테스트 실패 시 재시도 횟수 */
|
||||
retries: 0,
|
||||
/* 각 테스트 타임아웃 (30초) */
|
||||
timeout: 30000,
|
||||
/* 전체 테스트 실행 타임아웃 */
|
||||
globalTimeout: 600000,
|
||||
/* Assertion 타임아웃 */
|
||||
expect: {
|
||||
timeout: 5000,
|
||||
},
|
||||
/* 리포터 설정 (HTML 리포트 및 터미널 요약) */
|
||||
reporter: [["html", { open: "never" }], ["list"]],
|
||||
/* 공유 설정 */
|
||||
use: {
|
||||
/* 테스트 타겟 URL */
|
||||
baseURL: process.env.PLAYWRIGHT_BASE_URL || "http://localhost:3000",
|
||||
/* 실패한 테스트에 대해서만 트레이스 수집 */
|
||||
trace: "retain-on-failure",
|
||||
/* 스크린샷 캡처 설정 */
|
||||
screenshot: "only-on-failure",
|
||||
},
|
||||
|
||||
/* 프로젝트별 브라우저 구성 (기본적으로 Chromium 위주로 동작 확인) */
|
||||
projects: [
|
||||
{
|
||||
name: "chromium",
|
||||
use: { ...devices["Desktop Chrome"] },
|
||||
},
|
||||
{
|
||||
name: "firefox",
|
||||
use: { ...devices["Desktop Firefox"] },
|
||||
},
|
||||
{
|
||||
name: "webkit",
|
||||
use: { ...devices["Desktop Safari"] },
|
||||
},
|
||||
],
|
||||
|
||||
/* 로컬 서버 자동 기동 설정 */
|
||||
webServer: {
|
||||
command: "pnpm dev",
|
||||
url: "http://localhost:3000",
|
||||
reuseExistingServer: true,
|
||||
timeout: 120000,
|
||||
stdout: "pipe",
|
||||
stderr: "pipe",
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
Sentry.init({
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT ?? "local",
|
||||
tracesSampleRate: 1.0,
|
||||
debug: process.env.NEXT_PUBLIC_SENTRY_DEBUG === "true",
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
Sentry.init({
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT ?? "local",
|
||||
tracesSampleRate: 1.0,
|
||||
debug: process.env.NEXT_PUBLIC_SENTRY_DEBUG === "true",
|
||||
});
|
||||
@@ -2,9 +2,10 @@
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { MenuAuthorityApi } from "@/entities/menu-authority/@x/menu";
|
||||
import { getCookie, useAlertStore, useMenuStore } from "@/shared/lib";
|
||||
import { SITE_ID } from "@/shared/config";
|
||||
import { SITE_ID, ENDPOINT } from "@/shared/config";
|
||||
import { MenuApi } from "../api/menu-service";
|
||||
import { getCurrentMenu } from "./utils";
|
||||
|
||||
@@ -16,11 +17,10 @@ const MenuWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||
const { pageMenuAuthority, setCurrentMenuInfo, setPageMenuAuthority } =
|
||||
useMenuStore((state) => state);
|
||||
|
||||
const getCurrentMenuInfo = async () => {
|
||||
const menuRoles = await MenuApi.getMenuRoles(SITE_ID);
|
||||
if (!menuRoles) return;
|
||||
return getCurrentMenu(menuRoles, pathname ?? "");
|
||||
};
|
||||
const { data: menuRoles } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.MENU_ROLES],
|
||||
queryFn: () => MenuApi.getMenuRoles(SITE_ID),
|
||||
});
|
||||
|
||||
const getPageMenuAuthority = async () => {
|
||||
const menuCd = getCookie("menu-code-key");
|
||||
@@ -36,10 +36,14 @@ const MenuWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
const currentMenu = await getCurrentMenuInfo();
|
||||
if (menuRoles) {
|
||||
const currentMenu = getCurrentMenu(menuRoles, pathname ?? "");
|
||||
if (currentMenu) setCurrentMenuInfo(currentMenu);
|
||||
}
|
||||
}, [menuRoles, pathname]);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
const response = await getPageMenuAuthority();
|
||||
if (response?.length) setPageMenuAuthority(response[0]!);
|
||||
})();
|
||||
|
||||
@@ -1,29 +1,17 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type PaginationState,
|
||||
type Row,
|
||||
type RowSelectionState,
|
||||
type Table,
|
||||
type Row,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore, useDataTable } from "@/shared/lib";
|
||||
import { GroupApi } from "@/entities/group";
|
||||
import { GroupUsersApi } from "@/entities/group-user";
|
||||
import {
|
||||
type AdminUserListResponse,
|
||||
UserApi,
|
||||
type UserSearchParams,
|
||||
} from "@/entities/user";
|
||||
import {
|
||||
Button,
|
||||
Checkbox,
|
||||
Input,
|
||||
Label,
|
||||
Select,
|
||||
@@ -31,10 +19,18 @@ import {
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
Checkbox,
|
||||
} from "@common/components";
|
||||
|
||||
import { GroupApi } from "@/entities/group";
|
||||
import {
|
||||
UserApi,
|
||||
type UserSearchParams,
|
||||
type AdminUserListResponse,
|
||||
} from "@/entities/user";
|
||||
import { GroupUsersApi } from "@/entities/group-user";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useAlertStore } from "@/shared/lib";
|
||||
import { columns } from "../model/table-columns";
|
||||
|
||||
import { AddAdminDialog } from "./add-admin-dialog";
|
||||
|
||||
function AdminPage() {
|
||||
|
||||
@@ -1,25 +1,20 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useEffect, useState, useRef } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
type RowSelectionState,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import { POSTING_TYPE, PostingDialog } from "@/entities/posting";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
|
||||
import { POSTING_TYPE, PostingDialog } from "@/entities/posting";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import { BannerApi } from "../api/banner-service";
|
||||
import { type Banner } from "../model/banner-interface";
|
||||
import { createColumns } from "../model/banner-table-columns";
|
||||
|
||||
import { type Banner, type BannerParams } from "../model/banner-interface";
|
||||
import { PreviewBannerDialog } from "./preview-banner-dialog";
|
||||
|
||||
type PostingTarget = {
|
||||
@@ -27,52 +22,50 @@ type PostingTarget = {
|
||||
pstgTrgtNo: number;
|
||||
};
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
bnrTtl: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
|
||||
function BannerPage() {
|
||||
const router = useRouter();
|
||||
const imageRefs = useRef<Map<number, string>>(new Map());
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
|
||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
const [postingTargets, setPostingTargets] = useState<PostingTarget[]>([]);
|
||||
const [bnrTtl, setBnrTtl] = useState(params.bnrTtl);
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.BANNERS, params],
|
||||
queryFn: () =>
|
||||
BannerApi.getBannerList({
|
||||
bnrTtl: params.bnrTtl,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
const [bnrTtl, setBnrTtl] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<BannerParams>({
|
||||
bnrTtl: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.BANNERS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
BannerApi.getBannerList({
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
});
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ bnrTtl, page: 0 });
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
bnrTtl,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setBnrTtl("");
|
||||
resetParams();
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
bnrTtl: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Banner) => {
|
||||
@@ -99,7 +92,7 @@ function BannerPage() {
|
||||
manualPagination: true,
|
||||
enableMultiRowSelection: true,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
onRowSelectionChange: setRowSelection,
|
||||
},
|
||||
dataTableOptions: {
|
||||
|
||||
@@ -2,19 +2,12 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
type RowSelectionState,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import { type Board, BoardApi } from "@/entities/board";
|
||||
import { CodeSelect } from "@/entities/code";
|
||||
import {
|
||||
Button,
|
||||
Input,
|
||||
@@ -25,57 +18,60 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@common/components";
|
||||
|
||||
import { CodeSelect } from "@/entities/code";
|
||||
import { BoardApi, type BoardParams } from "@/entities/board";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import { type Board } from "@/entities/board";
|
||||
import { columns } from "../model/table-columns";
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
bbsTypeCd: "",
|
||||
bbsNm: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
|
||||
function BbsPage() {
|
||||
const router = useRouter();
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
const [bbsTypeCd, setBbsTypeCd] = useState(params.bbsTypeCd);
|
||||
const [bbsNm, setBbsNm] = useState(params.bbsNm);
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.BOARD_SERVICE.BBS, params],
|
||||
queryFn: () =>
|
||||
BoardApi.getBoardList({
|
||||
bbsTypeCd: params.bbsTypeCd,
|
||||
bbsNm: params.bbsNm,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
const [bbsTypeCd, setBbsTypeCd] = useState("");
|
||||
const [bbsNm, setBbsNm] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<BoardParams>({
|
||||
bbsTypeCd: "",
|
||||
bbsNm: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.BOARD_SERVICE.BBS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
BoardApi.getBoardList({
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
});
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ bbsTypeCd, bbsNm, page: 0 });
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
bbsTypeCd,
|
||||
bbsNm,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setBbsTypeCd("");
|
||||
setBbsNm("");
|
||||
resetParams();
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
bbsTypeCd: "",
|
||||
bbsNm: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Board) => {
|
||||
@@ -93,7 +89,7 @@ function BbsPage() {
|
||||
manualPagination: true,
|
||||
enableMultiRowSelection: true,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
onRowSelectionChange: setRowSelection,
|
||||
},
|
||||
dataTableOptions: {
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import { useState } from "react";
|
||||
|
||||
import type { ColumnDef } from "@tanstack/react-table";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
import type { UpCode } from "@/entities/code";
|
||||
import { useState } from "react";
|
||||
import type { ColumnDef } from "@tanstack/react-table";
|
||||
import { Button } from "@common/components";
|
||||
|
||||
import type { UpCode } from "@/entities/code";
|
||||
import { UpCodeManagementDialog } from "../ui/upcode-dialog";
|
||||
|
||||
export const columns: ColumnDef<UpCode>[] = [
|
||||
@@ -27,7 +24,7 @@ export const columns: ColumnDef<UpCode>[] = [
|
||||
header: "상위코드명",
|
||||
},
|
||||
{
|
||||
accessorKey: "cdSeNm",
|
||||
accessorKey: "cdSe",
|
||||
header: "코드구분",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -2,64 +2,60 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import { type Contents, ContentsApi } from "@/entities/content";
|
||||
import { getCoreRowModel, type PaginationState } from "@tanstack/react-table";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
|
||||
import {
|
||||
ContentsApi,
|
||||
type Contents,
|
||||
type ContentsParams,
|
||||
} from "@/entities/content";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import { columns } from "../model/table-columns";
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
contsTtl: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
|
||||
function ContentsPage() {
|
||||
const router = useRouter();
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
const [contsTtl, setContsTtl] = useState(params.contsTtl);
|
||||
|
||||
const [contsTtl, setContsTtl] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<ContentsParams>({
|
||||
contsTtl: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CONTENTS, params],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CONTENTS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
ContentsApi.getContentsList({
|
||||
contsTtl: params.contsTtl,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ contsTtl, page: 0 });
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
contsTtl,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setContsTtl("");
|
||||
resetParams();
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
contsTtl: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Contents) => {
|
||||
@@ -73,7 +69,7 @@ function ContentsPage() {
|
||||
state: {
|
||||
pagination,
|
||||
},
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
manualPagination: true,
|
||||
},
|
||||
|
||||
@@ -354,7 +354,7 @@ function DashboardPage() {
|
||||
<div className="card-header text-foreground">
|
||||
<h3 className="text-2xl font-medium">실시간 알림</h3>
|
||||
</div>
|
||||
<div className="p-4" style={{ height: "120px", overflowY: "auto" }}>
|
||||
<div className="p-4">
|
||||
<div className="space-y-4 text-foreground">
|
||||
{noticeUserList?.map((item) => (
|
||||
<div
|
||||
@@ -373,7 +373,7 @@ function DashboardPage() {
|
||||
<div className="card-header text-foreground">
|
||||
<h3 className="text-2xl font-medium">일정 알림</h3>
|
||||
</div>
|
||||
<div className="p-4" style={{ height: "120px", overflowY: "auto" }}>
|
||||
<div className="p-4">
|
||||
<div className="space-y-4 text-foreground">
|
||||
{scheduleList && scheduleList.length > 0 ? (
|
||||
scheduleList.map((schedule, index) => {
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import { getCoreRowModel, type PaginationState } from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore, useDataTable, useMutationWrapper } from "@/shared/lib";
|
||||
import { AttachmentApi, type AttachmentParams } from "@/entities/attachment";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
|
||||
import { AttachmentApi, type AttachmentParams } from "@/entities/attachment";
|
||||
import { useAlertStore, useDataTable, useMutationWrapper } from "@/shared/lib";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { createColumns } from "../model/table-columns";
|
||||
|
||||
function FilePage() {
|
||||
|
||||
@@ -2,73 +2,68 @@
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
type RowSelectionState,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import { POSTING_TYPE, PostingDialog } from "@/entities/posting";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
|
||||
import { POSTING_TYPE, PostingDialog } from "@/entities/posting";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import { ImageApi } from "../api/image-service";
|
||||
import { type Image } from "../model/image-interface";
|
||||
import { columns } from "../model/image-table-columns";
|
||||
import { type Image, type ImageParams } from "../model/image-interface";
|
||||
|
||||
type PostingTarget = {
|
||||
pstgTrgtNm: string;
|
||||
pstgTrgtNo: number;
|
||||
};
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
keyword: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
|
||||
function ImagePage() {
|
||||
const router = useRouter();
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
const [keyword, setKeyword] = useState(params.keyword);
|
||||
|
||||
const [keyword, setKeyword] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<ImageParams>({
|
||||
keyword: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
const [postingTargets, setPostingTargets] = useState<PostingTarget[]>([]);
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.IMAGES, params],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.IMAGES, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
ImageApi.getImageList({
|
||||
keyword: params.keyword,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ keyword, page: 0 });
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setKeyword("");
|
||||
resetParams();
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Image) => {
|
||||
@@ -86,7 +81,7 @@ function ImagePage() {
|
||||
manualPagination: true,
|
||||
enableMultiRowSelection: true,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
onRowSelectionChange: setRowSelection,
|
||||
},
|
||||
dataTableOptions: {
|
||||
|
||||
@@ -2,76 +2,45 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import {
|
||||
type Authorizations,
|
||||
AuthorizationsApi,
|
||||
} from "@/entities/authorization";
|
||||
import { CodeSelect } from "@/entities/code";
|
||||
import { getCoreRowModel, type PaginationState } from "@tanstack/react-table";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
|
||||
import { CodeSelect } from "@/entities/code";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import {
|
||||
AuthorizationsApi,
|
||||
type Authorizations,
|
||||
type AuthorizationsParams,
|
||||
} from "@/entities/authorization";
|
||||
import { columns } from "../model/authorizations-table-columns";
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
authorizationName: "",
|
||||
httpMethodCode: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
|
||||
function ModulePage() {
|
||||
const router = useRouter();
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
const [authorizationName, setAuthorizationName] = useState(
|
||||
params.authorizationName,
|
||||
);
|
||||
const [httpMethodCode, setHttpMethodCode] = useState(params.httpMethodCode);
|
||||
|
||||
const [authorizationName, setAuthorizationName] = useState("");
|
||||
const [httpMethodCode, setHttpMethodCode] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<AuthorizationsParams>({
|
||||
authorizationName: "",
|
||||
httpMethodCode: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.USER_SERVICE.AUTHORIZATIONS, params],
|
||||
queryKey: [ENDPOINT.USER_SERVICE.AUTHORIZATIONS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
AuthorizationsApi.getAuthorizationsList({
|
||||
authorizationName: params.authorizationName,
|
||||
httpMethodCode: params.httpMethodCode,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ authorizationName, httpMethodCode, page: 0 });
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setAuthorizationName("");
|
||||
setHttpMethodCode("");
|
||||
resetParams();
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Authorizations) => {
|
||||
router.push(`/module/register/${row.authorizationNo}`);
|
||||
};
|
||||
@@ -83,7 +52,7 @@ function ModulePage() {
|
||||
state: {
|
||||
pagination,
|
||||
},
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
manualPagination: true,
|
||||
},
|
||||
@@ -93,6 +62,29 @@ function ModulePage() {
|
||||
},
|
||||
});
|
||||
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
authorizationName,
|
||||
httpMethodCode,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setAuthorizationName("");
|
||||
setHttpMethodCode("");
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
authorizationName: "",
|
||||
httpMethodCode: "",
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="card card-border !mt-6">
|
||||
<div className="card card-border">
|
||||
|
||||
@@ -2,75 +2,70 @@
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
type RowSelectionState,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
import { AuthorityButton } from "@/entities/menu-authority";
|
||||
import { POSTING_TYPE, PostingDialog } from "@/entities/posting";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import { PopupApi } from "../api/popup-service";
|
||||
import type { Popup } from "../model/popup-interface";
|
||||
import { columns } from "../model/table-columns";
|
||||
import type { Popup, PopupParams } from "../model/popup-interface";
|
||||
|
||||
type PostingTarget = {
|
||||
pstgTrgtNm: string;
|
||||
pstgTrgtNo: number;
|
||||
};
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
keyword: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
|
||||
function PopupPage() {
|
||||
const router = useRouter();
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
const [keyword, setKeyword] = useState(params.keyword);
|
||||
|
||||
const [keyword, setKeyword] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<PopupParams>({
|
||||
keyword: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
const [postingTargets, setPostingTargets] = useState<PostingTarget[]>([]);
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.POPUPS, params],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.POPUPS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
PopupApi.getPopupList({
|
||||
keyword: params.keyword,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ keyword, page: 0 });
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setKeyword("");
|
||||
resetParams();
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Popup) => {
|
||||
@@ -87,7 +82,7 @@ function PopupPage() {
|
||||
},
|
||||
manualPagination: true,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
onRowSelectionChange: setRowSelection,
|
||||
},
|
||||
dataTableOptions: {
|
||||
|
||||
@@ -1,35 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import dayjs from "dayjs";
|
||||
import { useState } from "react";
|
||||
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
||||
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
type RowSelectionState,
|
||||
} from "@tanstack/react-table";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import {
|
||||
useAlertStore,
|
||||
useDataTable,
|
||||
useSearchParamsState,
|
||||
useSelectPrompt,
|
||||
} from "@/shared/lib";
|
||||
import { InputDateRangePicker } from "@/shared/ui/input-date-range-picker";
|
||||
import { BoardApi } from "@/entities/board";
|
||||
import { AuthorityButton } from "@/entities/menu-authority";
|
||||
import {
|
||||
type DeletePost,
|
||||
deleteReasonMessages,
|
||||
PostApi,
|
||||
type RecentPost,
|
||||
} from "@/entities/post";
|
||||
import { SortSelect } from "@/widgets/post";
|
||||
import {
|
||||
Button,
|
||||
Input,
|
||||
@@ -40,72 +20,76 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@common/components";
|
||||
|
||||
import { SortSelect } from "@/widgets/post";
|
||||
import {
|
||||
PostApi,
|
||||
deleteReasonMessages,
|
||||
type DeletePost,
|
||||
type RecentPost,
|
||||
type RecentPostParams,
|
||||
} from "@/entities/post";
|
||||
import { BoardApi } from "@/entities/board";
|
||||
import { AuthorityButton } from "@/entities/menu-authority";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { InputDateRangePicker } from "@/shared/ui/input-date-range-picker";
|
||||
import { useAlertStore, useSelectPrompt, useDataTable } from "@/shared/lib";
|
||||
import { columns } from "../model/table-columns";
|
||||
|
||||
import { MovePostDialog } from "./move-post-dialog";
|
||||
|
||||
type DateRange = {
|
||||
from?: Date | null | undefined;
|
||||
to?: Date | null | undefined;
|
||||
from?: Date | undefined;
|
||||
to?: Date | undefined;
|
||||
};
|
||||
|
||||
const selectData = Object.entries(deleteReasonMessages).map(
|
||||
([label, value]) => ({ label, value }),
|
||||
);
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
keywordType: "",
|
||||
keyword: "",
|
||||
bbsId: "",
|
||||
delYn: "N",
|
||||
frDateYmd: "",
|
||||
toDateYmd: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
|
||||
function parseDateRange(frDateYmd: string, toDateYmd: string): DateRange {
|
||||
return {
|
||||
from: frDateYmd ? dayjs(frDateYmd, "YYYYMMDD").toDate() : undefined,
|
||||
to: toDateYmd ? dayjs(toDateYmd, "YYYYMMDD").toDate() : undefined,
|
||||
};
|
||||
}
|
||||
|
||||
function RecentPage() {
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const searchParams = useSearchParams();
|
||||
const { prompt } = useSelectPrompt(selectData);
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
|
||||
const [tableSort, setTableSort] = useState("regDt,desc");
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
const [presetDateRange, setPresetDateRange] = useState("");
|
||||
const [dateRange, setDateRange] = useState<DateRange>(() =>
|
||||
parseDateRange(params.frDateYmd, params.toDateYmd),
|
||||
);
|
||||
const [keywordType, setKeywordType] = useState(params.keywordType);
|
||||
const [keyword, setKeyword] = useState(params.keyword);
|
||||
const [bbsId, setBbsId] = useState(params.bbsId);
|
||||
const [delYn, setDelYn] = useState(params.delYn);
|
||||
const [dateRange, setDateRange] = useState<DateRange>({
|
||||
from: undefined,
|
||||
to: undefined,
|
||||
});
|
||||
const [keywordType, setKeywordType] = useState("");
|
||||
const [keyword, setKeyword] = useState("");
|
||||
const [bbsId, setBbsId] = useState<string | null>(null);
|
||||
const [delYn, setDelYn] = useState("N");
|
||||
const [searchParams, setSearchParams] = useState<RecentPostParams>({
|
||||
keywordType: "",
|
||||
keyword: "",
|
||||
bbsId: null,
|
||||
delYn: "N",
|
||||
frDateYmd: "",
|
||||
toDateYmd: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [isDeletePostData, setIsDeletePostData] = useState(false);
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.BOARD_SERVICE.POSTS, params],
|
||||
queryKey: [
|
||||
ENDPOINT.BOARD_SERVICE.POSTS,
|
||||
searchParams,
|
||||
pagination,
|
||||
tableSort,
|
||||
],
|
||||
queryFn: () =>
|
||||
PostApi.getRecentPostList({
|
||||
keywordType: params.keywordType,
|
||||
keyword: params.keyword,
|
||||
bbsId: params.bbsId ? parseInt(params.bbsId) : null,
|
||||
delYn: params.delYn,
|
||||
frDateYmd: params.frDateYmd,
|
||||
toDateYmd: params.toDateYmd,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
sort: tableSort,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
@@ -115,22 +99,9 @@ function RecentPage() {
|
||||
queryFn: () => BoardApi.getBoardList(),
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const isDeletePostData = params.delYn === "Y";
|
||||
|
||||
const handleRowClick = (row: RecentPost) => {
|
||||
const from = `${pathname}${searchParams?.toString() ? `?${searchParams.toString()}` : ""}`;
|
||||
router.push(
|
||||
`/bbs/${row.bbsTypeCd.toLowerCase()}/${row.bbsId}/${row.pstNo}?from=${encodeURIComponent(from)}`,
|
||||
`/bbs/${row.bbsTypeCd.toLowerCase()}/${row.bbsId}/${row.pstNo}`,
|
||||
);
|
||||
};
|
||||
|
||||
@@ -145,7 +116,7 @@ function RecentPage() {
|
||||
manualPagination: true,
|
||||
enableMultiRowSelection: true,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
onRowSelectionChange: setRowSelection,
|
||||
},
|
||||
dataTableOptions: {
|
||||
@@ -156,32 +127,45 @@ function RecentPage() {
|
||||
|
||||
const isSelectedRow = table.getFilteredSelectedRowModel().rows.length > 0;
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({
|
||||
setIsDeletePostData(delYn === "Y");
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keywordType,
|
||||
keyword,
|
||||
bbsId,
|
||||
bbsId: bbsId ? parseInt(bbsId) : null,
|
||||
delYn,
|
||||
frDateYmd: dateRange?.from
|
||||
? dayjs(dateRange.from).format("YYYYMMDD")
|
||||
: "",
|
||||
toDateYmd: dateRange?.to ? dayjs(dateRange.to).format("YYYYMMDD") : "",
|
||||
page: 0,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setKeywordType("");
|
||||
setKeyword("");
|
||||
setBbsId("");
|
||||
setBbsId(null);
|
||||
setDelYn("N");
|
||||
setPresetDateRange("");
|
||||
setDateRange({
|
||||
from: undefined,
|
||||
to: undefined,
|
||||
});
|
||||
resetParams();
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keywordType: "",
|
||||
keyword: "",
|
||||
bbsId: null,
|
||||
delYn: "N",
|
||||
frDateYmd: "",
|
||||
toDateYmd: "",
|
||||
});
|
||||
setIsDeletePostData(false);
|
||||
};
|
||||
|
||||
const handlePresetDateRange = (value: string) => {
|
||||
@@ -289,7 +273,10 @@ function RecentPage() {
|
||||
setDateRange={handleDateRangeChange}
|
||||
/>
|
||||
<Label className="ml-4 mr-2 text-label">게시판</Label>
|
||||
<Select value={bbsId} onValueChange={setBbsId}>
|
||||
<Select
|
||||
value={bbsId?.toString() || ""}
|
||||
onValueChange={(value) => setBbsId(value ? value : null)}
|
||||
>
|
||||
<SelectTrigger className="w-[12rem]">
|
||||
<SelectValue placeholder="선택" />
|
||||
</SelectTrigger>
|
||||
@@ -302,7 +289,7 @@ function RecentPage() {
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Label className="ml-4 mr-2 text-label">상태</Label>
|
||||
<Select value={delYn} onValueChange={setDelYn}>
|
||||
<Select value={delYn} onValueChange={(value) => setDelYn(value)}>
|
||||
<SelectTrigger className="w-[10rem]">
|
||||
<SelectValue placeholder="선택" />
|
||||
</SelectTrigger>
|
||||
@@ -389,10 +376,10 @@ function RecentPage() {
|
||||
</>
|
||||
)}
|
||||
<Select
|
||||
value={params.size.toString()}
|
||||
onValueChange={(value) =>
|
||||
setParams({ size: parseInt(value), page: 0 })
|
||||
}
|
||||
value={table.getState().pagination.pageSize.toString()}
|
||||
onValueChange={(value) => {
|
||||
table.setPageSize(parseInt(value));
|
||||
}}
|
||||
>
|
||||
<SelectTrigger className="h-[3.2rem] w-[12rem]">
|
||||
<SelectValue placeholder="페이지 크기" />
|
||||
@@ -405,10 +392,7 @@ function RecentPage() {
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<SortSelect
|
||||
value={params.sort}
|
||||
onValueChange={(value) => setParams({ sort: value })}
|
||||
/>
|
||||
<SortSelect value={tableSort} onValueChange={setTableSort} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,67 +2,38 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import { type Role, RoleApi } from "@/entities/role";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getCoreRowModel, type PaginationState } from "@tanstack/react-table";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
|
||||
import { RoleApi, type Role, type RoleParams } from "@/entities/role";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore, useDataTable } from "@/shared/lib";
|
||||
import { createColumns } from "../model/table-columns";
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
keywordType: "roleName",
|
||||
keyword: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
|
||||
function RolePage() {
|
||||
const router = useRouter();
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
const [keyword, setKeyword] = useState(params.keyword);
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.USER_SERVICE.ROLES, params],
|
||||
queryFn: () =>
|
||||
RoleApi.getRoles({
|
||||
keywordType: params.keywordType,
|
||||
keyword: params.keyword,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
const [keyword, setKeyword] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<RoleParams>({
|
||||
keywordType: "roleName",
|
||||
keyword: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ keyword, page: 0 });
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setKeyword("");
|
||||
resetParams();
|
||||
};
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.USER_SERVICE.ROLES, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
RoleApi.getRoles({
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
});
|
||||
|
||||
const handleRowClick = (row: Role) => {
|
||||
router.push(`/role/register/${row.roleId}`);
|
||||
@@ -77,7 +48,7 @@ function RolePage() {
|
||||
},
|
||||
manualPagination: true,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
},
|
||||
dataTableOptions: {
|
||||
onRowClick: handleRowClick,
|
||||
@@ -85,6 +56,26 @@ function RolePage() {
|
||||
},
|
||||
});
|
||||
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setKeyword("");
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword: "",
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="card card-border !mt-6">
|
||||
<div className="card card-border">
|
||||
|
||||
@@ -1,65 +1,54 @@
|
||||
"use client";
|
||||
|
||||
import "@common/assets/styles/grid.css";
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import { type Site, SiteApi } from "@/entities/site";
|
||||
import { getCoreRowModel, type PaginationState } from "@tanstack/react-table";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
|
||||
import { SiteApi, type Site, type SiteParams } from "@/entities/site";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import { columns } from "../model/table-columns";
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
siteNm: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
|
||||
function SitePage() {
|
||||
const router = useRouter();
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
const [siteNm, setSiteNm] = useState(params.siteNm);
|
||||
const [siteNm, setSiteNm] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<SiteParams>({
|
||||
siteNm: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.SITES, params],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.SITES, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
SiteApi.getSiteList({
|
||||
siteNm: params.siteNm,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ siteNm, page: 0 });
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
siteNm,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setSiteNm("");
|
||||
resetParams();
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
siteNm: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Site) => {
|
||||
@@ -73,7 +62,7 @@ function SitePage() {
|
||||
state: {
|
||||
pagination,
|
||||
},
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
manualPagination: true,
|
||||
},
|
||||
|
||||
@@ -2,23 +2,19 @@
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
type RowSelectionState,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import { AuthorityButton } from "@/entities/menu-authority";
|
||||
import { POSTING_TYPE, PostingDialog } from "@/entities/posting";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
|
||||
import { POSTING_TYPE, PostingDialog } from "@/entities/posting";
|
||||
import { AuthorityButton } from "@/entities/menu-authority";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import { SurveyApi } from "../api/survey-service";
|
||||
import type { Survey } from "../model/survey-interface";
|
||||
import type { Survey, SurveyParams } from "../model/survey-interface";
|
||||
import { columns } from "../model/survey-table-columns";
|
||||
|
||||
type PostingTarget = {
|
||||
@@ -26,53 +22,32 @@ type PostingTarget = {
|
||||
pstgTrgtNo: number;
|
||||
};
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
srvyTtl: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
|
||||
function SurveyPage() {
|
||||
const router = useRouter();
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
const [srvyTtl, setSrvyTtl] = useState(params.srvyTtl);
|
||||
|
||||
const [srvyTtl, setSrvyTtl] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<SurveyParams>({
|
||||
srvyTtl: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
const [postingTargets, setPostingTargets] = useState<PostingTarget[]>([]);
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.SURVEY, params],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.SURVEY, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
SurveyApi.getSurveyList({
|
||||
srvyTtl: params.srvyTtl,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ srvyTtl, page: 0 });
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setSrvyTtl("");
|
||||
resetParams();
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Survey) => {
|
||||
router.push(`/survey/${row.srvySn}`);
|
||||
};
|
||||
@@ -87,7 +62,7 @@ function SurveyPage() {
|
||||
},
|
||||
manualPagination: true,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
onRowSelectionChange: setRowSelection,
|
||||
},
|
||||
dataTableOptions: {
|
||||
@@ -96,6 +71,26 @@ function SurveyPage() {
|
||||
},
|
||||
});
|
||||
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
srvyTtl,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setSrvyTtl("");
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
srvyTtl: "",
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const postingTargets = table
|
||||
.getFilteredSelectedRowModel()
|
||||
|
||||
@@ -2,70 +2,58 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import { CodeSelect } from "@/entities/code";
|
||||
import { getCoreRowModel, type PaginationState } from "@tanstack/react-table";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
|
||||
import { CodeSelect } from "@/entities/code";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import { TemplateApi } from "../api/template-service";
|
||||
import type { Template } from "../model/template-interface";
|
||||
import { columns } from "../model/template-table-columns";
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
keyword: "",
|
||||
tmpltSeCd: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
import type { Template, TemplateParams } from "../model/template-interface";
|
||||
|
||||
function TemplatePage() {
|
||||
const router = useRouter();
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
const [keyword, setKeyword] = useState(params.keyword);
|
||||
const [tmpltSeCd, setTmpltSeCd] = useState(params.tmpltSeCd);
|
||||
const [keyword, setKeyword] = useState("");
|
||||
const [tmpltSeCd, setTmpltSeCd] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<TemplateParams>({
|
||||
keyword: "",
|
||||
tmpltSeCd: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.TEMPLATE, params],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.TEMPLATE, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
TemplateApi.getTemplateList({
|
||||
keyword: params.keyword,
|
||||
tmpltSeCd: params.tmpltSeCd,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ keyword, tmpltSeCd, page: 0 });
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword,
|
||||
tmpltSeCd,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setKeyword("");
|
||||
setTmpltSeCd("");
|
||||
resetParams();
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword: "",
|
||||
tmpltSeCd: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Template) => {
|
||||
@@ -79,7 +67,7 @@ function TemplatePage() {
|
||||
state: {
|
||||
pagination,
|
||||
},
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
manualPagination: true,
|
||||
},
|
||||
|
||||
@@ -2,70 +2,63 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import { CodeSelect } from "@/entities/code";
|
||||
import { getCoreRowModel, type PaginationState } from "@tanstack/react-table";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
|
||||
import { CodeSelect } from "@/entities/code";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import { TermsApi } from "../api/terms-service";
|
||||
import type { Terms } from "../model/terms-interface";
|
||||
import { columns } from "../model/terms-table-columns";
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
keyword: "",
|
||||
trmsSeCd: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
import type { TermsParams, Terms } from "../model/terms-interface";
|
||||
|
||||
function TermsPage() {
|
||||
const router = useRouter();
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
const [keyword, setKeyword] = useState(params.keyword);
|
||||
const [trmsSeCd, setTrmsSeCd] = useState(params.trmsSeCd);
|
||||
|
||||
const [keyword, setKeyword] = useState("");
|
||||
const [trmsSeCd, setTrmsSeCd] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<TermsParams>({
|
||||
keyword: "",
|
||||
trmsSeCd: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.TERMS, params],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.TERMS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
TermsApi.getTermsList({
|
||||
keyword: params.keyword,
|
||||
trmsSeCd: params.trmsSeCd,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ keyword, trmsSeCd, page: 0 });
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword,
|
||||
trmsSeCd,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setKeyword("");
|
||||
setTrmsSeCd("");
|
||||
resetParams();
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword: "",
|
||||
trmsSeCd: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Terms) => {
|
||||
@@ -79,7 +72,7 @@ function TermsPage() {
|
||||
state: {
|
||||
pagination,
|
||||
},
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
manualPagination: true,
|
||||
},
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
type OnChangeFn,
|
||||
type PaginationState,
|
||||
} from "@tanstack/react-table";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getCoreRowModel, type PaginationState } from "@tanstack/react-table";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable, useSearchParamsState } from "@/shared/lib";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import { InputDateRangePicker } from "@/shared/ui/input-date-range-picker";
|
||||
import { CodeApi } from "@/entities/code";
|
||||
import { UserApi, type UserListResponse } from "@/entities/user";
|
||||
import {
|
||||
UserApi,
|
||||
type UserListResponse,
|
||||
type UserSearchParams,
|
||||
} from "@/entities/user";
|
||||
import {
|
||||
Button,
|
||||
Checkbox,
|
||||
@@ -35,39 +35,34 @@ type DateRange = {
|
||||
to?: Date | null;
|
||||
};
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
keywordType: "all",
|
||||
keyword: "",
|
||||
userStateCode: "",
|
||||
aprvYn: "",
|
||||
grpId: "",
|
||||
frDateYmd: "",
|
||||
toDateYmd: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
size: 10,
|
||||
};
|
||||
|
||||
function parseDateRange(frDateYmd: string, toDateYmd: string): DateRange {
|
||||
return {
|
||||
from: frDateYmd ? dayjs(frDateYmd, "YYYYMMDD").toDate() : undefined,
|
||||
to: toDateYmd ? dayjs(toDateYmd, "YYYYMMDD").toDate() : undefined,
|
||||
};
|
||||
}
|
||||
|
||||
function UsersPage() {
|
||||
const router = useRouter();
|
||||
const { params, setParams, resetParams } =
|
||||
useSearchParamsState(DEFAULT_PARAMS);
|
||||
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
const [presetDateRange, setPresetDateRange] = useState("");
|
||||
const [dateRange, setDateRange] = useState<DateRange>(() =>
|
||||
parseDateRange(params.frDateYmd, params.toDateYmd),
|
||||
);
|
||||
const [keywordType, setKeywordType] = useState(params.keywordType);
|
||||
const [keyword, setKeyword] = useState(params.keyword);
|
||||
const [userStateCode, setUserStateCode] = useState(params.userStateCode);
|
||||
const [aprvYn, setAprvYn] = useState(params.aprvYn);
|
||||
const [grpId, setGrpId] = useState(params.grpId);
|
||||
const [dateRange, setDateRange] = useState<DateRange>({
|
||||
from: undefined,
|
||||
to: undefined,
|
||||
});
|
||||
const [keywordType, setKeywordType] = useState("all");
|
||||
const [keyword, setKeyword] = useState("");
|
||||
const [userStateCode, setUserStateCode] = useState("");
|
||||
const [aprvYn, setAprvYn] = useState("");
|
||||
const [grpId, setGrpId] = useState("");
|
||||
|
||||
const [searchParams, setSearchParams] = useState<UserSearchParams>({
|
||||
keywordType: "all",
|
||||
keyword: "",
|
||||
userStateCode: "",
|
||||
aprvYn: "",
|
||||
grpId: "",
|
||||
frDateYmd: "",
|
||||
toDateYmd: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
|
||||
const { data: userSttsStats } = useQuery({
|
||||
queryKey: [ENDPOINT.USER_SERVICE.USERS, "userStatusStatistics"],
|
||||
@@ -75,21 +70,13 @@ function UsersPage() {
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.USER_SERVICE.USERS, params],
|
||||
queryKey: [ENDPOINT.USER_SERVICE.USERS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
UserApi.findPageUser({
|
||||
keywordType: params.keywordType,
|
||||
keyword: params.keyword,
|
||||
userStateCode: params.userStateCode,
|
||||
aprvYn: params.aprvYn,
|
||||
grpId: params.grpId,
|
||||
frDateYmd: params.frDateYmd,
|
||||
toDateYmd: params.toDateYmd,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
size: params.size,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
|
||||
const { data: userStateCodes } = useQuery({
|
||||
@@ -97,16 +84,6 @@ function UsersPage() {
|
||||
queryFn: () => CodeApi.getCode("USERSTTS"),
|
||||
});
|
||||
|
||||
const pagination: PaginationState = {
|
||||
pageIndex: params.page,
|
||||
pageSize: params.size,
|
||||
};
|
||||
|
||||
const handlePaginationChange: OnChangeFn<PaginationState> = (updater) => {
|
||||
const next = typeof updater === "function" ? updater(pagination) : updater;
|
||||
setParams({ page: next.pageIndex, size: next.pageSize });
|
||||
};
|
||||
|
||||
const handleRowClick = (row: UserListResponse) => {
|
||||
router.push(`/users/${row.userUnqId}`);
|
||||
};
|
||||
@@ -120,7 +97,7 @@ function UsersPage() {
|
||||
},
|
||||
manualPagination: true,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
onPaginationChange: handlePaginationChange,
|
||||
onPaginationChange: setPagination,
|
||||
},
|
||||
dataTableOptions: {
|
||||
onRowClick: handleRowClick,
|
||||
@@ -128,9 +105,14 @@ function UsersPage() {
|
||||
},
|
||||
});
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
const handleSubmit = (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keywordType,
|
||||
keyword,
|
||||
userStateCode,
|
||||
@@ -140,7 +122,6 @@ function UsersPage() {
|
||||
? dayjs(dateRange.from).format("YYYYMMDD")
|
||||
: "",
|
||||
toDateYmd: dateRange?.to ? dayjs(dateRange.to).format("YYYYMMDD") : "",
|
||||
page: 0,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -150,12 +131,20 @@ function UsersPage() {
|
||||
setUserStateCode("");
|
||||
setAprvYn("");
|
||||
setGrpId("");
|
||||
setPresetDateRange("");
|
||||
setDateRange({
|
||||
from: undefined,
|
||||
to: undefined,
|
||||
});
|
||||
resetParams();
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keywordType: "all",
|
||||
keyword: "",
|
||||
userStateCode: "",
|
||||
aprvYn: "",
|
||||
grpId: "",
|
||||
frDateYmd: "",
|
||||
toDateYmd: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handlePresetDateRange = (value: string) => {
|
||||
@@ -362,9 +351,12 @@ function UsersPage() {
|
||||
<h3 className="text-2xl font-medium text-label">회원 목록</h3>
|
||||
<div className="flex gap-2">
|
||||
<Select
|
||||
value={params.sort}
|
||||
defaultValue="regDt,desc"
|
||||
onValueChange={(value) => {
|
||||
setParams({ sort: value });
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
sort: value,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<SelectTrigger>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
export { getCookie, removeCookie, setCookie } from "./cookie";
|
||||
export { getCookie, setCookie, removeCookie } from "./cookie";
|
||||
export { useMutationWrapper } from "./use-mutation-wrapper";
|
||||
export { useAlertStore } from "./use-alert-store";
|
||||
export { useDataTable } from "./use-data-table";
|
||||
export { useMenuStore } from "./use-menu-store";
|
||||
export { useMutationWrapper } from "./use-mutation-wrapper";
|
||||
export { usePrompt } from "./use-prompt";
|
||||
export { useSearchParamsState } from "./use-search-params-state";
|
||||
export { useSelectPrompt } from "./use-select-prompt";
|
||||
export { useUserStore } from "./use-user-store";
|
||||
export { usePrompt } from "./use-prompt";
|
||||
export { useSelectPrompt } from "./use-select-prompt";
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { useCallback, useMemo, useRef } from "react";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
|
||||
/**
|
||||
* 조회 조건을 URL searchParams와 동기화하는 훅.
|
||||
*
|
||||
* - URL이 단일 소스 오브 트루스(SSOT)이며, 새로고침·뒤로가기 시에도 조건이 유지된다.
|
||||
* - 기본값과 동일한 값은 URL에서 제거해 쿼리스트링을 깨끗하게 유지한다.
|
||||
* - `window.history.replaceState` 기반 shallow 갱신으로 서버 라운드트립 없이 동작한다.
|
||||
* - 숫자 기본값이 주어진 키는 자동으로 `Number` 파싱한다.
|
||||
*
|
||||
* @example
|
||||
* const { params, setParams, resetParams } = useSearchParamsState({
|
||||
* keyword: "",
|
||||
* page: 0,
|
||||
* size: 10,
|
||||
* });
|
||||
*/
|
||||
export function useSearchParamsState<T extends Record<string, ParamValue>>(
|
||||
defaults: T,
|
||||
): UseSearchParamsStateReturn<T> {
|
||||
const searchParams = useSearchParams();
|
||||
const defaultsRef = useRef(defaults);
|
||||
|
||||
const params = useMemo(
|
||||
() => parseParams(searchParams, defaultsRef.current),
|
||||
[searchParams],
|
||||
);
|
||||
|
||||
const setParams = useCallback((partial: Partial<T>) => {
|
||||
const next = new URLSearchParams(window.location.search);
|
||||
for (const [key, value] of Object.entries(partial)) {
|
||||
if (value === undefined || value === defaultsRef.current[key]) {
|
||||
next.delete(key);
|
||||
} else {
|
||||
next.set(key, String(value));
|
||||
}
|
||||
}
|
||||
replaceUrl(next);
|
||||
}, []);
|
||||
|
||||
const resetParams = useCallback(() => {
|
||||
const next = new URLSearchParams(window.location.search);
|
||||
for (const key of Object.keys(defaultsRef.current)) {
|
||||
next.delete(key);
|
||||
}
|
||||
replaceUrl(next);
|
||||
}, []);
|
||||
|
||||
return { params, setParams, resetParams };
|
||||
}
|
||||
|
||||
function parseParams<T extends Record<string, ParamValue>>(
|
||||
searchParams: ReturnType<typeof useSearchParams>,
|
||||
defaults: T,
|
||||
): T {
|
||||
const result = { ...defaults };
|
||||
|
||||
for (const key of Object.keys(defaults) as (keyof T)[]) {
|
||||
const raw = searchParams?.get(key as string) ?? null;
|
||||
if (raw === null) continue;
|
||||
|
||||
if (typeof defaults[key] === "number") {
|
||||
const parsed = Number(raw);
|
||||
if (!Number.isNaN(parsed)) result[key] = parsed as T[keyof T];
|
||||
} else {
|
||||
result[key] = raw as T[keyof T];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function replaceUrl(searchParams: URLSearchParams) {
|
||||
const qs = searchParams.toString();
|
||||
const url = qs
|
||||
? `${window.location.pathname}?${qs}`
|
||||
: window.location.pathname;
|
||||
window.history.replaceState(null, "", url);
|
||||
}
|
||||
|
||||
type ParamValue = string | number | null;
|
||||
|
||||
interface UseSearchParamsStateReturn<T> {
|
||||
params: T;
|
||||
setParams: (partial: Partial<T>) => void;
|
||||
resetParams: () => void;
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
import { useEffect } from "react";
|
||||
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
||||
|
||||
import { useClipboard } from "@frontend-opensource/use-react-hooks";
|
||||
import { toast } from "sonner";
|
||||
|
||||
import { useMenuStore, useSelectPrompt, useUserStore } from "@/shared/lib";
|
||||
import { AuthorityButton } from "@/entities/menu-authority";
|
||||
import { deleteReasonMessages } from "@/entities/post";
|
||||
import { useEffect } from "react";
|
||||
import { useRouter, usePathname } from "next/navigation";
|
||||
import { useClipboard } from "@frontend-opensource/use-react-hooks";
|
||||
import { Button } from "@common/components";
|
||||
import { deleteReasonMessages } from "@/entities/post";
|
||||
import { AuthorityButton } from "@/entities/menu-authority";
|
||||
import { useMenuStore, useSelectPrompt, useUserStore } from "@/shared/lib";
|
||||
|
||||
type PostActionProps = {
|
||||
bbsId: string;
|
||||
@@ -23,14 +21,11 @@ const selectData = Object.entries(deleteReasonMessages).map(
|
||||
function PostAction({ children, handleDelete }: PostActionProps) {
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const searchParams = useSearchParams();
|
||||
const { copyText, copied } = useClipboard();
|
||||
const { prompt } = useSelectPrompt(selectData);
|
||||
const bbsInfo = useMenuStore((state) => state.bbsInfo);
|
||||
const userInfo = useUserStore((state) => state.userInfo);
|
||||
const postPageLink = `/bbs/${bbsInfo?.bbsTypeCd.toLowerCase()}/${bbsInfo?.bbsId}`;
|
||||
const from = searchParams?.get("from");
|
||||
const backLink = from ?? postPageLink;
|
||||
|
||||
const onDelete = async () => {
|
||||
const { resolved, value } = await prompt("삭제 사유를 입력해주세요.");
|
||||
@@ -70,7 +65,7 @@ function PostAction({ children, handleDelete }: PostActionProps) {
|
||||
size="lg"
|
||||
color="white"
|
||||
type="button"
|
||||
onClick={() => router.push(backLink)}
|
||||
onClick={() => router.push(postPageLink)}
|
||||
>
|
||||
목록
|
||||
</Button>
|
||||
|
||||
@@ -0,0 +1,415 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
|
||||
// 테스트 순차 실행 보장 (전 단계 상태가 영향을 줄 수 있으므로 serial 모드로 설정)
|
||||
test.describe.configure({ mode: "serial" });
|
||||
|
||||
const adminId = process.env.TEST_ADMIN_ID || "admin1gmail";
|
||||
const adminPassword = process.env.TEST_ADMIN_PW || "test1234!";
|
||||
|
||||
const DEVICE_PC = "device-pc-chrome-001";
|
||||
const DEVICE_MOBILE = "device-mobile-safari-002";
|
||||
const DEVICE_TABLET = "device-tablet-firefox-003";
|
||||
|
||||
// 디바이스별로 완전히 분리된 HTTP 요청 컨텍스트를 생성하여 세션 격리를 모사하는 헬퍼 함수
|
||||
async function createDeviceContext(playwrightRequest: any, deviceId: string) {
|
||||
return await playwrightRequest.newContext({
|
||||
baseURL: process.env.PLAYWRIGHT_BASE_URL || "http://localhost:3000",
|
||||
extraHTTPHeaders: {
|
||||
"X-Device-Id": deviceId,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// 1초 이상의 간격을 두어 토큰 발급/갱신 시 만료 시각(초)이 다르게 생성되도록 유도하는 지연 함수
|
||||
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
|
||||
// 응답의 Set-Cookie 헤더 배열에서 특정 쿠키 값을 추출하는 헬퍼 함수
|
||||
function getCookieValue(
|
||||
headers: { name: string; value: string }[],
|
||||
name: string,
|
||||
): string | null {
|
||||
const cookieHeaders = headers.filter(
|
||||
(h) => h.name.toLowerCase() === "set-cookie",
|
||||
);
|
||||
for (const header of cookieHeaders) {
|
||||
const parts = header.value.split(";")[0].split("=");
|
||||
if (parts[0].trim() === name) {
|
||||
return parts[1].trim();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// 응답의 Set-Cookie 헤더에서 특정 쿠키의 속성(httpOnly, sameSite 등) 존재 유무를 확인하는 헬퍼 함수
|
||||
function hasCookieAttribute(
|
||||
headers: { name: string; value: string }[],
|
||||
name: string,
|
||||
attribute: string,
|
||||
): boolean {
|
||||
const cookieHeaders = headers.filter(
|
||||
(h) => h.name.toLowerCase() === "set-cookie",
|
||||
);
|
||||
for (const header of cookieHeaders) {
|
||||
const parts = header.value.split(";");
|
||||
const cookieName = parts[0].split("=")[0].trim();
|
||||
if (cookieName === name) {
|
||||
return parts
|
||||
.slice(1)
|
||||
.some((p) => p.trim().toLowerCase() === attribute.toLowerCase());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
test.describe("다중 디바이스 인증 & Refresh Token Rotation (RTR) 테스트", () => {
|
||||
|
||||
test("1. 로그인 성공 시 httpOnly refresh-token 쿠키 설정", async ({ request }) => {
|
||||
const response = await request.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
headers: { "X-Device-Id": DEVICE_PC },
|
||||
});
|
||||
expect(response.status()).toBe(200);
|
||||
|
||||
const headers = response.headersArray();
|
||||
const refreshToken = getCookieValue(headers, "refresh-token");
|
||||
expect(refreshToken).not.toBeNull();
|
||||
expect(refreshToken).not.toBe("");
|
||||
|
||||
// httpOnly 속성이 설정되었는지 검증
|
||||
const isHttpOnly = hasCookieAttribute(headers, "refresh-token", "httponly");
|
||||
expect(isHttpOnly).toBe(true);
|
||||
});
|
||||
|
||||
test("2. PC/모바일/태블릿 독립 refresh-token 발급", async ({ playwright }) => {
|
||||
const pcContext = await createDeviceContext(playwright.request, DEVICE_PC);
|
||||
const mobileContext = await createDeviceContext(playwright.request, DEVICE_MOBILE);
|
||||
const tabletContext = await createDeviceContext(playwright.request, DEVICE_TABLET);
|
||||
|
||||
const pcRes = await pcContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
const pcToken = getCookieValue(pcRes.headersArray(), "refresh-token");
|
||||
|
||||
await delay(1000); // 1초 간격 지연
|
||||
|
||||
const mobileRes = await mobileContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
const mobileToken = getCookieValue(mobileRes.headersArray(), "refresh-token");
|
||||
|
||||
await delay(1000); // 1초 간격 지연
|
||||
|
||||
const tabletRes = await tabletContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
const tabletToken = getCookieValue(tabletRes.headersArray(), "refresh-token");
|
||||
|
||||
expect(pcToken).not.toBeNull();
|
||||
expect(mobileToken).not.toBeNull();
|
||||
expect(tabletToken).not.toBeNull();
|
||||
|
||||
// 다중 세션 환경에서는 디바이스마다 리프레시 토큰이 고유해야 함
|
||||
expect(pcToken).not.toBe(mobileToken);
|
||||
expect(pcToken).not.toBe(tabletToken);
|
||||
expect(mobileToken).not.toBe(tabletToken);
|
||||
|
||||
await pcContext.dispose();
|
||||
await mobileContext.dispose();
|
||||
await tabletContext.dispose();
|
||||
});
|
||||
|
||||
test("3. Silent Refresh RTR - 새 토큰 교체", async ({ playwright }) => {
|
||||
const pcContext = await createDeviceContext(playwright.request, DEVICE_PC);
|
||||
|
||||
// 로그인으로 최초 토큰 발급
|
||||
const loginRes = await pcContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
const firstToken = getCookieValue(loginRes.headersArray(), "refresh-token");
|
||||
expect(firstToken).not.toBeNull();
|
||||
|
||||
await delay(1000); // 1초 간격 지연
|
||||
|
||||
// 갱신 시도 (RTR 동작)
|
||||
const refreshRes = await pcContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
expect(refreshRes.status()).toBe(200);
|
||||
|
||||
const secondToken = getCookieValue(refreshRes.headersArray(), "refresh-token");
|
||||
expect(secondToken).not.toBeNull();
|
||||
|
||||
// 이전 토큰과 달라져야 함
|
||||
expect(secondToken).not.toBe(firstToken);
|
||||
|
||||
await pcContext.dispose();
|
||||
});
|
||||
|
||||
test("4. PC RTR 갱신 후 모바일 세션 독립 유지", async ({ playwright }) => {
|
||||
const pcContext = await createDeviceContext(playwright.request, DEVICE_PC);
|
||||
const mobileContext = await createDeviceContext(playwright.request, DEVICE_MOBILE);
|
||||
|
||||
await pcContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
|
||||
await delay(1000); // 1초 간격 지연
|
||||
|
||||
await mobileContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
|
||||
await delay(1000); // 1초 간격 지연
|
||||
|
||||
// PC 토큰을 RTR 갱신함
|
||||
const pcRefresh = await pcContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
expect(pcRefresh.status()).toBe(200);
|
||||
|
||||
// 모바일 세션은 PC와 연동되지 않고 독립적으로 정상 갱신되어야 함
|
||||
const mobileRefresh = await mobileContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
expect(mobileRefresh.status()).toBe(200);
|
||||
|
||||
await pcContext.dispose();
|
||||
await mobileContext.dispose();
|
||||
});
|
||||
|
||||
test("5. Replay Attack - 구 토큰 재주입 → 400", async ({ playwright }) => {
|
||||
const pcContext = await createDeviceContext(playwright.request, DEVICE_PC);
|
||||
|
||||
// 로그인 후 구 토큰 확보
|
||||
const loginRes = await pcContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
const oldToken = getCookieValue(loginRes.headersArray(), "refresh-token");
|
||||
|
||||
await delay(1000); // 1초 간격 지연
|
||||
|
||||
// 1차 갱신을 수행하여 서버(Redis)의 저장 값을 갱신
|
||||
const refreshRes1 = await pcContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
expect(refreshRes1.status()).toBe(200);
|
||||
|
||||
// 구 토큰을 명시적으로 세팅하여 재사용 시도
|
||||
const replayContext = await createDeviceContext(playwright.request, DEVICE_PC);
|
||||
await replayContext.storageState({
|
||||
cookies: [
|
||||
{
|
||||
name: "refresh-token",
|
||||
value: oldToken!,
|
||||
domain: "localhost",
|
||||
path: "/",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const replayRes = await replayContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
// 사용 완료된 토큰 재주입은 거부되어야 함 (백엔드는 401 반환)
|
||||
expect(replayRes.status()).toBe(401);
|
||||
|
||||
await pcContext.dispose();
|
||||
await replayContext.dispose();
|
||||
});
|
||||
|
||||
test("6. refresh-token 없이 silent refresh → 401", async ({ playwright }) => {
|
||||
const cleanContext = await createDeviceContext(playwright.request, DEVICE_PC);
|
||||
const res = await cleanContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
|
||||
// 토큰 부재 시 401 반환
|
||||
expect(res.status()).toBe(401);
|
||||
const body = await res.json();
|
||||
expect(body.message).toBe("Can't refresh");
|
||||
|
||||
await cleanContext.dispose();
|
||||
});
|
||||
|
||||
test("7. 잘못된 비밀번호 → 401", async ({ request }) => {
|
||||
const res = await request.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: "WrongPassword999!" },
|
||||
headers: { "X-Device-Id": DEVICE_PC },
|
||||
});
|
||||
expect(res.status()).toBe(401);
|
||||
const body = await res.json();
|
||||
expect(body.message).toBe("Invalid Credentials");
|
||||
});
|
||||
|
||||
test("8. 존재하지 않는 ID → 401", async ({ request }) => {
|
||||
const res = await request.post("/api/proxy/user-service/login", {
|
||||
data: { userId: "non_existent_user_xyz", password: adminPassword },
|
||||
headers: { "X-Device-Id": DEVICE_PC },
|
||||
});
|
||||
expect(res.status()).toBe(401);
|
||||
const body = await res.json();
|
||||
expect(body.message).toBe("Invalid Credentials");
|
||||
});
|
||||
|
||||
test("9. 로그아웃 후 쿠키 전체 삭제", async ({ playwright }) => {
|
||||
const pcContext = await createDeviceContext(playwright.request, DEVICE_PC);
|
||||
await pcContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
|
||||
// 로그아웃 호출
|
||||
const logoutRes = await pcContext.post("/api/auth/logout");
|
||||
expect(logoutRes.status()).toBe(200);
|
||||
|
||||
// 클라이언트의 인증 쿠키들이 소멸되었는지 검증
|
||||
const state = await pcContext.storageState();
|
||||
const refreshCookie = state.cookies.find((c) => c.name === "refresh-token");
|
||||
const accessCookie = state.cookies.find((c) => c.name === "access-token");
|
||||
const userCookie = state.cookies.find((c) => c.name === "user-id");
|
||||
|
||||
expect(refreshCookie).toBeUndefined();
|
||||
expect(accessCookie).toBeUndefined();
|
||||
expect(userCookie).toBeUndefined();
|
||||
|
||||
await pcContext.dispose();
|
||||
});
|
||||
|
||||
test("10. PC 로그아웃 후 모바일 세션 독립 유지", async ({ playwright }) => {
|
||||
const pcContext = await createDeviceContext(playwright.request, DEVICE_PC);
|
||||
const mobileContext = await createDeviceContext(playwright.request, DEVICE_MOBILE);
|
||||
|
||||
await pcContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
await mobileContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
|
||||
// PC 로그아웃
|
||||
await pcContext.post("/api/auth/logout");
|
||||
|
||||
// 모바일은 PC의 로그아웃과 무관하게 독립적으로 유효하게 동작해야 함
|
||||
const mobileRefresh = await mobileContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
expect(mobileRefresh.status()).toBe(200);
|
||||
|
||||
await pcContext.dispose();
|
||||
await mobileContext.dispose();
|
||||
});
|
||||
|
||||
test("11. UI 로그인 후 httpOnly 쿠키 E2E 확인", async ({ page }) => {
|
||||
// UI 로그인 페이지 접속
|
||||
await page.goto("/auth/login");
|
||||
|
||||
// Form 필드 입력
|
||||
await page.locator("input#id").fill(adminId);
|
||||
await page.locator("input#password").fill(adminPassword);
|
||||
|
||||
// 디바이스 ID 쿠키 설정 시뮬레이션
|
||||
await page.context().addCookies([
|
||||
{
|
||||
name: "device-id",
|
||||
value: DEVICE_PC,
|
||||
url: "http://localhost:3000",
|
||||
},
|
||||
]);
|
||||
|
||||
// 로그인 버튼 클릭
|
||||
await page.locator(".login_btn").click();
|
||||
|
||||
// 성공 시 대시보드 페이지 이동 대기
|
||||
await page.waitForURL("**/dashboard");
|
||||
|
||||
// E2E 보안 요구사항: 클라이언트 브라우저 JavaScript(document.cookie)로는 httpOnly 쿠키를 읽을 수 없어야 함
|
||||
const clientCookies = await page.evaluate(() => document.cookie);
|
||||
expect(clientCookies).not.toContain("refresh-token");
|
||||
|
||||
// 실제 브라우저의 HTTP Context 쿠키에는 저장되어 있어야 함
|
||||
const contextCookies = await page.context().cookies();
|
||||
const refreshCookie = contextCookies.find((c) => c.name === "refresh-token");
|
||||
expect(refreshCookie).toBeDefined();
|
||||
expect(refreshCookie?.httpOnly).toBe(true);
|
||||
});
|
||||
|
||||
test("12. 동일 계정 3개 브라우저 동시 로그인", async ({ playwright }) => {
|
||||
const pcContext = await createDeviceContext(playwright.request, DEVICE_PC);
|
||||
const mobileContext = await createDeviceContext(playwright.request, DEVICE_MOBILE);
|
||||
const tabletContext = await createDeviceContext(playwright.request, DEVICE_TABLET);
|
||||
|
||||
const pcRes = await pcContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
expect(pcRes.status()).toBe(200);
|
||||
|
||||
const mobileRes = await mobileContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
expect(mobileRes.status()).toBe(200);
|
||||
|
||||
const tabletRes = await tabletContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
expect(tabletRes.status()).toBe(200);
|
||||
|
||||
// 3개 브라우저 세션 모두 정상 리프레시 수행 가능 확인
|
||||
const pcRef = await pcContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
expect(pcRef.status()).toBe(200);
|
||||
|
||||
const mobRef = await mobileContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
expect(mobRef.status()).toBe(200);
|
||||
|
||||
const tabRef = await tabletContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
expect(tabRef.status()).toBe(200);
|
||||
|
||||
await pcContext.dispose();
|
||||
await mobileContext.dispose();
|
||||
await tabletContext.dispose();
|
||||
});
|
||||
|
||||
test("13. sameSite=Strict 쿠키 속성 확인", async ({ request }) => {
|
||||
const response = await request.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
headers: { "X-Device-Id": DEVICE_PC },
|
||||
});
|
||||
expect(response.status()).toBe(200);
|
||||
|
||||
const headers = response.headersArray();
|
||||
const isStrict = hasCookieAttribute(headers, "refresh-token", "samesite=strict");
|
||||
expect(isStrict).toBe(true);
|
||||
});
|
||||
|
||||
test("14. 연속 3회 RTR 갱신 - 4개 고유 토큰", async ({ playwright }) => {
|
||||
const pcContext = await createDeviceContext(playwright.request, DEVICE_PC);
|
||||
const tokens: string[] = [];
|
||||
|
||||
// 로그인 (1차 토큰 발급)
|
||||
const loginRes = await pcContext.post("/api/proxy/user-service/login", {
|
||||
data: { userId: adminId, password: adminPassword },
|
||||
});
|
||||
const t1 = getCookieValue(loginRes.headersArray(), "refresh-token");
|
||||
expect(t1).not.toBeNull();
|
||||
tokens.push(t1!);
|
||||
|
||||
await delay(1000);
|
||||
|
||||
// 1차 갱신 (2차 토큰 발급)
|
||||
const r1 = await pcContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
expect(r1.status()).toBe(200);
|
||||
const t2 = getCookieValue(r1.headersArray(), "refresh-token");
|
||||
expect(t2).not.toBeNull();
|
||||
tokens.push(t2!);
|
||||
|
||||
await delay(1000);
|
||||
|
||||
// 2차 갱신 (3차 토큰 발급)
|
||||
const r2 = await pcContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
expect(r2.status()).toBe(200);
|
||||
const t3 = getCookieValue(r2.headersArray(), "refresh-token");
|
||||
expect(t3).not.toBeNull();
|
||||
tokens.push(t3!);
|
||||
|
||||
await delay(1000);
|
||||
|
||||
// 3차 갱신 (4차 토큰 발급)
|
||||
const r3 = await pcContext.put("/api/proxy/user-service/api/v1/users/token/refresh");
|
||||
expect(r3.status()).toBe(200);
|
||||
const t4 = getCookieValue(r3.headersArray(), "refresh-token");
|
||||
expect(t4).not.toBeNull();
|
||||
tokens.push(t4!);
|
||||
|
||||
// 4개 토큰이 모두 고유한지 검증 (Set의 중복 제거 크기로 판별)
|
||||
const uniqueTokens = new Set(tokens);
|
||||
expect(uniqueTokens.size).toBe(4);
|
||||
|
||||
await pcContext.dispose();
|
||||
});
|
||||
});
|
||||
@@ -18,8 +18,8 @@ NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:800
|
||||
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_GATEWAY_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
||||
CONTENTS_INTRO = 24
|
||||
CONTENTS_EXAMPLE = 25
|
||||
CONTENTS_INTRO = 31
|
||||
CONTENTS_EXAMPLE = 32
|
||||
|
||||
NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do
|
||||
NEXT_PRIVATE_WR_ADDRESS_KEY = U01TXOFVVEgyMDI1MDgyODE0MTAxNzExNjEyMjA=
|
||||
|
||||
@@ -365,7 +365,7 @@ export default function SimilarCaseModal({
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowSpan={2} className={thBase}>
|
||||
총대장균군수<br />(개/100mL)
|
||||
총대장균군수<br />(개/100ml)
|
||||
</th>
|
||||
<th rowSpan={2} className={thBase}>
|
||||
용도별 결합 잔류염소<br />(mg/L)
|
||||
|
||||
@@ -428,7 +428,7 @@ export default function DemandRegisterPage() {
|
||||
</FormRow>
|
||||
<Divider />
|
||||
|
||||
<FormRow label="요구수량(㎥/d)" required>
|
||||
<FormRow label="요구수량(m²/d)" required>
|
||||
<TextInput value={reqQty} onChange={setReqQty} />
|
||||
</FormRow>
|
||||
<Divider />
|
||||
@@ -438,7 +438,7 @@ export default function DemandRegisterPage() {
|
||||
</FormRow>
|
||||
<Divider />
|
||||
|
||||
<FormRow label="희망단가(원/㎥)" required>
|
||||
<FormRow label="희망단가(원)" required>
|
||||
<TextInput value={hopePrice} onChange={setHopePrice} />
|
||||
</FormRow>
|
||||
</div>
|
||||
@@ -464,7 +464,7 @@ export default function DemandRegisterPage() {
|
||||
|
||||
<div className="border border-neutral-200 bg-white">
|
||||
<QualityRow
|
||||
leftLabel="총대장균군수(개/100㎖)"
|
||||
leftLabel="총대장균군수(개/mg)"
|
||||
leftRequired
|
||||
leftControl={
|
||||
<div className="flex items-center gap-4">
|
||||
|
||||
@@ -148,7 +148,7 @@ export default function DemandStatusPage() {
|
||||
{ label: "요구시기", value: selected.detail.reqDate, required: true },
|
||||
{ label: "요구수량(㎡/d)", value: selected.detail.reqQty },
|
||||
{ label: "사용용도", value: selected.detail.usePurpose },
|
||||
{ label: "희망단가(원/㎥)", value: selected.detail.price },
|
||||
{ label: "희망단가(원)", value: selected.detail.price },
|
||||
];
|
||||
}, [selected]);
|
||||
|
||||
@@ -157,7 +157,7 @@ export default function DemandStatusPage() {
|
||||
if (!selected) return [];
|
||||
const w = selected.detail.water;
|
||||
return [
|
||||
{ label: "총대장균군수(개/100㎖)", value: w.coliform },
|
||||
{ label: "총대장균군수(개/100mℓ)", value: w.coliform },
|
||||
{ label: "결합잔류염소(mg/L)", value: "-" },
|
||||
{ label: "탁도(NTU)", value: w.turbidity },
|
||||
|
||||
|
||||
@@ -44,17 +44,17 @@ export default function DemandRegisterPage() {
|
||||
const [coliform, setColiform] = useState<string>(""); // 총대장균군수
|
||||
const [noDetect, setNoDetect] = useState<boolean>(false);
|
||||
|
||||
const [tn, setTn] = useState<string>(""); // 총질소(T-N)
|
||||
const [residualCl, setResidualCl] = useState<string>(""); // 결합잔류염소
|
||||
const [tp, setTp] = useState<string>(""); // 총인(T-P)
|
||||
const [turbidity, setTurbidity] = useState<string>(""); // 탁도
|
||||
const [ph, setPh] = useState<PHRange>({ min: "", max: "" }); // 수소이온농도(pH)
|
||||
const [bod, setBod] = useState<string>(""); // 생물학적산소요구량(BOD)
|
||||
const [chloride, setChloride] = useState<string>(""); // 염화물
|
||||
const [odor, setOdor] = useState<string>("불쾌하지 않을 것"); // 냄새
|
||||
const [ec, setEc] = useState<string>(""); // 전기전도도
|
||||
const [color, setColor] = useState<string>(""); // 색도
|
||||
const [remark, setRemark] = useState<string>(""); // 비고
|
||||
const [tn, setTn] = useState<string>("");
|
||||
const [residualCl, setResidualCl] = useState<string>("");
|
||||
const [tp, setTp] = useState<string>("");
|
||||
const [turbidity, setTurbidity] = useState<string>("");
|
||||
const [ph, setPh] = useState<PHRange>({ min: "", max: "" });
|
||||
const [bod, setBod] = useState<string>("");
|
||||
const [chloride, setChloride] = useState<string>("");
|
||||
const [odor, setOdor] = useState<string>("불쾌하지 않을 것");
|
||||
const [ec, setEc] = useState<string>("");
|
||||
const [color, setColor] = useState<string>("");
|
||||
const [remark, setRemark] = useState<string>("");
|
||||
|
||||
// 공급처 후보지 선택(필수아님)
|
||||
const [cand1, setCand1] = useState("");
|
||||
@@ -373,8 +373,7 @@ export default function DemandRegisterPage() {
|
||||
switch (value) {
|
||||
// 청소화장실용도
|
||||
case '01':
|
||||
setNoDetect(true); // 총대장균군수 불검출
|
||||
setResidualCl('0.2'); // 잔류염소
|
||||
setTp('0.2');
|
||||
setTurbidity('2');
|
||||
setPh({ min: '5.8', max: '8.5' });
|
||||
setBod('5');
|
||||
@@ -382,35 +381,23 @@ export default function DemandRegisterPage() {
|
||||
break;
|
||||
// 세척살수용도
|
||||
case '02':
|
||||
setColiform('1000');
|
||||
setTurbidity('2'); // 탁도
|
||||
setTp('0.2');
|
||||
setTurbidity('2');
|
||||
setPh({ min: '5.8', max: '8.5' });
|
||||
setBod('5');
|
||||
break;
|
||||
// 조경용도
|
||||
case '03':
|
||||
setColiform('1000');
|
||||
setTp('0.2');
|
||||
setTurbidity('2');
|
||||
setPh({ min: '5.8', max: '8.5' });
|
||||
setBod('5');
|
||||
setChloride('250'); // 염화물
|
||||
setChloride('250');
|
||||
break;
|
||||
// 친수용도
|
||||
case '04':
|
||||
setNoDetect(true); // 총대장균군수 불검출
|
||||
setResidualCl('0.1'); // 잔류염소
|
||||
setTurbidity('2');
|
||||
setBod('3');
|
||||
setColor('10');
|
||||
setTn('10'); // 총질소
|
||||
setTp('0.5'); // 총인
|
||||
setPh({ min: '5.8', max: '8.5' });
|
||||
setChloride('0.5');
|
||||
break;
|
||||
// 지하수충전
|
||||
// 지하수
|
||||
case '05':
|
||||
break;
|
||||
// 농업용수
|
||||
// 농업용도
|
||||
case '06':
|
||||
setTurbidity('5');
|
||||
setPh({ min: '5.8', max: '8.5' });
|
||||
@@ -418,18 +405,16 @@ export default function DemandRegisterPage() {
|
||||
setEc('2000');
|
||||
setFarmText("이하 (** 간접:2000,직접:700 )");
|
||||
break;
|
||||
// 하천 등 유지용수
|
||||
// 하천 등 유지보수
|
||||
case '07':
|
||||
setColiform('1000');
|
||||
setBod('5');
|
||||
setTn('20');
|
||||
setTn('10');
|
||||
setTp('0.5');
|
||||
setPh({ min: '5.8', max: '8.5' });
|
||||
setChloride('0.5');
|
||||
setBod('5');
|
||||
break;
|
||||
// 공업용수
|
||||
// 공업
|
||||
case '08':
|
||||
setBod('20');
|
||||
setPh({ min: '5.8', max: '8.5' });
|
||||
break;
|
||||
default:
|
||||
@@ -482,7 +467,7 @@ export default function DemandRegisterPage() {
|
||||
|
||||
<Divider />
|
||||
|
||||
<FormRow label="요구수량(㎥/d)" required>
|
||||
<FormRow label="요구수량(m²/d)" required>
|
||||
<TextInput value={reqQty} onChange={setReqQty} placeholder="" />
|
||||
</FormRow>
|
||||
|
||||
@@ -505,7 +490,7 @@ export default function DemandRegisterPage() {
|
||||
|
||||
<Divider />
|
||||
|
||||
<FormRow label="희망단가(원/㎥)" required>
|
||||
<FormRow label="희망단가(원)" required>
|
||||
<TextInput value={hopePrice} onChange={setHopePrice} />
|
||||
</FormRow>
|
||||
</div>
|
||||
@@ -534,7 +519,7 @@ export default function DemandRegisterPage() {
|
||||
<div className="border border-neutral-200 bg-white">
|
||||
{/* 1행 */}
|
||||
<QualityRow
|
||||
leftLabel="총대장균군수(개/100㎖)"
|
||||
leftLabel="총대장균군수(개/mg)"
|
||||
|
||||
leftControl={
|
||||
<div className="flex items-center gap-4">
|
||||
|
||||
@@ -30,19 +30,6 @@ const formatValue = (value: string | number | null | undefined) => {
|
||||
return String(value);
|
||||
};
|
||||
|
||||
const formatNumberWithComma = (value: string | number | null | undefined) => {
|
||||
if (value === null || value === undefined || value === "") return "-";
|
||||
|
||||
const normalized =
|
||||
typeof value === "string" ? Number(value.replace(/,/g, "")) : Number(value);
|
||||
|
||||
if (Number.isNaN(normalized)) {
|
||||
return String(value);
|
||||
}
|
||||
|
||||
return normalized.toLocaleString("ko-KR");
|
||||
};
|
||||
|
||||
const formatBelow = (value: string | number | null | undefined) => {
|
||||
if (value === null || value === undefined || value === "") return "-";
|
||||
if (Number(value) === -1) return "불검출";
|
||||
@@ -247,9 +234,9 @@ export default function DemandStatusPage() {
|
||||
|
||||
return [
|
||||
{ label: "요구시기", key: "dmndTmng", value: formatDate(selectedSdmInfoStatus.dmndTmng), required: true },
|
||||
{ label: "요구수량(㎥/d)", key: "dmndQty", value: formatNumberWithComma(selectedSdmInfoStatus.dmndQty) },
|
||||
{ label: "요구수량(㎥/d)", key: "dmndQty", value: formatValue(selectedSdmInfoStatus.dmndQty) },
|
||||
{ label: "사용용도", key: "useUsgCd", value: formatValue(selectedSdmInfoStatus.useUsgCd) },
|
||||
{ label: "희망단가(원/㎥)", key: "wntUntprc", value: formatNumberWithComma(selectedSdmInfoStatus.wntUntprc) },
|
||||
{ label: "희망단가(원/㎥)", key: "wntUntprc", value: formatValue(selectedSdmInfoStatus.wntUntprc) },
|
||||
];
|
||||
}, [selectedSdmInfoStatus]);
|
||||
|
||||
@@ -257,7 +244,7 @@ export default function DemandStatusPage() {
|
||||
if (!selectedSdmInfoStatus) return [];
|
||||
|
||||
return [
|
||||
{ label: "총대장균군수(개/100㎖)", key: "grssClfg", value: formatBelow(selectedSdmInfoStatus.grssClfg) },
|
||||
{ label: "총대장균군수(개/100mL)", key: "grssClfg", value: formatBelow(selectedSdmInfoStatus.grssClfg) },
|
||||
{ label: "결합잔류염소(mg/L)", key:"combResdch", value: formatBelow(selectedSdmInfoStatus.combResdch) },
|
||||
{ label: "탁도(NTU)", key:"trbt", value: formatBelow(selectedSdmInfoStatus.trbt) },
|
||||
|
||||
@@ -533,7 +520,7 @@ export default function DemandStatusPage() {
|
||||
|
||||
{!selectedSdmInfoStatus ? (
|
||||
<div className="mt-3 border border-neutral-200 px-6 py-10 text-center text-sm text-slate-400">
|
||||
조회된 결과가 없습니다.
|
||||
상세 정보를 표시할 신청건이 없습니다.
|
||||
</div>
|
||||
) : (
|
||||
<div className="mt-3 border border-neutral-200">
|
||||
|
||||
@@ -770,7 +770,7 @@ export const SdmReducer = (set: any): SdmActions => {
|
||||
"/cms-service/api/v1/lwpo-cds/?lwpoCdNm=&sort=regDt,desc&upCd=WR018&page=0&size=100"
|
||||
);
|
||||
|
||||
const comUseTypes = upCd.content.map((el: any) => ({ text: el.lwpoCdNm, val: el.lwpoCd }));
|
||||
const comUseTypes = upCd.content.filter(el=>el.lwpoCdNm != '친수용수').map((el: any) => ({ text: el.lwpoCdNm, val: el.lwpoCd }));
|
||||
|
||||
set((state: SdmType) => ({
|
||||
Sdm: {
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
// },
|
||||
// {
|
||||
// name: "money",
|
||||
// label: "희망단가(원/㎥)",
|
||||
// label: "희망단가(원)",
|
||||
// formIndex: 0,
|
||||
// required: true,
|
||||
// component: (field) => (
|
||||
@@ -375,7 +375,7 @@
|
||||
// render={({ field }) =>
|
||||
// name === "money" ? (
|
||||
// <div>
|
||||
// <Label className="text-black">희망단가(원/㎥)*</Label>
|
||||
// <Label className="text-black">희망단가(원)*</Label>
|
||||
// {component(field)}
|
||||
// </div>
|
||||
// ) : (
|
||||
@@ -411,7 +411,7 @@
|
||||
// return (
|
||||
// <FormUi
|
||||
// label={
|
||||
// !isDisabled ? `총대장균군수(개/100㎖)*` : "총대장균군수(개/100㎖)"
|
||||
// !isDisabled ? `총대장균군수(개/mg)*` : "총대장균군수(개/mg)"
|
||||
// }
|
||||
// >
|
||||
// <div className="flex items-center gap-2">
|
||||
|
||||
Vendored
-1
@@ -1,6 +1,5 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
/// <reference path="./.next/types/routes.d.ts" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
|
||||
Vendored
-1
@@ -1,6 +1,5 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
/// <reference path="./.next/types/routes.d.ts" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
|
||||
Vendored
-1
@@ -1,6 +1,5 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
/// <reference path="./.next/types/routes.d.ts" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
|
||||
@@ -4,5 +4,4 @@ NEXT_PUBLIC_PROXY_HOST=http://localhost:3001
|
||||
SERVER_API_URL=http://192.168.0.102:8000
|
||||
NEXT_PUBLIC_SITE_ID=ST
|
||||
NEXT_PUBLIC_SUB_DOMAIN=http://localhost:3000
|
||||
NEXT_PUBLIC_TINY_API_KEY=t9nc4z6inquvvd5pq1vea8wcp7lb01qmqseh6egms9vpaju2
|
||||
NEXT_PUBLIC_ST_DASHBOARD_BBS_ID=13
|
||||
NEXT_PUBLIC_TINY_API_KEY=t9nc4z6inquvvd5pq1vea8wcp7lb01qmqseh6egms9vpaju2
|
||||
@@ -1,33 +1,55 @@
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
import { Suspense, useCallback, useEffect, useMemo, useState } from "react";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
|
||||
|
||||
import {
|
||||
|
||||
getTabStoreState as getGridTabStoreState,
|
||||
|
||||
useTabStore as gridTabStore,
|
||||
|
||||
} from "@rsone/components";
|
||||
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
|
||||
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import { getCookie, useAlertStore, useMenuStore } from "@/shared/lib";
|
||||
import { isBbsNoticeMenu } from "@/shared/lib/bbs-notice-menu";
|
||||
import {
|
||||
menuMatchesStatisticsTabId,
|
||||
resolveStatisticsTabId,
|
||||
} from "@/shared/lib/statistics-menu-url";
|
||||
|
||||
import { useStatisticsTabUrlSync } from "@/shared/lib/use-statistics-tab-url-sync";
|
||||
|
||||
import { isVerificationSelectionReportMenu } from "@/shared/lib/verification-selection-report";
|
||||
|
||||
import { StatisticsPageLayout } from "@/shared/ui/statistics-page-layout";
|
||||
|
||||
import { tokenManager } from "@/entities/auth";
|
||||
|
||||
import type { MenuItem } from "@/entities/menu";
|
||||
|
||||
import { MenuApi } from "@/entities/menu";
|
||||
|
||||
import { BaseLayout } from "@common/components";
|
||||
|
||||
import { getConfig } from "@common/config";
|
||||
|
||||
import VerificationSelectionReport from "@/components/statistics/VerificationSelectionReport";
|
||||
|
||||
|
||||
import { getTabStoreState, useTabStore } from "@/store/tab-store";
|
||||
|
||||
|
||||
|
||||
import VerificationSelectionReport from "@/components/statistics/VerificationSelectionReport";
|
||||
|
||||
|
||||
|
||||
const appConfig = getConfig();
|
||||
|
||||
const userId = getCookie(appConfig.AUTH_USER_ID ?? "");
|
||||
@@ -36,23 +58,42 @@ const appSiteId = getCookie("site-id-key") ?? "";
|
||||
|
||||
const isLoggedIn = !!userId;
|
||||
|
||||
function WithBaseLayoutInner({ children }: { children: React.ReactNode }) {
|
||||
|
||||
|
||||
function WithBaseLayoutInner({
|
||||
|
||||
children,
|
||||
|
||||
}: {
|
||||
|
||||
children: React.ReactNode;
|
||||
|
||||
}) {
|
||||
|
||||
const pathname = usePathname();
|
||||
const router = useRouter();
|
||||
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
|
||||
|
||||
/** 탭 추가 없이 메뉴만 눌렀을 때 패널 유지 (다른 메뉴 클릭해도 유지) */
|
||||
|
||||
const [isVerificationSelectionReportPanelOpen, setReportPanelOpen] =
|
||||
|
||||
useState(false);
|
||||
|
||||
|
||||
|
||||
const setCurrentMenuInfo = useMenuStore(
|
||||
|
||||
(state) => state.setCurrentMenuInfo,
|
||||
|
||||
);
|
||||
|
||||
const currentMenuInfo = useMenuStore((state) => state.currentMenuInfo);
|
||||
|
||||
|
||||
|
||||
const addTab = useTabStore((state) => state.addTab);
|
||||
|
||||
const setActiveTab = useTabStore((state) => state.setActiveTab);
|
||||
@@ -67,11 +108,16 @@ function WithBaseLayoutInner({ children }: { children: React.ReactNode }) {
|
||||
|
||||
const addTabForGrid = gridTabStore((state) => state.addTab);
|
||||
|
||||
const setActiveTabForGrid = gridTabStore((state) => state.setActiveTab);
|
||||
|
||||
const setMenuListForGrid = gridTabStore((state) => state.setMenuList);
|
||||
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
|
||||
|
||||
const { syncTabToUrl } = useStatisticsTabUrlSync({
|
||||
|
||||
pathname,
|
||||
|
||||
menuList,
|
||||
@@ -83,27 +129,41 @@ function WithBaseLayoutInner({ children }: { children: React.ReactNode }) {
|
||||
addTabForGrid,
|
||||
|
||||
setCurrentMenuInfo,
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
const { data: menuListData } = useQuery({
|
||||
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.MENU_ROLES],
|
||||
|
||||
queryFn: () => MenuApi.getMenuRoles(appSiteId),
|
||||
|
||||
enabled: isLoggedIn,
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
if (menuListData) {
|
||||
|
||||
setMenuList(menuListData);
|
||||
|
||||
setMenuListForGrid(menuListData);
|
||||
|
||||
}
|
||||
|
||||
}, [menuListData, setMenuList, setMenuListForGrid]);
|
||||
|
||||
|
||||
|
||||
// 새로고침 후 persist로 앱 탭만 복원된 경우 rsone 그리드 스토어에 탭을 맞춤
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
if (!menuList) return;
|
||||
|
||||
const appTabs = getTabStoreState().tabs;
|
||||
@@ -112,13 +172,20 @@ function WithBaseLayoutInner({ children }: { children: React.ReactNode }) {
|
||||
|
||||
if (getGridTabStoreState().tabs.length > 0) return;
|
||||
|
||||
|
||||
|
||||
for (const tab of appTabs) {
|
||||
|
||||
getGridTabStoreState().addTab(tab.menuItem);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
const activeId = getTabStoreState().activeTabId;
|
||||
|
||||
if (activeId) {
|
||||
|
||||
setActiveTab(activeId);
|
||||
|
||||
const activeTab = appTabs.find((t) => t.id === activeId);
|
||||
@@ -126,104 +193,155 @@ function WithBaseLayoutInner({ children }: { children: React.ReactNode }) {
|
||||
const gridActiveId = activeTab?.menuItem.menuEngNm;
|
||||
|
||||
if (gridActiveId) {
|
||||
|
||||
getGridTabStoreState().setActiveTab(gridActiveId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}, [menuList, tabs, setActiveTab]);
|
||||
|
||||
|
||||
|
||||
// 활성 탭의 메뉴를 찾아서 urlPath를 가져옴. 탭이 전부 닫히면 ''를 넘겨 LNB에서 메뉴 강조 제거
|
||||
|
||||
const currentPath = useMemo(() => {
|
||||
|
||||
if (tabs.length === 0) return "";
|
||||
|
||||
|
||||
|
||||
if (activeTabId && menuList) {
|
||||
|
||||
// menuList에서 활성 탭의 메뉴 찾기
|
||||
|
||||
const findMenuByEngNm = (items: MenuItem[]): MenuItem | null => {
|
||||
|
||||
for (const item of items) {
|
||||
if (menuMatchesStatisticsTabId(item, activeTabId)) {
|
||||
|
||||
if (item.urlPath === activeTabId) {
|
||||
|
||||
return item;
|
||||
|
||||
}
|
||||
|
||||
if (item.children) {
|
||||
|
||||
const found = findMenuByEngNm(item.children);
|
||||
|
||||
if (found) return found;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
const activeMenu = findMenuByEngNm(menuList);
|
||||
|
||||
|
||||
|
||||
if (activeMenu?.urlPath) {
|
||||
|
||||
return activeMenu.urlPath;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 탭에서 직접 찾기
|
||||
|
||||
if (activeTabId) {
|
||||
|
||||
const currentTabs = getTabStoreState().tabs;
|
||||
|
||||
const activeTab = currentTabs.find((t) => t.id === activeTabId);
|
||||
|
||||
if (activeTab?.menuItem?.urlPath) {
|
||||
|
||||
return activeTab.menuItem.urlPath;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// currentMenuInfo에서 가져오기
|
||||
|
||||
if (currentMenuInfo?.urlPath) {
|
||||
|
||||
return currentMenuInfo.urlPath;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 기본값으로 pathname 사용
|
||||
|
||||
return pathname ?? "";
|
||||
|
||||
}, [tabs.length, activeTabId, menuList, currentMenuInfo, pathname]);
|
||||
|
||||
|
||||
|
||||
const handleMenuClick = useCallback(
|
||||
|
||||
(item: MenuItem) => {
|
||||
if (item.urlPath.includes("/cms/")) return;
|
||||
|
||||
setCurrentMenuInfo(item);
|
||||
|
||||
|
||||
|
||||
if (isVerificationSelectionReportMenu(item)) {
|
||||
|
||||
setReportPanelOpen(true);
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if (isBbsNoticeMenu(item)) {
|
||||
if (item.urlPath) {
|
||||
router.push(item.urlPath);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const addTabResult: boolean = addTab(item);
|
||||
|
||||
|
||||
|
||||
// packages/rsone의 스토어에도 동기화
|
||||
|
||||
if (addTabResult) {
|
||||
|
||||
addTabForGrid(item);
|
||||
|
||||
if (item.urlPath) {
|
||||
syncTabToUrl(resolveStatisticsTabId(item.urlPath));
|
||||
|
||||
syncTabToUrl(item.urlPath);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!addTabResult) {
|
||||
|
||||
alert(`최대 추가 할 수 있는 화면 수(10개)를 \n초과 하였습니다.
|
||||
|
||||
기존 화면을 닫은 후 이용해주세요.`);
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
[
|
||||
|
||||
setCurrentMenuInfo,
|
||||
|
||||
addTab,
|
||||
@@ -236,38 +354,70 @@ function WithBaseLayoutInner({ children }: { children: React.ReactNode }) {
|
||||
|
||||
syncTabToUrl,
|
||||
|
||||
router,
|
||||
],
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
return (
|
||||
|
||||
<BaseLayout
|
||||
|
||||
queryClient={queryClient}
|
||||
|
||||
tokenManager={tokenManager}
|
||||
|
||||
currentPath={currentPath}
|
||||
|
||||
handleMenuClick={handleMenuClick}
|
||||
|
||||
>
|
||||
<div className="flex h-full flex-1">
|
||||
|
||||
<div className="flex flex-1 h-full">
|
||||
|
||||
{isVerificationSelectionReportPanelOpen && (
|
||||
|
||||
<VerificationSelectionReport
|
||||
|
||||
onClose={() => setReportPanelOpen(false)}
|
||||
|
||||
/>
|
||||
|
||||
)}
|
||||
|
||||
<StatisticsPageLayout>{children}</StatisticsPageLayout>
|
||||
|
||||
</div>
|
||||
|
||||
</BaseLayout>
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default function WithBaseLayout({
|
||||
|
||||
children,
|
||||
|
||||
}: {
|
||||
|
||||
children: React.ReactNode;
|
||||
|
||||
}) {
|
||||
|
||||
return (
|
||||
|
||||
<Suspense fallback={null}>
|
||||
|
||||
<WithBaseLayoutInner>{children}</WithBaseLayoutInner>
|
||||
|
||||
</Suspense>
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
}
|
||||
/* 셀 클래스가 있으면 위 기본색보다 우선 (같은 specificity + 나중 규칙) */
|
||||
.rg-grid .rg-body .rg-table .rg-data-row .rg-data-cell.rg-cell-readonly {
|
||||
@apply !bg-[#f0f0f0] !text-[#666];
|
||||
@apply !bg-[#f9f8f8] !text-[#666];
|
||||
}
|
||||
.rg-grid .rg-body .rg-table .rg-data-row .rg-data-cell.rg-cell-verify-error {
|
||||
@apply !bg-[#ffe6e6] !text-[#c00];
|
||||
|
||||
@@ -43,10 +43,8 @@ function buildFieldsFromColumns(columns: { fieldName: string; valueType?: ValueT
|
||||
const hasNumeratorDenominator = "numeratorFields" in col.computed && col.computed.numeratorFields.length > 0 && col.computed.denominatorFields.length > 0;
|
||||
const hasMaxOfFieldAndSum = "baseField" in col.computed && "sumFields" in col.computed && col.computed.sumFields.length > 0;
|
||||
const hasDifferenceOfSums = "minuendFields" in col.computed && "subtrahendFields" in col.computed && col.computed.minuendFields.length > 0;
|
||||
const hasHalfSumOfSums = col.computed.type === "halfSumOfSums" && "firstSumFields" in col.computed && "secondSumFields" in col.computed && col.computed.firstSumFields.length > 0 && col.computed.secondSumFields.length > 0;
|
||||
const hasSumOfTwoHalfSumOfSums = col.computed.type === "sumOfTwoHalfSumOfSums" && "firstHalfSum" in col.computed && "secondHalfSum" in col.computed && col.computed.firstHalfSum.firstSumFields.length > 0 && col.computed.firstHalfSum.secondSumFields.length > 0 && col.computed.secondHalfSum.firstSumFields.length > 0 && col.computed.secondHalfSum.secondSumFields.length > 0;
|
||||
const hasSumOfMaxGroups = "groups" in col.computed && Array.isArray(col.computed.groups) && col.computed.groups.length > 0;
|
||||
if (hasFields || hasNumeratorDenominator || hasMaxOfFieldAndSum || hasDifferenceOfSums || hasHalfSumOfSums || hasSumOfTwoHalfSumOfSums || hasSumOfMaxGroups) {
|
||||
if (hasFields || hasNumeratorDenominator || hasMaxOfFieldAndSum || hasDifferenceOfSums || hasSumOfMaxGroups) {
|
||||
field.valueCallback = getComputedValueCallback(col.computed) as (prod: unknown, dataRow: number, fieldName: string, fieldNames: string[], values: unknown[]) => number;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import type {
|
||||
|
||||
import { getComputedValueCallback } from "@/components/util/grid/computedFieldCallbacks";
|
||||
import {
|
||||
getExcelImportColumnFieldNames,
|
||||
prepareGridColumnsForExcelExport,
|
||||
restoreGridColumnsAfterExcelExport,
|
||||
shouldPrepareColumnsForExcelExport,
|
||||
@@ -34,7 +33,7 @@ declare module "realgrid" {
|
||||
setOptions(options: {
|
||||
footer?: { visible?: boolean };
|
||||
summaryMode?: "aggregate" | "statistical" | "none";
|
||||
checkBar?: { visible?: boolean; exclusive?: boolean };
|
||||
checkBar?: { visible?: boolean };
|
||||
}): void;
|
||||
}
|
||||
}
|
||||
@@ -458,31 +457,10 @@ function sortRowsGroupPreserving(
|
||||
}
|
||||
|
||||
/** columnInfo → RealGrid DataField 배열 (computed → valueCallback 포함, setFields용) */
|
||||
function getDecimalPlacesFromDataFormat(dataFormat?: string): number | null {
|
||||
if (!dataFormat) return null;
|
||||
const match = dataFormat.match(/\.(0+|#+)/);
|
||||
const decimalToken = match?.[1];
|
||||
if (decimalToken) return decimalToken.length;
|
||||
// #,##0 등 정수 포맷 — 소수부 없음 → 0자리 절삭(내림)
|
||||
if (/[#0]/.test(dataFormat)) return 0;
|
||||
return null;
|
||||
}
|
||||
|
||||
function truncateByDecimalPlaces(value: number, decimalPlaces: number): number {
|
||||
if (!Number.isFinite(value)) return 0;
|
||||
if (decimalPlaces < 0) return value;
|
||||
const factor = 10 ** decimalPlaces;
|
||||
const scaled = value * factor;
|
||||
// 절삭(truncate): 반올림 없이 소수점 이하를 버린다.
|
||||
const truncated = scaled >= 0 ? Math.floor(scaled) : Math.ceil(scaled);
|
||||
return truncated / factor;
|
||||
}
|
||||
|
||||
function buildFieldsFromColumns(
|
||||
columns: {
|
||||
fieldName: string;
|
||||
valueType?: ValueType;
|
||||
dataFormat?: string;
|
||||
datetimeFormat?: string;
|
||||
editor?: { type?: string; datetimeFormat?: string };
|
||||
computed?: import("../type/DataGrid.type").ComputedFieldConfig;
|
||||
@@ -530,52 +508,18 @@ function buildFieldsFromColumns(
|
||||
"minuendFields" in col.computed &&
|
||||
"subtrahendFields" in col.computed &&
|
||||
col.computed.minuendFields.length > 0;
|
||||
const hasHalfSumOfSums =
|
||||
col.computed.type === "halfSumOfSums" &&
|
||||
"firstSumFields" in col.computed &&
|
||||
"secondSumFields" in col.computed &&
|
||||
col.computed.firstSumFields.length > 0 &&
|
||||
col.computed.secondSumFields.length > 0;
|
||||
const hasSumOfTwoHalfSumOfSums =
|
||||
col.computed.type === "sumOfTwoHalfSumOfSums" &&
|
||||
"firstHalfSum" in col.computed &&
|
||||
"secondHalfSum" in col.computed &&
|
||||
col.computed.firstHalfSum.firstSumFields.length > 0 &&
|
||||
col.computed.firstHalfSum.secondSumFields.length > 0 &&
|
||||
col.computed.secondHalfSum.firstSumFields.length > 0 &&
|
||||
col.computed.secondHalfSum.secondSumFields.length > 0;
|
||||
const hasSumOfMaxGroups =
|
||||
col.computed.type === "sumOfMaxOfFieldAndSumGroups" &&
|
||||
"groups" in col.computed &&
|
||||
Array.isArray(col.computed.groups) &&
|
||||
col.computed.groups.length > 0;
|
||||
const hasPumpGrossPpqty =
|
||||
col.computed.type === "pumpGrossPpqty" &&
|
||||
"pumpGroups" in col.computed &&
|
||||
col.computed.pumpGroups.length > 0;
|
||||
const hasBodPrcsRt =
|
||||
col.computed.type === "bodPrcsRt" &&
|
||||
"inflwField" in col.computed &&
|
||||
"dschgField" in col.computed;
|
||||
const hasQuotientRatioPercent =
|
||||
col.computed.type === "quotientRatioPercent" &&
|
||||
"numeratorQuotient" in col.computed &&
|
||||
"denominatorQuotient" in col.computed &&
|
||||
col.computed.numeratorQuotient.length === 2 &&
|
||||
col.computed.denominatorQuotient.length === 2;
|
||||
if (
|
||||
hasFields ||
|
||||
hasNumeratorDenominator ||
|
||||
hasMaxOfFieldAndSum ||
|
||||
hasDifferenceOfSums ||
|
||||
hasHalfSumOfSums ||
|
||||
hasSumOfTwoHalfSumOfSums ||
|
||||
hasSumOfMaxGroups ||
|
||||
hasPumpGrossPpqty ||
|
||||
hasBodPrcsRt ||
|
||||
hasQuotientRatioPercent
|
||||
hasSumOfMaxGroups
|
||||
) {
|
||||
const computedCallback = getComputedValueCallback(
|
||||
field.valueCallback = getComputedValueCallback(
|
||||
col.computed,
|
||||
) as (
|
||||
prod: unknown,
|
||||
@@ -584,24 +528,6 @@ function buildFieldsFromColumns(
|
||||
fieldNames: string[],
|
||||
values: unknown[],
|
||||
) => number;
|
||||
const decimalPlaces = getDecimalPlacesFromDataFormat(col.dataFormat);
|
||||
field.valueCallback = (
|
||||
prod: unknown,
|
||||
dataRow: number,
|
||||
fieldName: string,
|
||||
fieldNames: string[],
|
||||
values: unknown[],
|
||||
) => {
|
||||
const computedValue = computedCallback(
|
||||
prod,
|
||||
dataRow,
|
||||
fieldName,
|
||||
fieldNames,
|
||||
values,
|
||||
);
|
||||
if (decimalPlaces == null) return computedValue;
|
||||
return truncateByDecimalPlaces(computedValue, decimalPlaces);
|
||||
};
|
||||
}
|
||||
}
|
||||
return field;
|
||||
@@ -660,7 +586,6 @@ const DataGrid = ({
|
||||
const onItemAllCheckedRef =
|
||||
useRef<typeof onItemAllChecked>(onItemAllChecked);
|
||||
const isSyncingChecksFromRowDataRef = useRef(false);
|
||||
const columnsFieldsSigRef = useRef("");
|
||||
columnsRef.current = columns;
|
||||
rowDataRef.current = rowData;
|
||||
cellStyleCallbackRef.current = cellStyleCallback;
|
||||
@@ -713,6 +638,20 @@ const DataGrid = ({
|
||||
.find((s) => s.menuEngNm === activeTabId)?.menuKornNm ||
|
||||
"export";
|
||||
|
||||
// 엑셀 import 시 매칭을 위해 헤더에 fieldName 포함 (예: "합계 (swgeProcZoneInnerSm)")
|
||||
const originalHeaders: Map<string, string> = new Map();
|
||||
columns.forEach((col) => {
|
||||
if (col.fieldName && gridView.columnByName) {
|
||||
const gridCol = gridView.columnByName(col.name);
|
||||
if (gridCol && gridCol.header) {
|
||||
const originalText = gridCol.header.text || "";
|
||||
originalHeaders.set(col.name, originalText);
|
||||
const headerWithFieldName = `${originalText} (${col.fieldName})`;
|
||||
gridCol.header.text = headerWithFieldName;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// exportGrid 호출 전에 columnLayout 정규화 (col 속성 추가)
|
||||
const normalizeLayoutForExport = (
|
||||
layout: ColumnLayoutItem[],
|
||||
@@ -806,6 +745,20 @@ const DataGrid = ({
|
||||
excelExportVisibilitySnapshot,
|
||||
);
|
||||
}
|
||||
// 헤더 원복
|
||||
columns.forEach((col) => {
|
||||
if (col.fieldName && gridView.columnByName) {
|
||||
const gridCol = gridView.columnByName(col.name);
|
||||
if (
|
||||
gridCol &&
|
||||
gridCol.header &&
|
||||
originalHeaders.has(col.name)
|
||||
) {
|
||||
gridCol.header.text =
|
||||
originalHeaders.get(col.name) || "";
|
||||
}
|
||||
}
|
||||
});
|
||||
// columnLayout 원복 (footerUserSpans 유지)
|
||||
if (normalizedLayout && !layoutRestored) {
|
||||
layoutRestored = true;
|
||||
@@ -907,11 +860,36 @@ const DataGrid = ({
|
||||
: headerStartRow;
|
||||
const dataStartRow = maxHeaderRowIndex + 1;
|
||||
|
||||
// 엑셀 N번째 열 → 그리드 N번째 fieldName (보내기 컬럼 순서 기준)
|
||||
const excelColumnFieldNames = getExcelImportColumnFieldNames(
|
||||
columns,
|
||||
columnLayout,
|
||||
);
|
||||
// 엑셀 컬럼 인덱스 → 그리드 fieldName 매핑
|
||||
const headerToFieldNameMap = new Map<string, string>();
|
||||
headers.forEach((headerText, colIndex) => {
|
||||
let fieldName: string | null = null;
|
||||
|
||||
// 헤더에 fieldName이 포함된 경우 (예: "합계 (swgeProcZoneInnerSm)")
|
||||
const fieldNameMatch = headerText.match(
|
||||
/\(([a-zA-Z_][a-zA-Z0-9_]*)\)$/,
|
||||
);
|
||||
if (fieldNameMatch && fieldNameMatch[1]) {
|
||||
const extractedFieldName = fieldNameMatch[1];
|
||||
if (
|
||||
columns.find(
|
||||
(c) => c.fieldName === extractedFieldName,
|
||||
)
|
||||
) {
|
||||
fieldName = extractedFieldName;
|
||||
}
|
||||
}
|
||||
|
||||
// 매칭 실패 시 원본 헤더 텍스트 사용
|
||||
if (!fieldName) {
|
||||
console.warn(
|
||||
`엑셀 컬럼 ${colIndex + 1} (헤더: "${headerText}") 매칭 실패 → 헤더 텍스트를 fieldName으로 사용`,
|
||||
);
|
||||
fieldName = headerText;
|
||||
}
|
||||
|
||||
headerToFieldNameMap.set(headerText, fieldName);
|
||||
});
|
||||
|
||||
// 데이터 행 읽기
|
||||
const dataRows: Record<string, string | number>[] = [];
|
||||
@@ -929,8 +907,12 @@ const DataGrid = ({
|
||||
worksheet[
|
||||
XLSX.utils.encode_cell({ r: row, c: col })
|
||||
];
|
||||
const fieldName = excelColumnFieldNames[colIndex];
|
||||
if (!fieldName) continue;
|
||||
const headerName =
|
||||
headers[colIndex] || `Column${colIndex + 1}`;
|
||||
// 헤더 텍스트를 fieldName으로 변환
|
||||
const fieldName =
|
||||
headerToFieldNameMap.get(headerName) ||
|
||||
headerName;
|
||||
|
||||
let cellValue: string | number = "";
|
||||
if (
|
||||
@@ -1014,21 +996,6 @@ const DataGrid = ({
|
||||
const dataProvider = gridRef.current.dataProvider;
|
||||
applyDefaultGridEditOptions(gridView as GridViewWithEditOptions);
|
||||
|
||||
const columnsFieldsSig = columns.map((c) => c.fieldName).join("\u0001");
|
||||
if (columnsFieldsSig !== columnsFieldsSigRef.current) {
|
||||
columnsFieldsSigRef.current = columnsFieldsSig;
|
||||
const dpForFields = dataProvider as {
|
||||
setFields?: (f: unknown[]) => void;
|
||||
setRows?: (r: Record<string, string | number>[]) => void;
|
||||
};
|
||||
try {
|
||||
dpForFields.setFields?.(buildFieldsFromColumns(columns));
|
||||
dpForFields.setRows?.(rowDataRef.current);
|
||||
} catch (e) {
|
||||
console.warn("setFields sync:", e);
|
||||
}
|
||||
}
|
||||
|
||||
// mergeCells: true인 컬럼이 있으면 onSorting에서 클라이언트 정렬로 처리
|
||||
const hasMergeCells = columns.some((col) => col.mergeCells === true);
|
||||
|
||||
@@ -1079,14 +1046,6 @@ const DataGrid = ({
|
||||
}
|
||||
columns.forEach((column) => {
|
||||
const gv = gridView as GridViewWithSetColumnProperty;
|
||||
const exists =
|
||||
typeof (
|
||||
gridView as { columnByName?: (name: string) => unknown }
|
||||
).columnByName === "function" &&
|
||||
(gridView as { columnByName: (name: string) => unknown }).columnByName(
|
||||
column.name,
|
||||
) != null;
|
||||
if (!exists) return;
|
||||
gv.setColumnProperty?.(
|
||||
column.name,
|
||||
"header",
|
||||
@@ -1095,11 +1054,6 @@ const DataGrid = ({
|
||||
tooltip: resolveColumnTooltip(column),
|
||||
}),
|
||||
);
|
||||
gv.setColumnProperty?.(
|
||||
column.name,
|
||||
"editable",
|
||||
column.editable !== false,
|
||||
);
|
||||
applyColumnListEditorProperties(gv, column);
|
||||
});
|
||||
if (columns.some((c) => isDropDownEditorColumn(c))) {
|
||||
@@ -1147,7 +1101,7 @@ const DataGrid = ({
|
||||
|
||||
// 헤더 체크박스 표시 여부 설정
|
||||
gridView.setOptions({
|
||||
checkBar: { visible: showHeaderCheckbox, exclusive: false },
|
||||
checkBar: { visible: showHeaderCheckbox },
|
||||
rowIndicator: { visible: false },
|
||||
});
|
||||
|
||||
@@ -1227,63 +1181,10 @@ const DataGrid = ({
|
||||
const hasFooterUserSpans = checkFooterUserSpans(columnLayout);
|
||||
|
||||
if (hasFooterUserSpans) {
|
||||
const validColumnNames = new Set(columns.map((c) => c.name));
|
||||
const sanitizeColumnLayout = (
|
||||
layout: unknown[],
|
||||
): unknown[] => {
|
||||
const result: unknown[] = [];
|
||||
for (const item of layout) {
|
||||
if (typeof item === "string") {
|
||||
if (validColumnNames.has(item)) {
|
||||
result.push(item);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!item || typeof item !== "object") continue;
|
||||
|
||||
if ("column" in item) {
|
||||
const columnName = (item as { column?: unknown }).column;
|
||||
if (
|
||||
typeof columnName === "string" &&
|
||||
validColumnNames.has(columnName)
|
||||
) {
|
||||
result.push(item);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if ("items" in item && Array.isArray((item as { items?: unknown[] }).items)) {
|
||||
const nextItems = sanitizeColumnLayout(
|
||||
(item as { items: unknown[] }).items,
|
||||
);
|
||||
if (nextItems.length > 0) {
|
||||
result.push({
|
||||
...(item as Record<string, unknown>),
|
||||
items: nextItems,
|
||||
});
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
result.push(item);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
// setColumnLayout은 그리드가 완전히 렌더링된 후 호출해야 함
|
||||
setTimeout(() => {
|
||||
if (gridRef.current?.gridView && columnLayout) {
|
||||
const safeLayout = sanitizeColumnLayout(columnLayout as unknown[]);
|
||||
if (safeLayout.length === 0) return;
|
||||
try {
|
||||
(
|
||||
gridRef.current.gridView.setColumnLayout as
|
||||
| ((layout: unknown) => void)
|
||||
| undefined
|
||||
)?.(safeLayout);
|
||||
} catch (e) {
|
||||
console.warn("setColumnLayout skipped due to invalid columns:", e);
|
||||
}
|
||||
gridRef.current.gridView.setColumnLayout?.(columnLayout);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
@@ -1753,22 +1654,6 @@ const DataGrid = ({
|
||||
layout={columnLayout}
|
||||
rows={rowData}
|
||||
onRGDataColumnsChanged={(grid) => {
|
||||
const dp = gridRef.current?.dataProvider as
|
||||
| {
|
||||
setFields?: (f: unknown[]) => void;
|
||||
setRows?: (
|
||||
r: Record<string, string | number>[],
|
||||
) => void;
|
||||
}
|
||||
| undefined;
|
||||
try {
|
||||
dp?.setFields?.(
|
||||
buildFieldsFromColumns(columnsRef.current),
|
||||
);
|
||||
dp?.setRows?.(rowDataRef.current);
|
||||
} catch (e) {
|
||||
console.warn("onRGDataColumnsChanged setFields:", e);
|
||||
}
|
||||
reapplyListEditorsOnGrid(
|
||||
grid as GridViewWithSetColumnProperty,
|
||||
columnsRef.current,
|
||||
@@ -1808,9 +1693,6 @@ const DataGrid = ({
|
||||
dataProvider.setFields(
|
||||
buildFieldsFromColumns(columns),
|
||||
);
|
||||
columnsFieldsSigRef.current = columns
|
||||
.map((c) => c.fieldName)
|
||||
.join("\u0001");
|
||||
}
|
||||
if (dataProvider?.setRows)
|
||||
dataProvider.setRows(rowData);
|
||||
@@ -1992,9 +1874,15 @@ const DataGrid = ({
|
||||
{columns.map((column) => {
|
||||
const baseStyleName = column.styleName;
|
||||
|
||||
const columnReactKey =
|
||||
column.values?.length &&
|
||||
isDropDownEditorColumn(column)
|
||||
? `${column.name}-dropdown-${column.values.length}`
|
||||
: column.name;
|
||||
|
||||
return (
|
||||
<RGDataColumn
|
||||
key={column.name}
|
||||
key={columnReactKey}
|
||||
name={column.name}
|
||||
fieldName={column.fieldName}
|
||||
valueType={
|
||||
|
||||
@@ -33,7 +33,7 @@ import DataGrid from "@/components/module/DataGrid";
|
||||
import { VerificationResultHistoryPagination } from "@/components/module/VerificationResultHistoryPagination";
|
||||
import type { CellStyleCallbackParams, ColumnInfo } from "@/components/type/DataGrid.type";
|
||||
|
||||
/** 통계 입력 현황 > 행 클릭 시 사용자예외처리(prcsYn=2) 내역만 조회 */
|
||||
/** 통계 입력 현황 > 행 클릭 시 예외처리(prcsYn=3) 내역만 조회 */
|
||||
export interface ExceptionProcessingHistoryQueryContext {
|
||||
sewerBzmnCd: string;
|
||||
ctpvNm: string;
|
||||
@@ -92,15 +92,13 @@ function exceptionPrcsYnNmCellStyle({ fieldName, row }: CellStyleCallbackParams)
|
||||
const exceptionHistoryColumnInfo: ColumnInfo = {
|
||||
columns: [
|
||||
{ name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false },
|
||||
{ name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역" }, editable: false },
|
||||
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
||||
{ name: "vrfcTrgtNm", fieldName: "vrfcTrgtNm", header: { text: "검증대상" }, editable: false },
|
||||
{ name: "rsnExpln", fieldName: "rsnExpln", header: { text: "사유" }, editable: false },
|
||||
{ name: "nowVlCn", fieldName: "nowVlCn", header: { text: "입력값" }, editable: false },
|
||||
{ name: "compVlCn", fieldName: "compVlCn", header: { text: "기준값" }, editable: false },
|
||||
{ name: "prcsYnNm", fieldName: "prcsYnNm", header: { text: "처리여부" }, editable: false },
|
||||
{ name: "stVrfRjtComNm", fieldName: "stVrfRjtComNm", header: { text: "반려상태" }, editable: false },
|
||||
{ name: "prcsOpnnExpln", fieldName: "prcsOpnnExpln", header: { text: "처리의견" }, editable: false },
|
||||
{ name: "rjctOpnnCn", fieldName: "rjctOpnnCn", header: { text: "반려의견" }, editable: false },
|
||||
{ name: "pbcpAprvYn", fieldName: "pbcpAprvYn", header: { text: "공단승인여부" }, editable: false },
|
||||
{ name: "regDt", fieldName: "regDt", header: { text: "등록일시" }, editable: false },
|
||||
{ name: "mdfcnDt", fieldName: "mdfcnDt", header: { text: "갱신일시" }, editable: false },
|
||||
{
|
||||
@@ -116,15 +114,13 @@ const exceptionHistoryColumnInfo: ColumnInfo = {
|
||||
],
|
||||
columnLayout: [
|
||||
"ctpvNm",
|
||||
"admdstNm",
|
||||
"sggNm",
|
||||
"vrfcTrgtNm",
|
||||
"rsnExpln",
|
||||
"nowVlCn",
|
||||
"compVlCn",
|
||||
"prcsYnNm",
|
||||
"stVrfRjtComNm",
|
||||
"prcsOpnnExpln",
|
||||
"rjctOpnnCn",
|
||||
"pbcpAprvYn",
|
||||
"regDt",
|
||||
"mdfcnDt",
|
||||
"individualReject",
|
||||
@@ -194,9 +190,9 @@ export function ExceptionProcessingHistoryDialog({
|
||||
sggNm: queryContext.sggNm,
|
||||
statsYr: queryContext.statsYr,
|
||||
statsCd: queryContext.statsCd,
|
||||
pbcpAprvYn: "N",
|
||||
vrfcMthdCd,
|
||||
prcsYnList: PRCS_YN_LIST,
|
||||
rejectCodeList: "0,1,2",
|
||||
page: pageIndex + 1,
|
||||
size: 30,
|
||||
};
|
||||
@@ -312,16 +308,14 @@ export function ExceptionProcessingHistoryDialog({
|
||||
const mapRows = (entries: VerificationResultReportItem[]): ExceptionHistoryGridRow[] =>
|
||||
entries.map((item) => ({
|
||||
ctpvNm: item.ctpvNm,
|
||||
admdstNm: item.admdstNm ?? item.sggNm ?? "-",
|
||||
sggNm: item.sggNm,
|
||||
vrfcTrgtNm: item.vrfcTrgtNm,
|
||||
rsnExpln: item.rsnExpln,
|
||||
nowVlCn: item.nowVlCn ?? "-",
|
||||
compVlCn: item.compVlCn ?? "-",
|
||||
prcsYnNm: item.prcsYnNm ?? "-",
|
||||
stVrfRjtComNm: item.stVrfRjtComNm ?? "-",
|
||||
prcsOpnnExpln: item.prcsOpnnExpln ?? "-",
|
||||
rjctOpnnCn: item.rjctOpnnCn ?? "-",
|
||||
prcsYn: item.prcsYn ?? "",
|
||||
pbcpAprvYn: item.pbcpAprvYn,
|
||||
regDt: (item.regDt ?? "").slice(0, 16),
|
||||
mdfcnDt: (item.mdfcnDt ?? "").slice(0, 16),
|
||||
individualReject: "개별 반려",
|
||||
|
||||
@@ -41,7 +41,7 @@ const getSggListFetcher = async (
|
||||
key: [string, string, string, string],
|
||||
): Promise<ApiResponse<Sgg[]>> => {
|
||||
const gugunSkipYn = doList.includes(key[3]) ? "N" : "Y";
|
||||
return statisticsApi.getSggList(key[1], {
|
||||
return statisticsApi.getSggAllList(key[1], {
|
||||
instSeCd: key[2],
|
||||
gugunSkipYn,
|
||||
});
|
||||
|
||||
@@ -116,7 +116,7 @@ const getSidoListFetcher = async (): Promise<ApiResponse<SearchCondition>> => {
|
||||
const getSggAllListFetcher = async (
|
||||
key: [string, string],
|
||||
): Promise<ApiResponse<Sgg[]>> => {
|
||||
return statisticsApi.getSggList(key[1]);
|
||||
return statisticsApi.getSggAllList(key[1]);
|
||||
};
|
||||
|
||||
type SidoSggFacilityNameSearchFormProps = {
|
||||
@@ -292,12 +292,17 @@ const SidoSggFacilityNameSearchForm = ({
|
||||
return;
|
||||
}
|
||||
|
||||
const ctpvNm = String(row.ctpvNm ?? sido);
|
||||
const sggNm = String(
|
||||
row.sggNm ?? (gugun !== "ALL" && gugun ? gugun : ""),
|
||||
);
|
||||
|
||||
const params: SeweragePipeFacilityAdminAreaListRequest = {
|
||||
statsYr: statsYr.trim(),
|
||||
swtrmtFcltCd,
|
||||
sewerBzmnCd: initialSearchValues?.bsnmCd || '',
|
||||
ctpvNm: initialSidoValue || '',
|
||||
...(doNameList.includes(initialSidoValue) ? { sggNm: initialGugunValue } : {}),
|
||||
ctpvNm,
|
||||
...(doNameList.includes(ctpvNm) ? { sggNm } : {}),
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
@@ -17,7 +17,6 @@ import SplitDataGrid from "./SplitDataGrid";
|
||||
|
||||
import { getComputedValueCallback } from "@/components/util/grid/computedFieldCallbacks"
|
||||
import {
|
||||
getExcelImportColumnFieldNames,
|
||||
prepareGridColumnsForExcelExport,
|
||||
restoreGridColumnsAfterExcelExport,
|
||||
shouldPrepareColumnsForExcelExport,
|
||||
@@ -223,10 +222,8 @@ function buildFieldsFromColumns(columns: { fieldName: string; valueType?: ValueT
|
||||
const hasNumeratorDenominator = "numeratorFields" in col.computed && col.computed.numeratorFields.length > 0 && col.computed.denominatorFields.length > 0;
|
||||
const hasMaxOfFieldAndSum = "baseField" in col.computed && "sumFields" in col.computed && col.computed.sumFields.length > 0;
|
||||
const hasDifferenceOfSums = "minuendFields" in col.computed && "subtrahendFields" in col.computed && col.computed.minuendFields.length > 0;
|
||||
const hasHalfSumOfSums = col.computed.type === "halfSumOfSums" && "firstSumFields" in col.computed && "secondSumFields" in col.computed && col.computed.firstSumFields.length > 0 && col.computed.secondSumFields.length > 0;
|
||||
const hasSumOfTwoHalfSumOfSums = col.computed.type === "sumOfTwoHalfSumOfSums" && "firstHalfSum" in col.computed && "secondHalfSum" in col.computed && col.computed.firstHalfSum.firstSumFields.length > 0 && col.computed.firstHalfSum.secondSumFields.length > 0 && col.computed.secondHalfSum.firstSumFields.length > 0 && col.computed.secondHalfSum.secondSumFields.length > 0;
|
||||
const hasSumOfMaxGroups = "groups" in col.computed && Array.isArray(col.computed.groups) && col.computed.groups.length > 0;
|
||||
if (hasFields || hasNumeratorDenominator || hasMaxOfFieldAndSum || hasDifferenceOfSums || hasHalfSumOfSums || hasSumOfTwoHalfSumOfSums || hasSumOfMaxGroups) {
|
||||
if (hasFields || hasNumeratorDenominator || hasMaxOfFieldAndSum || hasDifferenceOfSums || hasSumOfMaxGroups) {
|
||||
field.valueCallback = getComputedValueCallback(col.computed) as (prod: unknown, dataRow: number, fieldName: string, fieldNames: string[], values: unknown[]) => number;
|
||||
}
|
||||
}
|
||||
@@ -376,6 +373,20 @@ const TabDataGrid = ({
|
||||
const columns = columnInfoItem.columns || [];
|
||||
const columnLayout = columnInfoItem.columnLayout || [];
|
||||
|
||||
// 엑셀 import 시 매칭을 위해 헤더에 fieldName 포함 (예: "합계 (swgeProcZoneInnerSm)")
|
||||
const originalHeaders: Map<string, string> = new Map();
|
||||
columns.forEach((col) => {
|
||||
if (col.fieldName && gridView.columnByName) {
|
||||
const gridCol = gridView.columnByName(col.name);
|
||||
if (gridCol && gridCol.header) {
|
||||
const originalText = gridCol.header.text || '';
|
||||
originalHeaders.set(col.name, originalText);
|
||||
const headerWithFieldName = `${originalText} (${col.fieldName})`;
|
||||
gridCol.header.text = headerWithFieldName;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// exportGrid 호출 전에 columnLayout 정규화 (col 속성 추가)
|
||||
const normalizeLayoutForExport = (layout: ColumnLayoutItem[]): ColumnLayoutItem[] => {
|
||||
return layout.map(item => {
|
||||
@@ -441,6 +452,15 @@ const TabDataGrid = ({
|
||||
if (excelExportVisibilitySnapshot) {
|
||||
restoreGridColumnsAfterExcelExport(gridView, excelExportVisibilitySnapshot);
|
||||
}
|
||||
// 헤더 원복
|
||||
columns.forEach((col) => {
|
||||
if (col.fieldName && gridView.columnByName) {
|
||||
const gridCol = gridView.columnByName(col.name);
|
||||
if (gridCol && gridCol.header && originalHeaders.has(col.name)) {
|
||||
gridCol.header.text = originalHeaders.get(col.name) || '';
|
||||
}
|
||||
}
|
||||
});
|
||||
// columnLayout 원복 (footerUserSpans 유지)
|
||||
if (normalizedLayout && !layoutRestored) {
|
||||
layoutRestored = true;
|
||||
@@ -526,12 +546,29 @@ const TabDataGrid = ({
|
||||
const maxHeaderRowIndex = headerRowIndexes.length > 0 ? Math.max(...headerRowIndexes) : headerStartRow;
|
||||
const dataStartRow = maxHeaderRowIndex + 1;
|
||||
|
||||
// 엑셀 컬럼 인덱스 → 그리드 fieldName 매핑
|
||||
const headerToFieldNameMap = new Map<string, string>();
|
||||
const columns = columnInfoItem.columns || [];
|
||||
const columnLayout = columnInfoItem.columnLayout || [];
|
||||
const excelColumnFieldNames = getExcelImportColumnFieldNames(
|
||||
columns,
|
||||
columnLayout,
|
||||
);
|
||||
headers.forEach((headerText, colIndex) => {
|
||||
let fieldName: string | null = null;
|
||||
|
||||
// 헤더에 fieldName이 포함된 경우 (예: "합계 (swgeProcZoneInnerSm)")
|
||||
const fieldNameMatch = headerText.match(/\(([a-zA-Z_][a-zA-Z0-9_]*)\)$/);
|
||||
if (fieldNameMatch && fieldNameMatch[1]) {
|
||||
const extractedFieldName = fieldNameMatch[1];
|
||||
if (columns.find(c => c.fieldName === extractedFieldName)) {
|
||||
fieldName = extractedFieldName;
|
||||
}
|
||||
}
|
||||
|
||||
// 매칭 실패 시 원본 헤더 텍스트 사용
|
||||
if (!fieldName) {
|
||||
console.warn(`엑셀 컬럼 ${colIndex + 1} (헤더: "${headerText}") 매칭 실패 → 헤더 텍스트를 fieldName으로 사용`);
|
||||
fieldName = headerText;
|
||||
}
|
||||
|
||||
headerToFieldNameMap.set(headerText, fieldName);
|
||||
});
|
||||
|
||||
// 데이터 행 읽기
|
||||
const dataRows: Record<string, string | number>[] = [];
|
||||
@@ -542,8 +579,9 @@ const TabDataGrid = ({
|
||||
for (let colIndex = 0; colIndex < headers.length; colIndex++) {
|
||||
const col = range.s.c + colIndex;
|
||||
const cell = worksheet[XLSX.utils.encode_cell({ r: row, c: col })];
|
||||
const fieldName = excelColumnFieldNames[colIndex];
|
||||
if (!fieldName) continue;
|
||||
const headerName = headers[colIndex] || `Column${colIndex + 1}`;
|
||||
// 헤더 텍스트를 fieldName으로 변환
|
||||
const fieldName = headerToFieldNameMap.get(headerName) || headerName;
|
||||
|
||||
let cellValue: string | number = '';
|
||||
if (cell && cell.v !== undefined && cell.v !== null) {
|
||||
|
||||
@@ -92,12 +92,13 @@ const verificationSubmitResultColumnInfo: ColumnInfo = {
|
||||
{ name: "vrfcMthdNm", fieldName: "vrfcMthdNm", header: { text: "구분" }, editable: false },
|
||||
{ name: "vrfcMthdCd", fieldName: "vrfcMthdCd", header: { text: "검증유형코드" }, editable: false, visible: false },
|
||||
{ name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false },
|
||||
{ name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역" }, editable: false },
|
||||
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
||||
{ name: "vrfcTrgtNm", fieldName: "vrfcTrgtNm", header: { text: "검증대상" }, editable: false },
|
||||
{ name: "rsnExpln", fieldName: "rsnExpln", header: { text: "사유" }, editable: false },
|
||||
{ name: "nowVlCn", fieldName: "nowVlCn", header: { text: "입력값" }, editable: false },
|
||||
{ name: "compVlCn", fieldName: "compVlCn", header: { text: "기준값" }, editable: false },
|
||||
{ name: "prcsYn", fieldName: "prcsYn", header: { text: "처리여부" }, editable: false },
|
||||
{ name: "pbcpAprvYn", fieldName: "pbcpAprvYn", header: { text: "공단승인여부" }, editable: false },
|
||||
{ name: "regDt", fieldName: "regDt", header: { text: "등록일시" }, editable: false },
|
||||
{ name: "mdfcnDt", fieldName: "mdfcnDt", header: { text: "갱신일시" }, editable: false },
|
||||
{
|
||||
@@ -110,12 +111,13 @@ const verificationSubmitResultColumnInfo: ColumnInfo = {
|
||||
columnLayout: [
|
||||
"vrfcMthdNm",
|
||||
"ctpvNm",
|
||||
"admdstNm",
|
||||
"sggNm",
|
||||
"vrfcTrgtNm",
|
||||
"rsnExpln",
|
||||
"nowVlCn",
|
||||
"compVlCn",
|
||||
"prcsYn",
|
||||
"pbcpAprvYn",
|
||||
"regDt",
|
||||
"mdfcnDt",
|
||||
"prcsOpnnExpln",
|
||||
@@ -200,12 +202,13 @@ export function VerificationResultDialog({
|
||||
vrfcMthdCd,
|
||||
vrfcMthdNm: VRFC_MTHD_NAME_MAP[vrfcMthdCd] ?? item.vrfcMthdNm,
|
||||
ctpvNm: item.ctpvNm,
|
||||
admdstNm: item.admdstNm ?? item.sggNm ?? "-",
|
||||
sggNm: item.sggNm,
|
||||
vrfcTrgtNm: item.vrfcTrgtNm,
|
||||
rsnExpln: item.rsnExpln,
|
||||
nowVlCn: item.nowVlCn ?? "-",
|
||||
compVlCn: item.compVlCn ?? "-",
|
||||
prcsYn: item.prcsYnNm ?? PRCS_YN_LABEL[item.prcsYn] ?? item.prcsYn,
|
||||
prcsYn: PRCS_YN_LABEL[item.prcsYn] ?? item.prcsYn,
|
||||
pbcpAprvYn: item.pbcpAprvYn,
|
||||
regDt: (item.regDt ?? "").slice(0, 16),
|
||||
mdfcnDt: (item.mdfcnDt ?? "").slice(0, 16),
|
||||
prcsOpnnExpln: item.prcsOpnnExpln ?? "",
|
||||
@@ -223,9 +226,9 @@ export function VerificationResultDialog({
|
||||
sggNm: stableQueryContext.sggNm,
|
||||
statsYr: stableQueryContext.statsYr,
|
||||
statsCd: stableQueryContext.statsCd,
|
||||
pbcpAprvYn: "N",
|
||||
vrfcMthdCd,
|
||||
prcsYnList: "0",
|
||||
rejectCodeList: "0,1,2",
|
||||
page: page + 1,
|
||||
size: 10000,
|
||||
};
|
||||
|
||||
@@ -137,15 +137,12 @@ function verificationPrcsYnNmCellStyle({ fieldName, row }: CellStyleCallbackPara
|
||||
const verificationResultColumnInfo: ColumnInfo = {
|
||||
columns: [
|
||||
{ name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false },
|
||||
{ name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역" }, editable: false },
|
||||
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
||||
{ name: "vrfcTrgtNm", fieldName: "vrfcTrgtNm", header: { text: "검증대상" }, editable: false },
|
||||
{ name: "rsnExpln", fieldName: "rsnExpln", header: { text: "사유" }, editable: false },
|
||||
{ name: "nowVlCn", fieldName: "nowVlCn", header: { text: "입력값" }, editable: false },
|
||||
{ name: "compVlCn", fieldName: "compVlCn", header: { text: "기준값" }, editable: false },
|
||||
{ name: "prcsYnNm", fieldName: "prcsYnNm", header: { text: "처리여부" }, editable: false },
|
||||
{ name: "stVrfRjtComNm", fieldName: "stVrfRjtComNm", header: { text: "반려상태" }, editable: false },
|
||||
{ name: "prcsOpnnExpln", fieldName: "prcsOpnnExpln", header: { text: "처리의견" }, editable: false },
|
||||
{ name: "rjctOpnnCn", fieldName: "rjctOpnnCn", header: { text: "반려의견" }, editable: false },
|
||||
{ name: "regDt", fieldName: "regDt", header: { text: "등록일시" }, editable: false },
|
||||
{ name: "mdfcnDt", fieldName: "mdfcnDt", header: { text: "갱신일시" }, editable: false },
|
||||
{ name: "prcsYn", fieldName: "prcsYn", header: { text: "검증결과상태코드" }, editable: false, visible: false },
|
||||
@@ -153,15 +150,12 @@ const verificationResultColumnInfo: ColumnInfo = {
|
||||
],
|
||||
columnLayout: [
|
||||
"ctpvNm",
|
||||
"admdstNm",
|
||||
"sggNm",
|
||||
"vrfcTrgtNm",
|
||||
"rsnExpln",
|
||||
"nowVlCn",
|
||||
"compVlCn",
|
||||
"prcsYnNm",
|
||||
"stVrfRjtComNm",
|
||||
"prcsOpnnExpln",
|
||||
"rjctOpnnCn",
|
||||
"regDt",
|
||||
"mdfcnDt",
|
||||
"prcsYn",
|
||||
@@ -181,8 +175,6 @@ export interface VerificationResultHistoryDialogProps {
|
||||
} | null;
|
||||
title?: string;
|
||||
emptyMessage?: string;
|
||||
/** 예외 제출 취소 API 성공 후 부모(입력 화면)에서 메인 데이터를 다시 조회할 때 사용 */
|
||||
onExceptionResetSubmitted?: () => void | Promise<void>;
|
||||
}
|
||||
|
||||
export function VerificationResultHistoryDialog({
|
||||
@@ -191,7 +183,6 @@ export function VerificationResultHistoryDialog({
|
||||
queryContext,
|
||||
title = "검증 결과 내역",
|
||||
emptyMessage = "표시할 검증 결과가 없습니다.",
|
||||
onExceptionResetSubmitted,
|
||||
}: VerificationResultHistoryDialogProps) {
|
||||
const stableQueryContext = useMemo(() => {
|
||||
if (!queryContext) return null;
|
||||
@@ -254,9 +245,9 @@ export function VerificationResultHistoryDialog({
|
||||
sggNm: stableQueryContext.sggNm,
|
||||
statsYr: stableQueryContext.statsYr,
|
||||
statsCd: stableQueryContext.statsCd,
|
||||
pbcpAprvYn: "N",
|
||||
vrfcMthdCd,
|
||||
prcsYnList: "0,2",
|
||||
rejectCodeList: "0,1,2",
|
||||
prcsYnList: "0,2,3",
|
||||
page: pageIndex + 1,
|
||||
size: PAGE_SIZE,
|
||||
};
|
||||
@@ -385,16 +376,14 @@ export function VerificationResultHistoryDialog({
|
||||
vrfcSn: item.vrfcSn,
|
||||
__checked: isChecked ? 1 : 0,
|
||||
ctpvNm: item.ctpvNm,
|
||||
admdstNm: item.admdstNm ?? item.sggNm ?? "-",
|
||||
sggNm: item.sggNm,
|
||||
vrfcTrgtNm: item.vrfcTrgtNm,
|
||||
rsnExpln: item.rsnExpln,
|
||||
nowVlCn: item.nowVlCn ?? "-",
|
||||
compVlCn: item.compVlCn ?? "-",
|
||||
prcsYnNm: item.prcsYnNm ?? "-",
|
||||
stVrfRjtComNm: item.stVrfRjtComNm ?? "-",
|
||||
prcsOpnnExpln: item.prcsOpnnExpln ?? "-",
|
||||
rjctOpnnCn: item.rjctOpnnCn ?? "-",
|
||||
prcsYn: item.prcsYn ?? "",
|
||||
pbcpAprvYn: item.pbcpAprvYn,
|
||||
regDt: (item.regDt ?? "").slice(0, 16),
|
||||
mdfcnDt: (item.mdfcnDt ?? "").slice(0, 16),
|
||||
};
|
||||
@@ -462,28 +451,12 @@ export function VerificationResultHistoryDialog({
|
||||
alert("예외 제출 취소 처리되었습니다.");
|
||||
setCheckedVrfcByTab((prev) => ({ ...prev, [tab]: new Map() }));
|
||||
await loadTabPage(tab, tabPages[tab].pageIndex);
|
||||
try {
|
||||
await onExceptionResetSubmitted?.();
|
||||
} catch {
|
||||
alert(
|
||||
"예외 제출 취소는 완료되었으나 화면 데이터를 다시 불러오지 못했습니다. 조회로 새로고침 해주세요.",
|
||||
);
|
||||
}
|
||||
} catch {
|
||||
alert("예외 제출 취소 처리 중 오류가 발생했습니다.");
|
||||
} finally {
|
||||
setResetSubmitting(false);
|
||||
}
|
||||
}, [
|
||||
activeTab,
|
||||
alert,
|
||||
checkedVrfcByTab,
|
||||
entriesByTab,
|
||||
loadTabPage,
|
||||
onExceptionResetSubmitted,
|
||||
stableQueryContext,
|
||||
tabPages,
|
||||
]);
|
||||
}, [activeTab, alert, checkedVrfcByTab, entriesByTab, loadTabPage, stableQueryContext, tabPages]);
|
||||
|
||||
const renderActiveTabPanel = (tab: VerificationHistoryTabKey) => {
|
||||
const entries = entriesByTab[tab];
|
||||
|
||||
@@ -34,8 +34,8 @@ export async function hasAnyPostSubmitVerificationResult(
|
||||
sggNm: ctx.sggNm,
|
||||
statsYr: ctx.statsYr,
|
||||
statsCd: ctx.statsCd,
|
||||
pbcpAprvYn: "N" as const,
|
||||
prcsYnList: "0",
|
||||
rejectCodeList: "0,1,2",
|
||||
page: 1,
|
||||
size: 1,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useCallback, useState } from "react";
|
||||
import {
|
||||
type InfiniteData,
|
||||
keepPreviousData,
|
||||
@@ -9,12 +9,12 @@ import {
|
||||
} from "@tanstack/react-query";
|
||||
import { useTabStore as useGridTabStore } from "@rsone/components";
|
||||
|
||||
import { verificationInputReportApi } from "@/entities/statistics/api/verification-input-report-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import type {
|
||||
VerificationInputReportItem,
|
||||
VerificationInputReportResponse,
|
||||
VerificationInputReportTypeCountingInfo,
|
||||
} from "@/entities/statistics/model/verification-input-report-interface";
|
||||
VerificationResultListRequest,
|
||||
VerificationResultListResponse,
|
||||
VerificationResultReportItem,
|
||||
} from "@/entities/statistics/model/statistics-interface";
|
||||
import { useAlertStore, useMenuStore } from "@/shared/lib";
|
||||
import {
|
||||
findMenuItemByUrlPath,
|
||||
@@ -59,8 +59,8 @@ const TYPE_CODE_NAME_MAP: Record<string, string> = {
|
||||
const PAGE_SIZE = 100;
|
||||
const SCROLL_LOAD_THRESHOLD_PX = 120;
|
||||
|
||||
function getNextVerificationInputReportPage(
|
||||
lastPage: VerificationInputReportResponse,
|
||||
function getNextVerificationResultPage(
|
||||
lastPage: VerificationResultListResponse,
|
||||
): number | undefined {
|
||||
const pageInfo = lastPage?.data?.pageInfo;
|
||||
if (!pageInfo) return undefined;
|
||||
@@ -69,29 +69,19 @@ function getNextVerificationInputReportPage(
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function flattenVerificationInputReportResults(
|
||||
data: InfiniteData<VerificationInputReportResponse> | undefined,
|
||||
): VerificationInputReportItem[] {
|
||||
function flattenVerificationResults(
|
||||
data: InfiniteData<VerificationResultListResponse> | undefined,
|
||||
): VerificationResultReportItem[] {
|
||||
return (
|
||||
data?.pages.flatMap((page) => page?.data?.verifyResultList ?? []) ?? []
|
||||
);
|
||||
}
|
||||
|
||||
function getVerifyTypeCountingInfo(
|
||||
data: InfiniteData<VerificationInputReportResponse> | undefined,
|
||||
): VerificationInputReportTypeCountingInfo | null {
|
||||
return data?.pages[0]?.data?.verifyTypeCountingInfo ?? null;
|
||||
}
|
||||
|
||||
function formatReportItemTitle(item: VerificationInputReportItem): string {
|
||||
return item.statsNm?.trim() || item.vrfcTrgtNm?.trim() || item.statsCd;
|
||||
}
|
||||
|
||||
function formatReportItemRegion(item: VerificationInputReportItem): string {
|
||||
const parts = [item.ctpvNm, item.sggNm].filter(
|
||||
(v): v is string => Boolean(v?.trim()),
|
||||
);
|
||||
return parts.length > 0 ? parts.join(" ") : "-";
|
||||
function getVerificationResultTotalCount(
|
||||
data: InfiniteData<VerificationResultListResponse> | undefined,
|
||||
loadedCount: number,
|
||||
): number {
|
||||
return data?.pages[0]?.data?.pageInfo?.totalElements ?? loadedCount;
|
||||
}
|
||||
|
||||
function useVerificationReportList(
|
||||
@@ -99,31 +89,28 @@ function useVerificationReportList(
|
||||
statsCdQueryKey: string,
|
||||
vrfcMthdCd: VerificationReportTabKey,
|
||||
statsCd: string,
|
||||
enabled: boolean,
|
||||
) {
|
||||
return useInfiniteQuery({
|
||||
queryKey: [
|
||||
"verificationInputReport",
|
||||
"verificationResultList",
|
||||
statsYr,
|
||||
vrfcMthdCd,
|
||||
statsCdQueryKey,
|
||||
],
|
||||
initialPageParam: 1,
|
||||
queryFn: ({ pageParam }) =>
|
||||
verificationInputReportApi.getVerificationInputReport({
|
||||
statisticsApi.getVerificationResultList({
|
||||
statsYr,
|
||||
vrfcMthdCd,
|
||||
pbcpAprvYn: "N",
|
||||
page: pageParam,
|
||||
size: PAGE_SIZE,
|
||||
prcsYnList: "0",
|
||||
vrfcMthdCd,
|
||||
...(!(statsCd === "" || statsCd === "ALL") && { statsCd }),
|
||||
}),
|
||||
getNextPageParam: getNextVerificationInputReportPage,
|
||||
} satisfies VerificationResultListRequest),
|
||||
getNextPageParam: getNextVerificationResultPage,
|
||||
placeholderData: keepPreviousData,
|
||||
refetchOnWindowFocus: false,
|
||||
// 탭 전환만으로는 재조회하지 않음(명시적 새로고침/조건 변경 시만 조회)
|
||||
staleTime: Infinity,
|
||||
refetchOnMount: false,
|
||||
enabled,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -145,46 +132,28 @@ const VerificationSelectionReport = ({
|
||||
const alert = useAlertStore((s) => s.setMessage);
|
||||
const [activeTab, setActiveTab] = useState<VerificationReportTabKey>("NV");
|
||||
const [statsCd, setStatsCd] = useState<string>("ALL");
|
||||
const [isFullReloading, setIsFullReloading] = useState(false);
|
||||
|
||||
const statsYr = String(dayjs().year() - 1);
|
||||
const statsCdQueryKey =
|
||||
statsCd === "" || statsCd === "ALL" ? "" : statsCd;
|
||||
|
||||
const handleStatsCdChange = useCallback(
|
||||
(nextStatsCd: string) => {
|
||||
setStatsCd(nextStatsCd);
|
||||
setActiveTab("NV");
|
||||
setIsFullReloading(true);
|
||||
|
||||
// 통계항목 변경 시 모든 탭 캐시 제거 후 NV부터 다시 조회
|
||||
void queryClient.removeQueries({
|
||||
queryKey: ["verificationInputReport", statsYr],
|
||||
});
|
||||
},
|
||||
[queryClient, statsYr],
|
||||
);
|
||||
|
||||
const nvQuery = useVerificationReportList(
|
||||
statsYr,
|
||||
statsCdQueryKey,
|
||||
"NV",
|
||||
statsCd,
|
||||
activeTab === "NV",
|
||||
);
|
||||
const imrQuery = useVerificationReportList(
|
||||
statsYr,
|
||||
statsCdQueryKey,
|
||||
"IMR",
|
||||
statsCd,
|
||||
activeTab === "IMR",
|
||||
);
|
||||
const hbQuery = useVerificationReportList(
|
||||
statsYr,
|
||||
statsCdQueryKey,
|
||||
"HB",
|
||||
statsCd,
|
||||
activeTab === "HB",
|
||||
);
|
||||
|
||||
const queryByTab = {
|
||||
@@ -193,51 +162,44 @@ const VerificationSelectionReport = ({
|
||||
HB: hbQuery,
|
||||
} as const;
|
||||
|
||||
const activeQuery = queryByTab[activeTab];
|
||||
const isRefreshing = activeQuery.isFetching && !activeQuery.isPending;
|
||||
const error = activeQuery.error;
|
||||
|
||||
/** 통계항목 변경·최초 진입: 탭 영역 숨기고 카드 전체 로딩만 표시 */
|
||||
const hideTabsSection =
|
||||
isFullReloading ||
|
||||
(activeTab === "NV" && !nvQuery.data && (nvQuery.isPending || nvQuery.isFetching));
|
||||
|
||||
useEffect(() => {
|
||||
if (!isFullReloading) return;
|
||||
if (nvQuery.isFetching) return;
|
||||
if (nvQuery.isSuccess || nvQuery.isError) {
|
||||
setIsFullReloading(false);
|
||||
}
|
||||
}, [isFullReloading, nvQuery.isFetching, nvQuery.isSuccess, nvQuery.isError]);
|
||||
const isInitialLoading =
|
||||
nvQuery.isPending || imrQuery.isPending || hbQuery.isPending;
|
||||
const isRefreshing =
|
||||
(nvQuery.isFetching && !nvQuery.isPending) ||
|
||||
(imrQuery.isFetching && !imrQuery.isPending) ||
|
||||
(hbQuery.isFetching && !hbQuery.isPending);
|
||||
const error = nvQuery.error ?? imrQuery.error ?? hbQuery.error;
|
||||
|
||||
const handleRefresh = useCallback(() => {
|
||||
setStatsCd("ALL");
|
||||
setActiveTab("NV");
|
||||
setIsFullReloading(true);
|
||||
void queryClient.removeQueries({
|
||||
queryKey: ["verificationInputReport", statsYr],
|
||||
});
|
||||
}, [queryClient, statsYr]);
|
||||
const tabCodes: VerificationReportTabKey[] = ["NV", "IMR", "HB"];
|
||||
void Promise.all(
|
||||
tabCodes.map((code) =>
|
||||
queryClient.resetQueries({
|
||||
queryKey: [
|
||||
"verificationResultList",
|
||||
statsYr,
|
||||
code,
|
||||
statsCdQueryKey,
|
||||
],
|
||||
}),
|
||||
),
|
||||
);
|
||||
}, [queryClient, statsYr, statsCdQueryKey]);
|
||||
|
||||
const listsByTab: Record<VerificationReportTabKey, VerificationInputReportItem[]> = {
|
||||
NV: flattenVerificationInputReportResults(nvQuery.data),
|
||||
IMR: flattenVerificationInputReportResults(imrQuery.data),
|
||||
HB: flattenVerificationInputReportResults(hbQuery.data),
|
||||
const listsByTab: Record<VerificationReportTabKey, VerificationResultReportItem[]> = {
|
||||
NV: flattenVerificationResults(nvQuery.data),
|
||||
IMR: flattenVerificationResults(imrQuery.data),
|
||||
HB: flattenVerificationResults(hbQuery.data),
|
||||
};
|
||||
|
||||
const typeCountingInfo =
|
||||
getVerifyTypeCountingInfo(nvQuery.data) ??
|
||||
getVerifyTypeCountingInfo(imrQuery.data) ??
|
||||
getVerifyTypeCountingInfo(hbQuery.data);
|
||||
|
||||
const totalCountByTab: Record<VerificationReportTabKey, number> = {
|
||||
NV: typeCountingInfo?.nvCount ?? listsByTab.NV.length,
|
||||
IMR: typeCountingInfo?.imrCount ?? listsByTab.IMR.length,
|
||||
HB: typeCountingInfo?.hbCount ?? listsByTab.HB.length,
|
||||
NV: getVerificationResultTotalCount(nvQuery.data, listsByTab.NV.length),
|
||||
IMR: getVerificationResultTotalCount(imrQuery.data, listsByTab.IMR.length),
|
||||
HB: getVerificationResultTotalCount(hbQuery.data, listsByTab.HB.length),
|
||||
};
|
||||
|
||||
const openInputFromStatsCd = useCallback(
|
||||
(item: VerificationInputReportItem) => {
|
||||
(item: VerificationResultReportItem) => {
|
||||
const nav = resolveInputPageNavigationFromStatsCd(item.statsCd);
|
||||
if (!nav) {
|
||||
alert(
|
||||
@@ -301,21 +263,9 @@ const VerificationSelectionReport = ({
|
||||
[],
|
||||
);
|
||||
|
||||
const isTabContentLoading = (tab: VerificationReportTabKey) => {
|
||||
const query = queryByTab[tab];
|
||||
return (
|
||||
activeTab === tab &&
|
||||
!hideTabsSection &&
|
||||
(query.isPending ||
|
||||
(query.isFetching && !query.isFetchingNextPage) ||
|
||||
(!query.data && !query.error))
|
||||
);
|
||||
};
|
||||
|
||||
const renderResultList = (
|
||||
typeCode: VerificationReportTabKey,
|
||||
items: VerificationInputReportItem[],
|
||||
isTabLoading: boolean,
|
||||
items: VerificationResultReportItem[],
|
||||
hasNextPage: boolean,
|
||||
isFetchingNextPage: boolean,
|
||||
fetchNextPage: () => void,
|
||||
@@ -331,13 +281,7 @@ const VerificationSelectionReport = ({
|
||||
)
|
||||
}
|
||||
>
|
||||
{isTabLoading ? (
|
||||
<div className="flex h-full min-h-[8rem] items-center justify-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
</div>
|
||||
) : items.length === 0 && !isFetchingNextPage ? (
|
||||
{items.length === 0 && !isFetchingNextPage ? (
|
||||
<div className="flex h-full min-h-[8rem] items-center justify-center text-lg text-muted-foreground">
|
||||
항목이 없습니다.
|
||||
</div>
|
||||
@@ -359,7 +303,7 @@ const VerificationSelectionReport = ({
|
||||
>
|
||||
<div className="mb-2 flex items-center justify-between">
|
||||
<span className="font-medium">
|
||||
{formatReportItemTitle(item)}
|
||||
{item.statsNm}
|
||||
</span>
|
||||
<Badge
|
||||
color={
|
||||
@@ -376,7 +320,7 @@ const VerificationSelectionReport = ({
|
||||
{item.rsnExpln}
|
||||
</p>
|
||||
<div className="flex justify-between text-lg text-muted-foreground">
|
||||
<span>{formatReportItemRegion(item)}</span>
|
||||
<span>{item.admdstNm}</span>
|
||||
<span>
|
||||
현재: {item.nowVlCn ?? "-"} / 비교:{" "}
|
||||
{item.compVlCn ?? "-"}
|
||||
@@ -439,25 +383,25 @@ const VerificationSelectionReport = ({
|
||||
<CodeSelectWithAll
|
||||
upCd="STITEM"
|
||||
value={statsCd}
|
||||
onValueChange={handleStatsCdChange}
|
||||
onValueChange={setStatsCd}
|
||||
placeholder="전체"
|
||||
className="w-full"
|
||||
/>
|
||||
</div>
|
||||
<div className="card-body p-2.5 flex-1 flex flex-col overflow-hidden relative min-h-0">
|
||||
{hideTabsSection && (
|
||||
{isInitialLoading && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{!hideTabsSection && error && (
|
||||
{error && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
데이터를 불러올 수 없습니다.
|
||||
</div>
|
||||
)}
|
||||
{!hideTabsSection && !error && (
|
||||
{!isInitialLoading && !error && (
|
||||
<section className="flex min-h-0 flex-1 flex-col">
|
||||
<Tabs
|
||||
value={activeTab}
|
||||
@@ -484,14 +428,18 @@ const VerificationSelectionReport = ({
|
||||
value={tab.value}
|
||||
className="mt-0 flex min-h-0 flex-1 flex-col p-0 data-[state=inactive]:hidden"
|
||||
>
|
||||
{renderResultList(
|
||||
tab.value,
|
||||
listsByTab[tab.value],
|
||||
isTabContentLoading(tab.value),
|
||||
queryByTab[tab.value].hasNextPage ?? false,
|
||||
queryByTab[tab.value].isFetchingNextPage,
|
||||
queryByTab[tab.value].fetchNextPage,
|
||||
)}
|
||||
{activeTab === tab.value
|
||||
? renderResultList(
|
||||
tab.value,
|
||||
listsByTab[tab.value],
|
||||
queryByTab[tab.value]
|
||||
.hasNextPage ?? false,
|
||||
queryByTab[tab.value]
|
||||
.isFetchingNextPage,
|
||||
queryByTab[tab.value]
|
||||
.fetchNextPage,
|
||||
)
|
||||
: null}
|
||||
</TabsContent>
|
||||
))}
|
||||
</Tabs>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useRef, useState, type Dispatch, type SetStateAction } from 'react';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
||||
import { useConfirm } from '@frontend-opensource/use-react-hooks';
|
||||
|
||||
@@ -157,9 +157,7 @@ const PublicSewageFacilityInp = () => {
|
||||
const globalProgressVisible = useGlobalProgressStore((state) => state.visible);
|
||||
const [isLoading, setIsLoading] = useState<boolean>(false);
|
||||
const [hasSearched, setHasSearched] = useState(false);
|
||||
const [isNotApplicableByTab, setIsNotApplicableByTab] = useState<Map<string, boolean>>(
|
||||
() => new Map(),
|
||||
);
|
||||
const [isNotApplicable, setIsNotApplicable] = useState(false);
|
||||
const [showIsNotApplicable, setShowIsNotApplicable] = useState(false);
|
||||
const [searchValues, setSearchValues] = useState<SearchFormValues | null>(null);
|
||||
const [lastSearchedValues, setLastSearchedValues] = useState<SearchFormValues | null>(null);
|
||||
@@ -177,19 +175,6 @@ const PublicSewageFacilityInp = () => {
|
||||
const [mainFacilityMappingSaveDialogKey, setMainFacilityMappingSaveDialogKey] = useState(0);
|
||||
const [verificationResultDialogOpen, setVerificationResultDialogOpen] = useState(false);
|
||||
const [verificationHistoryOpen, setVerificationHistoryOpen] = useState(false);
|
||||
const isNotApplicable = isNotApplicableByTab.get('ST00060001') ?? false;
|
||||
const setIsNotApplicable: Dispatch<SetStateAction<boolean>> = (next) => {
|
||||
setIsNotApplicableByTab((prev) => {
|
||||
const current = prev.get('ST00060001') ?? false;
|
||||
const resolved =
|
||||
typeof next === 'function'
|
||||
? (next as (prevState: boolean) => boolean)(current)
|
||||
: next;
|
||||
const nextMap = new Map(prev);
|
||||
nextMap.set('ST00060001', resolved);
|
||||
return nextMap;
|
||||
});
|
||||
};
|
||||
|
||||
const periodEnterableRef = useRef(true);
|
||||
const searchDoneRef = useRef(false);
|
||||
@@ -210,7 +195,7 @@ const PublicSewageFacilityInp = () => {
|
||||
const currentData =
|
||||
st60001GridGetRowsRef.current?.() ?? rowDataMap.get('ST00060001') ?? [];
|
||||
if (!treatAsNoApplicable && (!currentData || currentData.length === 0)) {
|
||||
alert('해당사항 없음을 체크해주세요.');
|
||||
alert('제출할 데이터가 없습니다.');
|
||||
return;
|
||||
}
|
||||
const verificationBlocked = getVerificationPeriodActionBlockedMessage(periodCheckList);
|
||||
@@ -291,15 +276,15 @@ const PublicSewageFacilityInp = () => {
|
||||
const currentData =
|
||||
st60001GridGetRowsRef.current?.() ?? rowDataMap.get('ST00060001') ?? [];
|
||||
|
||||
const submitList = treatAsNoApplicable ? [] : buildFacilitySaveList(currentData);
|
||||
if (!treatAsNoApplicable && submitList.length === 0) {
|
||||
alert('해당사항 없음을 체크해주세요.');
|
||||
if (!treatAsNoApplicable && (!currentData || currentData.length === 0)) {
|
||||
alert('제출할 데이터가 없습니다.');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
showGlobalProgress({ label: '서버에 요청 중...', progress: 0 });
|
||||
const userInfo = await getUserInfo();
|
||||
const submitList = treatAsNoApplicable ? [] : buildFacilitySaveList(currentData);
|
||||
const activeTabStatus = tabStatusInfoMap.get(activeTab) ?? null;
|
||||
const statsCdForTab = tabStatsCdMap.get(activeTab) ?? activeTab;
|
||||
const requestData = {
|
||||
@@ -530,19 +515,19 @@ const PublicSewageFacilityInp = () => {
|
||||
if (!(await confirm('저장 하시겠습니까?'))) return;
|
||||
|
||||
if (activeTab === 'ST00060001') {
|
||||
const noApplicable = getNoApplicableForRequest();
|
||||
const treatAsNoApplicable = noApplicable || isNotApplicable;
|
||||
const currentData =
|
||||
st60001GridGetRowsRef.current?.() ?? rowDataMap.get('ST00060001') ?? [];
|
||||
const saveList = treatAsNoApplicable ? [] : buildFacilitySaveList(currentData);
|
||||
if (!treatAsNoApplicable && saveList.length === 0) {
|
||||
alert('해당사항 없음을 체크해주세요.');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
showGlobalProgress({ label: '저장 진행 중...', progress: 0 });
|
||||
const userInfo = await getUserInfo();
|
||||
const noApplicable = getNoApplicableForRequest();
|
||||
const treatAsNoApplicable = noApplicable || isNotApplicable;
|
||||
const currentData =
|
||||
st60001GridGetRowsRef.current?.() ?? rowDataMap.get('ST00060001') ?? [];
|
||||
if (!treatAsNoApplicable && (!currentData || currentData.length === 0)) {
|
||||
alert('저장할 데이터가 없습니다.');
|
||||
return;
|
||||
}
|
||||
|
||||
const saveList = treatAsNoApplicable ? [] : buildFacilitySaveList(currentData);
|
||||
const param: PublicSewageFacilitySaveRequest = {
|
||||
statsYr: lastSearchedValues.year ?? '',
|
||||
ctpvNm: lastSearchedValues.sido ?? '',
|
||||
@@ -670,6 +655,8 @@ const PublicSewageFacilityInp = () => {
|
||||
param: PublicSewageFacilityRequestParams,
|
||||
searchContext: SearchFormValues | null,
|
||||
): Promise<boolean> => {
|
||||
// 서버 데이터로 새로 불러오는 시점이므로 "해당없음" 체크는 항상 초기화
|
||||
setIsNotApplicable(false);
|
||||
try {
|
||||
if (tabKey === 'ST00060001') {
|
||||
const response = await statisticsInputPublicSewageFacilityApiService.getPublicSewageFacility(param);
|
||||
@@ -869,11 +856,6 @@ const PublicSewageFacilityInp = () => {
|
||||
setLastSearchedValues(values);
|
||||
searchDoneRef.current = true;
|
||||
setHasSearched(true);
|
||||
setIsNotApplicableByTab((prev) => {
|
||||
const next = new Map(prev);
|
||||
next.set('ST00060001', false);
|
||||
return next;
|
||||
});
|
||||
|
||||
setIsLoading(true);
|
||||
const param = buildPublicSewageFacilityParams(values);
|
||||
@@ -888,19 +870,6 @@ const PublicSewageFacilityInp = () => {
|
||||
};
|
||||
|
||||
const handleActiveTabChange = async (tabKey: string) => {
|
||||
const prevTabKey = activeTabRef.current;
|
||||
if (prevTabKey === 'ST00060001') {
|
||||
const latestRowsInPrevTab =
|
||||
st60001GridGetRowsRef.current?.() ?? rowDataMap.get('ST00060001') ?? [];
|
||||
if (latestRowsInPrevTab.length > 0 || rowDataMap.has('ST00060001')) {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
next.set('ST00060001', latestRowsInPrevTab);
|
||||
return next;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
activeTabRef.current = tabKey;
|
||||
setActiveTab(tabKey);
|
||||
|
||||
@@ -916,7 +885,7 @@ const PublicSewageFacilityInp = () => {
|
||||
const handleReset = () => {
|
||||
setIsLoading(false);
|
||||
setHasSearched(false);
|
||||
setIsNotApplicableByTab(new Map());
|
||||
setIsNotApplicable(false);
|
||||
setShowIsNotApplicable(false);
|
||||
|
||||
setRowDataMap(new Map());
|
||||
@@ -1246,7 +1215,7 @@ const PublicSewageFacilityInp = () => {
|
||||
return (
|
||||
<TabsContent key={tab.tabKey} value={tab.tabKey}>
|
||||
<DataGrid
|
||||
key={tab.tabKey}
|
||||
key={(tabEnterableForGrid || isAdminInfo) ? 'enterable' : 'readonly'}
|
||||
columnInfo={gridColumnInfo}
|
||||
rowStartNum={tab.rowStartNum}
|
||||
excelExportFileSuffix={tab.tabLabel || tab.tabKey}
|
||||
@@ -1309,11 +1278,6 @@ const PublicSewageFacilityInp = () => {
|
||||
open={verificationHistoryOpen}
|
||||
onOpenChange={setVerificationHistoryOpen}
|
||||
queryContext={verificationQueryContext}
|
||||
onExceptionResetSubmitted={async () => {
|
||||
const ctx = lastSearchedValues ?? searchValues;
|
||||
if (!ctx || !searchParamRef.current) return;
|
||||
await loadPublicSewageFacilityActiveTabData(activeTab, searchParamRef.current, ctx);
|
||||
}}
|
||||
/>
|
||||
<SubmitDailog
|
||||
open={showDailog}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -396,8 +396,6 @@ const SewagePipeInp = () => {
|
||||
values: SearchFormValues;
|
||||
tabKey: string;
|
||||
} | null>(null);
|
||||
/** ST00020002 무데이터 안내/자동이동은 동일 조회조건에서 1회만 수행 */
|
||||
const factInstallNoDataHandledKeyRef = useRef<string | null>(null);
|
||||
|
||||
const [verificationSearchDefaults, setVerificationSearchDefaults] =
|
||||
useState<SearchFormValues | null>(null);
|
||||
@@ -551,12 +549,6 @@ const SewagePipeInp = () => {
|
||||
mergeIntoExistingMap: boolean,
|
||||
updateLastSearchedValues: boolean,
|
||||
): Promise<boolean> => {
|
||||
const searchConditionKey = JSON.stringify({
|
||||
statsYr: searchParam.statsYr ?? "",
|
||||
ctpvNm: searchParam.ctpvNm ?? "",
|
||||
sggNm: searchParam.sggNm ?? "",
|
||||
sewerBzmnCd: searchParam.sewerBzmnCd ?? "",
|
||||
});
|
||||
const applyRowMap = (apply: (m: Map<string, Record<string, string | number>[]>) => void) => {
|
||||
if (mergeIntoExistingMap) {
|
||||
setRowDataMap((prev) => {
|
||||
@@ -603,23 +595,6 @@ const SewagePipeInp = () => {
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}));
|
||||
if (convertedData.length === 0) {
|
||||
const alreadyHandledForSameSearch =
|
||||
factInstallNoDataHandledKeyRef.current === searchConditionKey;
|
||||
if (!alreadyHandledForSameSearch) {
|
||||
factInstallNoDataHandledKeyRef.current = searchConditionKey;
|
||||
alert("시설별 설치 현황에 조회된 데이터가 없습니다.\n시설별 현황 관리에서 설정해주세요");
|
||||
activeTabRef.current = "ST00020006";
|
||||
setActiveTab("ST00020006");
|
||||
return await loadSewagePipeActiveTabData(
|
||||
"ST00020006",
|
||||
searchParam,
|
||||
values,
|
||||
true,
|
||||
updateLastSearchedValues,
|
||||
);
|
||||
}
|
||||
}
|
||||
applyRowMap((m) => m.set('ST00020002', toGridRows(convertedData)));
|
||||
setTabStatusInfoMap((prev) => new Map(prev).set(tabKey, response.data.statusInfo));
|
||||
setTabStatsCdMap((prev) => new Map(prev).set(tabKey, commonInfo.statsCd));
|
||||
@@ -820,39 +795,7 @@ const SewagePipeInp = () => {
|
||||
|
||||
}, [searchFormRemountKey]);
|
||||
|
||||
const getCurrentRowsForTab = (tabKey: string): Record<string, string | number>[] => {
|
||||
switch (tabKey) {
|
||||
case REGIONAL_FACT_TAB_KEY:
|
||||
return getGridDataRef.current?.() ?? [];
|
||||
case "ST00020002":
|
||||
return getFactInstallGridDataRef.current?.() ?? [];
|
||||
case "ST00020003":
|
||||
return getPipeTypeGridDataRef.current?.() ?? [];
|
||||
case "ST00020004":
|
||||
return getPipeDiameterGridDataRef.current?.() ?? [];
|
||||
case "ST00020005":
|
||||
return getManholeGridDataRef.current?.() ?? [];
|
||||
case "ST00020006":
|
||||
return [
|
||||
...(rowDataMap.get("treatmentPlantConnectionInp") ?? []),
|
||||
...(rowDataMap.get("adminAreaConnectionInp") ?? []),
|
||||
];
|
||||
default:
|
||||
return rowDataMap.get(tabKey) ?? [];
|
||||
}
|
||||
};
|
||||
|
||||
const handleActiveTabChange = async (tabKey: string) => {
|
||||
const prevTabKey = activeTabRef.current;
|
||||
const latestRowsInPrevTab = getCurrentRowsForTab(prevTabKey);
|
||||
if (latestRowsInPrevTab.length > 0 || rowDataMap.has(prevTabKey)) {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
next.set(prevTabKey, latestRowsInPrevTab);
|
||||
return next;
|
||||
});
|
||||
}
|
||||
|
||||
activeTabRef.current = tabKey;
|
||||
setActiveTab(tabKey);
|
||||
setStatsCd(tabStatsCdMap.get(tabKey) ?? "");
|
||||
@@ -1792,7 +1735,7 @@ const SewagePipeInp = () => {
|
||||
const maxYy = getManholeLastDataYear() % 100;
|
||||
|
||||
const saveList = currentData.map((d) => {
|
||||
const yearlyStats: SeweragePipeInputManholeStatusSaveYearlyStatItem[] = [];
|
||||
const yearlyStats = [];
|
||||
for (let yy = minYy; yy <= maxYy; yy++) {
|
||||
const year = 2000 + yy;
|
||||
const wholKey = `yy${yy}WholMnhlCnt`;
|
||||
@@ -2035,7 +1978,7 @@ const SewagePipeInp = () => {
|
||||
return (
|
||||
<TabsContent key={tabKey} value={tabKey}>
|
||||
<DataGrid
|
||||
key={tabKey}
|
||||
key={(tabEnterableForGrid || isAdminInfo) ? "enterable" : "readonly"}
|
||||
columnInfo={gridColumnInfo}
|
||||
rowStartNum={info.rowStartNum}
|
||||
excelExportFileSuffix={info.tabLabel || tabKey}
|
||||
@@ -2119,12 +2062,6 @@ const SewagePipeInp = () => {
|
||||
}
|
||||
: null
|
||||
}
|
||||
onExceptionResetSubmitted={async () => {
|
||||
const values = lastSearchedValues ?? searchValues;
|
||||
if (!values?.year || !values?.sido || !values?.bsnmCd) return;
|
||||
const refreshedParam = buildSewagePipeSearchParam(values);
|
||||
await loadSewagePipeActiveTabData(activeTab, refreshedParam, values, true, false);
|
||||
}}
|
||||
/>
|
||||
<SubmitDailog
|
||||
open={showDailog}
|
||||
|
||||
@@ -80,12 +80,6 @@ const SewagePipeMaintainInpTabList = [
|
||||
|
||||
const firstTabKey = RepairStatusInpColumn.tabKey;
|
||||
|
||||
const SEWAGE_PIPE_MAINTAIN_COLUMN_GUIDE_TAB_KEYS = Array.from(
|
||||
new Set(
|
||||
SewagePipeMaintainInpTabList.map((tab) => tab.tabKey).filter(Boolean),
|
||||
),
|
||||
);
|
||||
|
||||
const toGridColumnInfo = (tab: (typeof SewagePipeMaintainInpTabList)[number]): ColumnInfo => ({
|
||||
columns: tab.columns ?? [],
|
||||
columnLayout: tab.columnLayout ?? [],
|
||||
@@ -308,9 +302,6 @@ const SewagePipeMaintainInp = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<
|
||||
Map<string, Record<string, string | number>[]>
|
||||
>(new Map());
|
||||
const [columnGuidesByTab, setColumnGuidesByTab] = useState<
|
||||
Record<string, Record<string, string>>
|
||||
>({});
|
||||
|
||||
const searchDoneRef = useRef(false);
|
||||
const periodEnterableRef = useRef(true);
|
||||
@@ -337,37 +328,6 @@ const SewagePipeMaintainInp = () => {
|
||||
}
|
||||
}, [activeTabId, inputFocusNonce]);
|
||||
|
||||
useEffect(() => {
|
||||
if (activeTabId !== STATISTICS_INPUT_URL_PATH.SEWAGE_PIPE_MAINTAIN) return;
|
||||
let cancelled = false;
|
||||
void (async () => {
|
||||
const entries = await Promise.all(
|
||||
SEWAGE_PIPE_MAINTAIN_COLUMN_GUIDE_TAB_KEYS.map(async (tabKey) => {
|
||||
try {
|
||||
const res = await statisticsApi.getColumnGuides(tabKey);
|
||||
if (res.status !== "success" || !Array.isArray(res.data)) {
|
||||
return [tabKey, {}] as const;
|
||||
}
|
||||
const next: Record<string, string> = {};
|
||||
for (const item of res.data) {
|
||||
const key = item.engColNm?.trim();
|
||||
const guide = item.columnGuide?.trim();
|
||||
if (key && guide) next[key] = guide;
|
||||
}
|
||||
return [tabKey, next] as const;
|
||||
} catch {
|
||||
return [tabKey, {}] as const;
|
||||
}
|
||||
}),
|
||||
);
|
||||
if (cancelled) return;
|
||||
setColumnGuidesByTab(Object.fromEntries(entries));
|
||||
})();
|
||||
return () => {
|
||||
cancelled = true;
|
||||
};
|
||||
}, [activeTabId]);
|
||||
|
||||
const commitToolbarSnapshotForLoadedTab = (
|
||||
tabKey: string,
|
||||
statusInfo: SewerageStatusInfo | null,
|
||||
@@ -952,16 +912,6 @@ const SewagePipeMaintainInp = () => {
|
||||
}, [searchFormRemountKey]);
|
||||
|
||||
const handleActiveTabChange = async (tabKey: string) => {
|
||||
const prevTabKey = activeTabRef.current;
|
||||
const latestRowsInPrevTab = getTabGridRows(prevTabKey);
|
||||
if (latestRowsInPrevTab.length > 0 || rowDataMap.has(prevTabKey)) {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
next.set(prevTabKey, latestRowsInPrevTab);
|
||||
return next;
|
||||
});
|
||||
}
|
||||
|
||||
activeTabRef.current = tabKey;
|
||||
setActiveTab(tabKey);
|
||||
if (!hasSearched || !lastSearchedValues || !searchParamRef.current) return;
|
||||
@@ -991,22 +941,22 @@ const SewagePipeMaintainInp = () => {
|
||||
tabStatusInfoMap.get(tabKey) ?? null,
|
||||
inputPeriodEnterable,
|
||||
) || isAdminInfo;
|
||||
const rawColumns = tab.columns ?? [];
|
||||
const base = canEdit
|
||||
? rawColumns
|
||||
: rawColumns.map((col) => ({ ...col, editable: false as const }));
|
||||
const columns = base
|
||||
.map((col) => {
|
||||
const guide = columnGuidesByTab[tabKey]?.[col.fieldName]?.trim();
|
||||
return guide ? { ...col, tooltip: guide } : col;
|
||||
});
|
||||
const columns = (tab.columns ?? []).map((col: ColumnConfig) =>
|
||||
canEdit
|
||||
? col
|
||||
: {
|
||||
...col,
|
||||
editable: false as const,
|
||||
styleName: col.styleName ?? "rg-cell-readonly",
|
||||
},
|
||||
);
|
||||
map.set(tabKey, {
|
||||
columns,
|
||||
columnLayout: tab.columnLayout ?? [],
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}, [tabStatusInfoMap, inputPeriodEnterable, isAdminInfo, columnGuidesByTab]);
|
||||
}, [tabStatusInfoMap, inputPeriodEnterable, isAdminInfo]);
|
||||
|
||||
const searchContextForToolbar = lastSearchedValues ?? searchValues;
|
||||
const activeTabStatus = tabStatusInfoMap.get(activeTab) ?? null;
|
||||
@@ -1160,7 +1110,11 @@ const SewagePipeMaintainInp = () => {
|
||||
return (
|
||||
<TabsContent key={tabKey} value={tabKey}>
|
||||
<DataGrid
|
||||
key={`${tabKey}-${tabEnterableForGrid ? "enterable" : "readonly"}`}
|
||||
key={
|
||||
tabEnterableForGrid || isAdminInfo
|
||||
? `${tabKey}-enterable`
|
||||
: `${tabKey}-readonly`
|
||||
}
|
||||
columnInfo={
|
||||
columnInfoByTab.get(tabKey) ??
|
||||
toGridColumnInfo(info)
|
||||
@@ -1203,17 +1157,6 @@ const SewagePipeMaintainInp = () => {
|
||||
open={verificationHistoryOpen}
|
||||
onOpenChange={setVerificationHistoryOpen}
|
||||
queryContext={verificationQueryContext}
|
||||
onExceptionResetSubmitted={async () => {
|
||||
const values = lastSearchedValues ?? searchValues;
|
||||
if (!values || !searchParamRef.current) return;
|
||||
await loadActiveTabData(
|
||||
activeTabRef.current,
|
||||
searchParamRef.current,
|
||||
values,
|
||||
true,
|
||||
false,
|
||||
);
|
||||
}}
|
||||
/>
|
||||
<ConfirmDialog isOpen={false} />
|
||||
<SubmitDailog
|
||||
@@ -1227,17 +1170,6 @@ const SewagePipeMaintainInp = () => {
|
||||
open={verificationResultDialogOpen}
|
||||
onOpenChange={setVerificationResultDialogOpen}
|
||||
queryContext={verificationQueryContext}
|
||||
onExceptionSubmitted={async () => {
|
||||
const values = lastSearchedValues ?? searchValues;
|
||||
if (!values || !searchParamRef.current) return;
|
||||
await loadActiveTabData(
|
||||
activeTabRef.current,
|
||||
searchParamRef.current,
|
||||
values,
|
||||
true,
|
||||
false,
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -288,8 +288,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
} else {
|
||||
alert(response.message);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} catch {
|
||||
alert('데이터 조회 중 오류가 발생했습니다.');
|
||||
setRowData([]);
|
||||
setStatusInfo(null);
|
||||
@@ -791,13 +790,11 @@ const SeweragePenetrationRateInp = () => {
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{isLoading && !globalProgressVisible &&
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
{isLoading && !globalProgressVisible && <div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
}
|
||||
</div>}
|
||||
<DataGrid
|
||||
key={(isEnterable || isAdminInfo) ? 'enterable' : 'readonly'}
|
||||
columnInfo={columnInfo}
|
||||
@@ -862,11 +859,6 @@ const SeweragePenetrationRateInp = () => {
|
||||
}
|
||||
: null
|
||||
}
|
||||
onExceptionResetSubmitted={async () => {
|
||||
const values = lastSearchedValues ?? searchValues;
|
||||
if (!values) return;
|
||||
await handleSearch(values);
|
||||
}}
|
||||
/>
|
||||
<VerificationResultDialog
|
||||
open={verificationResultDialogOpen}
|
||||
|
||||
@@ -196,20 +196,6 @@ const LogHistory = () => {
|
||||
|
||||
const handleSearch = async (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (startDate && endDate) {
|
||||
const start = dayjs(startDate);
|
||||
const end = dayjs(endDate);
|
||||
if (start.isAfter(end, "day")) {
|
||||
alert("시작일은 종료일보다 늦을 수 없습니다.");
|
||||
return;
|
||||
}
|
||||
if (end.isBefore(start, "day")) {
|
||||
alert("종료일은 시작일보다 빠를 수 없습니다.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
await loadLogs(1);
|
||||
};
|
||||
|
||||
|
||||
@@ -213,7 +213,6 @@ function buildRowsFromStatusList(
|
||||
statKeys: string[],
|
||||
): Record<string, string | number>[] {
|
||||
const rowMap = new Map<string, Record<string, string | number>>();
|
||||
const rowOrder: string[] = [];
|
||||
|
||||
for (const item of statusList) {
|
||||
const { sido, sgg } = splitSidoSggNm(item.sidoSggNm);
|
||||
@@ -229,7 +228,6 @@ function buildRowsFromStatusList(
|
||||
row[key] = "";
|
||||
}
|
||||
rowMap.set(rowKey, row);
|
||||
rowOrder.push(rowKey);
|
||||
}
|
||||
|
||||
const row = rowMap.get(rowKey)!;
|
||||
@@ -238,7 +236,11 @@ function buildRowsFromStatusList(
|
||||
}
|
||||
}
|
||||
|
||||
return rowOrder.map((key) => rowMap.get(key)!);
|
||||
return Array.from(rowMap.values()).sort((a, b) => {
|
||||
const sidoCmp = String(a[SIDO_FIELD]).localeCompare(String(b[SIDO_FIELD]), "ko");
|
||||
if (sidoCmp !== 0) return sidoCmp;
|
||||
return String(a[SGG_FIELD]).localeCompare(String(b[SGG_FIELD]), "ko");
|
||||
});
|
||||
}
|
||||
|
||||
function buildUnSubmitDataRequest(
|
||||
|
||||
@@ -1,123 +1,10 @@
|
||||
import { useRef, useState } from "react";
|
||||
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { LoadingWithAnimation } from "@common/components";
|
||||
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import type { ColumnInfo } from "@/components/type/DataGrid.type";
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
|
||||
// 분리된 분뇨처리시설용 컬럼 구성 임포트
|
||||
import { ExcretaTreatmentStatusColumnConfig } from "@/components/util/column/total/SewerExcretaTreatmentStatusColumn";
|
||||
|
||||
// 집계표(TOTAL) API 및 인터페이스 명세 호출
|
||||
import { statisticsTotalStatusApi } from "@/entities/statistics/api/statistics-total-service";
|
||||
import type {
|
||||
ExcretaTreatmentMaintainTotalRequest
|
||||
} from "@/entities/statistics/model/statistics-total/statistics-excreta-treatment-total-interface";
|
||||
import CellColorInfo from "./CellColorInfo";
|
||||
|
||||
const ExcretaTreatmentFacilityTot = () => {
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
|
||||
// null 타입 컴파일 에러를 방지하기 위해 엄격하게 정의한 데이터 상태
|
||||
const [rowData, setRowData] = useState<Record<string, string | number>[]>([]);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const lastSearchedValuesRef = useRef<SearchFormValues | null>(null);
|
||||
|
||||
const config = ExcretaTreatmentStatusColumnConfig;
|
||||
|
||||
const handleReset = () => {
|
||||
setRowData([]);
|
||||
lastSearchedValuesRef.current = null;
|
||||
};
|
||||
|
||||
const loadGridData = async (values: SearchFormValues): Promise<boolean> => {
|
||||
const param: ExcretaTreatmentMaintainTotalRequest = {
|
||||
ctpvNm: values.sido === "ALL" ? "" : values.sido,
|
||||
sggNm: values.gugun === "ALL" ? "" : values.gugun,
|
||||
sewerBzmnCd: values.bsnmCd,
|
||||
statsYr: values.year,
|
||||
rowDataYn: values.isDetail,
|
||||
summaryYn: values.isSummary !== 'ALL',
|
||||
summaryYearCnt: values.isSummary !== 'ALL' ? Number(values.isSummary) : undefined
|
||||
};
|
||||
|
||||
try {
|
||||
const response = await statisticsTotalStatusApi.getExcretaTreatmentStatusTotalList(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
// object[]로 변환하여 주입함으로써 상위 컴포넌트 간 null 에러 완벽 차단
|
||||
setRowData(toGridRows(response.data as object[]));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
} catch {
|
||||
alert("서버 연결 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const ok = await loadGridData(values);
|
||||
if (ok) {
|
||||
lastSearchedValuesRef.current = values;
|
||||
} else {
|
||||
lastSearchedValuesRef.current = null;
|
||||
}
|
||||
} catch {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
lastSearchedValuesRef.current = null;
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const gridColumnInfo: ColumnInfo = {
|
||||
columns: config.columns,
|
||||
columnLayout: config.columnLayout,
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<SearchForm isDetail={true} isSummary={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
|
||||
{isLoading && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<CellColorInfo />
|
||||
|
||||
<div className="flex flex-col gap-[0.6rem] mx-[0.6rem] mt-[0.6rem]">
|
||||
<DataGrid
|
||||
columnInfo={gridColumnInfo}
|
||||
rowStartNum={config.rowStartNum}
|
||||
excelExportFileSuffix={config.tabLabel}
|
||||
rowData={rowData}
|
||||
setRowData={setRowData} // 필수 프로퍼티 에러 해결
|
||||
isExcelImport={false}
|
||||
isExcelExport={true}
|
||||
showHeaderCheckbox={false}
|
||||
fixedColumns={config.fixedColumns}
|
||||
enableSort={false}
|
||||
cellStyleCallback={({ row }) => {
|
||||
const rowType = String(row.rowType ?? '');
|
||||
if (rowType === 'DETAIL') return undefined;
|
||||
if (rowType === 'BIZ_SUM') return 'rg-cell-rowtype-biz-sum';
|
||||
if (rowType === 'SUMMARY') return 'rg-cell-rowtype-summary';
|
||||
return 'rg-cell-rowtype-other';
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<>
|
||||
<SearchForm />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,206 +1,10 @@
|
||||
import { useRef, useState } from "react";
|
||||
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { LoadingWithAnimation, Tabs, TabsContent, TabsList, TabsTrigger } from "@common/components";
|
||||
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import type { ColumnInfo } from "@/components/type/DataGrid.type";
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
|
||||
// 분리된 개별 3개 컬럼 스펙 파일 로드
|
||||
import { PrivateSewageTab1ColumnConfig } from "@/components/util/column/total/sewerPrivateSewageColumn/SewerPrivateSewageTab1Column";
|
||||
import { PrivateSewageTab2ColumnConfig } from "@/components/util/column/total/sewerPrivateSewageColumn/SewerPrivateSewageTab2Column";
|
||||
import { PrivateSewageTab3ColumnConfig } from "@/components/util/column/total/sewerPrivateSewageColumn/SewerPrivateSewageTab3Column";
|
||||
|
||||
// 통계 API 서비스 및 통합 DTO 명세 임포트
|
||||
import { statisticsTotalStatusApi } from "@/entities/statistics/api/statistics-total-service";
|
||||
import type {
|
||||
PrivateSewageFacilitySummaryRequest
|
||||
} from "@/entities/statistics/model/statistics-total/statistics-private-sewage-total-interface";
|
||||
import CellColorInfo from "./CellColorInfo";
|
||||
|
||||
const PrivateSewageColumnListTot = [
|
||||
PrivateSewageTab1ColumnConfig,
|
||||
PrivateSewageTab2ColumnConfig,
|
||||
PrivateSewageTab3ColumnConfig
|
||||
];
|
||||
|
||||
const firstTabKey = PrivateSewageColumnListTot[0]?.tabKey ?? "ST00040005_1";
|
||||
|
||||
const PrivateSewageFacilityTot = () => {
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
|
||||
// null 컴파일 예러를 사전에 원천 차단한 안전 상태 맵 선언
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [activeTab, setActiveTab] = useState(firstTabKey);
|
||||
const lastSearchedValuesRef = useRef<SearchFormValues | null>(null);
|
||||
|
||||
const columnInfo = PrivateSewageColumnListTot;
|
||||
|
||||
const handleReset = () => {
|
||||
setRowDataMap(new Map());
|
||||
setActiveTab(firstTabKey);
|
||||
lastSearchedValuesRef.current = null;
|
||||
};
|
||||
|
||||
/** 각 탭별 엔드포인트 비동기 디스패치 및 연동 */
|
||||
const loadGridData = async (tabKey: string, values: SearchFormValues): Promise<boolean> => {
|
||||
const param: PrivateSewageFacilitySummaryRequest = {
|
||||
ctpvNm: values.sido === "ALL" ? "" : values.sido,
|
||||
sggNm: values.gugun === "ALL" ? "" : values.gugun,
|
||||
sewerBzmnCd: values.bsnmCd,
|
||||
statsYr: values.year,
|
||||
rowDataYn: values.isDetail,
|
||||
summaryYn: values.isSummary !== 'ALL',
|
||||
summaryYearCnt: values.isSummary !== 'ALL' ? Number(values.isSummary) : undefined
|
||||
};
|
||||
|
||||
try {
|
||||
// [Tab1] 처리용량별 오수처리시설
|
||||
if (tabKey === "ST00080001") {
|
||||
const response = await statisticsTotalStatusApi.getPrivateSewageTab1List(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
|
||||
// [Tab2] 정화조현황
|
||||
if (tabKey === "ST00080002") {
|
||||
const response = await statisticsTotalStatusApi.getPrivateSewageTab2List(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
|
||||
// [Tab3] 개인하수도 관리지역 지정공고 현황
|
||||
if (tabKey === "ST00080003") {
|
||||
const response = await statisticsTotalStatusApi.getPrivatePrivateMgmtAreaList(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
return false;
|
||||
} catch {
|
||||
alert("서버 연결 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const ok = await loadGridData(activeTab, values);
|
||||
if (ok) {
|
||||
lastSearchedValuesRef.current = values;
|
||||
} else {
|
||||
lastSearchedValuesRef.current = null;
|
||||
}
|
||||
} catch {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
lastSearchedValuesRef.current = null;
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleActiveTabChange = async (tabKey: string) => {
|
||||
setActiveTab(tabKey);
|
||||
const values = lastSearchedValuesRef.current;
|
||||
if (!values) return;
|
||||
|
||||
const existing = rowDataMap.get(tabKey);
|
||||
if (existing && existing.length > 0) return; // 캐싱 검증 스킵
|
||||
|
||||
try {
|
||||
setIsLoading(true);
|
||||
await loadGridData(tabKey, values);
|
||||
} catch {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<SearchForm isDetail={true} isSummary={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
|
||||
{/* 하수관로 규칙과 100% 싱크 맞춘 중앙 정렬 소형 팝업 로딩 바 고정 */}
|
||||
{isLoading && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<CellColorInfo />
|
||||
|
||||
<div className="flex flex-col gap-[0.6rem] mx-[0.6rem]">
|
||||
<Tabs value={activeTab} onValueChange={(v) => void handleActiveTabChange(v)} className="w-full" variant="default">
|
||||
<TabsList>
|
||||
{columnInfo.map((info) => (
|
||||
<TabsTrigger key={info.tabKey} value={info.tabKey}>
|
||||
{info.tabLabel}
|
||||
</TabsTrigger>
|
||||
))}
|
||||
</TabsList>
|
||||
|
||||
{columnInfo.map((info) => {
|
||||
const tabKey = info.tabKey;
|
||||
|
||||
// 단언 연산자(as) 배제 형태 완벽 적용
|
||||
const rowData = rowDataMap.get(tabKey) ?? [];
|
||||
|
||||
const gridColumnInfo: ColumnInfo = {
|
||||
columns: info.columns,
|
||||
columnLayout: info.columnLayout,
|
||||
};
|
||||
|
||||
return (
|
||||
<TabsContent key={tabKey} value={tabKey}>
|
||||
<DataGrid
|
||||
columnInfo={gridColumnInfo}
|
||||
rowStartNum={info.rowStartNum}
|
||||
excelExportFileSuffix={info.tabLabel}
|
||||
rowData={rowData}
|
||||
setRowData={(updater) => {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
const cur = next.get(tabKey) ?? [];
|
||||
const n = typeof updater === "function" ? updater(cur) : updater;
|
||||
next.set(tabKey, n);
|
||||
return next;
|
||||
});
|
||||
}}
|
||||
isExcelImport={false}
|
||||
isExcelExport={true}
|
||||
showHeaderCheckbox={false}
|
||||
fixedColumns={info.fixedColumns}
|
||||
enableSort={false}
|
||||
cellStyleCallback={({ row }) => {
|
||||
const rowType = String(row.rowType ?? '');
|
||||
if (rowType === 'DETAIL') return undefined;
|
||||
if (rowType === 'BIZ_SUM') return 'rg-cell-rowtype-biz-sum';
|
||||
if (rowType === 'SUMMARY') return 'rg-cell-rowtype-summary';
|
||||
return 'rg-cell-rowtype-other';
|
||||
}}
|
||||
/>
|
||||
</TabsContent>
|
||||
);
|
||||
})}
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
<>
|
||||
<SearchForm />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,123 +1,10 @@
|
||||
import { useRef, useState } from "react";
|
||||
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { LoadingWithAnimation } from "@common/components";
|
||||
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import type { ColumnInfo } from "@/components/type/DataGrid.type";
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
|
||||
// 분리된 중계펌프장용 컬럼 구성 임포트
|
||||
import { MediationPumpStatusColumnConfig } from "@/components/util/column/total/SewerMediationPumpStatusColumn";
|
||||
|
||||
// 집계표(TOTAL) API 및 인터페이스 명세 호출
|
||||
import { statisticsTotalStatusApi } from "@/entities/statistics/api/statistics-total-service";
|
||||
import type {
|
||||
MediationPumpMaintainTotalRequest
|
||||
} from "@/entities/statistics/model/statistics-total/statistics-mediation-pump-total-interface";
|
||||
import CellColorInfo from "./CellColorInfo";
|
||||
|
||||
const PumpingStationTot = () => {
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
|
||||
// null 타입 컴파일 에러가 발생하지 않도록 엄격하게 정의한 데이터 상태
|
||||
const [rowData, setRowData] = useState<Record<string, string | number>[]>([]);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const lastSearchedValuesRef = useRef<SearchFormValues | null>(null);
|
||||
|
||||
const config = MediationPumpStatusColumnConfig;
|
||||
|
||||
const handleReset = () => {
|
||||
setRowData([]);
|
||||
lastSearchedValuesRef.current = null;
|
||||
};
|
||||
|
||||
const loadGridData = async (values: SearchFormValues): Promise<boolean> => {
|
||||
const param: MediationPumpMaintainTotalRequest = {
|
||||
ctpvNm: values.sido === "ALL" ? "" : values.sido,
|
||||
sggNm: values.gugun === "ALL" ? "" : values.gugun,
|
||||
sewerBzmnCd: values.bsnmCd,
|
||||
statsYr: values.year,
|
||||
rowDataYn: values.isDetail,
|
||||
summaryYn: values.isSummary !== 'ALL',
|
||||
summaryYearCnt: values.isSummary !== 'ALL' ? Number(values.isSummary) : undefined
|
||||
};
|
||||
|
||||
try {
|
||||
const response = await statisticsTotalStatusApi.getMediationPumpStationStatusTotalList(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
// object[]로 변환하여 주입함으로써 null 에러 전면 방지
|
||||
setRowData(toGridRows(response.data as object[]));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
} catch {
|
||||
alert("서버 연결 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const ok = await loadGridData(values);
|
||||
if (ok) {
|
||||
lastSearchedValuesRef.current = values;
|
||||
} else {
|
||||
lastSearchedValuesRef.current = null;
|
||||
}
|
||||
} catch {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
lastSearchedValuesRef.current = null;
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const gridColumnInfo: ColumnInfo = {
|
||||
columns: config.columns,
|
||||
columnLayout: config.columnLayout,
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<SearchForm isDetail={true} isSummary={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
|
||||
{isLoading && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<CellColorInfo />
|
||||
|
||||
<div className="flex flex-col gap-[0.6rem] mx-[0.6rem] mt-[0.6rem]">
|
||||
<DataGrid
|
||||
columnInfo={gridColumnInfo}
|
||||
rowStartNum={config.rowStartNum}
|
||||
excelExportFileSuffix={config.tabLabel}
|
||||
rowData={rowData}
|
||||
setRowData={setRowData}
|
||||
isExcelImport={false}
|
||||
isExcelExport={true}
|
||||
showHeaderCheckbox={false}
|
||||
fixedColumns={config.fixedColumns}
|
||||
enableSort={false}
|
||||
cellStyleCallback={({ row }) => {
|
||||
const rowType = String(row.rowType ?? '');
|
||||
if (rowType === 'DETAIL') return undefined;
|
||||
if (rowType === 'BIZ_SUM') return 'rg-cell-rowtype-biz-sum';
|
||||
if (rowType === 'SUMMARY') return 'rg-cell-rowtype-summary';
|
||||
return 'rg-cell-rowtype-other';
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<>
|
||||
<SearchForm />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,162 +1,10 @@
|
||||
import { useRef, useState } from "react";
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { LoadingWithAnimation, Tabs, TabsContent, TabsList, TabsTrigger } from "@common/components";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import type { ColumnInfo } from "@/components/type/DataGrid.type";
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
import CellColorInfo from "./CellColorInfo";
|
||||
|
||||
// 12. 하수 및 분뇨 관리 산업 탭 설정 (경로 확인 필수)
|
||||
import { PublicSewageStaffTab1ColumnConfig } from "@/components/util/column/total/sewageExcretaIndustry/PublicSewageStaffTab1Column";
|
||||
import { PublicHumanWasteStaffTab2ColumnConfig } from "@/components/util/column/total/sewageExcretaIndustry/PublicHumanWasteStaffTab2Column";
|
||||
import { HumanWasteCollectionTab3ColumnConfig } from "@/components/util/column/total/sewageExcretaIndustry/HumanWasteCollectionTab3Column";
|
||||
import { IndividualSewageTab4ColumnConfig } from "@/components/util/column/total/sewageExcretaIndustry/IndividualSewageTab4Column";
|
||||
import { statisticsTotalStatusApi } from "@/entities/statistics/api/statistics-total-service";
|
||||
import type {
|
||||
SewerageIndustry,
|
||||
PublicSewageStaffTab1Response,
|
||||
PublicHumanWasteStaffTab2Response,
|
||||
HumanWasteCollectionTab3Response,
|
||||
IndividualSewageTab4Response
|
||||
} from "@/entities/statistics/model/statistics-total/statistics-sewerage-industry-interface";
|
||||
|
||||
const SewageExcretaIndustryColumnListTot = [PublicSewageStaffTab1ColumnConfig,PublicHumanWasteStaffTab2ColumnConfig,HumanWasteCollectionTab3ColumnConfig,IndividualSewageTab4ColumnConfig].filter(Boolean);
|
||||
const firstTabKey = SewageExcretaIndustryColumnListTot[0]?.tabKey ?? "ST00120001";
|
||||
|
||||
const SewageExcretaRelatedTot = () => {
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [activeTab, setActiveTab] = useState(firstTabKey);
|
||||
const lastSearchedValuesRef = useRef<SearchFormValues | null>(null);
|
||||
|
||||
const handleReset = () => {
|
||||
setRowDataMap(new Map());
|
||||
setActiveTab(firstTabKey);
|
||||
lastSearchedValuesRef.current = null;
|
||||
};
|
||||
|
||||
const loadGridData = async (tabKey: string, values: SearchFormValues): Promise<boolean> => {
|
||||
setIsLoading(true);
|
||||
const param: SewerageIndustry = {
|
||||
ctpvNm: values.sido === "ALL" ? "" : values.sido,
|
||||
sggNm: values.gugun === "ALL" ? "" : values.gugun,
|
||||
sewerBzmnCd: values.bsnmCd,
|
||||
statsYr: values.year,
|
||||
rowDataYn: values.isDetail,
|
||||
summaryYn: values.isSummary !== 'ALL',
|
||||
summaryYearCnt: values.isSummary !== 'ALL' ? Number(values.isSummary) : undefined
|
||||
};
|
||||
|
||||
try {
|
||||
if (tabKey === "ST00120001") {
|
||||
const response: PublicSewageStaffTab1Response = await statisticsTotalStatusApi.getPublicSewageStaffTab1List(param);
|
||||
if (response?.status === "success") {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (tabKey === "ST00120002") {
|
||||
const response: PublicHumanWasteStaffTab2Response = await statisticsTotalStatusApi.getPublicHumanWasteStaffTab2List(param);
|
||||
if (response?.status === "success") {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (tabKey === "ST00120003") {
|
||||
const response: HumanWasteCollectionTab3Response = await statisticsTotalStatusApi.getHumanWasteCollectionTab3List(param);
|
||||
if (response?.status === "success") {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// [TAB4] 개인하수처리관련업
|
||||
else if (tabKey === "ST00120004") {
|
||||
const response: IndividualSewageTab4Response = await statisticsTotalStatusApi.getIndividualSewageTab4List(param);
|
||||
if (response?.status === "success") {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} catch {
|
||||
alert("서버 연결 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
lastSearchedValuesRef.current = values;
|
||||
await loadGridData(activeTab, values);
|
||||
};
|
||||
|
||||
const handleActiveTabChange = async (tabKey: string) => {
|
||||
setActiveTab(tabKey);
|
||||
const values = lastSearchedValuesRef.current;
|
||||
if (!values || rowDataMap.has(tabKey)) return;
|
||||
await loadGridData(tabKey, values);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<SearchForm isDetail={true} isSummary={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
|
||||
{isLoading && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<CellColorInfo />
|
||||
|
||||
<div className="flex flex-col gap-[0.6rem] mx-[0.6rem]">
|
||||
<Tabs value={activeTab} onValueChange={(v) => void handleActiveTabChange(v)} className="w-full" variant="default">
|
||||
<TabsList>
|
||||
{SewageExcretaIndustryColumnListTot.map((info) => (
|
||||
<TabsTrigger key={info.tabKey} value={info.tabKey}>{info.tabLabel}</TabsTrigger>
|
||||
))}
|
||||
</TabsList>
|
||||
|
||||
{SewageExcretaIndustryColumnListTot.map((info) => (
|
||||
<TabsContent key={info.tabKey} value={info.tabKey}>
|
||||
<DataGrid
|
||||
columnInfo={{ columns: info.columns, columnLayout: info.columnLayout }}
|
||||
rowStartNum={info.rowStartNum}
|
||||
rowData={rowDataMap.get(info.tabKey) ?? []}
|
||||
excelExportFileSuffix={info.tabLabel}
|
||||
setRowData={(updater) => {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
const cur = next.get(info.tabKey) ?? [];
|
||||
const n = typeof updater === "function" ? updater(cur) : updater;
|
||||
next.set(info.tabKey, n);
|
||||
return next;
|
||||
});
|
||||
}}
|
||||
isExcelImport={false}
|
||||
isExcelExport={true}
|
||||
showHeaderCheckbox={false}
|
||||
fixedColumns={info.fixedColumns}
|
||||
enableSort={false}
|
||||
cellStyleCallback={({ row }) => {
|
||||
const rowType = String(row.rowType ?? '');
|
||||
if (rowType === 'DETAIL') return undefined;
|
||||
if (rowType === 'BIZ_SUM') return 'rg-cell-rowtype-biz-sum';
|
||||
if (rowType === 'SUMMARY') return 'rg-cell-rowtype-summary';
|
||||
return 'rg-cell-rowtype-other';
|
||||
}}
|
||||
/>
|
||||
</TabsContent>
|
||||
))}
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
<>
|
||||
<SearchForm />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,210 +1,10 @@
|
||||
import { useRef, useState } from "react";
|
||||
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { LoadingWithAnimation, Tabs, TabsContent, TabsList, TabsTrigger } from "@common/components";
|
||||
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
|
||||
// 4개 탭 컬럼 설정 임포트
|
||||
import { SludgeProcessingTab1ColumnConfig } from "@/components/util/column/total/sludgeProcessing/SludgeProcessingTab1Column";
|
||||
import { DigestionTankTab2ColumnConfig } from "@/components/util/column/total/sludgeProcessing/DigestionTankTab2Column";
|
||||
import { SewageSludgeOperTab3ColumnConfig } from "@/components/util/column/total/sludgeProcessing/SewageSludgeOperTab3Column";
|
||||
import { HumanWasteSludgeTab4ColumnConfig } from "@/components/util/column/total/sludgeProcessing/HumanWasteSludgeTab4Column";
|
||||
|
||||
// API 인스턴스 및 인터페이스 임포트 (타입 안전성 확보)
|
||||
import { statisticsTotalStatusApi } from "@/entities/statistics/api/statistics-total-service";
|
||||
import type {
|
||||
SludgeSummaryRequest,
|
||||
SludgeProcessingTab1Response,
|
||||
DigestionTankOperTab2Response,
|
||||
SewageSludgeOperTab3Response,
|
||||
HumanWasteSludgeTab4Response
|
||||
} from "@/entities/statistics/model/statistics-total/statistics-sludge-total-interface";
|
||||
import CellColorInfo from "./CellColorInfo";
|
||||
|
||||
// 탭 순회 설정
|
||||
const SludgeColumnListTot = [
|
||||
SludgeProcessingTab1ColumnConfig,
|
||||
DigestionTankTab2ColumnConfig,
|
||||
SewageSludgeOperTab3ColumnConfig,
|
||||
HumanWasteSludgeTab4ColumnConfig
|
||||
].filter(Boolean);
|
||||
|
||||
const firstTabKey = SludgeColumnListTot[0]?.tabKey ?? "ST00110001";
|
||||
|
||||
const SewageExcretaSlurgeTot = () => {
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [activeTab, setActiveTab] = useState(firstTabKey);
|
||||
const lastSearchedValuesRef = useRef<SearchFormValues | null>(null);
|
||||
|
||||
const columnInfo = SludgeColumnListTot;
|
||||
|
||||
const handleReset = () => {
|
||||
setRowDataMap(new Map());
|
||||
setActiveTab(firstTabKey);
|
||||
lastSearchedValuesRef.current = null;
|
||||
};
|
||||
|
||||
const loadGridData = async (tabKey: string, values: SearchFormValues): Promise<boolean> => {
|
||||
setIsLoading(true);
|
||||
const param: SludgeSummaryRequest = {
|
||||
ctpvNm: values.sido === "ALL" ? "" : values.sido,
|
||||
sggNm: values.gugun === "ALL" ? "" : values.gugun,
|
||||
sewerBzmnCd: values.bsnmCd,
|
||||
statsYr: values.year,
|
||||
rowDataYn: values.isDetail,
|
||||
summaryYn: values.isSummary !== 'ALL',
|
||||
summaryYearCnt: values.isSummary !== 'ALL' ? Number(values.isSummary) : undefined
|
||||
};
|
||||
|
||||
try {
|
||||
// [TAB1] 하수및분뇨찌꺼기 > 찌꺼기처리시설현황
|
||||
if (tabKey === "ST00110001") {
|
||||
const response: SludgeProcessingTab1Response = await statisticsTotalStatusApi.getSludgeProcessingTab1List(param);
|
||||
if (response?.status === "success") {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// [TAB2] 소화조 운영현황
|
||||
else if (tabKey === "ST00110002") {
|
||||
const response: DigestionTankOperTab2Response = await statisticsTotalStatusApi.getSludgeTab2List(param);
|
||||
if (response?.status === "success") {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// [TAB3] 하수찌꺼기 처리시설 운영현황
|
||||
else if (tabKey === "ST00110003") {
|
||||
const response: SewageSludgeOperTab3Response = await statisticsTotalStatusApi.getSludgeTab3List(param);
|
||||
if (response?.status === "success") {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// [TAB4] 분뇨찌꺼기 처리현황
|
||||
else if (tabKey === "ST00110004") {
|
||||
const response: HumanWasteSludgeTab4Response = await statisticsTotalStatusApi.getSludgeTab4List(param);
|
||||
if (response?.status === "success") {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
} catch {
|
||||
alert("서버 연결 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
/** 검색 버튼 이벤트: SearchForm의 Values 타입을 기반으로 호출 */
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
// 탭 변경 없이 현재 탭(activeTab)에 대해서만 명시적 타입 호출
|
||||
const ok = await loadGridData(activeTab, values);
|
||||
if (ok) {
|
||||
lastSearchedValuesRef.current = values;
|
||||
} else {
|
||||
lastSearchedValuesRef.current = null;
|
||||
}
|
||||
} catch (error) {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
lastSearchedValuesRef.current = null;
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
/** 탭 변경 이벤트: 현재 탭 상태와 SearchForm의 마지막 값을 동기화 */
|
||||
const handleActiveTabChange = async (tabKey: string) => {
|
||||
setActiveTab(tabKey);
|
||||
|
||||
// 마지막 검색 값이 있으면 해당 탭만 새로 로드
|
||||
const values = lastSearchedValuesRef.current;
|
||||
if (!values || rowDataMap.has(tabKey)) return;
|
||||
|
||||
try {
|
||||
setIsLoading(true);
|
||||
await loadGridData(tabKey, values);
|
||||
} catch (error) {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<SearchForm isDetail={true} isSummary={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
|
||||
{isLoading && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<CellColorInfo />
|
||||
|
||||
<div className="flex flex-col gap-[0.6rem] mx-[0.6rem]">
|
||||
<Tabs value={activeTab} onValueChange={(v) => void handleActiveTabChange(v)} className="w-full" variant="default">
|
||||
<TabsList>
|
||||
{columnInfo.map((info) => (
|
||||
<TabsTrigger key={info.tabKey} value={info.tabKey}>{info.tabLabel}</TabsTrigger>
|
||||
))}
|
||||
</TabsList>
|
||||
|
||||
{columnInfo.map((info) => {
|
||||
const tabKey = info.tabKey;
|
||||
const rowData = rowDataMap.get(tabKey) ?? [];
|
||||
|
||||
return (
|
||||
<TabsContent key={tabKey} value={tabKey}>
|
||||
<DataGrid
|
||||
columnInfo={{ columns: info.columns, columnLayout: info.columnLayout }}
|
||||
rowStartNum={info.rowStartNum}
|
||||
rowData={rowData}
|
||||
excelExportFileSuffix={info.tabLabel}
|
||||
setRowData={(updater) => {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
const cur = next.get(tabKey) ?? [];
|
||||
const n = typeof updater === "function" ? updater(cur) : updater;
|
||||
next.set(tabKey, n);
|
||||
return next;
|
||||
});
|
||||
}}
|
||||
isExcelImport={false}
|
||||
isExcelExport={true}
|
||||
showHeaderCheckbox={false}
|
||||
fixedColumns={info.fixedColumns}
|
||||
enableSort={false}
|
||||
cellStyleCallback={({ row }) => {
|
||||
const rowType = String(row.rowType ?? '');
|
||||
if (rowType === 'DETAIL') return undefined;
|
||||
if (rowType === 'BIZ_SUM') return 'rg-cell-rowtype-biz-sum';
|
||||
if (rowType === 'SUMMARY') return 'rg-cell-rowtype-summary';
|
||||
return 'rg-cell-rowtype-other';
|
||||
}}
|
||||
/>
|
||||
</TabsContent>
|
||||
);
|
||||
})}
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
<>
|
||||
<SearchForm />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -15,17 +15,12 @@ import type { SewagePipeMaintainTotalRequest } from "@/entities/statistics/model
|
||||
const firstTabKey = SewagePipeMaintainColumnListTot[0]?.tabKey ?? "ST00030001";
|
||||
|
||||
function buildSewagePipeMaintainTotSearchParam(values: SearchFormValues): SewagePipeMaintainTotalRequest {
|
||||
const isSummaryEnabled = values.isSummary !== 'ALL';
|
||||
const summaryYearCnt = isSummaryEnabled ? Number(values.isSummary) : undefined;
|
||||
|
||||
return {
|
||||
ctpvNm: values.sido === "ALL" ? "" : values.sido,
|
||||
sggNm: values.gugun === "ALL" ? "" : values.gugun,
|
||||
sewerBzmnCd: values.bsnmCd,
|
||||
statsYr: values.year,
|
||||
rowDataYn: values.isDetail,
|
||||
summaryYn: isSummaryEnabled,
|
||||
...(isSummaryEnabled ? { summaryYearCnt } : {}),
|
||||
rowDataYn: values.isDetail,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -133,7 +128,7 @@ const SewagePipeMaintainTot = () => {
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<SearchForm isDetail={true} isSummary={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
<SearchForm isDetail={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
{isLoading && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
|
||||
@@ -1,190 +1,10 @@
|
||||
import { useRef, useState } from "react";
|
||||
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { LoadingWithAnimation, Tabs, TabsContent, TabsList, TabsTrigger } from "@common/components";
|
||||
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import type { ColumnInfo } from "@/components/type/DataGrid.type";
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
|
||||
// 분리된 개별 컬럼 구성 임포트 경로 유지
|
||||
import { ReservoirStatusColumnConfig } from "@/components/util/column/total/sewerReservoir/SewerReservoirStatusColumn";
|
||||
import { PumpStationStatusColumnConfig } from "@/components/util/column/total/sewerReservoir/SewerPumpStationStatusColumn";
|
||||
|
||||
// 수정 적용한 API 및 인터페이스 명세 호출 유지
|
||||
import { statisticsTotalStatusApi } from "@/entities/statistics/api/statistics-total-service";
|
||||
import type {
|
||||
SewerReservoirMaintainTotalRequest
|
||||
} from "@/entities/statistics/model/statistics-total/statistics-sewage-reservoir-total-interface";
|
||||
import CellColorInfo from "./CellColorInfo";
|
||||
|
||||
const SewerReservoirColumnListTot = [
|
||||
ReservoirStatusColumnConfig,
|
||||
PumpStationStatusColumnConfig
|
||||
];
|
||||
|
||||
const firstTabKey = SewerReservoirColumnListTot[0]?.tabKey ?? "ST00040001";
|
||||
|
||||
const SewageReservoirPumpTot = () => {
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
|
||||
// 상태 정의에서 null을 제외하여 DataGrid와 타입을 일치시킵니다.
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [activeTab, setActiveTab] = useState(firstTabKey);
|
||||
const lastSearchedValuesRef = useRef<SearchFormValues | null>(null);
|
||||
|
||||
const columnInfo = SewerReservoirColumnListTot;
|
||||
|
||||
const handleReset = () => {
|
||||
setRowDataMap(new Map());
|
||||
setActiveTab(firstTabKey);
|
||||
lastSearchedValuesRef.current = null;
|
||||
};
|
||||
|
||||
const loadGridData = async (tabKey: string, values: SearchFormValues): Promise<boolean> => {
|
||||
const param: SewerReservoirMaintainTotalRequest = {
|
||||
ctpvNm: values.sido === "ALL" ? "" : values.sido,
|
||||
sggNm: values.gugun === "ALL" ? "" : values.gugun,
|
||||
sewerBzmnCd: values.bsnmCd,
|
||||
statsYr: values.year,
|
||||
rowDataYn: values.isDetail,
|
||||
summaryYn: values.isSummary !== 'ALL',
|
||||
summaryYearCnt: values.isSummary !== 'ALL' ? Number(values.isSummary) : undefined
|
||||
};
|
||||
|
||||
try {
|
||||
if (tabKey === "ST00040001") {
|
||||
const response = await statisticsTotalStatusApi.getSewerReservoirStatusTotalList(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
|
||||
if (tabKey === "ST00040002") {
|
||||
const response = await statisticsTotalStatusApi.getSewerPumpStationStatusTotalList(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
return false;
|
||||
} catch {
|
||||
alert("서버 연결 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const ok = await loadGridData(activeTab, values);
|
||||
if (ok) {
|
||||
lastSearchedValuesRef.current = values;
|
||||
} else {
|
||||
lastSearchedValuesRef.current = null;
|
||||
}
|
||||
} catch {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
lastSearchedValuesRef.current = null;
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleActiveTabChange = async (tabKey: string) => {
|
||||
setActiveTab(tabKey);
|
||||
const values = lastSearchedValuesRef.current;
|
||||
if (!values) return;
|
||||
|
||||
const existing = rowDataMap.get(tabKey);
|
||||
if (existing && existing.length > 0) return;
|
||||
|
||||
try {
|
||||
setIsLoading(true);
|
||||
await loadGridData(tabKey, values);
|
||||
} catch {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<SearchForm isDetail={true} isSummary={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
|
||||
{isLoading && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<CellColorInfo />
|
||||
|
||||
<div className="flex flex-col gap-[0.6rem] mx-[0.6rem]">
|
||||
<Tabs value={activeTab} onValueChange={(v) => void handleActiveTabChange(v)} className="w-full" variant="default">
|
||||
<TabsList>
|
||||
{columnInfo.map((info) => (
|
||||
<TabsTrigger key={info.tabKey} value={info.tabKey}>
|
||||
{info.tabLabel}
|
||||
</TabsTrigger>
|
||||
))}
|
||||
</TabsList>
|
||||
|
||||
{columnInfo.map((info) => {
|
||||
const tabKey = info.tabKey;
|
||||
const rowData = rowDataMap.get(tabKey) ?? [];
|
||||
|
||||
const gridColumnInfo: ColumnInfo = {
|
||||
columns: info.columns,
|
||||
columnLayout: info.columnLayout,
|
||||
};
|
||||
|
||||
return (
|
||||
<TabsContent key={tabKey} value={tabKey}>
|
||||
<DataGrid
|
||||
columnInfo={gridColumnInfo}
|
||||
rowStartNum={info.rowStartNum}
|
||||
excelExportFileSuffix={info.tabLabel}
|
||||
rowData={rowData}
|
||||
setRowData={(updater) => {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
const cur = next.get(tabKey) ?? [];
|
||||
const n =
|
||||
typeof updater === "function" ? updater(cur) : updater;
|
||||
next.set(tabKey, n);
|
||||
return next;
|
||||
});
|
||||
}}
|
||||
isExcelImport={false}
|
||||
isExcelExport={true}
|
||||
showHeaderCheckbox={false}
|
||||
fixedColumns={info.fixedColumns}
|
||||
enableSort={false}
|
||||
cellStyleCallback={({ row }) => {
|
||||
const rowType = String(row.rowType ?? '');
|
||||
if (rowType === 'DETAIL') return undefined;
|
||||
if (rowType === 'BIZ_SUM') return 'rg-cell-rowtype-biz-sum';
|
||||
if (rowType === 'SUMMARY') return 'rg-cell-rowtype-summary';
|
||||
return 'rg-cell-rowtype-other';
|
||||
}}
|
||||
/>
|
||||
</TabsContent>
|
||||
);
|
||||
})}
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
<>
|
||||
<SearchForm />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,217 +1,10 @@
|
||||
import { useRef, useState } from "react";
|
||||
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { LoadingWithAnimation, Tabs, TabsContent, TabsList, TabsTrigger } from "@common/components";
|
||||
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import type { ColumnInfo } from "@/components/type/DataGrid.type";
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
|
||||
// 분리된 4개 개별 탭 컬럼 파일 바인딩
|
||||
import { SewerageFinancialTab1ColumnConfig } from "@/components/util/column/total/sewerageFinancial/SewerageFinancialTab1Column";
|
||||
import { SewerageFeeTab2ColumnConfig } from "@/components/util/column/total/sewerageFinancial/SewerageFeeTab2Column";
|
||||
import { SewerageUsageFeeTab3ColumnConfig } from "@/components/util/column/total/sewerageFinancial/SewerageUsageFeeTab3Column";
|
||||
import { SewerageOrgCauseTab4ColumnConfig } from "@/components/util/column/total/sewerageFinancial/SewerageOrgCauseTab4Column";
|
||||
|
||||
// API 인스턴스 및 인터페이스 호출
|
||||
import { statisticsTotalStatusApi } from "@/entities/statistics/api/statistics-total-service";
|
||||
import type {
|
||||
SewerageFinanceSummaryRequest
|
||||
} from "@/entities/statistics/model/statistics-total/statistics-sewerage-finance-total-interface";
|
||||
import CellColorInfo from "./CellColorInfo";
|
||||
|
||||
const SewerageFinanceColumnListTot = [
|
||||
SewerageFinancialTab1ColumnConfig,
|
||||
SewerageFeeTab2ColumnConfig,
|
||||
SewerageUsageFeeTab3ColumnConfig,
|
||||
SewerageOrgCauseTab4ColumnConfig
|
||||
];
|
||||
|
||||
const firstTabKey = SewerageFinanceColumnListTot[0]?.tabKey ?? "ST00040006_1";
|
||||
|
||||
const SewerageFinanceTot = () => {
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
|
||||
// 컴파일 에러가 발생하지 않도록 원천 가공 처리형 맵 적용
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [activeTab, setActiveTab] = useState(firstTabKey);
|
||||
const lastSearchedValuesRef = useRef<SearchFormValues | null>(null);
|
||||
|
||||
const columnInfo = SewerageFinanceColumnListTot;
|
||||
|
||||
const handleReset = () => {
|
||||
setRowDataMap(new Map());
|
||||
setActiveTab(firstTabKey);
|
||||
lastSearchedValuesRef.current = null;
|
||||
};
|
||||
|
||||
/** 개별 조건별 데이터 동적 라우팅 디스패치 */
|
||||
const loadGridData = async (tabKey: string, values: SearchFormValues): Promise<boolean> => {
|
||||
const param: SewerageFinanceSummaryRequest = {
|
||||
ctpvNm: values.sido === "ALL" ? "" : values.sido,
|
||||
sggNm: values.gugun === "ALL" ? "" : values.gugun,
|
||||
sewerBzmnCd: values.bsnmCd,
|
||||
statsYr: values.year,
|
||||
rowDataYn: values.isDetail,
|
||||
summaryYn: values.isSummary !== 'ALL',
|
||||
summaryYearCnt: values.isSummary !== 'ALL' ? Number(values.isSummary) : undefined
|
||||
};
|
||||
|
||||
try {
|
||||
// [Tab1] 하수도재정 결산
|
||||
if (tabKey === "ST00090001") {
|
||||
const response = await statisticsTotalStatusApi.getSewerageFinancialList(param); // 엔드포인트 바인딩
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
|
||||
// [Tab2] 하수도 요금
|
||||
if (tabKey === "ST00090002") {
|
||||
const response = await statisticsTotalStatusApi.getSewerageFeeList(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
|
||||
// [Tab3] 하수도 사용료
|
||||
if (tabKey === "ST00090003") {
|
||||
const response = await statisticsTotalStatusApi.getSewerageUsageList(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
|
||||
// [Tab4] 원인자 부담금
|
||||
if (tabKey === "ST00090004") {
|
||||
const response = await statisticsTotalStatusApi.getSewerageOrgCauseList(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
return false;
|
||||
} catch {
|
||||
alert("서버 연결 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const ok = await loadGridData(activeTab, values);
|
||||
if (ok) {
|
||||
lastSearchedValuesRef.current = values;
|
||||
} else {
|
||||
lastSearchedValuesRef.current = null;
|
||||
}
|
||||
} catch {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
lastSearchedValuesRef.current = null;
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleActiveTabChange = async (tabKey: string) => {
|
||||
setActiveTab(tabKey);
|
||||
const values = lastSearchedValuesRef.current;
|
||||
if (!values) return;
|
||||
|
||||
const existing = rowDataMap.get(tabKey);
|
||||
if (existing && existing.length > 0) return;
|
||||
|
||||
try {
|
||||
setIsLoading(true);
|
||||
await loadGridData(tabKey, values);
|
||||
} catch {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<SearchForm isDetail={true} isSummary={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
|
||||
{isLoading && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<CellColorInfo />
|
||||
|
||||
<div className="flex flex-col gap-[0.6rem] mx-[0.6rem]">
|
||||
<Tabs value={activeTab} onValueChange={(v) => void handleActiveTabChange(v)} className="w-full" variant="default">
|
||||
<TabsList>
|
||||
{columnInfo.map((info) => (
|
||||
<TabsTrigger key={info.tabKey} value={info.tabKey}>
|
||||
{info.tabLabel}
|
||||
</TabsTrigger>
|
||||
))}
|
||||
</TabsList>
|
||||
|
||||
{columnInfo.map((info) => {
|
||||
const tabKey = info.tabKey;
|
||||
|
||||
// 요청하신 타입 단언 제거 형태 유지
|
||||
const rowData = rowDataMap.get(tabKey) ?? [];
|
||||
|
||||
const gridColumnInfo: ColumnInfo = {
|
||||
columns: info.columns,
|
||||
columnLayout: info.columnLayout,
|
||||
};
|
||||
|
||||
return (
|
||||
<TabsContent key={tabKey} value={tabKey}>
|
||||
<DataGrid
|
||||
columnInfo={gridColumnInfo}
|
||||
rowStartNum={info.rowStartNum}
|
||||
excelExportFileSuffix={info.tabLabel}
|
||||
rowData={rowData}
|
||||
setRowData={(updater) => {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
const cur = next.get(tabKey) ?? [];
|
||||
const n = typeof updater === "function" ? updater(cur) : updater;
|
||||
next.set(tabKey, n);
|
||||
return next;
|
||||
});
|
||||
}}
|
||||
isExcelImport={false}
|
||||
isExcelExport={true}
|
||||
showHeaderCheckbox={false}
|
||||
fixedColumns={info.fixedColumns}
|
||||
enableSort={false}
|
||||
cellStyleCallback={({ row }) => {
|
||||
const rowType = String(row.rowType ?? '');
|
||||
if (rowType === 'DETAIL') return undefined;
|
||||
if (rowType === 'BIZ_SUM') return 'rg-cell-rowtype-biz-sum';
|
||||
if (rowType === 'SUMMARY') return 'rg-cell-rowtype-summary';
|
||||
return 'rg-cell-rowtype-other';
|
||||
}}
|
||||
/>
|
||||
</TabsContent>
|
||||
);
|
||||
})}
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
<>
|
||||
<SearchForm />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,99 +1,131 @@
|
||||
import { useRef, useState } from "react";
|
||||
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { LoadingWithAnimation, Tabs, TabsContent, TabsList, TabsTrigger } from "@common/components";
|
||||
import { statisticsTotalStatusApi } from "@/entities/statistics/api/statistics-total-service";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import { LoadingWithAnimation, Tabs, TabsContent, TabsList, TabsTrigger } from "@common/components";
|
||||
|
||||
import type { ColumnInfo } from "@/components/type/DataGrid.type";
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
import CellColorInfo from "./CellColorInfo";
|
||||
import { ComplaintInpColumn } from "@/components/util/column/total/sewerageServiceLevel/ComplaintTotColumn";
|
||||
import { ResidentFriendlyFactTotColumn } from "@/components/util/column/total/sewerageServiceLevel/ResidentFriendlyFactTotColumn";
|
||||
|
||||
// 13. 하수도서비스수준 컬럼 설정
|
||||
import { SewageComplaintTab1ColumnConfig } from "@/components/util/column/total/sewerageServiceLevel/ComplaintTotColumn";
|
||||
import { ResidentFriendlyFacilityTab2ColumnConfig } from "@/components/util/column/total/sewerageServiceLevel/ResidentFriendlyFactTotColumn";
|
||||
|
||||
import { statisticsTotalStatusApi } from "@/entities/statistics/api/statistics-total-service";
|
||||
import type {
|
||||
SewerageServiceLevelRequest,
|
||||
SewerageServiceLevelComplaintResponse,
|
||||
SewerageServiceLevelResidentFriendlyFactResponse
|
||||
} from "@/entities/statistics/model/statistics-total/statistics-service-level-total-interface";
|
||||
|
||||
const SewageServiceLevelColumnListTot = [
|
||||
SewageComplaintTab1ColumnConfig,
|
||||
ResidentFriendlyFacilityTab2ColumnConfig
|
||||
].filter(Boolean);
|
||||
|
||||
const firstTabKey = SewageServiceLevelColumnListTot[0]?.tabKey ?? "ST00130001";
|
||||
const SewerageServiceLevelInpTabList = [
|
||||
ComplaintInpColumn,
|
||||
ResidentFriendlyFactTotColumn,
|
||||
];
|
||||
const SUPPORTED_TAB_KEYS = [ComplaintInpColumn.tabKey, ResidentFriendlyFactTotColumn.tabKey] as const;
|
||||
|
||||
const SewerageServiceLevelTot = () => {
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [activeTab, setActiveTab] = useState(firstTabKey);
|
||||
const lastSearchedValuesRef = useRef<SearchFormValues | null>(null);
|
||||
const [isLoading, setIsLoading] = useState<boolean>(false);
|
||||
const [activeTab, setActiveTab] = useState(ComplaintInpColumn.tabKey);
|
||||
const lastSearchValuesRef = useRef<SearchFormValues | null>(null);
|
||||
|
||||
const columnInfo = SewerageServiceLevelInpTabList;
|
||||
|
||||
const handleReset = () => {
|
||||
setRowDataMap(new Map());
|
||||
setActiveTab(firstTabKey);
|
||||
lastSearchedValuesRef.current = null;
|
||||
setActiveTab(ComplaintInpColumn.tabKey);
|
||||
lastSearchValuesRef.current = null;
|
||||
};
|
||||
|
||||
const loadGridData = async (tabKey: string, values: SearchFormValues): Promise<boolean> => {
|
||||
setIsLoading(true);
|
||||
const param: SewerageServiceLevelRequest = {
|
||||
const loadSewerageServiceLevelTotTabData = async (
|
||||
tabKey: string,
|
||||
values: SearchFormValues,
|
||||
mergeIntoExistingMap: boolean,
|
||||
) => {
|
||||
const param = {
|
||||
ctpvNm: values.sido === "ALL" ? "" : values.sido,
|
||||
sggNm: values.gugun === "ALL" ? "" : values.gugun,
|
||||
sewerBzmnCd: values.bsnmCd,
|
||||
statsYr: values.year,
|
||||
rowDataYn: values.isDetail,
|
||||
summaryYn: values.isSummary !== 'ALL',
|
||||
summaryYearCnt: values.isSummary !== 'ALL' ? Number(values.isSummary) : undefined
|
||||
};
|
||||
|
||||
try {
|
||||
// [TAB1] 민원
|
||||
if (tabKey === "ST00130001") {
|
||||
const response: SewerageServiceLevelComplaintResponse = await statisticsTotalStatusApi.getSewerageServiceLevelComplaint(param);
|
||||
if (response?.status === "success") {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// [TAB2] 주민친화시설
|
||||
else if (tabKey === "ST00130002") {
|
||||
const response: SewerageServiceLevelResidentFriendlyFactResponse = await statisticsTotalStatusApi.getSewerageServiceLevelResidentFriendlyFact(param);
|
||||
if (response?.status === "success") {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
const fetcherMap = {
|
||||
[ComplaintInpColumn.tabKey]: statisticsTotalStatusApi.getSewerageServiceLevelComplaint.bind(
|
||||
statisticsTotalStatusApi,
|
||||
),
|
||||
[ResidentFriendlyFactTotColumn.tabKey]:
|
||||
statisticsTotalStatusApi.getSewerageServiceLevelResidentFriendlyFact.bind(
|
||||
statisticsTotalStatusApi,
|
||||
),
|
||||
};
|
||||
const fetcher = fetcherMap[tabKey];
|
||||
if (!fetcher) {
|
||||
return false;
|
||||
}
|
||||
const response = await fetcher(param);
|
||||
|
||||
if (response.status === "success" && response.data) {
|
||||
const rows = toGridRows(response.data as object[]);
|
||||
if (mergeIntoExistingMap) {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
next.set(tabKey, rows);
|
||||
return next;
|
||||
});
|
||||
} else {
|
||||
const next = new Map<string, Record<string, string | number>[]>();
|
||||
next.set(tabKey, rows);
|
||||
setRowDataMap(next);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
alert(response.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
};
|
||||
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
let ok = false;
|
||||
if (SUPPORTED_TAB_KEYS.includes(activeTab)) {
|
||||
ok = await loadSewerageServiceLevelTotTabData(activeTab, values, true);
|
||||
}
|
||||
if (ok) {
|
||||
lastSearchValuesRef.current = values;
|
||||
} else {
|
||||
lastSearchValuesRef.current = null;
|
||||
}
|
||||
return false;
|
||||
} catch {
|
||||
alert("서버 연결 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
lastSearchValuesRef.current = null;
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
lastSearchedValuesRef.current = values;
|
||||
await loadGridData(activeTab, values);
|
||||
};
|
||||
|
||||
const handleActiveTabChange = async (tabKey: string) => {
|
||||
setActiveTab(tabKey);
|
||||
const values = lastSearchedValuesRef.current;
|
||||
if (!values || rowDataMap.has(tabKey)) return;
|
||||
await loadGridData(tabKey, values);
|
||||
|
||||
const values = lastSearchValuesRef.current;
|
||||
if (!values) return;
|
||||
|
||||
const existing = rowDataMap.get(tabKey);
|
||||
const hasData = Array.isArray(existing) && existing.length > 0;
|
||||
if (hasData) return;
|
||||
|
||||
if (SUPPORTED_TAB_KEYS.includes(tabKey)) {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
await loadSewerageServiceLevelTotTabData(tabKey, values, true);
|
||||
} catch {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<SearchForm isDetail={true} isSummary={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
|
||||
<SearchForm isDetail={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
{isLoading && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
@@ -101,48 +133,58 @@ const SewerageServiceLevelTot = () => {
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<CellColorInfo />
|
||||
|
||||
<div className="flex flex-col gap-[0.6rem] mx-[0.6rem]">
|
||||
<Tabs value={activeTab} onValueChange={(v) => void handleActiveTabChange(v)} className="w-full" variant="default">
|
||||
<TabsList>
|
||||
{SewageServiceLevelColumnListTot.map((info) => (
|
||||
<TabsTrigger key={info.tabKey} value={info.tabKey}>{info.tabLabel}</TabsTrigger>
|
||||
{columnInfo.map((info) => (
|
||||
<TabsTrigger key={info.tabKey} value={info.tabKey}>
|
||||
{info.tabLabel || info.tabKey}
|
||||
</TabsTrigger>
|
||||
))}
|
||||
</TabsList>
|
||||
|
||||
{SewageServiceLevelColumnListTot.map((info) => (
|
||||
<TabsContent key={info.tabKey} value={info.tabKey}>
|
||||
<DataGrid
|
||||
columnInfo={{ columns: info.columns, columnLayout: info.columnLayout }}
|
||||
rowStartNum={info.rowStartNum}
|
||||
rowData={rowDataMap.get(info.tabKey) ?? []}
|
||||
excelExportFileSuffix={info.tabLabel}
|
||||
setRowData={(updater) => {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
const cur = next.get(info.tabKey) ?? [];
|
||||
const n = typeof updater === "function" ? updater(cur) : updater;
|
||||
next.set(info.tabKey, n);
|
||||
return next;
|
||||
});
|
||||
}}
|
||||
isExcelImport={false}
|
||||
isExcelExport={true}
|
||||
showHeaderCheckbox={false}
|
||||
fixedColumns={info.fixedColumns}
|
||||
enableSort={false}
|
||||
cellStyleCallback={({ row }) => {
|
||||
const rowType = String(row.rowType ?? '');
|
||||
if (rowType === 'DETAIL') return undefined;
|
||||
if (rowType === 'BIZ_SUM') return 'rg-cell-rowtype-biz-sum';
|
||||
if (rowType === 'SUMMARY') return 'rg-cell-rowtype-summary';
|
||||
return 'rg-cell-rowtype-other';
|
||||
}}
|
||||
/>
|
||||
</TabsContent>
|
||||
))}
|
||||
{columnInfo.map((info) => {
|
||||
const tabKey = info.tabKey;
|
||||
if (!info.columns || !info.columnLayout) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const rowData = rowDataMap.get(tabKey) ?? [];
|
||||
const gridColumnInfo: ColumnInfo = {
|
||||
columns: info.columns,
|
||||
columnLayout: info.columnLayout,
|
||||
};
|
||||
|
||||
return (
|
||||
<TabsContent key={tabKey} value={tabKey}>
|
||||
<DataGrid
|
||||
columnInfo={gridColumnInfo}
|
||||
rowStartNum={info.rowStartNum}
|
||||
excelExportFileSuffix={info.tabLabel || tabKey}
|
||||
rowData={rowData}
|
||||
setRowData={(updater) => {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
const cur = next.get(tabKey) ?? [];
|
||||
const n = typeof updater === "function" ? updater(cur) : updater;
|
||||
next.set(tabKey, n);
|
||||
return next;
|
||||
});
|
||||
}}
|
||||
isExcelImport={false}
|
||||
isExcelExport
|
||||
showHeaderCheckbox={false}
|
||||
fixedColumns={info.fixedColumns}
|
||||
enableSort={false}
|
||||
cellStyleCallback={({ row }) => {
|
||||
const rowType = String(row.rowType ?? "");
|
||||
if (rowType === "DETAIL") return undefined;
|
||||
if (rowType === "BIZ_SUM") return "rg-cell-rowtype-biz-sum";
|
||||
return "rg-cell-rowtype-other";
|
||||
}}
|
||||
/>
|
||||
</TabsContent>
|
||||
);
|
||||
})}
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,229 +1,10 @@
|
||||
import { useRef, useState } from "react";
|
||||
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { LoadingWithAnimation, Tabs, TabsContent, TabsList, TabsTrigger } from "@common/components";
|
||||
|
||||
import SearchForm from "../../module/SearchForm";
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import type { ColumnInfo } from "@/components/type/DataGrid.type";
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
|
||||
// [폴더 정밀 정비 완료] 프로젝트 트리 구조 5개 컬럼 스펙 패키지 호출
|
||||
import { SewerageReuseTab1ColumnConfig } from "@/components/util/column/total/sewerageReuse/SewerageReuseTab1Column";
|
||||
import { SewerageGrayWaterTab2ColumnConfig } from "@/components/util/column/total/sewerageReuse/SewerageGrayWaterTab2Column";
|
||||
import { SewerageRainwaterTab3ColumnConfig } from "@/components/util/column/total/sewerageReuse/SewerageRainwaterTab3Column";
|
||||
import { SewerageWwtRtlztnRegTab4ColumnConfig } from "@/components/util/column/total/sewerageReuse/SewerageWwtRtlztnRegTab4Column";
|
||||
import { SewerageWwtRtlztnSncnTab5ColumnConfig } from "@/components/util/column/total/sewerageReuse/SewerageWwtRtlztnSncnTab5Column";
|
||||
|
||||
// 집계표(TOTAL) API 서비스 및 인터페이스 명세 임포트
|
||||
import { statisticsTotalStatusApi } from "@/entities/statistics/api/statistics-total-service";
|
||||
import type {
|
||||
WaterReuseSummaryRequest
|
||||
} from "@/entities/statistics/model/statistics-total/statistics-sewerage-reuse-total-interface";
|
||||
import CellColorInfo from "./CellColorInfo";
|
||||
|
||||
// 5개 멀티 탭 매핑을 위한 설정 취합 배열
|
||||
const WaterReuseColumnListTot = [
|
||||
SewerageReuseTab1ColumnConfig,
|
||||
SewerageGrayWaterTab2ColumnConfig,
|
||||
SewerageRainwaterTab3ColumnConfig,
|
||||
SewerageWwtRtlztnRegTab4ColumnConfig,
|
||||
SewerageWwtRtlztnSncnTab5ColumnConfig // 👈 5번째 탭 풀장착 완료
|
||||
];
|
||||
|
||||
const firstTabKey = WaterReuseColumnListTot[0]?.tabKey ?? "ST00040007_1";
|
||||
|
||||
const WaterReuseTot = () => {
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
|
||||
// Map 데이터 구조를 사용하여 완벽하게 안전한 멀티 탭 데이터 상태 유지
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [activeTab, setActiveTab] = useState(firstTabKey);
|
||||
const lastSearchedValuesRef = useRef<SearchFormValues | null>(null);
|
||||
|
||||
const columnInfo = WaterReuseColumnListTot;
|
||||
|
||||
const handleReset = () => {
|
||||
setRowDataMap(new Map());
|
||||
setActiveTab(firstTabKey);
|
||||
lastSearchedValuesRef.current = null;
|
||||
};
|
||||
|
||||
const loadGridData = async (tabKey: string, values: SearchFormValues): Promise<boolean> => {
|
||||
const param: WaterReuseSummaryRequest = {
|
||||
ctpvNm: values.sido === "ALL" ? "" : values.sido,
|
||||
sggNm: values.gugun === "ALL" ? "" : values.gugun,
|
||||
sewerBzmnCd: values.bsnmCd,
|
||||
statsYr: values.year,
|
||||
rowDataYn: values.isDetail,
|
||||
summaryYn: values.isSummary !== 'ALL',
|
||||
summaryYearCnt: values.isSummary !== 'ALL' ? Number(values.isSummary) : undefined
|
||||
};
|
||||
|
||||
try {
|
||||
// [TAB1] 공공하수처리수 재이용 현황 조회
|
||||
if (tabKey === "ST00100001") {
|
||||
const response = await statisticsTotalStatusApi.getSewerageReuseTab1List(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
|
||||
// [TAB2] 중수도 현황 조회
|
||||
if (tabKey === "ST00100002") {
|
||||
const response = await statisticsTotalStatusApi.getGrayWaterStatusTab2List(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
|
||||
// [TAB3] 빗물이용시설현황 조회
|
||||
if (tabKey === "ST00100003") {
|
||||
const response = await statisticsTotalStatusApi.getRainwaterStatusTab3List(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
|
||||
// [TAB4] 하·폐수처리수 재이용시설 시공업 등록현황 조회
|
||||
if (tabKey === "ST00100004") {
|
||||
const response = await statisticsTotalStatusApi.getWwtRtlztnRegStatusTab4List(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
|
||||
// [TAB5] 하·폐수처리수 재이용시설 시공업 인가현황 조회
|
||||
if (tabKey === "ST00100005") {
|
||||
const response = await statisticsTotalStatusApi.getWwtRtlztnSncnStatusTab5List(param);
|
||||
if (response && response.status === "success" && response.data) {
|
||||
setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[])));
|
||||
return true;
|
||||
}
|
||||
alert(response?.message || "데이터 조회 중 오류가 발생했습니다.");
|
||||
}
|
||||
return false;
|
||||
} catch {
|
||||
alert("서버 연결 중 오류가 발생했습니다.");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const ok = await loadGridData(activeTab, values);
|
||||
if (ok) {
|
||||
lastSearchedValuesRef.current = values;
|
||||
} else {
|
||||
lastSearchedValuesRef.current = null;
|
||||
}
|
||||
} catch {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
lastSearchedValuesRef.current = null;
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleActiveTabChange = async (tabKey: string) => {
|
||||
setActiveTab(tabKey);
|
||||
const values = lastSearchedValuesRef.current;
|
||||
if (!values) return;
|
||||
|
||||
// 중복 API 통신 방지 필터 캐싱 디스패치
|
||||
const existing = rowDataMap.get(tabKey);
|
||||
if (existing && existing.length > 0) return;
|
||||
|
||||
try {
|
||||
setIsLoading(true);
|
||||
await loadGridData(tabKey, values);
|
||||
} catch {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<SearchForm isDetail={true} isSummary={true} onSubmit={handleSearch} onReset={handleReset} sidoSelectText="전체" />
|
||||
|
||||
{/* 정중앙 5rem 크기 고정 격리형 로딩 애니메이션 */}
|
||||
{isLoading && (
|
||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<CellColorInfo />
|
||||
|
||||
<div className="flex flex-col gap-[0.6rem] mx-[0.6rem]">
|
||||
<Tabs value={activeTab} onValueChange={(v) => void handleActiveTabChange(v)} className="w-full" variant="default">
|
||||
<TabsList>
|
||||
{columnInfo.map((info) => (
|
||||
<TabsTrigger key={info.tabKey} value={info.tabKey}>
|
||||
{info.tabLabel}
|
||||
</TabsTrigger>
|
||||
))}
|
||||
</TabsList>
|
||||
|
||||
{columnInfo.map((info) => {
|
||||
const tabKey = info.tabKey;
|
||||
const rowData = rowDataMap.get(tabKey) ?? [];
|
||||
|
||||
const gridColumnInfo: ColumnInfo = {
|
||||
columns: info.columns,
|
||||
columnLayout: info.columnLayout,
|
||||
};
|
||||
|
||||
return (
|
||||
<TabsContent key={tabKey} value={tabKey}>
|
||||
<DataGrid
|
||||
columnInfo={gridColumnInfo}
|
||||
rowStartNum={info.rowStartNum}
|
||||
excelExportFileSuffix={info.tabLabel}
|
||||
rowData={rowData}
|
||||
setRowData={(updater) => {
|
||||
setRowDataMap((prev) => {
|
||||
const next = new Map(prev);
|
||||
const cur = next.get(tabKey) ?? [];
|
||||
const n = typeof updater === "function" ? updater(cur) : updater;
|
||||
next.set(tabKey, n);
|
||||
return next;
|
||||
});
|
||||
}}
|
||||
isExcelImport={false}
|
||||
isExcelExport={true}
|
||||
showHeaderCheckbox={false}
|
||||
fixedColumns={info.fixedColumns}
|
||||
enableSort={false}
|
||||
cellStyleCallback={({ row }) => {
|
||||
const rowType = String(row.rowType ?? '');
|
||||
if (rowType === 'DETAIL') return undefined;
|
||||
if (rowType === 'BIZ_SUM') return 'rg-cell-rowtype-biz-sum';
|
||||
if (rowType === 'SUMMARY') return 'rg-cell-rowtype-summary';
|
||||
return 'rg-cell-rowtype-other';
|
||||
}}
|
||||
/>
|
||||
</TabsContent>
|
||||
);
|
||||
})}
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
<>
|
||||
<SearchForm />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -116,22 +116,12 @@ export type DataFieldValueCallback = (
|
||||
|
||||
/** 계산 필드 설정 (computedFieldCallbacks.ts 참고) */
|
||||
export type ComputedFieldConfig =
|
||||
| { fields: string[]; type: "sum" | "avg" | "max" | "difference" | "quotient" }
|
||||
| { fields: string[]; type: "sum" | "avg" | "max" | "difference" }
|
||||
| {
|
||||
minuendFields: string[];
|
||||
subtrahendFields: string[];
|
||||
type: "differenceOfSums";
|
||||
}
|
||||
| {
|
||||
firstSumFields: string[];
|
||||
secondSumFields: string[];
|
||||
type: "halfSumOfSums";
|
||||
}
|
||||
| {
|
||||
firstHalfSum: { firstSumFields: string[]; secondSumFields: string[] };
|
||||
secondHalfSum: { firstSumFields: string[]; secondSumFields: string[] };
|
||||
type: "sumOfTwoHalfSumOfSums";
|
||||
}
|
||||
| {
|
||||
baseField: string;
|
||||
sumFields: string[];
|
||||
@@ -159,25 +149,6 @@ export type ComputedFieldConfig =
|
||||
denominatorFields: string[];
|
||||
thirdFields: string[];
|
||||
type: "swrgInstlrtRate";
|
||||
}
|
||||
| {
|
||||
pumpGroups: Array<{
|
||||
pumpCntField: string;
|
||||
rsrvPumpCntField: string;
|
||||
perPpqtyField: string;
|
||||
}>;
|
||||
type: "pumpGrossPpqty";
|
||||
}
|
||||
| {
|
||||
inflwField: string;
|
||||
dschgField: string;
|
||||
type: "bodPrcsRt";
|
||||
}
|
||||
| {
|
||||
/** (quotient[0]/quotient[1]) / (denominatorQuotient[0]/denominatorQuotient[1]) × 100 */
|
||||
numeratorQuotient: [string, string];
|
||||
denominatorQuotient: [string, string];
|
||||
type: "quotientRatioPercent";
|
||||
};
|
||||
|
||||
export type ColumnConfig = {
|
||||
|
||||
@@ -8,83 +8,58 @@ import { ValueType } from "realgrid";
|
||||
export const ExcretaTreatFactInpColumn = {
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, footer: { text: '합계' }, editable: false },
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' } },
|
||||
{ name: 'sido', fieldName: '시도', header: { text: '시도' }, editable: false },
|
||||
{ name: 'gugun', fieldName: '시군구', header: { text: '시군구' }, footer: { text: '합계' } },
|
||||
|
||||
// 기본 정보
|
||||
{ name: 'fcltNm', fieldName: 'fcltNm', header: { text: '시설명' } },
|
||||
{ name: 'fcltPstnCn', fieldName: 'fcltPstnCn', header: { text: '소재지' } },
|
||||
{ name: 'telNo', fieldName: 'telNo', header: { text: '전화번호' } },
|
||||
{ name: 'ecscs_nm', fieldName: '시설명', header: { text: '시설명' } },
|
||||
{ name: 'locplcs', fieldName: '소재지', header: { text: '소재지' } },
|
||||
{ name: 'telno', fieldName: '전화번호', header: { text: '전화번호' } },
|
||||
|
||||
// 날짜 정보
|
||||
{
|
||||
name: 'cmptnStrtYmd',
|
||||
fieldName: 'cmptnStrtYmd',
|
||||
header: { text: '준공일 yyyy-mm-dd' },
|
||||
datetimeFormat: 'yyyy-MM-dd',
|
||||
editor: {
|
||||
type: 'date' as const,
|
||||
dropDownWhenClick: true,
|
||||
datetimeFormat: 'yyyy-MM-dd',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'oprtngStrtYmd',
|
||||
fieldName: 'oprtngStrtYmd',
|
||||
header: { text: '가동개시일 yyyy-mm-dd' },
|
||||
datetimeFormat: 'yyyy-MM-dd',
|
||||
editor: {
|
||||
type: 'date' as const,
|
||||
dropDownWhenClick: true,
|
||||
datetimeFormat: 'yyyy-MM-dd',
|
||||
},
|
||||
},
|
||||
{ name: 'comp_dt', fieldName: '준공일 yyyy-mm-dd', header: { text: '준공일 yyyy-mm-dd' } },
|
||||
{ name: 'rn_dt', fieldName: '가동개시일 yyyy-mm-dd', header: { text: '가동개시일 yyyy-mm-dd' } },
|
||||
|
||||
// 사업비/용량 정보
|
||||
{ name: 'wholPjtcoAmt', fieldName: 'wholPjtcoAmt', header: { text: '사업비(백만원)' }, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'prcsFcltCpct', fieldName: 'prcsFcltCpct', header: { text: '시설용량(m³/일)' }, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'cpct', fieldName: 'cpct', header: { text: '처리량(m³/일)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'oprtngDayCnt', fieldName: 'oprtngDayCnt', header: { text: '가동일수(일/년)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'wct', fieldName: '사업비(백만원)', header: { text: '사업비(백만원)' }, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'ecscs_cpcty', fieldName: '시설용량(m³/일)', header: { text: '시설용량(m³/일)' }, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'process_cpcty', fieldName: '처리량(m³/일)', header: { text: '처리량(m³/일)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'opr_daycnt', fieldName: '가동일수(일/년)', header: { text: '가동일수(일/년)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 처리 공법 및 연계
|
||||
{ name: 'prcsMthdExpln', fieldName: 'prcsMthdExpln', header: { text: '처리공법' } },
|
||||
{ name: 'linkTmplntCn', fieldName: 'linkTmplntCn', header: { text: '연계처리장명' } },
|
||||
{ name: 'linkPrcsQnt', fieldName: 'linkPrcsQnt', header: { text: '연계처리량(m³/일)' }, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'trt_msrc', fieldName: '처리공법', header: { text: '처리공법' } },
|
||||
{ name: 'cntc_prcplt', fieldName: '연계처리장명', header: { text: '연계처리장명' } },
|
||||
{ name: 'assct_trt_cpc', fieldName: '연계처리량(m³/일)', header: { text: '연계처리량(m³/일)' }, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 유입수질
|
||||
{ name: 'inflwBodWqVl', fieldName: 'inflwBodWqVl', header: { text: 'BOD' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'inflwTocWqVl', fieldName: 'inflwTocWqVl', header: { text: 'TOC' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'inflwSsWqVl', fieldName: 'inflwSsWqVl', header: { text: 'SS' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'inflwTnWqVl', fieldName: 'inflwTnWqVl', header: { text: 'T-N' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'inflwTpWqVl', fieldName: 'inflwTpWqVl', header: { text: 'T-P' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'inflwClfgCnt', fieldName: 'inflwClfgCnt', header: { text: '대장균군수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'infl_wqlt_bod', fieldName: 'BOD', header: { text: 'BOD' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'infl_wqlt_toc', fieldName: 'TOC', header: { text: 'TOC' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'infl_wqlt_ss', fieldName: 'SS', header: { text: 'SS' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'infl_wqlt_tn', fieldName: 'T-N', header: { text: 'T-N' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'infl_wqlt_tp', fieldName: 'T-P', header: { text: 'T-P' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'infl_wqlt_clfgrpcnt', fieldName: '대장균군수', header: { text: '대장균군수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 방류수질
|
||||
{ name: 'dschgBodWqVl', fieldName: 'dschgBodWqVl', header: { text: 'BOD' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'dschgTocWqVl', fieldName: 'dschgTocWqVl', header: { text: 'TOC' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'dschgSsWqVl', fieldName: 'dschgSsWqVl', header: { text: 'SS' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'dschgTnWqVl', fieldName: 'dschgTnWqVl', header: { text: 'T-N' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'dschgTpWqVl', fieldName: 'dschgTpWqVl', header: { text: 'T-P' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'dschgClfgCnt', fieldName: 'dschgClfgCnt', header: { text: '대장균군수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'effl_wqlt_bod', fieldName: 'BOD', header: { text: 'BOD' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'effl_wqlt_toc', fieldName: 'TOC', header: { text: 'TOC' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'effl_wqlt_ss', fieldName: 'SS', header: { text: 'SS' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'effl_wqlt_tn', fieldName: 'T-N', header: { text: 'T-N' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'effl_wqlt_tp', fieldName: 'T-P', header: { text: 'T-P' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'effl_wqlt_clfgrpcnt', fieldName: '대장균군수', header: { text: '대장균군수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 방류수역
|
||||
{ name: 'wtsysNm', fieldName: 'wtsysNm', header: { text: '수계' } },
|
||||
{ name: 'trbtrNm', fieldName: 'trbtrNm', header: { text: '지류' } },
|
||||
{ name: 'msirbCn', fieldName: 'msirbCn', header: { text: '중권역' } },
|
||||
{ name: 'ssirbCn', fieldName: 'ssirbCn', header: { text: '소권역' } },
|
||||
{ name: 'rvbsn', fieldName: '수계', header: { text: '수계' } },
|
||||
{ name: 'bstrm', fieldName: '지류', header: { text: '지류' } },
|
||||
{ name: 'lgbsn', fieldName: '중권역', header: { text: '중권역' } },
|
||||
{ name: 'mdmbsn', fieldName: '소권역', header: { text: '소권역' } },
|
||||
|
||||
// 운영 정보
|
||||
{ name: 'operMthdCdCn', fieldName: 'operMthdCdCn', header: { text: '운영주체(자체/공기업/민간위탁)' } },
|
||||
{ name: 'wholNope', fieldName: 'wholNope', header: { text: '직원총수(명)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sftyAcdntEvntcsCnt', fieldName: 'sftyAcdntEvntcsCnt', header: { text: '안전사고건수(건/인/년)' }, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'oper_mth', fieldName: '운영주체(자체/공기업/민간위탁)', header: { text: '운영주체(자체/공기업/민간위탁)' } },
|
||||
{ name: 'cntc_prcplt_cpc', fieldName: '직원총수(명)', header: { text: '직원총수(명)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'safe_acdnt_co', fieldName: '안전사고건수(건/인/년)', header: { text: '안전사고건수(건/인/년)' }, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 비고
|
||||
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
||||
|
||||
// Hidden Columns : 시스템 관리를 위한 값
|
||||
{ name: 'admdstCd', fieldName: 'admdstCd', header: { text: '행정구역코드' }, visible: false, },
|
||||
{ name: 'fcltSn', fieldName: 'fcltSn', header: { text: '시설일련번호' }, visible: false, },
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, visible: false },
|
||||
{ name: 'rmk', fieldName: '비고', header: { text: '비고' } },
|
||||
],
|
||||
|
||||
columnLayout: [
|
||||
@@ -92,51 +67,41 @@ export const ExcretaTreatFactInpColumn = {
|
||||
name: 'adminGroup',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '행정구역' },
|
||||
items: [
|
||||
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 2 }] },
|
||||
'sggNm',
|
||||
],
|
||||
items: ['sido', 'gugun'],
|
||||
},
|
||||
'fcltNm',
|
||||
'fcltPstnCn',
|
||||
'telNo',
|
||||
'cmptnStrtYmd',
|
||||
'oprtngStrtYmd',
|
||||
'wholPjtcoAmt',
|
||||
'prcsFcltCpct',
|
||||
'cpct',
|
||||
'oprtngDayCnt',
|
||||
'prcsMthdExpln',
|
||||
'linkTmplntCn',
|
||||
'linkPrcsQnt',
|
||||
'ecscs_nm',
|
||||
'locplcs',
|
||||
'telno',
|
||||
'comp_dt',
|
||||
'rn_dt',
|
||||
'wct',
|
||||
'ecscs_cpcty',
|
||||
'process_cpcty',
|
||||
'opr_daycnt',
|
||||
'trt_msrc',
|
||||
'cntc_prcplt',
|
||||
'assct_trt_cpc',
|
||||
{
|
||||
name: 'influenceGroup',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '유입수질(mg/L, 개/mL)' },
|
||||
items: ['inflwBodWqVl', 'inflwTocWqVl', 'inflwSsWqVl', 'inflwTnWqVl', 'inflwTpWqVl', 'inflwClfgCnt'],
|
||||
items: ['infl_wqlt_bod', 'infl_wqlt_toc', 'infl_wqlt_ss', 'infl_wqlt_tn', 'infl_wqlt_tp', 'infl_wqlt_clfgrpcnt'],
|
||||
},
|
||||
{
|
||||
name: 'effluentGroup',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '방류수질(mg/L, 개/mL)' },
|
||||
items: ['dschgBodWqVl', 'dschgTocWqVl', 'dschgSsWqVl', 'dschgTnWqVl', 'dschgTpWqVl', 'dschgClfgCnt'],
|
||||
items: ['effl_wqlt_bod', 'effl_wqlt_toc', 'effl_wqlt_ss', 'effl_wqlt_tn', 'effl_wqlt_tp', 'effl_wqlt_clfgrpcnt'],
|
||||
},
|
||||
{
|
||||
name: 'dischargeGroup',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '방류수역' },
|
||||
items: ['wtsysNm', 'trbtrNm', 'msirbCn', 'ssirbCn'],
|
||||
items: ['rvbsn', 'bstrm', 'lgbsn', 'mdmbsn'],
|
||||
},
|
||||
'operMthdCdCn',
|
||||
'wholNope',
|
||||
'sftyAcdntEvntcsCnt',
|
||||
'rmrk',
|
||||
'admdstCd',
|
||||
'fcltSn',
|
||||
'admdstNm'
|
||||
],
|
||||
|
||||
rowStartNum: 2,
|
||||
fixedColumns: 2,
|
||||
tabKey: 'ST00070001',
|
||||
'oper_mth',
|
||||
'cntc_prcplt_cpc',
|
||||
'safe_acdnt_co',
|
||||
'rmk',
|
||||
]
|
||||
};
|
||||
+7
-50
@@ -8,7 +8,7 @@ import { footerDecimal1, footerDecimal3,footerInt } from "@/components/util/grid
|
||||
export const PublicSewageFactColumn = {
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, footer: { text: '합계' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' }, editable: false, footer: { text: '합계' }, styleName: 'rg-cell-readonly' },
|
||||
|
||||
// 시설명
|
||||
@@ -18,20 +18,7 @@ export const PublicSewageFactColumn = {
|
||||
{ name: 'fcltPstnCn', fieldName: 'fcltPstnCn', header: { text: '소재지' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
|
||||
// 시설용량
|
||||
{
|
||||
name: 'prcsFcltCpct',
|
||||
fieldName: 'prcsFcltCpct',
|
||||
header: { text: '시설용량(500m³/일 이상/미만)' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: ['prcsFcltPhysCpct', 'prcsFcltBoilCpct', 'prcsFcltAltdCpct'],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'prcsFcltCpct', fieldName: 'prcsFcltCpct', header: { text: '시설용량(500m³/일 이상/미만)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-total' },
|
||||
|
||||
// (m³/일)
|
||||
{ name: 'prcsFcltPhysCpct', fieldName: 'prcsFcltPhysCpct', header: { text: '물리적' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
@@ -69,22 +56,8 @@ export const PublicSewageFactColumn = {
|
||||
{ name: 'dschgGrssClfgVl', fieldName: 'dschgGrssClfgVl', header: { text: '방류총대장균군수' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
|
||||
// 처리특성
|
||||
{
|
||||
name: 'prcsRt',
|
||||
fieldName: 'prcsRt',
|
||||
header: { text: '처리효율(%)' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
inflwField: 'inflwBodVl',
|
||||
dschgField: 'dschgBodVl',
|
||||
type: 'bodPrcsRt' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'prcsLodQnt', fieldName: 'prcsLodQnt', header: { text: '처리부하량(kgBOD/D)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
{ name: 'prcsRt', fieldName: 'prcsRt', header: { text: '처리효율(%)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-total' },
|
||||
{ name: 'prcsLodQnt', fieldName: 'prcsLodQnt', header: { text: '처리부하량(kgBOD/D)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-total' },
|
||||
{ name: 'prcsMthdExpln', fieldName: 'prcsMthdExpln', header: { text: '처리방법' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
|
||||
// 연계처리량
|
||||
@@ -113,20 +86,7 @@ export const PublicSewageFactColumn = {
|
||||
{ name: 'goalWqNo', fieldName: 'goalWqNo', header: { text: '목표수질(BOD)' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
|
||||
// 에너지 자립률
|
||||
{
|
||||
name: 'engySrlneRt',
|
||||
fieldName: 'engySrlneRt',
|
||||
header: { text: '에너지자립률(%)' },
|
||||
editable: false,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
numeratorFields: ['engyItslfPrdctnQnt'],
|
||||
denominatorFields: ['anlEngyWholUseQnt'],
|
||||
type: 'pblswrgPopltnSuprtRate' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'engySrlneRt', fieldName: 'engySrlneRt', header: { text: '에너지자립률(%)' }, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
|
||||
// 에너지 자체 생산량
|
||||
{ name: 'engyItslfPrdctnQnt', fieldName: 'engyItslfPrdctnQnt', header: { text: '에너지자체생산량(TOE)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
@@ -137,7 +97,7 @@ export const PublicSewageFactColumn = {
|
||||
{ name: 'itslfEngyUseQnt', fieldName: 'itslfEngyUseQnt', header: { text: '자체 에너지사용량(TOE)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
|
||||
// 하수처리량당 CO2배출량
|
||||
{ name: 'swtrmtEmsnQnt', fieldName: 'swtrmtEmsnQnt', header: { text: '하수처리량당 CO2배출량(kgCO2/m³)' }, editable: false, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000', styleName: 'rg-cell-readonly' },
|
||||
{ name: 'swtrmtEmsnQnt', fieldName: 'swtrmtEmsnQnt', header: { text: '하수처리량당 CO2배출량(kgCO2/m³)' }, editable: false, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000', styleName: 'rg-cell-total' },
|
||||
|
||||
// 운영주체
|
||||
{ name: 'operMnbdCn', fieldName: 'operMnbdCn', header: { text: '운영주체(자체/공기업/민간대행)' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
@@ -163,10 +123,7 @@ export const PublicSewageFactColumn = {
|
||||
name: 'administrative',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '행정구역' },
|
||||
items: [
|
||||
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 2 }] },
|
||||
'sggNm',
|
||||
],
|
||||
items: ['ctpvNm', 'sggNm'],
|
||||
},
|
||||
'swtrmtFcltNm',
|
||||
'fcltPstnCn',
|
||||
|
||||
@@ -1,33 +1,6 @@
|
||||
import type { ColumnConfig } from "@/components/type/DataGrid.type";
|
||||
import { footerInt, footerDecimal1, footerDecimal3 } from "@/components/util/grid/footerSummary";
|
||||
import { ValueType } from "realgrid";
|
||||
|
||||
/** 펌프장 구분(`pumpSeNm`) */
|
||||
export const PUMPING_STATION_PUMP_SE_VALUES = ["합류식", "분류식"] as const;
|
||||
|
||||
function dropdownColumn(
|
||||
col: Pick<ColumnConfig, "name" | "fieldName" | "header"> &
|
||||
Partial<ColumnConfig>,
|
||||
options: readonly string[],
|
||||
): ColumnConfig {
|
||||
const values = [...options];
|
||||
return {
|
||||
...col,
|
||||
values,
|
||||
labels: values,
|
||||
lookupDisplay: true,
|
||||
editor: {
|
||||
type: "dropdown",
|
||||
domainOnly: true,
|
||||
textReadOnly: true,
|
||||
commitOnSelect: true,
|
||||
dropDownWhenClick: true,
|
||||
values,
|
||||
labels: values,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 하수도 통계 관리 > 05. 펌프장
|
||||
* 단일 Tab
|
||||
@@ -35,155 +8,69 @@ function dropdownColumn(
|
||||
export const PumpingStationInpColumn = {
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, footer: { text: '합계' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' } },
|
||||
{ name: 'sido', fieldName: '시도', header: { text: '시도' }, editable: false },
|
||||
{ name: 'sgg', fieldName: '시군구', header: { text: '시군구' }, footer: { text: '합계' } },
|
||||
|
||||
// 기본 정보
|
||||
{ name: 'swtrmtFcltNm', fieldName: 'swtrmtFcltNm', header: { text: '처리장명' } },
|
||||
{ name: 'fcltNm', fieldName: 'fcltNm', header: { text: '시설명' } },
|
||||
dropdownColumn(
|
||||
{ name: 'pumpSeNm', fieldName: 'pumpSeNm', header: { text: '구분(합류식 분류식)' } },
|
||||
PUMPING_STATION_PUMP_SE_VALUES,
|
||||
),
|
||||
{ name: 'fcltPstnCn', fieldName: 'fcltPstnCn', header: { text: '위치' } },
|
||||
{
|
||||
name: 'oprtngStrtYmd',
|
||||
fieldName: 'oprtngStrtYmd',
|
||||
header: { text: '가동 년월일 yyyy-mm-dd' },
|
||||
datetimeFormat: 'yyyy-MM-dd',
|
||||
editor: {
|
||||
type: 'date' as const,
|
||||
dropDownWhenClick: true,
|
||||
datetimeFormat: 'yyyy-MM-dd',
|
||||
},
|
||||
},
|
||||
{ name: 'planMltvArea', fieldName: 'planMltvArea', header: { text: '계획배수면적(㎢)' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'treatmentFacilityName', fieldName: '처리장명', header: { text: '처리장명' } },
|
||||
{ name: 'facilityName', fieldName: '시설명', header: { text: '시설명' } },
|
||||
{ name: 'classification', fieldName: '구분(합류식 분류식)', header: { text: '구분(합류식 분류식)' } },
|
||||
{ name: 'location', fieldName: '위치', header: { text: '위치' } },
|
||||
{ name: 'operationDate', fieldName: '가동 년월일 yyyy-mm-dd', header: { text: '가동 년월일 yyyy-mm-dd' } },
|
||||
{ name: 'planDrainageArea', fieldName: '계획배수면적(㎢)', header: { text: '계획배수면적(㎢)' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
|
||||
// 계획시간 대 최대배수량
|
||||
{ name: 'sndyArea', fieldName: 'sndyArea', header: { text: '청천시(A)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'rainArea', fieldName: 'rainArea', header: { text: '우천시(B)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{
|
||||
name: 'exlnQnt',
|
||||
fieldName: 'exlnQnt',
|
||||
header: { text: '우수량(B-A)' },
|
||||
footer: footerDecimal1,
|
||||
editable: false,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
computed: { fields: ['rainArea', 'sndyArea'], type: 'difference' as const },
|
||||
styleName: 'rg-cell-total',
|
||||
},
|
||||
{ name: 'fairWeatherFlow', fieldName: '청천시(A)', header: { text: '청천시(A)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'rainyWeatherFlow', fieldName: '우천시(B)', header: { text: '우천시(B)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'rainwaterFlow', fieldName: '우수량(B-A)', header: { text: '우수량(B-A)' }, footer: footerDecimal1, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 배수능력 > 총 양수량 (오수)
|
||||
{
|
||||
name: 'drtwPumpGrssPpqty',
|
||||
fieldName: 'drtwPumpGrssPpqty',
|
||||
header: { text: '총양수량(m³/min)' },
|
||||
footer: footerDecimal1,
|
||||
editable: false,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
type: 'pumpGrossPpqty' as const,
|
||||
pumpGroups: [
|
||||
{
|
||||
pumpCntField: 'drtwPumpN1Cnt',
|
||||
rsrvPumpCntField: 'drtwPumpN1RsrvCnt',
|
||||
perPpqtyField: 'drtwPumpN1Ppqty',
|
||||
},
|
||||
{
|
||||
pumpCntField: 'drtwPumpN2Cnt',
|
||||
rsrvPumpCntField: 'drtwPumpN2RsrvCnt',
|
||||
perPpqtyField: 'drtwPumpN2Ppqty',
|
||||
},
|
||||
{
|
||||
pumpCntField: 'drtwPumpN3Cnt',
|
||||
rsrvPumpCntField: 'drtwPumpN3RsrvCnt',
|
||||
perPpqtyField: 'drtwPumpN3Ppqty',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{ name: 'sewageTotalPumpCapacity', fieldName: '총양수량(m³/min)', header: { text: '총양수량(m³/min)' }, footer: footerDecimal1, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 배수능력 > 오수펌프(1)
|
||||
{ name: 'drtwPumpN1DmtrArea', fieldName: 'drtwPumpN1DmtrArea', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'drtwPumpN1Ppqty', fieldName: 'drtwPumpN1Ppqty', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'drtwPumpN1Cnt', fieldName: 'drtwPumpN1Cnt', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'drtwPumpN1RsrvCnt', fieldName: 'drtwPumpN1RsrvCnt', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sewagePump1Diameter', fieldName: '오수펌프(1) 구경(mm)', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sewagePump1Capacity', fieldName: '오수펌프(1) 대당 양수량(m³/min·대)', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'sewagePump1Count', fieldName: '오수펌프(1) 펌프대수', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sewagePump1Reserve', fieldName: '오수펌프(1) 예비펌프대수', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 배수능력 > 오수펌프(2)
|
||||
{ name: 'drtwPumpN2DmtrArea', fieldName: 'drtwPumpN2DmtrArea', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'drtwPumpN2Ppqty', fieldName: 'drtwPumpN2Ppqty', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'drtwPumpN2Cnt', fieldName: 'drtwPumpN2Cnt', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'drtwPumpN2RsrvCnt', fieldName: 'drtwPumpN2RsrvCnt', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sewagePump2Diameter', fieldName: '오수펌프(2) 구경(mm)', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sewagePump2Capacity', fieldName: '오수펌프(2) 대당 양수량(m³/min·대)', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'sewagePump2Count', fieldName: '오수펌프(2) 펌프대수', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sewagePump2Reserve', fieldName: '오수펌프(2) 예비펌프대수', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 배수능력 > 오수펌프(3)
|
||||
{ name: 'drtwPumpN3DmtrArea', fieldName: 'drtwPumpN3DmtrArea', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'drtwPumpN3Ppqty', fieldName: 'drtwPumpN3Ppqty', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'drtwPumpN3Cnt', fieldName: 'drtwPumpN3Cnt', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'drtwPumpN3RsrvCnt', fieldName: 'drtwPumpN3RsrvCnt', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sewagePump3Diameter', fieldName: '오수펌프(3) 구경(mm)', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sewagePump3Capacity', fieldName: '오수펌프(3) 대당 양수량(m³/min·대)', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'sewagePump3Count', fieldName: '오수펌프(3) 펌프대수', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sewagePump3Reserve', fieldName: '오수펌프(3) 예비펌프대수', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 배수능력 > 총 양수량 (우수)
|
||||
{
|
||||
name: 'exlnPumpGrssPpqty',
|
||||
fieldName: 'exlnPumpGrssPpqty',
|
||||
header: { text: '총양수량(m³/min)' },
|
||||
footer: footerDecimal1,
|
||||
editable: false,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
type: 'pumpGrossPpqty' as const,
|
||||
pumpGroups: [
|
||||
{
|
||||
pumpCntField: 'exlnPumpN1Cnt',
|
||||
rsrvPumpCntField: 'exlnPumpN1RsrvCnt',
|
||||
perPpqtyField: 'exlnPumpN1Ppqty',
|
||||
},
|
||||
{
|
||||
pumpCntField: 'exlnPumpN2Cnt',
|
||||
rsrvPumpCntField: 'exlnPumpN2RsrvCnt',
|
||||
perPpqtyField: 'exlnPumpN2Ppqty',
|
||||
},
|
||||
{
|
||||
pumpCntField: 'exlnPumpN3Cnt',
|
||||
rsrvPumpCntField: 'exlnPumpN3RsrvCnt',
|
||||
perPpqtyField: 'exlnPumpN3Ppqty',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{ name: 'rainwaterTotalPumpCapacity', fieldName: '총양수량(m³/min)', header: { text: '총양수량(m³/min)' }, footer: footerDecimal1, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 배수능력 > 우수펌프(1)
|
||||
{ name: 'exlnPumpN1DmtrArea', fieldName: 'exlnPumpN1DmtrArea', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'exlnPumpN1Ppqty', fieldName: 'exlnPumpN1Ppqty', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'exlnPumpN1Cnt', fieldName: 'exlnPumpN1Cnt', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'exlnPumpN1RsrvCnt', fieldName: 'exlnPumpN1RsrvCnt', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rainwaterPump1Diameter', fieldName: '우수펌프(1) 구경(mm)', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rainwaterPump1Capacity', fieldName: '우수펌프(1) 대당 양수량(m³/min·대)', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'rainwaterPump1Count', fieldName: '우수펌프(1) 펌프대수', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rainwaterPump1Reserve', fieldName: '우수펌프(1) 예비펌프대수', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 배수능력 > 우수펌프(2)
|
||||
{ name: 'exlnPumpN2DmtrArea', fieldName: 'exlnPumpN2DmtrArea', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'exlnPumpN2Ppqty', fieldName: 'exlnPumpN2Ppqty', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'exlnPumpN2Cnt', fieldName: 'exlnPumpN2Cnt', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'exlnPumpN2RsrvCnt', fieldName: 'exlnPumpN2RsrvCnt', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rainwaterPump2Diameter', fieldName: '우수펌프(2) 구경(mm)', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rainwaterPump2Capacity', fieldName: '우수펌프(2) 대당 양수량(m³/min·대)', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'rainwaterPump2Count', fieldName: '우수펌프(2) 펌프대수', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rainwaterPump2Reserve', fieldName: '우수펌프(2) 예비펌프대수', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 배수능력 > 우수펌프(3)
|
||||
{ name: 'exlnPumpN3DmtrArea', fieldName: 'exlnPumpN3DmtrArea', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'exlnPumpN3Ppqty', fieldName: 'exlnPumpN3Ppqty', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'exlnPumpN3Cnt', fieldName: 'exlnPumpN3Cnt', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'exlnPumpN3RsrvCnt', fieldName: 'exlnPumpN3RsrvCnt', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rainwaterPump3Diameter', fieldName: '우수펌프(3) 구경(mm)', header: { text: '구경(mm)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rainwaterPump3Capacity', fieldName: '우수펌프(3) 대당 양수량(m³/min·대)', header: { text: '대당 양수량(m³/min·대)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'rainwaterPump3Count', fieldName: '우수펌프(3) 펌프대수', header: { text: '펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rainwaterPump3Reserve', fieldName: '우수펌프(3) 예비펌프대수', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 연간전력 사용량
|
||||
{ name: 'anlElpwrUseQnt', fieldName: 'anlElpwrUseQnt', header: { text: '연간전력사용량(kWh/년)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'annualPowerUsage', fieldName: '연간전력사용량(kWh/년)', header: { text: '연간전력사용량(kWh/년)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 비고
|
||||
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
||||
|
||||
// Hidden Columns : 시스템 관리를 위한 값
|
||||
{ name: 'admdstCd', fieldName: 'admdstCd', header: { text: '행정구역코드' }, visible: false, },
|
||||
{ name: 'fcltSn', fieldName: 'fcltSn', header: { text: '시설일련번호' }, visible: false, },
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, visible: false },
|
||||
{ name: 'remarks', fieldName: '비고', header: { text: '비고' } },
|
||||
],
|
||||
|
||||
columnLayout: [
|
||||
@@ -191,75 +78,66 @@ export const PumpingStationInpColumn = {
|
||||
name: 'administrativeArea',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '행정구역' },
|
||||
items: [
|
||||
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 2 }] },
|
||||
'sggNm',
|
||||
],
|
||||
items: ['sido', 'sgg'],
|
||||
},
|
||||
'swtrmtFcltNm',
|
||||
'fcltNm',
|
||||
'pumpSeNm',
|
||||
'fcltPstnCn',
|
||||
'oprtngStrtYmd',
|
||||
'planMltvArea',
|
||||
'treatmentFacilityName',
|
||||
'facilityName',
|
||||
'classification',
|
||||
'location',
|
||||
'operationDate',
|
||||
'planDrainageArea',
|
||||
{
|
||||
name: 'planFlowGroup',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '계획시간대최대배수량(m³/hr)' },
|
||||
items: ['sndyArea', 'rainArea', 'exlnQnt'],
|
||||
items: ['fairWeatherFlow', 'rainyWeatherFlow', 'rainwaterFlow'],
|
||||
},
|
||||
{
|
||||
name: 'drainageCapability',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '배수능력' },
|
||||
items: [
|
||||
'drtwPumpGrssPpqty',
|
||||
'sewageTotalPumpCapacity',
|
||||
{
|
||||
name: 'sewagePump1Group',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '오수펌프(1)' },
|
||||
items: ['drtwPumpN1DmtrArea', 'drtwPumpN1Ppqty', 'drtwPumpN1Cnt', 'drtwPumpN1RsrvCnt'],
|
||||
items: ['sewagePump1Diameter', 'sewagePump1Capacity', 'sewagePump1Count', 'sewagePump1Reserve'],
|
||||
},
|
||||
{
|
||||
name: 'sewagePump2Group',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '오수펌프(2)' },
|
||||
items: ['drtwPumpN2DmtrArea', 'drtwPumpN2Ppqty', 'drtwPumpN2Cnt', 'drtwPumpN2RsrvCnt'],
|
||||
items: ['sewagePump2Diameter', 'sewagePump2Capacity', 'sewagePump2Count', 'sewagePump2Reserve'],
|
||||
},
|
||||
{
|
||||
name: 'sewagePump3Group',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '오수펌프(3)' },
|
||||
items: ['drtwPumpN3DmtrArea', 'drtwPumpN3Ppqty', 'drtwPumpN3Cnt', 'drtwPumpN3RsrvCnt'],
|
||||
items: ['sewagePump3Diameter', 'sewagePump3Capacity', 'sewagePump3Count', 'sewagePump3Reserve'],
|
||||
},
|
||||
'exlnPumpGrssPpqty',
|
||||
'rainwaterTotalPumpCapacity',
|
||||
{
|
||||
name: 'rainwaterPump1Group',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '우수펌프(1)' },
|
||||
items: ['exlnPumpN1DmtrArea', 'exlnPumpN1Ppqty', 'exlnPumpN1Cnt', 'exlnPumpN1RsrvCnt'],
|
||||
items: ['rainwaterPump1Diameter', 'rainwaterPump1Capacity', 'rainwaterPump1Count', 'rainwaterPump1Reserve'],
|
||||
},
|
||||
{
|
||||
name: 'rainwaterPump2Group',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '우수펌프(2)' },
|
||||
items: ['exlnPumpN2DmtrArea', 'exlnPumpN2Ppqty', 'exlnPumpN2Cnt', 'exlnPumpN2RsrvCnt'],
|
||||
items: ['rainwaterPump2Diameter', 'rainwaterPump2Capacity', 'rainwaterPump2Count', 'rainwaterPump2Reserve'],
|
||||
},
|
||||
{
|
||||
name: 'rainwaterPump3Group',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '우수펌프(3)' },
|
||||
items: ['exlnPumpN3DmtrArea', 'exlnPumpN3Ppqty', 'exlnPumpN3Cnt', 'exlnPumpN3RsrvCnt'],
|
||||
items: ['rainwaterPump3Diameter', 'rainwaterPump3Capacity', 'rainwaterPump3Count', 'rainwaterPump3Reserve'],
|
||||
},
|
||||
],
|
||||
},
|
||||
'anlElpwrUseQnt',
|
||||
'rmrk',
|
||||
'admdstCd',
|
||||
'fcltSn',
|
||||
'admdstNm'
|
||||
],
|
||||
rowStartNum: 3,
|
||||
fixedColumns: 3,
|
||||
tabKey: 'ST00050001',
|
||||
'annualPowerUsage',
|
||||
'remarks',
|
||||
]
|
||||
};
|
||||
+27
-25
@@ -5,64 +5,66 @@ import { ValueType } from "realgrid";
|
||||
export const PrivateSewageDesigStatusInpColumn = {
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, footer: { text: '합계' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' }, editable: false },
|
||||
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' }, editable: false, footer: { text: '합계' } },
|
||||
|
||||
// 개인하수도관리지역공고현황
|
||||
{ name: 'indvSwagePbancRgnCnt', fieldName: 'indvSwagePbancRgnCnt', header: { text: '공고지역(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'indvSwageDsgnScpLen', fieldName: 'indvSwageDsgnScpLen', header: { text: '지정범위(㎢)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'MGMT_AR', fieldName: '공고지역(개소)', header: { text: '공고지역(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'APPN_SCOPE', fieldName: '지정범위(㎢)', header: { text: '지정범위(㎢)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 개인하수도관리지역공고현황 > 정화조
|
||||
{ name: 'spctnkGrssFcltCnt', fieldName: 'spctnkGrssFcltCnt', header: { text: '개소수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'spctnkQnt', fieldName: 'spctnkQnt', header: { text: '처리용량(인/일)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'STTY_CNT', fieldName: '개소수', header: { text: '개소수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_CPC', fieldName: '처리용량(인/일)', header: { text: '처리용량(인/일)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 개인하수도관리지역공고현황 > 오수시설
|
||||
{ name: 'drtwPrcsFcltGrssFcltCnt', fieldName: 'drtwPrcsFcltGrssFcltCnt', header: { text: '개소수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'drtwPrcsFcltQnt', fieldName: 'drtwPrcsFcltQnt', header: { text: '처리용량(m³/일)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'WRRTN_CNT', fieldName: '개소수', header: { text: '개소수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'WRRTN_CPC', fieldName: '처리용량(m³/일)', header: { text: '처리용량(m³/일)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 비고
|
||||
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
||||
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
|
||||
|
||||
// hidden
|
||||
{ name: 'admdstCd', fieldName: 'admdstCd', header: { text: '행정구역코드' }, visible: false, },
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, visible: false },
|
||||
// 검증 필드 (hidden)
|
||||
{ name: 'CHK_MGMT_AR', fieldName: 'CHK_MGMT_AR', header: { text: '' } },
|
||||
{ name: 'CHK_APPN_SCOPE', fieldName: 'CHK_APPN_SCOPE', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_CNT', fieldName: 'CHK_STTY_CNT', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_CPC', fieldName: 'CHK_STTY_CPC', header: { text: '' } },
|
||||
{ name: 'CHK_WRRTN_CNT', fieldName: 'CHK_WRRTN_CNT', header: { text: '' } },
|
||||
{ name: 'CHK_WRRTN_CPC', fieldName: 'CHK_WRRTN_CPC', header: { text: '' } },
|
||||
|
||||
{ name: 'WRTER_OPINION', fieldName: '사용자의견', header: { text: '사용자의견' } },
|
||||
{ name: 'CHCKER_OPINION', fieldName: '검토자의견', header: { text: '검토자의견' } },
|
||||
],
|
||||
columnLayout: [
|
||||
{
|
||||
name: 'group_admin',
|
||||
header: { text: '행정구역' },
|
||||
items: [
|
||||
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 2 }] },
|
||||
'sggNm',
|
||||
],
|
||||
items: ['SIDO', 'GUGUN']
|
||||
},
|
||||
{
|
||||
name: 'group_notice',
|
||||
header: { text: '개인하수도관리지역공고현황 (하수도법제34조의2)' },
|
||||
items: [
|
||||
'indvSwagePbancRgnCnt',
|
||||
'indvSwageDsgnScpLen',
|
||||
'MGMT_AR',
|
||||
'APPN_SCOPE',
|
||||
{
|
||||
name: 'group_septic',
|
||||
header: { text: '정화조' },
|
||||
items: [
|
||||
'spctnkGrssFcltCnt',
|
||||
'spctnkQnt'
|
||||
'STTY_CNT',
|
||||
'STTY_CPC'
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'group_sewage',
|
||||
header: { text: '오수시설' },
|
||||
items: [
|
||||
'drtwPrcsFcltGrssFcltCnt',
|
||||
'drtwPrcsFcltQnt'
|
||||
'WRRTN_CNT',
|
||||
'WRRTN_CPC'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
'rmrk',
|
||||
'admdstCd',
|
||||
'admdstNm'
|
||||
'RMK'
|
||||
],
|
||||
rowStartNum: 3,
|
||||
fixedColumns: 1,
|
||||
|
||||
+144
-280
@@ -5,316 +5,182 @@ import { ValueType } from "realgrid";
|
||||
export const SepticTankStatusInpColumn = {
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, footer: { text: '합계' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' }, editable: false },
|
||||
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' }, editable: false, footer: { text: '합계' } },
|
||||
|
||||
// 총 시설 수 — (B+C)/2 + (E+F)/2 = A + D
|
||||
{
|
||||
name: 'grssFcltCnt',
|
||||
fieldName: 'grssFcltCnt',
|
||||
header: { text: '총 시설 수 (A+D)' },
|
||||
editable: false,
|
||||
footer: footerInt,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
firstHalfSum: {
|
||||
firstSumFields: [
|
||||
'staaInsdSttkNprsflCnt',
|
||||
'step1StaaInsdSttkFrcCnt',
|
||||
'staaInsdSprktpFltrtbCnt',
|
||||
'staaInsdAertMthdCnt',
|
||||
'staaInsdCntcAertCnt',
|
||||
'staaInsdEtcCnt',
|
||||
],
|
||||
secondSumFields: [
|
||||
'step1StaaInsdNope',
|
||||
'step2StaaInsdNope',
|
||||
'step3StaaInsdNope',
|
||||
'step4StaaInsdNope',
|
||||
'step5StaaInsdNope',
|
||||
'step6StaaInsdNope',
|
||||
'step7StaaInsdNope',
|
||||
'step8StaaInsdNope',
|
||||
],
|
||||
},
|
||||
secondHalfSum: {
|
||||
firstSumFields: [
|
||||
'staaExcpSttkNprsflCnt',
|
||||
'step1StaaExcpSttkFrcCnt',
|
||||
'staaExcpSprktpFltrtbCnt',
|
||||
'staaExcpAertMthdCnt',
|
||||
'staaExcpCntcAertCnt',
|
||||
'staaExcpEtcCnt',
|
||||
],
|
||||
secondSumFields: [
|
||||
'step1StaaExcpNope',
|
||||
'step2StaaExcpNope',
|
||||
'step3StaaExcpNope',
|
||||
'step4StaaExcpNope',
|
||||
'step5StaaExcpNope',
|
||||
'step6StaaExcpNope',
|
||||
'step7StaaExcpNope',
|
||||
'step8StaaExcpNope',
|
||||
],
|
||||
},
|
||||
type: 'sumOfTwoHalfSumOfSums' as const,
|
||||
},
|
||||
},
|
||||
// 총 시설 수
|
||||
{ name: 'TOT_FCLTY_CNT', fieldName: '총 시설 수 (A+D)', header: { text: '총 시설 수 (A+D)' }, editable: false, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 하수처리구역 내 > 총계
|
||||
{
|
||||
name: 'staaInsdWhol',
|
||||
fieldName: 'staaInsdWhol',
|
||||
header: { text: '총계 A=(B+C)/2' },
|
||||
editable: false,
|
||||
footer: footerInt,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
firstSumFields: [
|
||||
'staaInsdSttkNprsflCnt',
|
||||
'step1StaaInsdSttkFrcCnt',
|
||||
'staaInsdSprktpFltrtbCnt',
|
||||
'staaInsdAertMthdCnt',
|
||||
'staaInsdCntcAertCnt',
|
||||
'staaInsdEtcCnt',
|
||||
],
|
||||
secondSumFields: [
|
||||
'step1StaaInsdNope',
|
||||
'step2StaaInsdNope',
|
||||
'step3StaaInsdNope',
|
||||
'step4StaaInsdNope',
|
||||
'step5StaaInsdNope',
|
||||
'step6StaaInsdNope',
|
||||
'step7StaaInsdNope',
|
||||
'step8StaaInsdNope',
|
||||
],
|
||||
type: 'halfSumOfSums' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'SPZI_SM', fieldName: '총계 A=(B+C)/2', header: { text: '총계 A=(B+C)/2' }, editable: false, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 하수처리구역 내 > 처리방식별
|
||||
{
|
||||
name: 'staaInsdPrcsMthByWhol',
|
||||
fieldName: 'staaInsdPrcsMthByWhol',
|
||||
header: { text: '계(B)' },
|
||||
editable: false,
|
||||
footer: footerInt,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: [
|
||||
'staaInsdSttkNprsflCnt',
|
||||
'step1StaaInsdSttkFrcCnt',
|
||||
'staaInsdSprktpFltrtbCnt',
|
||||
'staaInsdAertMthdCnt',
|
||||
'staaInsdCntcAertCnt',
|
||||
'staaInsdEtcCnt',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'SPZI_MTHD_SM', fieldName: '계(B)', header: { text: '계(B)' }, editable: false, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 하수처리구역 내 > 처리방식별 > 부패탱크
|
||||
{ name: 'staaInsdSttkNprsflCnt', fieldName: 'staaInsdSttkNprsflCnt', header: { text: '자연유하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step1StaaInsdSttkFrcCnt', fieldName: 'step1StaaInsdSttkFrcCnt', header: { text: '강제펌핑식' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_ROT_NPFL_CNT', fieldName: '자연유하', header: { text: '자연유하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_ROT_ENFCT_PUMP_1', fieldName: '강제펌핑식', header: { text: '강제펌핑식' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 하수처리구역 내 > 처리방식별
|
||||
{ name: 'staaInsdSprktpFltrtbCnt', fieldName: 'staaInsdSprktpFltrtbCnt', header: { text: '살수여상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'staaInsdAertMthdCnt', fieldName: 'staaInsdAertMthdCnt', header: { text: '폭기방법' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'staaInsdCntcAertCnt', fieldName: 'staaInsdCntcAertCnt', header: { text: '접촉폭기' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'staaInsdEtcCnt', fieldName: 'staaInsdEtcCnt', header: { text: '기타' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_WTROT_NPFL_CNT', fieldName: '살수여상', header: { text: '살수여상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_TFM', fieldName: '폭기방법', header: { text: '폭기방법' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_ARTM', fieldName: '접촉폭기', header: { text: '접촉폭기' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_CTARM', fieldName: '기타', header: { text: '기타' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 하수처리구역 내 > 처리용량별
|
||||
{
|
||||
name: 'staaInsdPrcsCpctByWhol',
|
||||
fieldName: 'staaInsdPrcsCpctByWhol',
|
||||
header: { text: '계(C)' },
|
||||
editable: false,
|
||||
footer: footerInt,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: [
|
||||
'step1StaaInsdNope',
|
||||
'step2StaaInsdNope',
|
||||
'step3StaaInsdNope',
|
||||
'step4StaaInsdNope',
|
||||
'step5StaaInsdNope',
|
||||
'step6StaaInsdNope',
|
||||
'step7StaaInsdNope',
|
||||
'step8StaaInsdNope',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'step1StaaInsdNope', fieldName: 'step1StaaInsdNope', header: { text: '10인조이하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step2StaaInsdNope', fieldName: 'step2StaaInsdNope', header: { text: '11~20' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step3StaaInsdNope', fieldName: 'step3StaaInsdNope', header: { text: '21~30' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step4StaaInsdNope', fieldName: 'step4StaaInsdNope', header: { text: '31~50' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step5StaaInsdNope', fieldName: 'step5StaaInsdNope', header: { text: '51~199' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step6StaaInsdNope', fieldName: 'step6StaaInsdNope', header: { text: '200~499' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step7StaaInsdNope', fieldName: 'step7StaaInsdNope', header: { text: '500~999' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step8StaaInsdNope', fieldName: 'step8StaaInsdNope', header: { text: '1,000 이상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_PROC_CPC_SM', fieldName: '계(C)', header: { text: '계(C)' }, editable: false, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_PROC_CPC_1', fieldName: '10인조이하', header: { text: '10인조이하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_PROC_CPC_2', fieldName: '11~20', header: { text: '11~20' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_PROC_CPC_3', fieldName: '21~30', header: { text: '21~30' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_PROC_CPC_4', fieldName: '31~50', header: { text: '31~50' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_PROC_CPC_5', fieldName: '51~199', header: { text: '51~199' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_PROC_CPC_6', fieldName: '200~499', header: { text: '200~499' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_PROC_CPC_7', fieldName: '500~999', header: { text: '500~999' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZI_PROC_CPC_8', fieldName: '1,000 이상', header: { text: '1,000 이상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 하수처리구역 외 > 총계
|
||||
{
|
||||
name: 'staaExcpWhol',
|
||||
fieldName: 'staaExcpWhol',
|
||||
header: { text: '총계 D=(E+F)/2' },
|
||||
editable: false,
|
||||
footer: footerInt,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
firstSumFields: [
|
||||
'staaExcpSttkNprsflCnt',
|
||||
'step1StaaExcpSttkFrcCnt',
|
||||
'staaExcpSprktpFltrtbCnt',
|
||||
'staaExcpAertMthdCnt',
|
||||
'staaExcpCntcAertCnt',
|
||||
'staaExcpEtcCnt',
|
||||
],
|
||||
secondSumFields: [
|
||||
'step1StaaExcpNope',
|
||||
'step2StaaExcpNope',
|
||||
'step3StaaExcpNope',
|
||||
'step4StaaExcpNope',
|
||||
'step5StaaExcpNope',
|
||||
'step6StaaExcpNope',
|
||||
'step7StaaExcpNope',
|
||||
'step8StaaExcpNope',
|
||||
],
|
||||
type: 'halfSumOfSums' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'SPZO_SM', fieldName: '총계 D=(E+F)/2', header: { text: '총계 D=(E+F)/2' }, editable: false, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 하수처리구역 외 > 처리방식별
|
||||
{
|
||||
name: 'staaExcpPrcsMthByWhol',
|
||||
fieldName: 'staaExcpPrcsMthByWhol',
|
||||
header: { text: '계(E)' },
|
||||
editable: false,
|
||||
footer: footerInt,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: [
|
||||
'staaExcpSttkNprsflCnt',
|
||||
'step1StaaExcpSttkFrcCnt',
|
||||
'staaExcpSprktpFltrtbCnt',
|
||||
'staaExcpAertMthdCnt',
|
||||
'staaExcpCntcAertCnt',
|
||||
'staaExcpEtcCnt',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'SPZO_MTHD_SM', fieldName: '계(E)', header: { text: '계(E)' }, editable: false, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 하수처리구역 외 > 처리방식별 > 부패탱크
|
||||
{ name: 'staaExcpSttkNprsflCnt', fieldName: 'staaExcpSttkNprsflCnt', header: { text: '자연유하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step1StaaExcpSttkFrcCnt', fieldName: 'step1StaaExcpSttkFrcCnt', header: { text: '강제펌핑식' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_ROT_NPFL_CNT', fieldName: '자연유하', header: { text: '자연유하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_ROT_ENFCT_PUMP_1', fieldName: '강제펌핑식', header: { text: '강제펌핑식' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 하수처리구역 외 > 처리방식별
|
||||
{ name: 'staaExcpSprktpFltrtbCnt', fieldName: 'staaExcpSprktpFltrtbCnt', header: { text: '살수여상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'staaExcpAertMthdCnt', fieldName: 'staaExcpAertMthdCnt', header: { text: '폭기방법' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'staaExcpCntcAertCnt', fieldName: 'staaExcpCntcAertCnt', header: { text: '접촉폭기' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'staaExcpEtcCnt', fieldName: 'staaExcpEtcCnt', header: { text: '기타' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_WTROT_NPFL_CNT', fieldName: '살수여상', header: { text: '살수여상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_TFM', fieldName: '폭기방법', header: { text: '폭기방법' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_ARTM', fieldName: '접촉폭기', header: { text: '접촉폭기' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_CTARM', fieldName: '기타', header: { text: '기타' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 하수처리구역 외 > 처리용량별
|
||||
{
|
||||
name: 'staaExcpPrcsCpctByWhol',
|
||||
fieldName: 'staaExcpPrcsCpctByWhol',
|
||||
header: { text: '계(F)' },
|
||||
editable: false,
|
||||
footer: footerInt,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: [
|
||||
'step1StaaExcpNope',
|
||||
'step2StaaExcpNope',
|
||||
'step3StaaExcpNope',
|
||||
'step4StaaExcpNope',
|
||||
'step5StaaExcpNope',
|
||||
'step6StaaExcpNope',
|
||||
'step7StaaExcpNope',
|
||||
'step8StaaExcpNope',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'step1StaaExcpNope', fieldName: 'step1StaaExcpNope', header: { text: '10인조이하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step2StaaExcpNope', fieldName: 'step2StaaExcpNope', header: { text: '11~20' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step3StaaExcpNope', fieldName: 'step3StaaExcpNope', header: { text: '21~30' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step4StaaExcpNope', fieldName: 'step4StaaExcpNope', header: { text: '31~50' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step5StaaExcpNope', fieldName: 'step5StaaExcpNope', header: { text: '51~199' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step6StaaExcpNope', fieldName: 'step6StaaExcpNope', header: { text: '200~499' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step7StaaExcpNope', fieldName: 'step7StaaExcpNope', header: { text: '500~999' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step8StaaExcpNope', fieldName: 'step8StaaExcpNope', header: { text: '1,000 이상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_PROC_CPC_SM', fieldName: '계(F)', header: { text: '계(F)' }, editable: false, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_PROC_CPC_1', fieldName: '10인조이하', header: { text: '10인조이하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_PROC_CPC_2', fieldName: '11~20', header: { text: '11~20' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_PROC_CPC_3', fieldName: '21~30', header: { text: '21~30' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_PROC_CPC_4', fieldName: '31~50', header: { text: '31~50' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_PROC_CPC_5', fieldName: '51~199', header: { text: '51~199' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_PROC_CPC_6', fieldName: '200~499', header: { text: '200~499' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_PROC_CPC_7', fieldName: '500~999', header: { text: '500~999' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SPZO_PROC_CPC_8', fieldName: '1,000 이상', header: { text: '1,000 이상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 비고
|
||||
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
||||
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
|
||||
|
||||
// hidden
|
||||
{ name: 'admdstCd', fieldName: 'admdstCd', header: { text: '행정구역코드' }, visible: false, },
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, visible: false },
|
||||
{ name: 'WRTER_OPINION', fieldName: '사용자의견', header: { text: '사용자의견' } },
|
||||
{ name: 'CHCKER_OPINION', fieldName: '검토자의견', header: { text: '검토자의견' } },
|
||||
|
||||
// 검증 필드 (검증 여부 표시용 - 빨간색 표시)
|
||||
{ name: 'CHK_TOT_FCLTY_CNT', fieldName: 'CHK_TOT_FCLTY_CNT', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_SM', fieldName: 'CHK_SPZI_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_MTHD_SM', fieldName: 'CHK_SPZI_MTHD_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_ROT_NPFL_CNT', fieldName: 'CHK_SPZI_ROT_NPFL_CNT', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_ROT_ENFCT_PUMP_1', fieldName: 'CHK_SPZI_ROT_ENFCT_PUMP_1', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_ROT_ENFCT_PUMP_2', fieldName: 'CHK_SPZI_ROT_ENFCT_PUMP_2', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_ROT_ENFCT_PUMP_3', fieldName: 'CHK_SPZI_ROT_ENFCT_PUMP_3', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_ROT_TANK_SM', fieldName: 'CHK_SPZI_ROT_TANK_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_IMHF_NPFL_CNT', fieldName: 'CHK_SPZI_IMHF_NPFL_CNT', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_IMHF_ENFCT_PUMP_1', fieldName: 'CHK_SPZI_IMHF_ENFCT_PUMP_1', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_IMHF_ENFCT_PUMP_2', fieldName: 'CHK_SPZI_IMHF_ENFCT_PUMP_2', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_IMHF_ENFCT_PUMP_3', fieldName: 'CHK_SPZI_IMHF_ENFCT_PUMP_3', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_IMHF_TANK_SM', fieldName: 'CHK_SPZI_IMHF_TANK_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_WTROT_NPFL_CNT', fieldName: 'CHK_SPZI_WTROT_NPFL_CNT', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_WTROT_ENFCT_PUMP_1', fieldName: 'CHK_SPZI_WTROT_ENFCT_PUMP_1', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_WTROT_ENFCT_PUMP_2', fieldName: 'CHK_SPZI_WTROT_ENFCT_PUMP_2', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_WTROT_ENFCT_PUMP_3', fieldName: 'CHK_SPZI_WTROT_ENFCT_PUMP_3', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_WTROT_TANK_SM', fieldName: 'CHK_SPZI_WTROT_TANK_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_TFM', fieldName: 'CHK_SPZI_TFM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_ARTM', fieldName: 'CHK_SPZI_ARTM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_CTARM', fieldName: 'CHK_SPZI_CTARM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_NPFL', fieldName: 'CHK_SPZI_NPFL', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_ENFCT_PUMP', fieldName: 'CHK_SPZI_ENFCT_PUMP', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_PROC_CPC_SM', fieldName: 'CHK_SPZI_PROC_CPC_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_PROC_CPC_1', fieldName: 'CHK_SPZI_PROC_CPC_1', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_PROC_CPC_2', fieldName: 'CHK_SPZI_PROC_CPC_2', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_PROC_CPC_3', fieldName: 'CHK_SPZI_PROC_CPC_3', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_PROC_CPC_4', fieldName: 'CHK_SPZI_PROC_CPC_4', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_PROC_CPC_5', fieldName: 'CHK_SPZI_PROC_CPC_5', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_PROC_CPC_6', fieldName: 'CHK_SPZI_PROC_CPC_6', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_PROC_CPC_7', fieldName: 'CHK_SPZI_PROC_CPC_7', header: { text: '' } },
|
||||
{ name: 'CHK_SPZI_PROC_CPC_8', fieldName: 'CHK_SPZI_PROC_CPC_8', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_SM', fieldName: 'CHK_SPZO_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_MTHD_SM', fieldName: 'CHK_SPZO_MTHD_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_ROT_NPFL_CNT', fieldName: 'CHK_SPZO_ROT_NPFL_CNT', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_ROT_ENFCT_PUMP_1', fieldName: 'CHK_SPZO_ROT_ENFCT_PUMP_1', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_ROT_ENFCT_PUMP_2', fieldName: 'CHK_SPZO_ROT_ENFCT_PUMP_2', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_ROT_ENFCT_PUMP_3', fieldName: 'CHK_SPZO_ROT_ENFCT_PUMP_3', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_ROT_TANK_SM', fieldName: 'CHK_SPZO_ROT_TANK_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_IMHF_NPFL_CNT', fieldName: 'CHK_SPZO_IMHF_NPFL_CNT', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_IMHF_ENFCT_PUMP_1', fieldName: 'CHK_SPZO_IMHF_ENFCT_PUMP_1', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_IMHF_ENFCT_PUMP_2', fieldName: 'CHK_SPZO_IMHF_ENFCT_PUMP_2', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_IMHF_ENFCT_PUMP_3', fieldName: 'CHK_SPZO_IMHF_ENFCT_PUMP_3', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_IMHF_TANK_SM', fieldName: 'CHK_SPZO_IMHF_TANK_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_WTROT_NPFL_CNT', fieldName: 'CHK_SPZO_WTROT_NPFL_CNT', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_WTROT_ENFCT_PUMP_1', fieldName: 'CHK_SPZO_WTROT_ENFCT_PUMP_1', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_WTROT_ENFCT_PUMP_2', fieldName: 'CHK_SPZO_WTROT_ENFCT_PUMP_2', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_WTROT_ENFCT_PUMP_3', fieldName: 'CHK_SPZO_WTROT_ENFCT_PUMP_3', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_WTROT_TANK_SM', fieldName: 'CHK_SPZO_WTROT_TANK_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_TFM', fieldName: 'CHK_SPZO_TFM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_ARTM', fieldName: 'CHK_SPZO_ARTM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_CTARM', fieldName: 'CHK_SPZO_CTARM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_NPFL', fieldName: 'CHK_SPZO_NPFL', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_ENFCT_PUMP', fieldName: 'CHK_SPZO_ENFCT_PUMP', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_PROC_CPC_SM', fieldName: 'CHK_SPZO_PROC_CPC_SM', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_PROC_CPC_1', fieldName: 'CHK_SPZO_PROC_CPC_1', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_PROC_CPC_2', fieldName: 'CHK_SPZO_PROC_CPC_2', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_PROC_CPC_3', fieldName: 'CHK_SPZO_PROC_CPC_3', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_PROC_CPC_4', fieldName: 'CHK_SPZO_PROC_CPC_4', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_PROC_CPC_5', fieldName: 'CHK_SPZO_PROC_CPC_5', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_PROC_CPC_6', fieldName: 'CHK_SPZO_PROC_CPC_6', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_PROC_CPC_7', fieldName: 'CHK_SPZO_PROC_CPC_7', header: { text: '' } },
|
||||
{ name: 'CHK_SPZO_PROC_CPC_8', fieldName: 'CHK_SPZO_PROC_CPC_8', header: { text: '' } },
|
||||
],
|
||||
columnLayout: [
|
||||
{
|
||||
name: 'group_admin',
|
||||
header: { text: '행정구역' },
|
||||
items: [
|
||||
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 2 }] },
|
||||
'sggNm',
|
||||
],
|
||||
items: ['SIDO', 'GUGUN']
|
||||
},
|
||||
'grssFcltCnt',
|
||||
'TOT_FCLTY_CNT',
|
||||
{
|
||||
name: 'group_spzi',
|
||||
header: { text: '하수처리구역 내' },
|
||||
items: [
|
||||
'staaInsdWhol',
|
||||
'SPZI_SM',
|
||||
{
|
||||
name: 'group_spzi_mthd',
|
||||
header: { text: '처리방식별' },
|
||||
items: [
|
||||
'staaInsdPrcsMthByWhol',
|
||||
'SPZI_MTHD_SM',
|
||||
{
|
||||
name: 'group_spzi_rot',
|
||||
header: { text: '부패탱크' },
|
||||
items: [
|
||||
'staaInsdSttkNprsflCnt',
|
||||
'step1StaaInsdSttkFrcCnt'
|
||||
'SPZI_ROT_NPFL_CNT',
|
||||
'SPZI_ROT_ENFCT_PUMP_1'
|
||||
]
|
||||
},
|
||||
'staaInsdSprktpFltrtbCnt',
|
||||
'staaInsdAertMthdCnt',
|
||||
'staaInsdCntcAertCnt',
|
||||
'staaInsdEtcCnt'
|
||||
'SPZI_WTROT_NPFL_CNT',
|
||||
'SPZI_TFM',
|
||||
'SPZI_ARTM',
|
||||
'SPZI_CTARM'
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'group_spzi_proc',
|
||||
header: { text: '처리용량별' },
|
||||
items: [
|
||||
'staaInsdPrcsCpctByWhol',
|
||||
'step1StaaInsdNope',
|
||||
'step2StaaInsdNope',
|
||||
'step3StaaInsdNope',
|
||||
'step4StaaInsdNope',
|
||||
'step5StaaInsdNope',
|
||||
'step6StaaInsdNope',
|
||||
'step7StaaInsdNope',
|
||||
'step8StaaInsdNope'
|
||||
'SPZI_PROC_CPC_SM',
|
||||
'SPZI_PROC_CPC_1',
|
||||
'SPZI_PROC_CPC_2',
|
||||
'SPZI_PROC_CPC_3',
|
||||
'SPZI_PROC_CPC_4',
|
||||
'SPZI_PROC_CPC_5',
|
||||
'SPZI_PROC_CPC_6',
|
||||
'SPZI_PROC_CPC_7',
|
||||
'SPZI_PROC_CPC_8'
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -323,49 +189,47 @@ export const SepticTankStatusInpColumn = {
|
||||
name: 'group_spzo',
|
||||
header: { text: '하수처리구역 외' },
|
||||
items: [
|
||||
'staaExcpWhol',
|
||||
'SPZO_SM',
|
||||
{
|
||||
name: 'group_spzo_mthd',
|
||||
header: { text: '처리방식별' },
|
||||
items: [
|
||||
'staaExcpPrcsMthByWhol',
|
||||
'SPZO_MTHD_SM',
|
||||
{
|
||||
name: 'group_spzo_rot',
|
||||
header: { text: '부패탱크' },
|
||||
items: [
|
||||
'staaExcpSttkNprsflCnt',
|
||||
'step1StaaExcpSttkFrcCnt'
|
||||
'SPZO_ROT_NPFL_CNT',
|
||||
'SPZO_ROT_ENFCT_PUMP_1'
|
||||
]
|
||||
},
|
||||
'staaExcpSprktpFltrtbCnt',
|
||||
'staaExcpAertMthdCnt',
|
||||
'staaExcpCntcAertCnt',
|
||||
'staaExcpEtcCnt'
|
||||
'SPZO_WTROT_NPFL_CNT',
|
||||
'SPZO_TFM',
|
||||
'SPZO_ARTM',
|
||||
'SPZO_CTARM'
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'group_spzo_proc',
|
||||
header: { text: '처리용량별' },
|
||||
items: [
|
||||
'staaExcpPrcsCpctByWhol',
|
||||
'step1StaaExcpNope',
|
||||
'step2StaaExcpNope',
|
||||
'step3StaaExcpNope',
|
||||
'step4StaaExcpNope',
|
||||
'step5StaaExcpNope',
|
||||
'step6StaaExcpNope',
|
||||
'step7StaaExcpNope',
|
||||
'step8StaaExcpNope'
|
||||
'SPZO_PROC_CPC_SM',
|
||||
'SPZO_PROC_CPC_1',
|
||||
'SPZO_PROC_CPC_2',
|
||||
'SPZO_PROC_CPC_3',
|
||||
'SPZO_PROC_CPC_4',
|
||||
'SPZO_PROC_CPC_5',
|
||||
'SPZO_PROC_CPC_6',
|
||||
'SPZO_PROC_CPC_7',
|
||||
'SPZO_PROC_CPC_8'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
'rmrk',
|
||||
'admdstCd',
|
||||
'admdstNm'
|
||||
'RMK'
|
||||
],
|
||||
rowStartNum: 4,
|
||||
fixedColumns: 1,
|
||||
tabKey: 'ST00080002',
|
||||
tabKey: 'septicTankStatusInp',
|
||||
tabLabel: '정화조 현황'
|
||||
};
|
||||
+61
-117
@@ -5,119 +5,65 @@ import { ValueType } from "realgrid";
|
||||
export const SewageTreatFactStatusInpColumn = {
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, footer: { text: '합계' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' }, editable: false },
|
||||
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' }, editable: false, footer: { text: '합계' } },
|
||||
|
||||
// 총계
|
||||
{
|
||||
name: 'wholDrtwPrcsFcltCnt',
|
||||
fieldName: 'wholDrtwPrcsFcltCnt',
|
||||
header: { text: '총계' },
|
||||
editable: false,
|
||||
footer: footerInt,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: [
|
||||
'step1StaaPrcsQnt',
|
||||
'step2StaaPrcsQnt',
|
||||
'step3StaaPrcsQnt',
|
||||
'step4StaaPrcsQnt',
|
||||
'step5StaaPrcsQnt',
|
||||
'step6StaaPrcsQnt',
|
||||
'step7StaaPrcsQnt',
|
||||
'step1StaaExcpPrcsQnt',
|
||||
'step2StaaExcpPrcsQnt',
|
||||
'step3StaaExcpPrcsQnt',
|
||||
'step4StaaExcpPrcsQnt',
|
||||
'step5StaaExcpPrcsQnt',
|
||||
'step6StaaExcpPrcsQnt',
|
||||
'step7StaaExcpPrcsQnt',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'STTY_SM', fieldName: '총계', header: { text: '총계' }, editable: false, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 오수처리시설 > 하수처리구역 내(m³/일)
|
||||
{
|
||||
name: 'wholStaaCnt',
|
||||
fieldName: 'wholStaaCnt',
|
||||
header: { text: '계' },
|
||||
editable: false,
|
||||
footer: footerInt,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: [
|
||||
'step1StaaPrcsQnt',
|
||||
'step2StaaPrcsQnt',
|
||||
'step3StaaPrcsQnt',
|
||||
'step4StaaPrcsQnt',
|
||||
'step5StaaPrcsQnt',
|
||||
'step6StaaPrcsQnt',
|
||||
'step7StaaPrcsQnt',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'step1StaaPrcsQnt', fieldName: 'step1StaaPrcsQnt', header: { text: '2이하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step2StaaPrcsQnt', fieldName: 'step2StaaPrcsQnt', header: { text: '3~10' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step3StaaPrcsQnt', fieldName: 'step3StaaPrcsQnt', header: { text: '11~20' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step4StaaPrcsQnt', fieldName: 'step4StaaPrcsQnt', header: { text: '21~50' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step5StaaPrcsQnt', fieldName: 'step5StaaPrcsQnt', header: { text: '51~100' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step6StaaPrcsQnt', fieldName: 'step6StaaPrcsQnt', header: { text: '101~500' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step7StaaPrcsQnt', fieldName: 'step7StaaPrcsQnt', header: { text: '501이상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_INNER_SM', fieldName: '계', header: { text: '계' }, editable: false, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_INNER_2', fieldName: '2이하', header: { text: '2이하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_INNER_3', fieldName: '3~10', header: { text: '3~10' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_INNER_11', fieldName: '11~20', header: { text: '11~20' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_INNER_21', fieldName: '21~50', header: { text: '21~50' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_INNER_51', fieldName: '51~100', header: { text: '51~100' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_INNER_101', fieldName: '101~500', header: { text: '101~500' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_INNER_501', fieldName: '501이상', header: { text: '501이상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 오수처리시설 > 하수처리구역 외(m³/일)
|
||||
{
|
||||
name: 'staaExcpWhol',
|
||||
fieldName: 'staaExcpWhol',
|
||||
header: { text: '계' },
|
||||
editable: false,
|
||||
footer: footerInt,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: [
|
||||
'step1StaaExcpPrcsQnt',
|
||||
'step2StaaExcpPrcsQnt',
|
||||
'step3StaaExcpPrcsQnt',
|
||||
'step4StaaExcpPrcsQnt',
|
||||
'step5StaaExcpPrcsQnt',
|
||||
'step6StaaExcpPrcsQnt',
|
||||
'step7StaaExcpPrcsQnt',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'step1StaaExcpPrcsQnt', fieldName: 'step1StaaExcpPrcsQnt', header: { text: '2이하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step2StaaExcpPrcsQnt', fieldName: 'step2StaaExcpPrcsQnt', header: { text: '3~10' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step3StaaExcpPrcsQnt', fieldName: 'step3StaaExcpPrcsQnt', header: { text: '11~20' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step4StaaExcpPrcsQnt', fieldName: 'step4StaaExcpPrcsQnt', header: { text: '21~50' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step5StaaExcpPrcsQnt', fieldName: 'step5StaaExcpPrcsQnt', header: { text: '51~100' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step6StaaExcpPrcsQnt', fieldName: 'step6StaaExcpPrcsQnt', header: { text: '101~500' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'step7StaaExcpPrcsQnt', fieldName: 'step7StaaExcpPrcsQnt', header: { text: '501이상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_OUTER_SM', fieldName: '계', header: { text: '계' }, editable: false, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_OUTER_2', fieldName: '2이하', header: { text: '2이하' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_OUTER_3', fieldName: '3~10', header: { text: '3~10' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_OUTER_11', fieldName: '11~20', header: { text: '11~20' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_OUTER_21', fieldName: '21~50', header: { text: '21~50' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_OUTER_51', fieldName: '51~100', header: { text: '51~100' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_OUTER_101', fieldName: '101~500', header: { text: '101~500' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'STTY_ZONE_OUTER_501', fieldName: '501이상', header: { text: '501이상' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 비고
|
||||
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
||||
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
|
||||
|
||||
// hidden
|
||||
{ name: 'admdstCd', fieldName: 'admdstCd', header: { text: '행정구역코드' }, visible: false, },
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, visible: false },
|
||||
{ name: 'WRTER_OPINION', fieldName: '사용자의견', header: { text: '사용자의견' } },
|
||||
{ name: 'CHCKER_OPINION', fieldName: '검토자의견', header: { text: '검토자의견' } },
|
||||
|
||||
// 검증 필드 (검증 여부 표시용, 빨간색 표시)
|
||||
{ name: 'CHK_STTY_SM', fieldName: 'CHK_STTY_SM', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_INNER_SM', fieldName: 'CHK_STTY_ZONE_INNER_SM', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_INNER_2', fieldName: 'CHK_STTY_ZONE_INNER_2', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_INNER_3', fieldName: 'CHK_STTY_ZONE_INNER_3', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_INNER_11', fieldName: 'CHK_STTY_ZONE_INNER_11', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_INNER_21', fieldName: 'CHK_STTY_ZONE_INNER_21', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_INNER_51', fieldName: 'CHK_STTY_ZONE_INNER_51', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_INNER_101', fieldName: 'CHK_STTY_ZONE_INNER_101', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_INNER_501', fieldName: 'CHK_STTY_ZONE_INNER_501', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_OUTER_SM', fieldName: 'CHK_STTY_ZONE_OUTER_SM', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_OUTER_2', fieldName: 'CHK_STTY_ZONE_OUTER_2', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_OUTER_3', fieldName: 'CHK_STTY_ZONE_OUTER_3', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_OUTER_11', fieldName: 'CHK_STTY_ZONE_OUTER_11', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_OUTER_21', fieldName: 'CHK_STTY_ZONE_OUTER_21', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_OUTER_51', fieldName: 'CHK_STTY_ZONE_OUTER_51', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_OUTER_101', fieldName: 'CHK_STTY_ZONE_OUTER_101', header: { text: '' } },
|
||||
{ name: 'CHK_STTY_ZONE_OUTER_501', fieldName: 'CHK_STTY_ZONE_OUTER_501', header: { text: '' } },
|
||||
],
|
||||
columnLayout: [
|
||||
{
|
||||
name: 'group_admin',
|
||||
header: { text: '행정구역' },
|
||||
items: [
|
||||
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 2 }] },
|
||||
'sggNm',
|
||||
],
|
||||
items: ['SIDO', 'GUGUN']
|
||||
},
|
||||
'wholDrtwPrcsFcltCnt',
|
||||
'STTY_SM',
|
||||
{
|
||||
name: 'group_stty',
|
||||
header: { text: '오수처리시설' },
|
||||
@@ -126,38 +72,36 @@ export const SewageTreatFactStatusInpColumn = {
|
||||
name: 'group_inner',
|
||||
header: { text: '하수처리구역 내(m³/일)' },
|
||||
items: [
|
||||
'wholStaaCnt',
|
||||
'step1StaaPrcsQnt',
|
||||
'step2StaaPrcsQnt',
|
||||
'step3StaaPrcsQnt',
|
||||
'step4StaaPrcsQnt',
|
||||
'step5StaaPrcsQnt',
|
||||
'step6StaaPrcsQnt',
|
||||
'step7StaaPrcsQnt'
|
||||
'STTY_ZONE_INNER_SM',
|
||||
'STTY_ZONE_INNER_2',
|
||||
'STTY_ZONE_INNER_3',
|
||||
'STTY_ZONE_INNER_11',
|
||||
'STTY_ZONE_INNER_21',
|
||||
'STTY_ZONE_INNER_51',
|
||||
'STTY_ZONE_INNER_101',
|
||||
'STTY_ZONE_INNER_501'
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'group_outer',
|
||||
header: { text: '하수처리구역 외(m³/일)' },
|
||||
items: [
|
||||
'staaExcpWhol',
|
||||
'step1StaaExcpPrcsQnt',
|
||||
'step2StaaExcpPrcsQnt',
|
||||
'step3StaaExcpPrcsQnt',
|
||||
'step4StaaExcpPrcsQnt',
|
||||
'step5StaaExcpPrcsQnt',
|
||||
'step6StaaExcpPrcsQnt',
|
||||
'step7StaaExcpPrcsQnt'
|
||||
'STTY_ZONE_OUTER_SM',
|
||||
'STTY_ZONE_OUTER_2',
|
||||
'STTY_ZONE_OUTER_3',
|
||||
'STTY_ZONE_OUTER_11',
|
||||
'STTY_ZONE_OUTER_21',
|
||||
'STTY_ZONE_OUTER_51',
|
||||
'STTY_ZONE_OUTER_101',
|
||||
'STTY_ZONE_OUTER_501'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
'rmrk',
|
||||
'admdstCd',
|
||||
'admdstNm'
|
||||
'RMK'
|
||||
],
|
||||
rowStartNum: 3,
|
||||
fixedColumns: 1,
|
||||
tabKey: 'ST00080001',
|
||||
tabKey: 'sewageTreatFactStatusInp',
|
||||
tabLabel: '처리용량별 오수처리시설 현황'
|
||||
};
|
||||
+6
-77
@@ -1,33 +1,6 @@
|
||||
import type { ColumnConfig } from "@/components/type/DataGrid.type";
|
||||
import { footerInt, footerDecimal1, footerDecimal2, footerDecimal3 } from "@/components/util/grid/footerSummary";
|
||||
import { ValueType } from "realgrid";
|
||||
|
||||
const RAINFALL_PUMP_FCLTY_KIND_VALUES = ["해당없음", "제1종", "제2종", "제3종"] as const;
|
||||
const RAINFALL_PUMP_YN_VALUES = ["유", "무"] as const;
|
||||
|
||||
function dropdownColumn(
|
||||
col: Pick<ColumnConfig, "name" | "fieldName" | "header"> &
|
||||
Partial<ColumnConfig>,
|
||||
options: readonly string[],
|
||||
): ColumnConfig {
|
||||
const values = [...options];
|
||||
return {
|
||||
...col,
|
||||
values,
|
||||
labels: values,
|
||||
lookupDisplay: true,
|
||||
editor: {
|
||||
type: "dropdown",
|
||||
domainOnly: true,
|
||||
textReadOnly: true,
|
||||
commitOnSelect: true,
|
||||
dropDownWhenClick: true,
|
||||
values,
|
||||
labels: values,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
// 하수도 통계 관리 > 04.하수저류시설 및 빗물펌프장 > tab 2: 빗물펌프장
|
||||
export const RainfallPumpStationInpColumn = {
|
||||
columns: [
|
||||
@@ -37,10 +10,7 @@ export const RainfallPumpStationInpColumn = {
|
||||
{ name: 'fcltNm', fieldName: 'fcltNm', header: { text: '시설명' } },
|
||||
{ name: 'fcltPstnCn', fieldName: 'fcltPstnCn', header: { text: '위치' } },
|
||||
|
||||
dropdownColumn(
|
||||
{ name: 'fcltyKndCn', fieldName: 'fcltyKndCn', header: { text: '시설물종류' } },
|
||||
RAINFALL_PUMP_FCLTY_KIND_VALUES,
|
||||
),
|
||||
{ name: 'fcltyKndCn', fieldName: 'fcltyKndCn', header: { text: '시설물종류' } },
|
||||
|
||||
{
|
||||
name: 'oprtngStrtYmd',
|
||||
@@ -59,46 +29,14 @@ export const RainfallPumpStationInpColumn = {
|
||||
{ name: 'wtrStrgZoneArea', fieldName: 'wtrStrgZoneArea', header: { text: '집수구역면적(㎢)' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
|
||||
// 유수지
|
||||
dropdownColumn(
|
||||
{ name: 'rsvrYn', fieldName: 'rsvrYn', header: { text: '유수지유무(유,무)' } },
|
||||
RAINFALL_PUMP_YN_VALUES,
|
||||
),
|
||||
{ name: 'rsvrYn', fieldName: 'rsvrYn', header: { text: '유수지유무(유,무)' } },
|
||||
{ name: 'rsvrImpndQnt', fieldName: 'rsvrImpndQnt', header: { text: '저류랑(m³)' }, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 흡수정
|
||||
{ name: 'abstnRgnImpdQnt', fieldName: 'abstnRgnImpdQnt', header: { text: '저류랑(m³)' }, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 펌프시설 > 총양수량(m³/min)
|
||||
{
|
||||
name: 'grssPpqty',
|
||||
fieldName: 'grssPpqty',
|
||||
header: { text: '총양수량(m³/min)' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
type: 'pumpGrossPpqty' as const,
|
||||
pumpGroups: [
|
||||
{
|
||||
pumpCntField: 'pumpFcltN1PumpCnt',
|
||||
rsrvPumpCntField: 'pumpFcltN1RsrvPumpCnt',
|
||||
perPpqtyField: 'pumpFcltN1PerPpqty',
|
||||
},
|
||||
{
|
||||
pumpCntField: 'pumpFcltN2PumpCnt',
|
||||
rsrvPumpCntField: 'pumpFcltN2RsrvPumpCnt',
|
||||
perPpqtyField: 'pumpFcltN2PerPpqty',
|
||||
},
|
||||
{
|
||||
pumpCntField: 'pumpFcltN3PumpCnt',
|
||||
rsrvPumpCntField: 'pumpFcltN3RsrvPumpCnt',
|
||||
perPpqtyField: 'pumpFcltN3PerPpqty',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{ name: 'grssPpqty', fieldName: 'grssPpqty', header: { text: '총양수량(m³/min)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 펌프시설1
|
||||
{ name: 'pumpFcltN1DmtrExpln', fieldName: 'pumpFcltN1DmtrExpln', header: { text: '구경(mm)' } },
|
||||
@@ -119,18 +57,9 @@ export const RainfallPumpStationInpColumn = {
|
||||
{ name: 'pumpFcltN3RsrvPumpCnt', fieldName: 'pumpFcltN3RsrvPumpCnt', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 부대시설
|
||||
dropdownColumn(
|
||||
{ name: 'prcsgFcltYn', fieldName: 'prcsgFcltYn', header: { text: '전처리시설유무(유/무)' } },
|
||||
RAINFALL_PUMP_YN_VALUES,
|
||||
),
|
||||
dropdownColumn(
|
||||
{ name: 'ddrztnEqpmYn', fieldName: 'ddrztnEqpmYn', header: { text: '탈취설비유무(유/무)' } },
|
||||
RAINFALL_PUMP_YN_VALUES,
|
||||
),
|
||||
dropdownColumn(
|
||||
{ name: 'oslfEtgtYn', fieldName: 'oslfEtgtYn', header: { text: '자가발전유무(유/무)' } },
|
||||
RAINFALL_PUMP_YN_VALUES,
|
||||
),
|
||||
{ name: 'prcsgFcltYn', fieldName: 'prcsgFcltYn', header: { text: '전처리시설유무(유/무)' } },
|
||||
{ name: 'ddrztnEqpmYn', fieldName: 'ddrztnEqpmYn', header: { text: '탈취설비유무(유/무)' } },
|
||||
{ name: 'oslfEtgtYn', fieldName: 'oslfEtgtYn', header: { text: '자가발전유무(유/무)' } },
|
||||
|
||||
// 방류수역
|
||||
{ name: 'dschgWtrsExpln', fieldName: 'dschgWtrsExpln', header: { text: '방류수역' } },
|
||||
|
||||
+9
-84
@@ -11,10 +11,6 @@ export const SEWAGE_RESERVOIR_FCLT_STRCT_VALUES = [
|
||||
"지하터널식",
|
||||
"기타",
|
||||
] as const;
|
||||
export const SEWAGE_RESERVOIR_YN_VALUES = ["유", "무"] as const;
|
||||
export const SEWAGE_RESERVOIR_MLTV_MTH_VALUES = ["자연배수", "강제배수"] as const;
|
||||
export const SEWAGE_RESERVOIR_IMPD_MTH_VALUES = ["직렬", "병렬"] as const;
|
||||
export const SEWAGE_RESERVOIR_IMPD_PRCS_MTHD_VALUES = ["자체처리", "연계처리"] as const;
|
||||
|
||||
function dropdownColumn(
|
||||
col: Pick<ColumnConfig, "name" | "fieldName" | "header"> &
|
||||
@@ -103,36 +99,7 @@ export const SewageReservoirInpColumn = {
|
||||
{ name: 'impdFcltCpct', fieldName: 'impdFcltCpct', header: { text: '시설용량(m³)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 펌프시설 > 총양수량
|
||||
{
|
||||
name: 'grssPpqty',
|
||||
fieldName: 'grssPpqty',
|
||||
header: { text: '총양수량(m³/min)' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
type: 'pumpGrossPpqty' as const,
|
||||
pumpGroups: [
|
||||
{
|
||||
pumpCntField: 'pumpFcltN1PumpCnt',
|
||||
rsrvPumpCntField: 'pumpFcltN1RsrvPumpCnt',
|
||||
perPpqtyField: 'pumpFcltN1PerPpqty',
|
||||
},
|
||||
{
|
||||
pumpCntField: 'pumpFcltN2PumpCnt',
|
||||
rsrvPumpCntField: 'pumpFcltN2RsrvPumpCnt',
|
||||
perPpqtyField: 'pumpFcltN2PerPpqty',
|
||||
},
|
||||
{
|
||||
pumpCntField: 'pumpFcltN3PumpCnt',
|
||||
rsrvPumpCntField: 'pumpFcltN3RsrvPumpCnt',
|
||||
perPpqtyField: 'pumpFcltN3PerPpqty',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{ name: 'grssPpqty', fieldName: 'grssPpqty', header: { text: '총양수량(m³/min)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 펌프시설 1
|
||||
{ name: 'pumpFcltN1DmtrExpln', fieldName: 'pumpFcltN1DmtrExpln', header: { text: '구경(mm)' } },
|
||||
@@ -153,60 +120,18 @@ export const SewageReservoirInpColumn = {
|
||||
{ name: 'pumpFcltN3RsrvPumpCnt', fieldName: 'pumpFcltN3RsrvPumpCnt', header: { text: '예비펌프대수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 부대시설
|
||||
dropdownColumn(
|
||||
{
|
||||
name: "prcsgFcltYn",
|
||||
fieldName: "prcsgFcltYn",
|
||||
header: { text: "전처리시설유무(유/무)" },
|
||||
},
|
||||
SEWAGE_RESERVOIR_YN_VALUES,
|
||||
),
|
||||
dropdownColumn(
|
||||
{
|
||||
name: "ddrztnEqpmYn",
|
||||
fieldName: "ddrztnEqpmYn",
|
||||
header: { text: "탈취설비유무(유/무)" },
|
||||
},
|
||||
SEWAGE_RESERVOIR_YN_VALUES,
|
||||
),
|
||||
dropdownColumn(
|
||||
{
|
||||
name: "oslfEtgtYn",
|
||||
fieldName: "oslfEtgtYn",
|
||||
header: { text: "자가발전유무(유/무)" },
|
||||
},
|
||||
SEWAGE_RESERVOIR_YN_VALUES,
|
||||
),
|
||||
{ name: 'prcsgFcltYn', fieldName: 'prcsgFcltYn', header: { text: '전처리시설유무(유/무)' } },
|
||||
{ name: 'ddrztnEqpmYn', fieldName: 'ddrztnEqpmYn', header: { text: '탈취설비유무(유/무)' } },
|
||||
{ name: 'oslfEtgtYn', fieldName: 'oslfEtgtYn', header: { text: '자가발전유무(유/무)' } },
|
||||
|
||||
// 배수 방식
|
||||
dropdownColumn(
|
||||
{
|
||||
name: "mltvMthCn",
|
||||
fieldName: "mltvMthCn",
|
||||
header: { text: "배수방식(자연배수,강제배수)" },
|
||||
},
|
||||
SEWAGE_RESERVOIR_MLTV_MTH_VALUES,
|
||||
),
|
||||
|
||||
{ name: 'mltvMthCn', fieldName: 'mltvMthCn', header: { text: '배수방식(자연배수,강제배수)' } },
|
||||
|
||||
// 저류 방식
|
||||
dropdownColumn(
|
||||
{
|
||||
name: "impdMthCn",
|
||||
fieldName: "impdMthCn",
|
||||
header: { text: "저류방식(직렬,병렬)" },
|
||||
},
|
||||
SEWAGE_RESERVOIR_IMPD_MTH_VALUES,
|
||||
),
|
||||
|
||||
{ name: 'impdMthCn', fieldName: 'impdMthCn', header: { text: '저류방식(직렬,병렬)' } },
|
||||
|
||||
// 저류수 처리방법
|
||||
dropdownColumn(
|
||||
{
|
||||
name: "impdPrcsMthdCn",
|
||||
fieldName: "impdPrcsMthdCn",
|
||||
header: { text: "저류수처리방법(자체처리,연계처리)" },
|
||||
},
|
||||
SEWAGE_RESERVOIR_IMPD_PRCS_MTHD_VALUES,
|
||||
),
|
||||
{ name: 'impdPrcsMthdCn', fieldName: 'impdPrcsMthdCn', header: { text: '저류수처리방법(자체처리,연계처리)' } },
|
||||
|
||||
// 방류 수역
|
||||
{ name: 'dschgWtrsExpln', fieldName: 'dschgWtrsExpln', header: { text: '방류수역(또는 연계처리장명)' } },
|
||||
|
||||
@@ -5,72 +5,46 @@ import { ValueType } from "realgrid";
|
||||
export const CauserBurdenInpColumn = {
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, footer: { text: '합계' }, editable: false },
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' } },
|
||||
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' }, editable: false },
|
||||
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' }, editable: false, footer: { text: '합계' } },
|
||||
|
||||
// 부과액
|
||||
{ name: 'levyEvntcsCnt', fieldName: 'levyEvntcsCnt', header: { text: '건수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'levyAmt', fieldName: 'levyAmt', header: { text: '금액(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'LEVY_CO', fieldName: '건수', header: { text: '건수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'LEVY_AMOUNT', fieldName: '금액(백만원)', header: { text: '금액(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 대상별 징수현황 > 계
|
||||
{
|
||||
name: 'trgtByWholClctnEvntcsCnt',
|
||||
fieldName: 'trgtByWholClctnEvntcsCnt',
|
||||
header: { text: '건수' },
|
||||
editable: false,
|
||||
footer: footerInt,
|
||||
styleName: 'rg-cell-total',
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0',
|
||||
computed: {
|
||||
fields: ['mltvEqpmEvntcsCnt', 'othrCstrnOthrActrCnt'],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'trgtByWholClctnAmt',
|
||||
fieldName: 'trgtByWholClctnAmt',
|
||||
header: { text: '금액(백만원)' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
styleName: 'rg-cell-total',
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
computed: {
|
||||
fields: ['mltvEqpmAmt', 'othrCstrnOthrActrAmt'],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'TRGET_LEV_STTUS_CO', fieldName: '건수', header: { text: '건수' }, editable: false, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'TRGET_LEV_STTUS_AMOUNT', fieldName: '금액(백만원)', header: { text: '금액(백만원)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 대상별 징수현황 > 배수설비설치자
|
||||
{ name: 'mltvEqpmEvntcsCnt', fieldName: 'mltvEqpmEvntcsCnt', header: { text: '건수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'mltvEqpmAmt', fieldName: 'mltvEqpmAmt', header: { text: '금액(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'DRNG_EQP_CO', fieldName: '건수', header: { text: '건수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'DRNG_EQP_AMOUNT', fieldName: '금액(백만원)', header: { text: '금액(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 대상별 징수현황 > 타공사·타행위자
|
||||
{ name: 'othrCstrnOthrActrCnt', fieldName: 'othrCstrnOthrActrCnt', header: { text: '건수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'othrCstrnOthrActrAmt', fieldName: 'othrCstrnOthrActrAmt', header: { text: '금액(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'CNTRWK_CO', fieldName: '건수', header: { text: '건수' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'CNTRWK_AMOUNT', fieldName: '금액(백만원)', header: { text: '금액(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 비고
|
||||
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
||||
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
|
||||
|
||||
// hidden
|
||||
{ name: 'admdstCd', fieldName: 'admdstCd', header: { text: '행정구역코드' }, visible: false, },
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, visible: false },
|
||||
{ name: 'CHCKER_OPINION', fieldName: '검토자의견', header: { text: '검토자의견' } },
|
||||
{ name: 'WRTER_OPINION', fieldName: '사용자의견', header: { text: '사용자의견' } },
|
||||
|
||||
// 참조 필드
|
||||
{ name: 'AMNTBRNCSR', fieldName: 'AMNTBRNCSR', header: { text: 'AMNTBRNCSR' } },
|
||||
],
|
||||
|
||||
columnLayout: [
|
||||
{
|
||||
name: 'group_admin',
|
||||
header: { text: '행정구역' },
|
||||
items: [
|
||||
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 2 }] },
|
||||
'sggNm',
|
||||
],
|
||||
items: ['SIDO', 'GUGUN']
|
||||
},
|
||||
{
|
||||
name: 'group_assess',
|
||||
header: { text: '부과액' },
|
||||
items: ['levyEvntcsCnt', 'levyAmt']
|
||||
items: ['LEVY_CO', 'LEVY_AMOUNT']
|
||||
},
|
||||
{
|
||||
name: 'group_collection',
|
||||
@@ -79,27 +53,25 @@ export const CauserBurdenInpColumn = {
|
||||
{
|
||||
name: 'coll_group_total',
|
||||
header: { text: '계' },
|
||||
items: ['trgtByWholClctnEvntcsCnt', 'trgtByWholClctnAmt']
|
||||
items: ['TRGET_LEV_STTUS_CO', 'TRGET_LEV_STTUS_AMOUNT']
|
||||
},
|
||||
{
|
||||
name: 'coll_group_inst',
|
||||
header: { text: '배수설비설치자(하수도법 제61조 제1항)' },
|
||||
items: ['mltvEqpmEvntcsCnt', 'mltvEqpmAmt']
|
||||
items: ['DRNG_EQP_CO', 'DRNG_EQP_AMOUNT']
|
||||
},
|
||||
{
|
||||
name: 'coll_group_otr',
|
||||
header: { text: '타공사·타행위자(하수도법 제61조 제2항)' },
|
||||
items: ['othrCstrnOthrActrCnt', 'othrCstrnOthrActrAmt']
|
||||
items: ['CNTRWK_CO', 'CNTRWK_AMOUNT']
|
||||
}
|
||||
]
|
||||
},
|
||||
'rmrk',
|
||||
'admdstCd',
|
||||
'admdstNm'
|
||||
'RMK'
|
||||
],
|
||||
|
||||
rowStartNum: 3,
|
||||
fixedColumns: 1,
|
||||
tabKey: 'ST00090004',
|
||||
tabKey: 'causerBurdenInp',
|
||||
tabLabel: '원인자 부담금'
|
||||
};
|
||||
+24
-65
@@ -5,86 +5,45 @@ import { ValueType } from "realgrid";
|
||||
export const SewerageChargeInpColumn = {
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, footer: { text: '합계' }, editable: false },
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' } },
|
||||
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' }, editable: false },
|
||||
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' }, editable: false, footer: { text: '합계' } },
|
||||
|
||||
// 요금
|
||||
{ name: 'anlLevyQnt', fieldName: 'anlLevyQnt', header: { text: '연간조정량(m³)(A)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'levyAmt', fieldName: 'levyAmt', header: { text: '하수도사용료수익(원)(B)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{
|
||||
name: 'avgUntprcAmt',
|
||||
fieldName: 'avgUntprcAmt',
|
||||
header: { text: 'm³당요금(원/m³) C=(B/A)' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
styleName: 'rg-cell-total',
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
computed: {
|
||||
fields: ['levyAmt', 'anlLevyQnt'],
|
||||
type: 'quotient' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'FYER_LEVY_QY', fieldName: '연간조정량(m³)(A)', header: { text: '연간조정량(m³)(A)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'LEVY_AMOUNT', fieldName: '하수도사용료수익(원)(B)', header: { text: '하수도사용료수익(원)(B)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'AVRG_UNTPC', fieldName: 'm³당요금(원/m³) C=(B/A)', header: { text: 'm³당요금(원/m³) C=(B/A)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
{ name: 'grssPrmcoAmt', fieldName: 'grssPrmcoAmt', header: { text: '총괄원가(원)(D)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{
|
||||
name: 'grssUnitPrmcoAmt',
|
||||
fieldName: 'grssUnitPrmcoAmt',
|
||||
header: { text: 'm³당원가(원/m³) E=(D/A)' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
styleName: 'rg-cell-total',
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
computed: {
|
||||
fields: ['grssPrmcoAmt', 'anlLevyQnt'],
|
||||
type: 'quotient' as const,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'rlztnRt',
|
||||
fieldName: 'rlztnRt',
|
||||
header: { text: '요금현실화율(%) F=(C/E*100)' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
styleName: 'rg-cell-total',
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
computed: {
|
||||
numeratorQuotient: ['levyAmt', 'anlLevyQnt'] as [string, string],
|
||||
denominatorQuotient: ['grssPrmcoAmt', 'anlLevyQnt'] as [string, string],
|
||||
type: 'quotientRatioPercent' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'SMRIZE_PRMPC', fieldName: '총괄원가(원)(D)', header: { text: '총괄원가(원)(D)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'SMRIZE_UNIT_PRMPC', fieldName: 'm³당원가(원/m³) E=(D/A)', header: { text: 'm³당원가(원/m³) E=(D/A)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'RLTY_RT', fieldName: '요금현실화율(%) F=(C/E*100)', header: { text: '요금현실화율(%) F=(C/E*100)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 비고
|
||||
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
||||
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
|
||||
|
||||
// hidden
|
||||
{ name: 'admdstCd', fieldName: 'admdstCd', header: { text: '행정구역코드' }, visible: false, },
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, visible: false },
|
||||
{ name: 'CHCKER_OPINION', fieldName: '검토자의견', header: { text: '검토자의견' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'WRTER_OPINION', fieldName: '사용자의견', header: { text: '사용자의견' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 참조 필드
|
||||
{ name: 'SEWER_RNTFEE', fieldName: 'SEWER_RNTFEE', header: { text: 'SEWER_RNTFEE' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'C_LEVY_AMOUNT', fieldName: 'C_LEVY_AMOUNT', header: { text: 'C_LEVY_AMOUNT' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
],
|
||||
columnLayout: [
|
||||
{
|
||||
name: 'group_admin',
|
||||
header: { text: '행정구역' },
|
||||
items: [
|
||||
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 2 }] },
|
||||
'sggNm',
|
||||
],
|
||||
items: ['SIDO', 'GUGUN']
|
||||
},
|
||||
'anlLevyQnt',
|
||||
'levyAmt',
|
||||
'avgUntprcAmt',
|
||||
'grssPrmcoAmt',
|
||||
'grssUnitPrmcoAmt',
|
||||
'rlztnRt',
|
||||
'rmrk',
|
||||
'admdstCd',
|
||||
'admdstNm'
|
||||
'FYER_LEVY_QY',
|
||||
'LEVY_AMOUNT',
|
||||
'AVRG_UNTPC',
|
||||
'SMRIZE_PRMPC',
|
||||
'SMRIZE_UNIT_PRMPC',
|
||||
'RLTY_RT',
|
||||
'RMK'
|
||||
],
|
||||
rowStartNum: 2,
|
||||
fixedColumns: 1,
|
||||
tabKey: 'ST00090002',
|
||||
tabKey: 'sewerageChargeInp',
|
||||
tabLabel: '하수도 요금'
|
||||
};
|
||||
+71
-163
@@ -5,238 +5,146 @@ import { ValueType } from "realgrid";
|
||||
export const SewerageFinanceSettleInpColumn = {
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, footer: { text: '합계' }, editable: false },
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' } },
|
||||
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' }, editable: false },
|
||||
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' }, editable: false, footer: { text: '합계' } },
|
||||
|
||||
// 재정별 사업비
|
||||
{
|
||||
name: 'fnnByWholPjtcoAmt',
|
||||
fieldName: 'fnnByWholPjtcoAmt',
|
||||
header: { text: '계' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: [
|
||||
'cnterGovSprtAmt',
|
||||
'mctpvLcexpAmt',
|
||||
'wareaSggLclAmt',
|
||||
'sewerUseAmt',
|
||||
'orgprBrdnAmt',
|
||||
'etcIncmAmt',
|
||||
'crfwAmt',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'cnterGovSprtAmt', fieldName: 'cnterGovSprtAmt', header: { text: '중앙정부지원액' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
{ name: 'FNANC_WCT_SM', fieldName: '계', header: { text: '계' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'NTNXPN', fieldName: '중앙정부지원액', header: { text: '중앙정부지원액' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 재정별 사업비 > 지방비
|
||||
{ name: 'mctpvLcexpAmt', fieldName: 'mctpvLcexpAmt', header: { text: '특·광역시, 도' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'wareaSggLclAmt', fieldName: 'wareaSggLclAmt', header: { text: '시,군,구 지자체' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'LCLEXPNS', fieldName: '특·광역시, 도', header: { text: '특·광역시, 도' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'LCLTY_CT', fieldName: '시,군,구 지자체', header: { text: '시,군,구 지자체' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 재정별 사업비
|
||||
{ name: 'sewerUseAmt', fieldName: 'sewerUseAmt', header: { text: '하수도사용료' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'orgprBrdnAmt', fieldName: 'orgprBrdnAmt', header: { text: '원인자부담금' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'etcIncmAmt', fieldName: 'etcIncmAmt', header: { text: '기타잡수입' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'crfwAmt', fieldName: 'crfwAmt', header: { text: '이월액' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'SEWER_RNTFEE', fieldName: '하수도사용료', header: { text: '하수도사용료' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'AMNTBRNCSR', fieldName: '원인자부담금', header: { text: '원인자부담금' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'ETC_INCME', fieldName: '기타잡수입', header: { text: '기타잡수입' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'CYFD_AMOUNT', fieldName: '이월액', header: { text: '이월액' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 부채액
|
||||
{ name: 'lbltAmt', fieldName: 'lbltAmt', header: { text: '부채액(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'DEBT_AMOUNT', fieldName: '부채액(백만원)', header: { text: '부채액(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 용도별사업비 > 계
|
||||
{
|
||||
name: 'usgByWholPjtcoAmt',
|
||||
fieldName: 'usgByWholPjtcoAmt',
|
||||
header: { text: '계' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
},
|
||||
{ name: 'PRPOS_WCT_SM', fieldName: '계', header: { text: '계' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 용도별사업비 > 처리장
|
||||
{
|
||||
name: 'tmplntWholAmt',
|
||||
fieldName: 'tmplntWholAmt',
|
||||
header: { text: '소계' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: ['tmplntFcltAmt', 'tmplntMendngAmt', 'tmplntOperKeepAmt', 'tmplntEtcAmt'],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'tmplntFcltAmt', fieldName: 'tmplntFcltAmt', header: { text: '시설비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'tmplntMendngAmt', fieldName: 'tmplntMendngAmt', header: { text: '개보수비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'tmplntOperKeepAmt', fieldName: 'tmplntOperKeepAmt', header: { text: '운영유지비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'tmplntEtcAmt', fieldName: 'tmplntEtcAmt', header: { text: '기타' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'PRCPLT_SM', fieldName: '소계', header: { text: '소계' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'PRCPLT_FCLTY', fieldName: '시설비', header: { text: '시설비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'PRCPLT_RPAIR', fieldName: '개보수비', header: { text: '개보수비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'PRCPLT_ORPNS', fieldName: '운영유지비', header: { text: '운영유지비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'PRCPLT_ETC', fieldName: '기타', header: { text: '기타' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 용도별사업비 > 하수관로
|
||||
{
|
||||
name: 'wholSwagePplAmt',
|
||||
fieldName: 'wholSwagePplAmt',
|
||||
header: { text: '소계' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: [
|
||||
'swagePplFcltAmt',
|
||||
'swagePplMendngAmt',
|
||||
'swagePplOperKeepAmt',
|
||||
'swagePplEtcAmt',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'swagePplFcltAmt', fieldName: 'swagePplFcltAmt', header: { text: '시설비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'swagePplMendngAmt', fieldName: 'swagePplMendngAmt', header: { text: '개보수비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'swagePplOperKeepAmt', fieldName: 'swagePplOperKeepAmt', header: { text: '운영유지비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'swagePplEtcAmt', fieldName: 'swagePplEtcAmt', header: { text: '기타' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'SEWAGE_SM', fieldName: '소계', header: { text: '소계' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'SEWAGE_FCLTY', fieldName: '시설비', header: { text: '시설비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'SEWAGE_RPAIR', fieldName: '개보수비', header: { text: '개보수비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'SEWAGE_ORPNS', fieldName: '운영유지비', header: { text: '운영유지비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'SEWAGE_ETC', fieldName: '기타', header: { text: '기타' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 용도별사업비 > 하수저류시설
|
||||
{
|
||||
name: 'wholSwageImpdFcltAmt',
|
||||
fieldName: 'wholSwageImpdFcltAmt',
|
||||
header: { text: '소계' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: [
|
||||
'swageImpdFcltAmt',
|
||||
'swageImpdMendngAmt',
|
||||
'swageImpdOperKeepAmt',
|
||||
'swageImpdFcltEtcAmt',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'swageImpdFcltAmt', fieldName: 'swageImpdFcltAmt', header: { text: '시설비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'swageImpdMendngAmt', fieldName: 'swageImpdMendngAmt', header: { text: '개보수비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'swageImpdOperKeepAmt', fieldName: 'swageImpdOperKeepAmt', header: { text: '운영유지비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'swageImpdFcltEtcAmt', fieldName: 'swageImpdFcltEtcAmt', header: { text: '기타' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'SWGE_STRGE_SM', fieldName: '소계', header: { text: '소계' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'SWGE_STRGE_FCLTY', fieldName: '시설비', header: { text: '시설비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'SWGE_STRGE_RPAIR', fieldName: '개보수비', header: { text: '개보수비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'SWGE_STRGE_ORPNS', fieldName: '운영유지비', header: { text: '운영유지비' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'SWGE_STRGE_ETC', fieldName: '기타', header: { text: '기타' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 용도별사업비 > 기타
|
||||
{
|
||||
name: 'etcWholAmt',
|
||||
fieldName: 'etcWholAmt',
|
||||
header: { text: '소계' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
styleName: 'rg-cell-total',
|
||||
computed: {
|
||||
fields: ['etcAcdntCrfwAmt', 'etcNrcpAmt', 'etcAmt'],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'etcAcdntCrfwAmt', fieldName: 'etcAcdntCrfwAmt', header: { text: '사고이월액' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'etcNrcpAmt', fieldName: 'etcNrcpAmt', header: { text: '미수납액' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'etcAmt', fieldName: 'etcAmt', header: { text: '기타' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'ETC_SM', fieldName: '소계', header: { text: '소계' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'ACDNT_CYFD_AMOUNT', fieldName: '사고이월액', header: { text: '사고이월액' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'UNRCIV_AMOUNT', fieldName: '미수납액', header: { text: '미수납액' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'ETC_AMOUNT', fieldName: '기타', header: { text: '기타' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 비고
|
||||
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
||||
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
|
||||
|
||||
// hidden
|
||||
{ name: 'admdstCd', fieldName: 'admdstCd', header: { text: '행정구역코드' }, visible: false, },
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, visible: false },
|
||||
{ name: 'CHCKER_OPINION', fieldName: '검토자의견', header: { text: '검토자의견' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'WRTER_OPINION', fieldName: '사용자의견', header: { text: '사용자의견' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 참조 필드
|
||||
{ name: 'B_LEVY_AMOUNT', fieldName: 'B_LEVY_AMOUNT', header: { text: 'B_LEVY_AMOUNT' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'C_LEVY_AMOUNT', fieldName: 'C_LEVY_AMOUNT', header: { text: 'C_LEVY_AMOUNT' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'D_LEVY_AMOUNT', fieldName: 'D_LEVY_AMOUNT', header: { text: 'D_LEVY_AMOUNT' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
],
|
||||
columnLayout: [
|
||||
{
|
||||
name: 'group_admin',
|
||||
header: { text: '행정구역' },
|
||||
items: [
|
||||
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 2 }] },
|
||||
'sggNm',
|
||||
],
|
||||
items: ['SIDO', 'GUGUN']
|
||||
},
|
||||
{
|
||||
name: 'group_finance',
|
||||
header: { text: '재정별 사업비(백만원)' },
|
||||
items: [
|
||||
'fnnByWholPjtcoAmt',
|
||||
'cnterGovSprtAmt',
|
||||
'FNANC_WCT_SM',
|
||||
'NTNXPN',
|
||||
{
|
||||
name: 'group_local_finance',
|
||||
header: { text: '지방비' },
|
||||
items: ['mctpvLcexpAmt', 'wareaSggLclAmt']
|
||||
items: ['LCLEXPNS', 'LCLTY_CT']
|
||||
},
|
||||
'sewerUseAmt',
|
||||
'orgprBrdnAmt',
|
||||
'etcIncmAmt',
|
||||
'crfwAmt'
|
||||
'SEWER_RNTFEE',
|
||||
'AMNTBRNCSR',
|
||||
'ETC_INCME',
|
||||
'CYFD_AMOUNT'
|
||||
]
|
||||
},
|
||||
'lbltAmt',
|
||||
'DEBT_AMOUNT',
|
||||
{
|
||||
name: 'group_purpose',
|
||||
header: { text: '용도별사업비(백만원)' },
|
||||
items: [
|
||||
'usgByWholPjtcoAmt',
|
||||
'PRPOS_WCT_SM',
|
||||
{
|
||||
name: 'group_treatment',
|
||||
header: { text: '처리장' },
|
||||
items: [
|
||||
'tmplntWholAmt',
|
||||
'tmplntFcltAmt',
|
||||
'tmplntMendngAmt',
|
||||
'tmplntOperKeepAmt',
|
||||
'tmplntEtcAmt'
|
||||
'PRCPLT_SM',
|
||||
'PRCPLT_FCLTY',
|
||||
'PRCPLT_RPAIR',
|
||||
'PRCPLT_ORPNS',
|
||||
'PRCPLT_ETC'
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'group_pipe',
|
||||
header: { text: '하수관로' },
|
||||
items: [
|
||||
'wholSwagePplAmt',
|
||||
'swagePplFcltAmt',
|
||||
'swagePplMendngAmt',
|
||||
'swagePplOperKeepAmt',
|
||||
'swagePplEtcAmt'
|
||||
'SEWAGE_SM',
|
||||
'SEWAGE_FCLTY',
|
||||
'SEWAGE_RPAIR',
|
||||
'SEWAGE_ORPNS',
|
||||
'SEWAGE_ETC'
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'group_storage',
|
||||
header: { text: '하수저류시설' },
|
||||
items: [
|
||||
'wholSwageImpdFcltAmt',
|
||||
'swageImpdFcltAmt',
|
||||
'swageImpdMendngAmt',
|
||||
'swageImpdOperKeepAmt',
|
||||
'swageImpdFcltEtcAmt'
|
||||
'SWGE_STRGE_SM',
|
||||
'SWGE_STRGE_FCLTY',
|
||||
'SWGE_STRGE_RPAIR',
|
||||
'SWGE_STRGE_ORPNS',
|
||||
'SWGE_STRGE_ETC'
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'group_etc_purpose',
|
||||
header: { text: '기타' },
|
||||
items: [
|
||||
'etcWholAmt',
|
||||
'etcAcdntCrfwAmt',
|
||||
'etcNrcpAmt',
|
||||
'etcAmt'
|
||||
'ETC_SM',
|
||||
'ACDNT_CYFD_AMOUNT',
|
||||
'UNRCIV_AMOUNT',
|
||||
'ETC_AMOUNT'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
'rmrk',
|
||||
'admdstCd',
|
||||
'admdstNm'
|
||||
'RMK'
|
||||
],
|
||||
rowStartNum: 3,
|
||||
fixedColumns: 1,
|
||||
tabKey: 'ST00090001',
|
||||
tabKey: 'sewerageFinanceSettleInp',
|
||||
tabLabel: '하수도재정 결산'
|
||||
};
|
||||
+58
-101
@@ -5,108 +5,67 @@ import { ValueType } from "realgrid";
|
||||
export const SewerageUsageFeeInpColumn = {
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, footer: { text: '합계' }, editable: false },
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' } },
|
||||
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' }, editable: false },
|
||||
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' }, editable: false, footer: { text: '합계' } },
|
||||
|
||||
// 총계 > 부과액
|
||||
{
|
||||
name: 'levyAmt',
|
||||
fieldName: 'levyAmt',
|
||||
header: { text: '(백만원)' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
styleName: 'rg-cell-total',
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
computed: {
|
||||
fields: [
|
||||
'hshusLevyAmt',
|
||||
'taskFrLevyAmt',
|
||||
'fbuLevyAmt',
|
||||
'bthhsFrSpcs1LevyAmt',
|
||||
'bthhsFrSpcs2LevyAmt',
|
||||
'induLevyAmt',
|
||||
'etcLevyAmt',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'LEVY_AMOUNT', fieldName: '(백만원)', header: { text: '(백만원)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 총계 > 부과량
|
||||
{
|
||||
name: 'levyQnt',
|
||||
fieldName: 'levyQnt',
|
||||
header: { text: '(천톤)' },
|
||||
editable: false,
|
||||
footer: footerDecimal1,
|
||||
styleName: 'rg-cell-total',
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
computed: {
|
||||
fields: [
|
||||
'hshusLevyQnt',
|
||||
'taskFrLevyQnt',
|
||||
'fbuLevyQnt',
|
||||
'bthhsFrSpcs1LevyQnt',
|
||||
'bthhsFrSpcs2LevyQnt',
|
||||
'induLevyQnt',
|
||||
'etcLevyQnt',
|
||||
],
|
||||
type: 'sum' as const,
|
||||
},
|
||||
},
|
||||
{ name: 'LEVY_QY', fieldName: '(천톤)', header: { text: '(천톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 가정용
|
||||
{ name: 'hshusLevyAmt', fieldName: 'hshusLevyAmt', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'hshusLevyQnt', fieldName: 'hshusLevyQnt', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'hshusUntprcAmt', fieldName: 'hshusUntprcAmt', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
{ name: 'HOME_LEVY_AMOUNT', fieldName: '(백만원)', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'HOME_LEVY_QY', fieldName: '(천톤)', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'HOME_UNTPC', fieldName: '(원/톤)', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 업무용
|
||||
{ name: 'taskFrLevyAmt', fieldName: 'taskFrLevyAmt', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'taskFrLevyQnt', fieldName: 'taskFrLevyQnt', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'taskFrUntprcAmt', fieldName: 'taskFrUntprcAmt', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
{ name: 'JOB_LEVY_AMOUNT', fieldName: '(백만원)', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'JOB_LEVY_QY', fieldName: '(천톤)', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'JOB_UNTPC', fieldName: '(원/톤)', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 영업용(일반용)
|
||||
{ name: 'fbuLevyAmt', fieldName: 'fbuLevyAmt', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'fbuLevyQnt', fieldName: 'fbuLevyQnt', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'fbuUntprcAmt', fieldName: 'fbuUntprcAmt', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
{ name: 'BSN_LEVY_AMOUNT', fieldName: '(백만원)', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'BSN_LEVY_QY', fieldName: '(천톤)', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'BSN_UNTPC', fieldName: '(원/톤)', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 욕탕1종(대중탕용)
|
||||
{ name: 'bthhsFrSpcs1LevyAmt', fieldName: 'bthhsFrSpcs1LevyAmt', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'bthhsFrSpcs1LevyQnt', fieldName: 'bthhsFrSpcs1LevyQnt', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'bthhsFrSpcs1UntprcAmt', fieldName: 'bthhsFrSpcs1UntprcAmt', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
{ name: 'BATHS1_LEVY_AMOUNT', fieldName: '(백만원)', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'BATHS1_LEVY_QY', fieldName: '(천톤)', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'BATHS1_UNTPC', fieldName: '(원/톤)', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 욕탕2종
|
||||
{ name: 'bthhsFrSpcs2LevyAmt', fieldName: 'bthhsFrSpcs2LevyAmt', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'bthhsFrSpcs2LevyQnt', fieldName: 'bthhsFrSpcs2LevyQnt', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'bthhsFrSpcs2UntprcAmt', fieldName: 'bthhsFrSpcs2UntprcAmt', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
{ name: 'PBBATH_LEVY_AMOUNT', fieldName: '(백만원)', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'PBBATH_LEVY_QY', fieldName: '(천톤)', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'PBBATH_UNTPC', fieldName: '(원/톤)', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 산업 및 공업용
|
||||
{ name: 'induLevyAmt', fieldName: 'induLevyAmt', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'induLevyQnt', fieldName: 'induLevyQnt', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'induUntprcAmt', fieldName: 'induUntprcAmt', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
{ name: 'INDUST_LEVY_AMOUNT', fieldName: '(백만원)', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'INDUST_LEVY_QY', fieldName: '(천톤)', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'INDUST_UNTPC', fieldName: '(원/톤)', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 기타
|
||||
{ name: 'etcLevyAmt', fieldName: 'etcLevyAmt', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'etcLevyQnt', fieldName: 'etcLevyQnt', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'etcLevyUntprcAmt', fieldName: 'etcLevyUntprcAmt', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-readonly' },
|
||||
{ name: 'ETC_LEVY_AMOUNT', fieldName: '(백만원)', header: { text: '(백만원)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'ETC_LEVY_QY', fieldName: '(천톤)', header: { text: '(천톤)' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'ETC_UNTPC', fieldName: '(원/톤)', header: { text: '(원/톤)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 비고
|
||||
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
||||
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
|
||||
|
||||
// hidden
|
||||
{ name: 'admdstCd', fieldName: 'admdstCd', header: { text: '행정구역코드' }, visible: false, },
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, visible: false },
|
||||
{ name: 'CHCKER_OPINION', fieldName: '검토자의견', header: { text: '검토자의견' } },
|
||||
{ name: 'WRTER_OPINION', fieldName: '사용자의견', header: { text: '사용자의견' } },
|
||||
|
||||
// 참조 필드
|
||||
{ name: 'SEWER_RNTFEE', fieldName: 'SEWER_RNTFEE', header: { text: 'SEWER_RNTFEE' } },
|
||||
{ name: 'B_LEVY_AMOUNT', fieldName: 'B_LEVY_AMOUNT', header: { text: 'B_LEVY_AMOUNT' } },
|
||||
],
|
||||
|
||||
columnLayout: [
|
||||
{
|
||||
name: 'group_admin',
|
||||
header: { text: '행정구역' },
|
||||
items: [
|
||||
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 2 }] },
|
||||
'sggNm',
|
||||
],
|
||||
items: ['SIDO', 'GUGUN']
|
||||
},
|
||||
{
|
||||
name: 'group_total',
|
||||
@@ -115,12 +74,12 @@ export const SewerageUsageFeeInpColumn = {
|
||||
{
|
||||
name: 'total_amount',
|
||||
header: { text: '부과액' },
|
||||
items: ['levyAmt']
|
||||
items: ['LEVY_AMOUNT']
|
||||
},
|
||||
{
|
||||
name: 'total_qty',
|
||||
header: { text: '부과량' },
|
||||
items: ['levyQnt']
|
||||
items: ['LEVY_QY']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -131,17 +90,17 @@ export const SewerageUsageFeeInpColumn = {
|
||||
{
|
||||
name: 'home_amount',
|
||||
header: { text: '부과액' },
|
||||
items: ['hshusLevyAmt']
|
||||
items: ['HOME_LEVY_AMOUNT']
|
||||
},
|
||||
{
|
||||
name: 'home_qty',
|
||||
header: { text: '부과량' },
|
||||
items: ['hshusLevyQnt']
|
||||
items: ['HOME_LEVY_QY']
|
||||
},
|
||||
{
|
||||
name: 'home_price',
|
||||
header: { text: '단가' },
|
||||
items: ['hshusUntprcAmt']
|
||||
items: ['HOME_UNTPC']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -152,17 +111,17 @@ export const SewerageUsageFeeInpColumn = {
|
||||
{
|
||||
name: 'job_amount',
|
||||
header: { text: '부과액' },
|
||||
items: ['taskFrLevyAmt']
|
||||
items: ['JOB_LEVY_AMOUNT']
|
||||
},
|
||||
{
|
||||
name: 'job_qty',
|
||||
header: { text: '부과량' },
|
||||
items: ['taskFrLevyQnt']
|
||||
items: ['JOB_LEVY_QY']
|
||||
},
|
||||
{
|
||||
name: 'job_price',
|
||||
header: { text: '단가' },
|
||||
items: ['taskFrUntprcAmt']
|
||||
items: ['JOB_UNTPC']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -173,17 +132,17 @@ export const SewerageUsageFeeInpColumn = {
|
||||
{
|
||||
name: 'bsn_amount',
|
||||
header: { text: '부과액' },
|
||||
items: ['fbuLevyAmt']
|
||||
items: ['BSN_LEVY_AMOUNT']
|
||||
},
|
||||
{
|
||||
name: 'bsn_qty',
|
||||
header: { text: '부과량' },
|
||||
items: ['fbuLevyQnt']
|
||||
items: ['BSN_LEVY_QY']
|
||||
},
|
||||
{
|
||||
name: 'bsn_price',
|
||||
header: { text: '단가' },
|
||||
items: ['fbuUntprcAmt']
|
||||
items: ['BSN_UNTPC']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -194,17 +153,17 @@ export const SewerageUsageFeeInpColumn = {
|
||||
{
|
||||
name: 'baths1_amount',
|
||||
header: { text: '부과액' },
|
||||
items: ['bthhsFrSpcs1LevyAmt']
|
||||
items: ['BATHS1_LEVY_AMOUNT']
|
||||
},
|
||||
{
|
||||
name: 'baths1_qty',
|
||||
header: { text: '부과량' },
|
||||
items: ['bthhsFrSpcs1LevyQnt']
|
||||
items: ['BATHS1_LEVY_QY']
|
||||
},
|
||||
{
|
||||
name: 'baths1_price',
|
||||
header: { text: '단가' },
|
||||
items: ['bthhsFrSpcs1UntprcAmt']
|
||||
items: ['BATHS1_UNTPC']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -215,17 +174,17 @@ export const SewerageUsageFeeInpColumn = {
|
||||
{
|
||||
name: 'pbbath_amount',
|
||||
header: { text: '부과액' },
|
||||
items: ['bthhsFrSpcs2LevyAmt']
|
||||
items: ['PBBATH_LEVY_AMOUNT']
|
||||
},
|
||||
{
|
||||
name: 'pbbath_qty',
|
||||
header: { text: '부과량' },
|
||||
items: ['bthhsFrSpcs2LevyQnt']
|
||||
items: ['PBBATH_LEVY_QY']
|
||||
},
|
||||
{
|
||||
name: 'pbbath_price',
|
||||
header: { text: '단가' },
|
||||
items: ['bthhsFrSpcs2UntprcAmt']
|
||||
items: ['PBBATH_UNTPC']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -236,17 +195,17 @@ export const SewerageUsageFeeInpColumn = {
|
||||
{
|
||||
name: 'indust_amount',
|
||||
header: { text: '부과액' },
|
||||
items: ['induLevyAmt']
|
||||
items: ['INDUST_LEVY_AMOUNT']
|
||||
},
|
||||
{
|
||||
name: 'indust_qty',
|
||||
header: { text: '부과량' },
|
||||
items: ['induLevyQnt']
|
||||
items: ['INDUST_LEVY_QY']
|
||||
},
|
||||
{
|
||||
name: 'indust_price',
|
||||
header: { text: '단가' },
|
||||
items: ['induUntprcAmt']
|
||||
items: ['INDUST_UNTPC']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -257,27 +216,25 @@ export const SewerageUsageFeeInpColumn = {
|
||||
{
|
||||
name: 'etc_amount',
|
||||
header: { text: '부과액' },
|
||||
items: ['etcLevyAmt']
|
||||
items: ['ETC_LEVY_AMOUNT']
|
||||
},
|
||||
{
|
||||
name: 'etc_qty',
|
||||
header: { text: '부과량' },
|
||||
items: ['etcLevyQnt']
|
||||
items: ['ETC_LEVY_QY']
|
||||
},
|
||||
{
|
||||
name: 'etc_price',
|
||||
header: { text: '단가' },
|
||||
items: ['etcLevyUntprcAmt']
|
||||
items: ['ETC_UNTPC']
|
||||
}
|
||||
]
|
||||
},
|
||||
'rmrk',
|
||||
'admdstCd',
|
||||
'admdstNm'
|
||||
'RMK'
|
||||
],
|
||||
|
||||
rowStartNum: 3,
|
||||
fixedColumns: 1,
|
||||
tabKey: 'ST00090003',
|
||||
tabKey: 'sewerageUsageFeeInp',
|
||||
tabLabel: '하수도 사용료'
|
||||
};
|
||||
@@ -1,63 +0,0 @@
|
||||
import { ValueType } from "realgrid";
|
||||
|
||||
export const ExcretaTreatmentStatusColumnConfig = {
|
||||
tabKey: "ST00070001",
|
||||
tabLabel: "분뇨처리시설",
|
||||
rowStartNum: 2,
|
||||
fixedColumns: 2,
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false },
|
||||
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
||||
{ name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역명" }, editable: false },
|
||||
|
||||
// 기본 마스터 상세
|
||||
{ name: "fcltNm", fieldName: "fcltNm", header: { text: "시설명" }, editable: false },
|
||||
{ name: "fcltPstnCn", fieldName: "fcltPstnCn", header: { text: "소재지" }, editable: false },
|
||||
{ name: "telNo", fieldName: "telNo", header: { text: "전화번호" }, editable: false },
|
||||
{ name: "cmptnStrtYmd", fieldName: "cmptnStrtYmd", header: { text: "준공일" }, editable: false },
|
||||
{ name: "oprtngStrtYmd", fieldName: "oprtngStrtYmd", header: { text: "가동개시일" }, editable: false },
|
||||
{ name: "wholPjtcoAmt", fieldName: "wholPjtcoAmt", header: { text: "사업비\n(백만원)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "prcsFcltCpct", fieldName: "prcsFcltCpct", header: { text: "시설용량\n(㎥/일)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
{ name: "cpct", fieldName: "cpct", header: { text: "처리량\n(㎥/일)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
{ name: "oprtngDayCnt", fieldName: "oprtngDayCnt", header: { text: "가동일수\n(일/년)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "prcsMthdExpln", fieldName: "prcsMthdExpln", header: { text: "처리공법" }, editable: false },
|
||||
{ name: "linkTmplntCn", fieldName: "linkTmplntCn", header: { text: "연계처리장명" }, editable: false },
|
||||
{ name: "linkPrcsQnt", fieldName: "linkPrcsQnt", header: { text: "연계처리량\n(㎥/일)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
|
||||
// 유입수질(mg/L, 개/mL) 그룹 소속
|
||||
{ name: "inflwBodWqVl", fieldName: "inflwBodWqVl", header: { text: "BOD" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.00", editable: false },
|
||||
{ name: "inflwTocWqVl", fieldName: "inflwTocWqVl", header: { text: "TOC" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.00", editable: false },
|
||||
{ name: "inflwSsWqVl", fieldName: "inflwSsWqVl", header: { text: "SS" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.00", editable: false },
|
||||
{ name: "inflwTnWqVl", fieldName: "inflwTnWqVl", header: { text: "T-N" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.00", editable: false },
|
||||
{ name: "inflwTpWqVl", fieldName: "inflwTpWqVl", header: { text: "T-P" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.000", editable: false },
|
||||
{ name: "inflwClfgCnt", fieldName: "inflwClfgCnt", header: { text: "대장균\n군수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
|
||||
// 방류수질(mg/L, 개/mL) 그룹 소속
|
||||
{ name: "dschgBodWqVl", fieldName: "dschgBodWqVl", header: { text: "BOD" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.00", editable: false },
|
||||
{ name: "dschgTocWqVl", fieldName: "dschgTocWqVl", header: { text: "TOC" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.00", editable: false },
|
||||
{ name: "dschgSsWqVl", fieldName: "dschgSsWqVl", header: { text: "SS" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.00", editable: false },
|
||||
{ name: "dschgTnWqVl", fieldName: "dschgTnWqVl", header: { text: "T-N" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.00", editable: false },
|
||||
{ name: "dschgTpWqVl", fieldName: "dschgTpWqVl", header: { text: "T-P" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.000", editable: false },
|
||||
{ name: "dschgClfgCnt", fieldName: "dschgClfgCnt", header: { text: "대장균\n군수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
|
||||
// 방류수역 그룹 소속
|
||||
{ name: "wtsysNm", fieldName: "wtsysNm", header: { text: "수계" }, editable: false },
|
||||
{ name: "trbtrNm", fieldName: "trbtrNm", header: { text: "지류" }, editable: false },
|
||||
{ name: "msirbCn", fieldName: "msirbCn", header: { text: "중권역" }, editable: false },
|
||||
{ name: "ssirbCn", fieldName: "ssirbCn", header: { text: "소권역" }, editable: false },
|
||||
|
||||
// 단일 미그룹 성격 컬럼들
|
||||
{ name: "operMthdCdCn", fieldName: "operMthdCdCn", header: { text: "운영주체\n(자체/공기업/\n민간위탁)" }, editable: false },
|
||||
{ name: "wholNope", fieldName: "wholNope", header: { text: "직원총수\n(명)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "sftyAcdntEvntcsCnt", fieldName: "sftyAcdntEvntcsCnt", header: { text: "안전사고\n건수\n(건/인/년)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.00", editable: false }
|
||||
],
|
||||
columnLayout: [
|
||||
{ name: "areaGroup", header: { text: "행정구역" }, items: ["ctpvNm", "sggNm", "admdstNm"] },
|
||||
"fcltNm", "fcltPstnCn", "telNo", "cmptnStrtYmd", "oprtngStrtYmd", "wholPjtcoAmt", "prcsFcltCpct", "cpct", "oprtngDayCnt", "prcsMthdExpln", "linkTmplntCn", "linkPrcsQnt",
|
||||
{ name: "inflwWqGroup", header: { text: "유입수질(mg/L, 개/mL)" }, items: ["inflwBodWqVl", "inflwTocWqVl", "inflwSsWqVl", "inflwTnWqVl", "inflwTpWqVl", "inflwClfgCnt"] },
|
||||
{ name: "dschgWqGroup", header: { text: "방류수질(mg/L, 개/mL)" }, items: ["dschgBodWqVl", "dschgTocWqVl", "dschgSsWqVl", "dschgTnWqVl", "dschgTpWqVl", "dschgClfgCnt"] },
|
||||
{ name: "wtrAreaGroup", header: { text: "방류수역" }, items: ["wtsysNm", "trbtrNm", "msirbCn", "ssirbCn"] },
|
||||
"operMthdCdCn", "wholNope", "sftyAcdntEvntcsCnt"
|
||||
]
|
||||
};
|
||||
@@ -1,103 +0,0 @@
|
||||
import { ValueType } from "realgrid";
|
||||
|
||||
export const MediationPumpStatusColumnConfig = {
|
||||
tabKey: "ST00050001",
|
||||
tabLabel: "중계펌프장",
|
||||
rowStartNum: 2,
|
||||
fixedColumns: 3,
|
||||
columns: [
|
||||
// 행정구역 그룹 소속
|
||||
{ name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false },
|
||||
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
||||
{ name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역명" }, editable: false },
|
||||
|
||||
// 단일 컬럼들
|
||||
{ name: "fcltNm", fieldName: "fcltNm", header: { text: "펌프장명" }, editable: false },
|
||||
{ name: "pumpSeNm", fieldName: "pumpSeNm", header: { text: "구분\n(합류식,\n분류식)" }, editable: false },
|
||||
{ name: "swtrmtFcltNm", fieldName: "swtrmtFcltNm", header: { text: "처리장명" }, editable: false },
|
||||
{ name: "fcltPstnCn", fieldName: "fcltPstnCn", header: { text: "위치" }, editable: false },
|
||||
{ name: "oprtngStrtYmd", fieldName: "oprtngStrtYmd", header: { text: "가동개시\n년월일\nyyyy-mm-dd" }, editable: false },
|
||||
{ name: "planMltvArea", fieldName: "planMltvArea", header: { text: "계획배수면적(㏊)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
|
||||
// 계획시간대최대배수량(㎥/일) 그룹 소속
|
||||
{ name: "sndyArea", fieldName: "sndyArea", header: { text: "청천시" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
{ name: "rainArea", fieldName: "rainArea", header: { text: "우천시" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
{ name: "exlnQnt", fieldName: "exlnQnt", header: { text: "우수량" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
|
||||
// 오수펌프 그룹 내부 소속
|
||||
{ name: "drtwPumpGrssPpqty", fieldName: "drtwPumpGrssPpqty", header: { text: "총양수량\n(㎥/min)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
|
||||
// 오수펌프 > 오수펌프1 그룹 소속
|
||||
{ name: "drtwPumpN1DmtrArea", fieldName: "drtwPumpN1DmtrArea", header: { text: "구경(mm)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "drtwPumpN1Ppqty", fieldName: "drtwPumpN1Ppqty", header: { text: "양수량\n(㎥/min)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
{ name: "drtwPumpN1Cnt", fieldName: "drtwPumpN1Cnt", header: { text: "펌프대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "drtwPumpN1RsrvCnt", fieldName: "drtwPumpN1RsrvCnt", header: { text: "예비대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
|
||||
// 오수펌프 > 오수펌프2 그룹 소속
|
||||
{ name: "drtwPumpN2DmtrArea", fieldName: "drtwPumpN2DmtrArea", header: { text: "구경(mm)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "drtwPumpN2Ppqty", fieldName: "drtwPumpN2Ppqty", header: { text: "양수량\n(㎥/min)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
{ name: "drtwPumpN2Cnt", fieldName: "drtwPumpN2Cnt", header: { text: "펌프대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "drtwPumpN2RsrvCnt", fieldName: "drtwPumpN2RsrvCnt", header: { text: "예비대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
|
||||
// 오수펌프 > 오수펌프3 그룹 소속
|
||||
{ name: "drtwPumpN3DmtrArea", fieldName: "drtwPumpN3DmtrArea", header: { text: "구경(mm)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "drtwPumpN3Ppqty", fieldName: "drtwPumpN3Ppqty", header: { text: "양수량\n(㎥/min)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
{ name: "drtwPumpN3Cnt", fieldName: "drtwPumpN3Cnt", header: { text: "펌프대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "drtwPumpN3RsrvCnt", fieldName: "drtwPumpN3RsrvCnt", header: { text: "예비대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
|
||||
// 우수펌프 그룹 내부 소속
|
||||
{ name: "exlnPumpGrssPpqty", fieldName: "exlnPumpGrssPpqty", header: { text: "총양수량\n(㎥/min)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
|
||||
// 우수펌프 > 우수펌프1 그룹 소속
|
||||
{ name: "exlnPumpN1DmtrArea", fieldName: "exlnPumpN1DmtrArea", header: { text: "구경(mm)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "exlnPumpN1Ppqty", fieldName: "exlnPumpN1Ppqty", header: { text: "양수량\n(㎥/min)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
{ name: "exlnPumpN1Cnt", fieldName: "exlnPumpN1Cnt", header: { text: "펌프대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "exlnPumpN1RsrvCnt", fieldName: "exlnPumpN1RsrvCnt", header: { text: "예비대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
|
||||
// 우수펌프 > 우수펌프2 그룹 소속
|
||||
{ name: "exlnPumpN2DmtrArea", fieldName: "exlnPumpN2DmtrArea", header: { text: "구경(mm)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "exlnPumpN2Ppqty", fieldName: "exlnPumpN2Ppqty", header: { text: "양수량\n(㎥/min)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
{ name: "exlnPumpN2Cnt", fieldName: "exlnPumpN2Cnt", header: { text: "펌프대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "exlnPumpN2RsrvCnt", fieldName: "exlnPumpN2RsrvCnt", header: { text: "예비대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
|
||||
// 우수펌프 > 우수펌프3 그룹 소속
|
||||
{ name: "exlnPumpN3DmtrArea", fieldName: "exlnPumpN3DmtrArea", header: { text: "구경(mm)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "exlnPumpN3Ppqty", fieldName: "exlnPumpN3Ppqty", header: { text: "양수량\n(㎥/min)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||
{ name: "exlnPumpN3Cnt", fieldName: "exlnPumpN3Cnt", header: { text: "펌프대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "exlnPumpN3RsrvCnt", fieldName: "exlnPumpN3RsrvCnt", header: { text: "예비대수" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
|
||||
// 단일 컬럼
|
||||
{ name: "anlElpwrUseQnt", fieldName: "anlElpwrUseQnt", header: { text: "연간전력\n사용량\n(㎾h/년)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false }
|
||||
],
|
||||
columnLayout: [
|
||||
{ name: "areaGroup", header: { text: "행정구역" }, items: ["ctpvNm", "sggNm", "admdstNm"] },
|
||||
"swtrmtFcltNm",
|
||||
"fcltNm",
|
||||
"pumpSeNm",
|
||||
"fcltPstnCn",
|
||||
"oprtngStrtYmd",
|
||||
"planMltvArea",
|
||||
{ name: "planDrainGroup", header: { text: "계획시간대최대배수량(㎥/일)" }, items: ["sndyArea", "rainArea", "exlnQnt"] },
|
||||
{
|
||||
name: "drtwPumpGroup",
|
||||
header: { text: "오수펌프" },
|
||||
items: [
|
||||
"drtwPumpGrssPpqty",
|
||||
{ name: "drtwPumpN1Group", header: { text: "오수펌프(1)" }, items: ["drtwPumpN1DmtrArea", "drtwPumpN1Ppqty", "drtwPumpN1Cnt", "drtwPumpN1RsrvCnt"] },
|
||||
{ name: "drtwPumpN2Group", header: { text: "오수펌프(2)" }, items: ["drtwPumpN2DmtrArea", "drtwPumpN2Ppqty", "drtwPumpN2Cnt", "drtwPumpN2RsrvCnt"] },
|
||||
{ name: "drtwPumpN3Group", header: { text: "오수펌프(3)" }, items: ["drtwPumpN3DmtrArea", "drtwPumpN3Ppqty", "drtwPumpN3Cnt", "drtwPumpN3RsrvCnt"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "exlnPumpGroup",
|
||||
header: { text: "우수펌프" },
|
||||
items: [
|
||||
"exlnPumpGrssPpqty",
|
||||
{ name: "exlnPumpN1Group", header: { text: "우수펌프(1)" }, items: ["exlnPumpN1DmtrArea", "exlnPumpN1Ppqty", "exlnPumpN1Cnt", "exlnPumpN1RsrvCnt"] },
|
||||
{ name: "exlnPumpN2Group", header: { text: "우수펌프(2)" }, items: ["exlnPumpN2DmtrArea", "exlnPumpN2Ppqty", "exlnPumpN2Cnt", "exlnPumpN2RsrvCnt"] },
|
||||
{ name: "exlnPumpN3Group", header: { text: "우수펌프(3)" }, items: ["exlnPumpN3DmtrArea", "exlnPumpN3Ppqty", "exlnPumpN3Cnt", "exlnPumpN3RsrvCnt"] }
|
||||
]
|
||||
},
|
||||
"anlElpwrUseQnt"
|
||||
]
|
||||
};
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
import { ValueType } from "realgrid";
|
||||
|
||||
export const HumanWasteCollectionTab3ColumnConfig = {
|
||||
tabKey: "ST00120003",
|
||||
tabLabel: "분뇨수집·운반업",
|
||||
rowStartNum: 3,
|
||||
fixedColumns: 3,
|
||||
columns: [
|
||||
{ name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false },
|
||||
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
||||
{ name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역명" }, editable: false },
|
||||
{ name: "bzentyCnt", fieldName: "bzentyCnt", header: { text: "업체수(개소)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "empNope", fieldName: "empNope", header: { text: "종사인원(명)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "fcltSecrPrstCnt", fieldName: "fcltSecrPrstCnt", header: { text: "계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "n3TonUdrCnt", fieldName: "n3TonUdrCnt", header: { text: "3톤이하" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "n4TonUdrCnt", fieldName: "n4TonUdrCnt", header: { text: "4.5톤이하" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "n8TonUdrCnt", fieldName: "n8TonUdrCnt", header: { text: "8톤이하" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "etcCnt", fieldName: "etcCnt", header: { text: "기타" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "clctCnvncPrfmncQnt", fieldName: "clctCnvncPrfmncQnt", header: { text: "수집·운반실적(m³/년)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }
|
||||
],
|
||||
columnLayout: [
|
||||
{ name: "areaGroup", header: { text: "행정구역" }, items: ["ctpvNm", "sggNm", "admdstNm"] },
|
||||
"bzentyCnt", "empNope",
|
||||
{
|
||||
name: "fcltGroup",
|
||||
header: { text: "시설(차량) 확보현황(대수)" },
|
||||
items: ["fcltSecrPrstCnt", "n3TonUdrCnt", "n4TonUdrCnt", "n8TonUdrCnt", "etcCnt"]
|
||||
},
|
||||
"clctCnvncPrfmncQnt"
|
||||
]
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user