노후관로 팝업 위치 수정
This commit is contained in:
@@ -196,8 +196,16 @@ export default function AgedPipePopupPage() {
|
||||
window.close();
|
||||
};
|
||||
|
||||
const getCellClassName = (_row: AgedPipeRow, headId: string) => {
|
||||
if (headId === "mqltCd") {
|
||||
return "break-all whitespace-normal";
|
||||
}
|
||||
|
||||
return "whitespace-normal";
|
||||
};
|
||||
|
||||
return (
|
||||
<main className="flex h-screen flex-col overflow-hidden bg-white">
|
||||
<main className="flex h-screen w-full max-w-full min-w-0 flex-col overflow-x-hidden overflow-y-hidden bg-white">
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<header className="flex min-h-[44px] items-center justify-between border-b border-[#dbe2e6] bg-primary px-5 py-3">
|
||||
<h1 className="text-[1.45rem] font-semibold text-white">노후관로 현황</h1>
|
||||
@@ -220,9 +228,9 @@ export default function AgedPipePopupPage() {
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<section className="overflow-y-auto p-4">
|
||||
<div className="grid grid-cols-1 gap-3 border-b border-slate-200 bg-slate-50 pb-4 md:grid-cols-[160px_320px_320px_auto] md:items-end md:justify-between">
|
||||
<label className="block md:max-w-[160px]">
|
||||
<section className="flex min-h-0 flex-1 flex-col overflow-x-hidden px-4 pb-3 pt-3">
|
||||
<div className="grid grid-cols-1 gap-3 border-b border-slate-200 bg-slate-50 pb-3 md:grid-cols-[140px_minmax(0,1fr)_minmax(0,1fr)_auto] md:items-end">
|
||||
<label className="block min-w-0">
|
||||
<div className="mb-1 text-[1.05rem] font-medium text-slate-700">경과년도</div>
|
||||
<Input
|
||||
className="h-10 !text-[1.1rem]"
|
||||
@@ -244,7 +252,7 @@ export default function AgedPipePopupPage() {
|
||||
/>
|
||||
</label>
|
||||
|
||||
<label className="block md:max-w-[320px]">
|
||||
<label className="block min-w-0">
|
||||
<div className="mb-1 text-[1.05rem] font-medium text-slate-700">시도</div>
|
||||
<select
|
||||
className="h-10 w-full rounded-md border border-slate-300 px-3 text-[1.1rem]"
|
||||
@@ -266,7 +274,7 @@ export default function AgedPipePopupPage() {
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label className="block md:max-w-[320px]">
|
||||
<label className="block min-w-0">
|
||||
<div className="mb-1 text-[1.05rem] font-medium text-slate-700">시군구</div>
|
||||
<select
|
||||
className="h-10 w-full rounded-md border border-slate-300 px-3 text-[1.1rem]"
|
||||
@@ -282,7 +290,7 @@ export default function AgedPipePopupPage() {
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<div className="flex flex-wrap justify-end gap-2 md:pr-3">
|
||||
<div className="flex flex-wrap items-end justify-end gap-2">
|
||||
<Button
|
||||
type="button"
|
||||
size="sm"
|
||||
@@ -304,19 +312,65 @@ export default function AgedPipePopupPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<UiTable<AgedPipeRow>
|
||||
headName={<>노후관로 조회 결과 총 {total.toLocaleString()}건</>}
|
||||
tableData={rows}
|
||||
headlist={AGED_PIPE_LIST_HEADLIST}
|
||||
pageSize={10}
|
||||
total={total}
|
||||
cellClick={(index) => handleRowClick(index)}
|
||||
onPageChange={(page) => void handleSearch(page)}
|
||||
curPage={currentPage}
|
||||
index={selectedIndex}
|
||||
widthFixed={true}
|
||||
/>
|
||||
<div className="aged-pipe-popup-table min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto pt-2">
|
||||
<UiTable<AgedPipeRow>
|
||||
headName={<>노후관로 조회 결과 총 {total.toLocaleString()}건</>}
|
||||
tableData={rows}
|
||||
headlist={AGED_PIPE_LIST_HEADLIST}
|
||||
pageSize={10}
|
||||
total={total}
|
||||
cellClick={(index) => handleRowClick(index)}
|
||||
onPageChange={(page) => void handleSearch(page)}
|
||||
cellClassName={getCellClassName}
|
||||
curPage={currentPage}
|
||||
index={selectedIndex}
|
||||
widthFixed={true}
|
||||
isHideCount={true}
|
||||
className="!m-0 overflow-x-hidden"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
<style jsx global>{`
|
||||
.aged-pipe-popup-table .card-header {
|
||||
margin-bottom: 0.6rem;
|
||||
}
|
||||
|
||||
.aged-pipe-popup-table .card-header h3 {
|
||||
font-size: 1.7rem;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.aged-pipe-popup-table .card {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.aged-pipe-popup-table .table-ui {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.aged-pipe-popup-table .table-ui th {
|
||||
padding: 0.8rem 0.45rem;
|
||||
font-size: 1.1rem;
|
||||
line-height: 1.2;
|
||||
word-break: keep-all;
|
||||
}
|
||||
|
||||
.aged-pipe-popup-table .table-ui td {
|
||||
padding: 0.85rem 0.4rem;
|
||||
font-size: 1.1rem;
|
||||
line-height: 1.25;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.aged-pipe-popup-table .table-ui td:nth-child(2),
|
||||
.aged-pipe-popup-table .table-ui td:nth-child(3),
|
||||
.aged-pipe-popup-table .table-ui td:nth-child(8) {
|
||||
word-break: keep-all;
|
||||
}
|
||||
`}</style>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -59,9 +59,9 @@ export const AGED_PIPE_LIST_HEADLIST = [
|
||||
{ id: "instlYmd", title: "설치일자", widthPercent: 12 },
|
||||
{ id: "pdmtVl", title: "관경(mm)", widthPercent: 10 },
|
||||
{ id: "prlgVl", title: "연장(m)", widthPercent: 10 },
|
||||
{ id: "usgCd", title: "용도", widthPercent: 14 },
|
||||
{ id: "usgCd", title: "용도", widthPercent: 12 },
|
||||
{ id: "mqltCd", title: "재질", widthPercent: 18 },
|
||||
{ id: "elapsedYears", title: "경과년도", widthPercent: 12, align: "right" },
|
||||
{ id: "elapsedYears", title: "경과년도", widthPercent: 8, align: "right" },
|
||||
];
|
||||
|
||||
export const AGED_PIPE_EXCEL_FIELDS = [
|
||||
|
||||
@@ -1506,6 +1506,22 @@ const appendAgedPipeControlNode = (data: any[]) => {
|
||||
];
|
||||
};
|
||||
|
||||
const normalizeTreeRowSpacing = (data: any[]) => {
|
||||
if (!Array.isArray(data)) return data;
|
||||
|
||||
return data.map((item) => {
|
||||
if (item?.lyrNm !== "지반침하정보") {
|
||||
return item;
|
||||
}
|
||||
|
||||
return {
|
||||
...item,
|
||||
iconNm: null,
|
||||
gobjTy: "",
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
const Map = () => {
|
||||
const pathname = usePathname();
|
||||
const flowDirectionMode = useMemo(() => getFlowDirectionModeByPathname(pathname), [pathname]);
|
||||
@@ -1960,7 +1976,11 @@ const Map = () => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const data = await getRawJson("/sewerage-service/api/v1/map/lyrStngs/SN_NETWORK");
|
||||
setTreeData(appendAgedPipeControlNode(normalizeFlowDirectionLayerInfos(data)));
|
||||
setTreeData(
|
||||
appendAgedPipeControlNode(
|
||||
normalizeTreeRowSpacing(normalizeFlowDirectionLayerInfos(data)),
|
||||
),
|
||||
);
|
||||
setLayerLoadError(null);
|
||||
} catch (error) {
|
||||
const message =
|
||||
|
||||
@@ -31,6 +31,22 @@ const agedPipeHighlightStyle = new Style({
|
||||
|
||||
const PIPE_LAYER_TYPE = "tb_ms_swage_ppl";
|
||||
const EmptySearchView = () => null;
|
||||
const normalizeTreeRowSpacing = (data: any[]) => {
|
||||
if (!Array.isArray(data)) return data;
|
||||
|
||||
return data.map((item) => {
|
||||
if (item?.lyrNm !== "지반침하정보") {
|
||||
return item;
|
||||
}
|
||||
|
||||
return {
|
||||
...item,
|
||||
iconNm: null,
|
||||
gobjTy: "",
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
const DESIGN_PREVIEW_FEATURE = {
|
||||
fid: "preview-aged-pipe",
|
||||
lyrTypeNm: PIPE_LAYER_TYPE,
|
||||
@@ -103,7 +119,7 @@ const Map = () => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const data = await getRawJson("/sewerage-service/api/v1/map/lyrStngs/SN_NETWORK");
|
||||
setTreeData(data);
|
||||
setTreeData(normalizeTreeRowSpacing(data));
|
||||
} catch (error) {
|
||||
console.error("노후관로 레이어 설정 조회 중 오류:", error);
|
||||
throw new Error("Invalid JSON response from server");
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
# SFR-011 노후관로관리 통합 검증 결과
|
||||
|
||||
## 1. 문서 목적
|
||||
|
||||
- `SFR-011 노후관로관리` 유지보수 라운드의 검증 결과를 기록한다.
|
||||
- 이번 검증은 팝업 위치/폭 유지보수와 좁은 폭 레이아웃 보정 중심이다.
|
||||
|
||||
## 2. 현재 검증 상태
|
||||
|
||||
### 2.1 수행 여부
|
||||
|
||||
- 정적 코드 검토와 타입 검사 시도를 수행했다.
|
||||
- 자동 브라우저 검증은 수행하지 못했다.
|
||||
|
||||
### 2.2 수행 결과
|
||||
|
||||
- 정적 구현 확인
|
||||
- `agedPipePopup` 최종 크기가 `850 x 600`으로 조정됐다.
|
||||
- `agedPipePopup`이 `browser-left + alignTop + offsetTop: 200` 기준 배치를 사용하도록 설정됐다.
|
||||
- 조회/다운로드 버튼이 `시군구`와 같은 수평선 오른쪽으로 정렬되도록 반영됐다.
|
||||
- 필터 영역 하단 여백이 축소되도록 반영됐다.
|
||||
- `UiTable` 외곽 마진 제거와 중복 총건수 숨김이 반영됐다.
|
||||
- 표 영역이 현재 팝업 높이 기준에서 하단 공백이 과도하지 않도록 조정됐다.
|
||||
- 로컬 라우트 응답 확인
|
||||
- `http://127.0.0.1:3002/popup/agedPipePopup?elapsedYears=30&ctpvCd=0&sggCd=0` 응답 `200`
|
||||
- `http://127.0.0.1:3002/map` 응답 `200`
|
||||
- 정적 타입 검사
|
||||
- 실행 명령: `pnpm --filter sn exec tsc --noEmit --pretty false`
|
||||
- 결과: 실패
|
||||
- 확인 내용
|
||||
- 저장소 기존 타입 오류가 다수 존재한다.
|
||||
- 출력된 기존 오류 경로
|
||||
- `app/(map-layout)/map/components/common/index.ts`
|
||||
- `app/(map-layout)/map/components/pipeAnalysis/PipeAnalysisPopupPage.tsx`
|
||||
- `app/html/(map-layout)/map/components/common/index.ts`
|
||||
- `app/html/(with-base-layout)/layout.tsx`
|
||||
- `packages/common/business_components/src/ui/chart/*`
|
||||
- 명령 말미에 `Command "tsc" not found`가 함께 출력돼 현재 실행 환경도 안정적이지 않다.
|
||||
|
||||
### 2.3 미수행 항목
|
||||
|
||||
- `localhost:3002/map` 실제 브라우저에서 `노후관로 > 목록보기` 팝업 위치 육안 확인
|
||||
- 팝업 최소화 후 재오픈 체감 확인
|
||||
- 실제 최종 크기(`850 x 600`) 상태에서 행 선택, 페이지 이동, 다운로드 버튼 상호작용 확인
|
||||
|
||||
## 3. 현재 리스크
|
||||
|
||||
- 자동 브라우저 캡처용 Playwright 의존성이 현재 세션에 없어 화면 증적을 남기지 못했다.
|
||||
- 팝업 위치가 사용자 의도와 완전히 일치하는지는 수동 검증 전까지 확정할 수 없다.
|
||||
- 저장소 기존 타입 오류 때문에 이번 변경의 정적 게이트 통과 여부를 분리 보장하기 어렵다.
|
||||
|
||||
## 4. 후속 검증 권장 항목
|
||||
|
||||
- `http://127.0.0.1:3002/map`에서 실제 팝업 열기
|
||||
- 사용자 스크린샷 기준 위치 체감 확인
|
||||
- 최종 크기(`850 x 600`) 상태에서 표 하단 공백 체감 확인
|
||||
- 필요 시 문서만 현재 운영값 기준으로 재동기화
|
||||
@@ -0,0 +1,76 @@
|
||||
# SFR-011 노후관로관리 통합 구현 기록
|
||||
|
||||
## 1. 문서 목적
|
||||
|
||||
- `SFR-011 노후관로관리`의 FE 구현 이력과 유지보수 보정 사항을 기능당 1개 문서로 누적 관리한다.
|
||||
- 이번 라운드는 신규 기능 추가가 아니라, 기존 `노후관로` 목록 팝업의 위치와 폭을 유지보수하는 목적이다.
|
||||
|
||||
## 2. 입력 근거
|
||||
|
||||
- `COMMON_DOCS_ROOT/작업계획/SFR-011-노후관로관리/001-DE-P2-노후관로관리-설계초안.md`
|
||||
- 사용자 유지보수 요청
|
||||
- 하수관망도 `노후관로` 목록보기 팝업 가로 사이즈 축소
|
||||
- 지도와 같이 볼 수 있도록 팝업 위치 좌측 상단 쪽으로 이동
|
||||
- 폭 축소 후 컴포넌트가 자연스럽게 재배치되도록 보정
|
||||
|
||||
## 3. 현재 라운드 구현 요약
|
||||
|
||||
### 3.1 2026-06-04 팝업 위치/폭 유지보수
|
||||
|
||||
- `agedPipePopup` 최종 크기를 `850 x 600`으로 조정했다.
|
||||
- 팝업 공통 열기 유틸에 위치 미세조정 옵션을 추가해 `노후관로` 팝업이 `placement: "browser-left"`, `alignTop: true`, `offsetTop: 200` 기준으로 열리도록 정리했다.
|
||||
- 상단 조회 조건 영역은 `경과년도 / 시도 / 시군구 / 조회 / 다운로드`가 한 줄로 보이도록 맞췄다.
|
||||
- 현재 팝업 높이에서 표 아래 공백이 과도하지 않도록 높이 기준을 재조정했다.
|
||||
|
||||
### 3.2 2026-06-04 후속 미세조정
|
||||
|
||||
- 사용 피드백 기준으로 팝업 위치는 현재 좌측 기준 + 세로 오프셋 `200px` 배치를 유지했다.
|
||||
- 조회/다운로드 버튼을 `시군구`와 같은 수평선에서 우측 정렬되도록 다시 조정했다.
|
||||
- 필터 영역 하단 여백을 줄여 버튼 아래 빈 공간이 남지 않게 보정했다.
|
||||
- `UiTable`에 전달하는 외곽 마진을 제거하고, 중복 총 건수 문구를 숨겨 팝업 내부 가로/세로 스크롤 발생 가능성을 낮췄다.
|
||||
- 표 영역은 현재 팝업 폭과 높이 안에서 보이도록 유지하는 방향으로 정리했다.
|
||||
|
||||
## 4. 실제 수정 파일
|
||||
|
||||
- `FE_APP_ROOT/app/(map-layout)/map/components/agedPipe/AgedPipePopupPage.tsx`
|
||||
- `FE_APP_ROOT/src/features/windowPopup/model/popupDefinitions.ts`
|
||||
- `FE_APP_ROOT/src/features/windowPopup/model/types.ts`
|
||||
- `FE_APP_ROOT/src/features/windowPopup/lib/openWindowPopup.ts`
|
||||
|
||||
## 5. 구현 상세
|
||||
|
||||
### 5.1 팝업 정의
|
||||
|
||||
- `agedPipePopup`
|
||||
- `width: 850`
|
||||
- `height: 600`
|
||||
- `placement: "browser-left"`
|
||||
- `alignTop: true`
|
||||
- `offsetLeft: 0`
|
||||
- `offsetTop: 200`
|
||||
|
||||
### 5.2 공통 팝업 유틸
|
||||
|
||||
- 기존 `center`, `browser-left` 배치 외에, 개별 팝업이 좌표를 미세 조정할 수 있도록 아래 속성을 허용했다.
|
||||
- `alignTop`
|
||||
- `offsetLeft`
|
||||
- `offsetTop`
|
||||
- 이번 라운드에서는 `agedPipePopup`만 이 옵션을 사용한다.
|
||||
|
||||
### 5.3 팝업 본문 레이아웃
|
||||
|
||||
- 최상위 컨테이너에 `min-w-0`, `min-h-0` 기준을 추가했다.
|
||||
- 조회조건 영역을 `시군구`와 버튼이 같은 줄에서 정렬되도록 재배치했다.
|
||||
- 표는 현재 팝업 높이 안에서 하단 공백이 과도하지 않게 보이도록 구성했다.
|
||||
|
||||
## 6. 영향 범위
|
||||
|
||||
- `노후관로` 목록 팝업 초기 오픈 위치
|
||||
- `노후관로` 목록 팝업 초기 오픈 폭
|
||||
- 현재 팝업 높이에서의 조건영역/표 레이아웃
|
||||
- 다른 팝업은 기본 동작을 유지하며, 이번 위치 미세조정 옵션은 사용하지 않는다.
|
||||
|
||||
## 7. 남은 리스크
|
||||
|
||||
- 사용자 스크린샷 기준의 정확한 위치 체감은 실제 브라우저 수동 확인이 필요하다.
|
||||
- 최소화 후 다시 열 때 사용하는 메인 화면의 미니 카드 위치는 이번 라운드 범위에 포함하지 않았다.
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
windowPopupDefinitions,
|
||||
type WindowPopupKey,
|
||||
} from "../model/popupDefinitions";
|
||||
import type { OpenWindowPopupParams } from "../model/types";
|
||||
import type { OpenWindowPopupParams, WindowPopupDefinition } from "../model/types";
|
||||
|
||||
const buildQueryString = (params: OpenWindowPopupParams = {}) => {
|
||||
const searchParams = new URLSearchParams();
|
||||
@@ -22,11 +22,17 @@ const clamp = (value: number, min: number, max: number) => {
|
||||
return Math.min(Math.max(value, min), max);
|
||||
};
|
||||
|
||||
const buildPopupFeatures = (
|
||||
width: number,
|
||||
height: number,
|
||||
placement: "center" | "browser-left" = "center",
|
||||
) => {
|
||||
const buildPopupFeatures = ({
|
||||
width,
|
||||
height,
|
||||
placement = "center",
|
||||
alignTop = false,
|
||||
offsetLeft = 0,
|
||||
offsetTop = 0,
|
||||
}: Pick<
|
||||
WindowPopupDefinition,
|
||||
"width" | "height" | "placement" | "alignTop" | "offsetLeft" | "offsetTop"
|
||||
>) => {
|
||||
const screenLeft = window.screenX ?? window.screenLeft ?? 0;
|
||||
const screenTop = window.screenY ?? window.screenTop ?? 0;
|
||||
const outerWidth = window.outerWidth || window.screen.width;
|
||||
@@ -47,14 +53,16 @@ const buildPopupFeatures = (
|
||||
const maxTop = availableTop + availableHeight - safeHeight - 24;
|
||||
const left =
|
||||
placement === "browser-left"
|
||||
? clamp(screenLeft, minLeft, maxLeft)
|
||||
? clamp(screenLeft + offsetLeft, minLeft, maxLeft)
|
||||
: clamp(
|
||||
screenLeft + Math.round((outerWidth - safeWidth) / 2),
|
||||
screenLeft + Math.round((outerWidth - safeWidth) / 2) + offsetLeft,
|
||||
availableLeft + 16,
|
||||
maxLeft,
|
||||
);
|
||||
const top = clamp(
|
||||
screenTop + Math.round((outerHeight - safeHeight) / 2),
|
||||
alignTop
|
||||
? screenTop + 24 + offsetTop
|
||||
: screenTop + Math.round((outerHeight - safeHeight) / 2) + offsetTop,
|
||||
minTop,
|
||||
maxTop,
|
||||
);
|
||||
@@ -82,11 +90,7 @@ export const openWindowPopup = (
|
||||
|
||||
const definition = windowPopupDefinitions[popupKey];
|
||||
const popupUrl = `/popup/${popupKey}${buildQueryString(params)}`;
|
||||
const popupFeatures = buildPopupFeatures(
|
||||
definition.width,
|
||||
definition.height,
|
||||
"placement" in definition ? definition.placement : undefined,
|
||||
);
|
||||
const popupFeatures = buildPopupFeatures(definition);
|
||||
const popupWindow = window.open(
|
||||
popupUrl,
|
||||
`sn-popup-${popupKey}`,
|
||||
|
||||
@@ -70,8 +70,12 @@ export const windowPopupDefinitions = {
|
||||
agedPipePopup: {
|
||||
key: "agedPipePopup",
|
||||
title: "노후 하수관로 관리 ",
|
||||
width: 1180,
|
||||
height: 760,
|
||||
width: 850,
|
||||
height: 600,
|
||||
placement: "browser-left",
|
||||
alignTop: true,
|
||||
offsetLeft: 0,
|
||||
offsetTop: 200,
|
||||
},
|
||||
pipeAnalysisPopup: {
|
||||
key: "pipeAnalysisPopup",
|
||||
|
||||
@@ -15,6 +15,9 @@ export type WindowPopupDefinition = {
|
||||
width: number;
|
||||
height: number;
|
||||
placement?: "center" | "browser-left";
|
||||
alignTop?: boolean;
|
||||
offsetLeft?: number;
|
||||
offsetTop?: number;
|
||||
requiredParams?: string[];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user