중점우수토실 추가

This commit is contained in:
yschoi
2025-06-04 16:11:32 +09:00
parent 3be2c3bdef
commit 5266e8d0ba
7 changed files with 32 additions and 17 deletions
@@ -43,9 +43,6 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
const accessToken = tokenManager.getToken(CLAIM_NAME);
const tokenId = tokenManager.getToken(AUTH_USER_ID);
//TODO 삭제
console.log(accessToken)
const response = await axios.get<IUserInfo>(
`${ENDPOINT.USER_SERVICE.USERS}/info/me`,
{
+1 -1
View File
@@ -145,7 +145,7 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void,
✕
</button>
</div>
<div className="overflow-y-auto flex-1" ref={contentRef}>
<div className="overflow-y-auto overflow-x-hidden flex-1" ref={contentRef}>
<VerticalTable headName='LX 연계정보' tableData={[tableData]} headlist={headlist} pageSize={20} total={0} children={undefined} cellClick={undefined} onPageChange={function (page: number): void {
throw new Error("Function not implemented.");
}}></VerticalTable>
+17 -7
View File
@@ -2,9 +2,9 @@ import { NextRequest, NextResponse } from "next/server";
const AUTH_USER_ID = process.env.NEXT_PUBLIC_AUTH_USER_ID || "token-id";
const CLAIM_NAME = process.env.NEXT_PUBLIC_CLAIM_NAME || "Authorization";
const serverApiUrl =
process.env.NEXT_PUBLIC_SERVER_API_URL || "http://localhost:3002";
const geoServerUrl = process.env.NEXT_PUBLIC_GEOSERVER_URL || "";
const SERVER_API_URL = process.env.NEXT_PUBLIC_SERVER_API_URL || "";
const GEOSERVER_URL = process.env.NEXT_PUBLIC_GEOSERVER_URL || "";
const SEWERAGE_API_URL = process.env.NEXT_PUBLIC_SEWERAGE_API_URL || "";
export function middleware(req: NextRequest) {
console.log("Middleware 진입:", req.nextUrl.pathname);
@@ -13,7 +13,7 @@ export function middleware(req: NextRequest) {
if (pathname.startsWith("/server")) {
const queryParams = searchParams.toString();
const newUrl = `${serverApiUrl}${pathname.replace("/server", "")}${
const newUrl = `${SERVER_API_URL}${pathname.replace("/server", "")}${
queryParams ? `?${queryParams}` : ""
}`;
console.log(`[Middleware] Rewriting from '/server' path to: ${newUrl}`);
@@ -22,7 +22,16 @@ export function middleware(req: NextRequest) {
if (pathname.startsWith("/geoserver")) {
const queryParams = searchParams.toString();
const newUrl = `${geoServerUrl}${pathname.replace("/geoserver", "")}${
const newUrl = `${GEOSERVER_URL}${pathname.replace("/geoserver", "")}${
queryParams ? `?${queryParams}` : ""
}`;
console.log(`[Middleware] Rewriting from '/geoserver' path to: ${newUrl}`);
return NextResponse.rewrite(new URL(newUrl));
}
if (pathname.startsWith("/sewerage-service/api/v1/map/geometry")) {
const queryParams = searchParams.toString();
const newUrl = `${SEWERAGE_API_URL}${pathname.replace("/sewerage-service/api", "")}${
queryParams ? `?${queryParams}` : ""
}`;
console.log(`[Middleware] Rewriting from '/geoserver' path to: ${newUrl}`);
@@ -33,7 +42,7 @@ export function middleware(req: NextRequest) {
const requestHeaders = new Headers(req.headers);
const token = req.cookies.get(CLAIM_NAME)?.value;
const userId = req.cookies.get(AUTH_USER_ID)?.value;
const newUrl = `${serverApiUrl}${pathname}`;
const newUrl = `${SERVER_API_URL}${pathname}`;
if (token) requestHeaders.set(CLAIM_NAME, token);
if (userId) requestHeaders.set(AUTH_USER_ID, userId);
@@ -48,7 +57,7 @@ export function middleware(req: NextRequest) {
if (pathname.startsWith("/user-service")) {
const requestHeaders = new Headers(req.headers);
const newUrl = `${serverApiUrl}${pathname}`;
const newUrl = `${SERVER_API_URL}${pathname}`;
console.log(
`[Middleware] Rewriting from '/user-service' path to: ${newUrl}`,
@@ -68,5 +77,6 @@ export const config = {
"/attach-service/:path*",
"/user-service/:path*",
"/cms-service/:path*",
"/sewerage-service/api/v1/map/geometry/:path*",
],
};
@@ -134,7 +134,7 @@ function Gis({ treeData = [], isSearch = false }) {
projection: GisApp.TO_PROJ,
zoom: gisCore.defaults.zoom,
center: olProj.transform(
[126.85306, 35.571634],
[126.6757, 37.5585],
GisApp.FROM_PROJ,
GisApp.TO_PROJ
),
@@ -32,6 +32,7 @@ GisApp.layerInfos = [];
//GisApp.GEOSERVER_URL = 'http://rsone.iptime.org:10010/geoserver/hasudo/ows';
//GisApp.GEOSERVER_WMS_URL = 'http://rsone.iptime.org:10010/geoserver/hasudo/wms';
GisApp.GEOSERVER_URL = '/geoserver/hasudo/ows';
GisApp.SN_GEOSERVER_URL = '/sewerage-service/api/v1/map/geometry';
GisApp.GEOSERVER_WMS_URL = '/geoserver/hasudo/wms';
//맵 정보
@@ -72,11 +72,18 @@ GisOlLayer.prototype = {
* [사용]WFS 벡터 소스 반환
*/
getVectorSourceGeoserver: function (options) {
const url = GisApp.GEOSERVER_URL;
const toProj = GisApp.TO_PROJ;
const lyrTyNm = options.lyrTyNm;
let url = GisApp.GEOSERVER_URL;
let toProj = GisApp.TO_PROJ;
let lyrTyNm = options.lyrTyNm;
let typename = this.storageNm + lyrTyNm;
if(options.lyrTyNm == "om_dt_untrt_swg_rain"){ //중점우수토실실
url = GisApp.SN_GEOSERVER_URL;
typename = lyrTyNm;
}
const params = {};
params['TYPENAME'] = this.storageNm + lyrTyNm;
params['TYPENAME'] = typename;
params['SERVICE'] = 'WFS';
params['VERSION'] = '1.1.0';
params['REQUEST'] = 'GetFeature';
@@ -90,7 +90,7 @@ GisOlStyle.prototype = {
}
let baseResolution = 20;
let minScale = 0.3;
let minScale = 0.4;
let maxScale = 1.5;
let scale = baseResolution / resolution > maxScale ? maxScale : baseResolution / resolution;
scale = Math.max(minScale, Math.min(maxScale, scale));