수요처 팝업 추가 완료

This commit is contained in:
leedj312
2025-08-11 17:39:30 +09:00
parent 06c840951b
commit 12b9ffe65c
6 changed files with 103 additions and 42 deletions
+18 -15
View File
@@ -30,7 +30,6 @@ export const getFeatureCd = (featurePropertise: any, layerNm: string) => {
layerNm === "tb_wr_bdst_ruse_fclt"
? featurePropertise?.swtrmt_fclt_cd
: [
"tb_wr_ruse_fclt_dmd_co",
"tb_wr_rswtr_fclt",
"tb_wr_htdfl_fclt",
"tb_wr_rnwtr_utztn_fclt",
@@ -39,29 +38,29 @@ export const getFeatureCd = (featurePropertise: any, layerNm: string) => {
? featurePropertise?.bdst_nm
: layerNm === "tb_il_swage_prcs_fclt"
? featurePropertise?.swtrmt_fclt_nm
: null;
: layerNm === "tb_wr_ruse_fclt_dmd_co"
? featurePropertise?.bdst_info_sn
: null;
return featureCd;
};
export const getWrLayerNm = (featurePropertise: any) => {
const result = wrLayerList
.filter(item => item.val in featurePropertise) // 키 존재 여부 체크
.map(item => item.text);
.filter((item) => item.val in featurePropertise) // 키 존재 여부 체크
.map((item) => item.text);
return result[0];
};
export const getWrFeaturePk = (layerName :string) => {
export const getWrFeaturePk = (layerName: string) => {
const result = wrFeaturePK
.filter(item => item.val === layerName) // 키 존재 여부 체크
.map(item => item.text);
.filter((item) => item.val === layerName) // 키 존재 여부 체크
.map((item) => item.text);
return result[0];
};
export const getSelectedLayers = (isFeature: any, gisMaps:any) => {
export const getSelectedLayers = (isFeature: any, gisMaps: any) => {
const map = gisMaps.current;
if (!map) {
console.warn("지도가 초기화되지 않았습니다.");
@@ -94,11 +93,11 @@ export const getSelectedLayers = (isFeature: any, gisMaps:any) => {
return result;
};
export const getClickFeatureId = (data: any) => {
let featureId =''
export const getClickFeatureId = (data: any) => {
let featureId = "";
const layerName = data.layerNm;
if (layerName === "하수재이용시설") {
// 재이용시설
// 재이용시설
featureId = `${layerName}.${data.searchPk}`;
} else if (
//빗물이용시설, 중수도시설
@@ -121,7 +120,11 @@ export const getClickFeatureId = (data: any) => {
return featureId;
};
export function featurePopUpOpen(layerNm:string,featureCd:string,popupDetailRef){
export function featurePopUpOpen(
layerNm: string,
featureCd: string,
popupDetailRef
) {
const url = `/mapFeaturePopup?layerNm=${encodeURIComponent(String(layerNm))}&featureCd=${encodeURIComponent(featureCd)} `;
const width =
String(layerNm) === "tb_wr_bdst_ruse_fclt"
@@ -139,4 +142,4 @@ export function featurePopUpOpen(layerNm:string,featureCd:string,popupDetailRef)
"지도 시설 상세정보 팝업",
popupOptions
);
}
}
@@ -1,10 +0,0 @@
export default function coSttnDetailPopup(){
return(
<>
</>
)
}
@@ -0,0 +1,30 @@
import { useWrStore } from "@/app/store";
import SdmInsertForm from "@common/business_components/ui/sdmInsertForm";
import type { DemandCompType } from "@common/business_components/ui/sdmInsertForm/form";
export default function CoSttnDetailPopup({isDetail} :{isDetail:DemandCompType}){
const {
code
} = useWrStore((state) => state);
return(
<div>
<SdmInsertForm
selectSidoData={code.cityCd}
selectSigunData={code.sggCd}
dataList={[]}
rtnValue={(searchText: string, pageCnt: number) => {
console.log(searchText, pageCnt);
}}
rtnInputData={async (data) => {
console.log(data)
}}
bodyClassNm={"w-full mx-auto bg-white rounded-lg shadow-md p-6"}
updateList={isDetail}
readOnly={true}
></SdmInsertForm>
</div>
)
}