후보지 추가 지도 진행시켜~~~
This commit is contained in:
@@ -15,6 +15,13 @@ const Map = () => {
|
||||
const [checkedLayers, setCheckedLayers] = useState<string[]>([]);
|
||||
const [checkedLayersData, setCheckedLayersData] = useState<any[]>([]);
|
||||
const [selectDataPk, setSelectDataPk] = useState<string>("");
|
||||
const [subs, setSubs] = useState<object[]>([]);
|
||||
|
||||
//적용 버튼 클릭 이벤트
|
||||
const onApply = () => {
|
||||
//setSubs([{'41110PB001R1':'수원제1,2 재이용1'},{'41110PB001R2':'수원제1,2 재이용2'}]);
|
||||
console.log(subs)
|
||||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
@@ -120,6 +127,7 @@ const Map = () => {
|
||||
setSelectDataPk(hasuPk);
|
||||
}
|
||||
}}
|
||||
onApply={onApply}
|
||||
/>
|
||||
<div className="bg-container">
|
||||
<Gis
|
||||
@@ -138,6 +146,7 @@ const Map = () => {
|
||||
isSearchModalOpen={isSearchModalOpen}
|
||||
onCheckedLayersChange={handleCheckedLayersChange}
|
||||
imgVisble={false}
|
||||
setData={setSubs}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
|
||||
@@ -7,19 +7,20 @@ import {
|
||||
SelectBox,
|
||||
type SelectDataType,
|
||||
} from "@common/business_components/ui";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import SearchInputText from "../SearchInputText/SearchInputText";
|
||||
|
||||
export function SearchBar({
|
||||
|
||||
setHasuPk
|
||||
}:{
|
||||
setHasuPk: (hasuPk: string) => void,
|
||||
}
|
||||
|
||||
) {
|
||||
const {map, Common, initializeCommonData ,findRuseFclt} = useDmStore((state) => state);
|
||||
setHasuPk,
|
||||
onApply
|
||||
}: {
|
||||
setHasuPk: (hasuPk: string) => void;
|
||||
onApply: () => void;
|
||||
}) {
|
||||
const { map, Common, initializeCommonData, findRuseFclt } = useDmStore(
|
||||
(state) => state
|
||||
);
|
||||
const [sidoValue, setSidoValue] = useState<string>("");
|
||||
const [sigunValue, setSigunValue] = useState<string>("");
|
||||
const [filteredSigunData, setFilteredSigunData] = useState<SelectDataType[]>([
|
||||
@@ -59,12 +60,11 @@ export function SearchBar({
|
||||
}
|
||||
},
|
||||
[initializeSigunData]
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
console.log('map.ruseFcltList ', map.ruseFcltList)
|
||||
},[map.ruseFcltList])
|
||||
useEffect(() => {
|
||||
console.log("map.ruseFcltList ", map.ruseFcltList);
|
||||
}, [map.ruseFcltList]);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -81,10 +81,10 @@ useEffect(()=>{
|
||||
onSelectValue={(val) =>
|
||||
onSelectValue(val.toString(), "ctpvCd")
|
||||
}
|
||||
value={sidoValue|| Common.selectSidoData[0]?.val || ""}
|
||||
value={sidoValue || Common.selectSidoData[0]?.val || ""}
|
||||
/>
|
||||
<SelectBox
|
||||
className="col-span-2 w-1/6 h-full text-2xl ml-2"
|
||||
className="col-span-2 w-1/6 h-full text-2xl ml-10"
|
||||
label="시군구"
|
||||
selectClass={""}
|
||||
selectArray={filteredSigunData || []}
|
||||
@@ -93,43 +93,50 @@ useEffect(()=>{
|
||||
}
|
||||
value={sigunValue}
|
||||
/>
|
||||
<div className="col-span-6 flex flex-row items-center min-w-[40rem]">
|
||||
<Label className="text-xl justify-self-center mt-2 mx-3">
|
||||
하수재이용시설 :
|
||||
</Label>
|
||||
<SearchInputText
|
||||
label={'시설명'}
|
||||
initValue={undefined}
|
||||
setValue={ (searchNm?: string)=> {
|
||||
let sggOrCity=''
|
||||
if(searchNm){
|
||||
if(sigunValue === "0" || sigunValue === "") {
|
||||
sggOrCity = sidoValue;
|
||||
}else{
|
||||
sggOrCity = sigunValue;
|
||||
<div className="col-span-6 flex flex-row items-center min-w-[27rem] ml-10">
|
||||
<Label className="text-xl justify-self-center mt-2 mx-3">
|
||||
하수재이용시설
|
||||
</Label>
|
||||
<SearchInputText
|
||||
label={"시설명"}
|
||||
initValue={undefined}
|
||||
setValue={(searchNm?: string) => {
|
||||
let sggOrCity = "";
|
||||
if (searchNm) {
|
||||
if (sigunValue === "0" || sigunValue === "") {
|
||||
sggOrCity = sidoValue;
|
||||
} else {
|
||||
sggOrCity = sigunValue;
|
||||
}
|
||||
findRuseFclt(sggOrCity, searchNm);
|
||||
}
|
||||
findRuseFclt(sggOrCity, searchNm);
|
||||
}
|
||||
}}
|
||||
setRtnData={(rtnData: any)=> {
|
||||
setHasuPk(rtnData.bscFctCd || "");
|
||||
}}
|
||||
searchList={map.ruseFcltList || []}
|
||||
/>
|
||||
|
||||
}}
|
||||
setRtnData={(rtnData: any) => {
|
||||
setHasuPk(rtnData.bscFctCd || "");
|
||||
}}
|
||||
searchList={map.ruseFcltList || []}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row space-x-2">
|
||||
<Button
|
||||
color="red"
|
||||
className="mx-2 mt-2"
|
||||
size={"sm"}
|
||||
onClick={() => {}}
|
||||
>
|
||||
후보지선택
|
||||
</Button>
|
||||
<Button
|
||||
color="sky"
|
||||
className="mt-2"
|
||||
size={"sm"}
|
||||
onClick={() => {onApply();}}
|
||||
>
|
||||
적용
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</SearchFormLeft>
|
||||
<SearchFormRight className="w-2/12 mx-5 flex flex-col items-center justify-center space-x-2 ">
|
||||
<div className="flex flex-row space-x-2">
|
||||
<Button color="red" className="mx-2 mt-2" size={"sm"} onClick={() => {}}>
|
||||
후보지선택
|
||||
</Button>
|
||||
<Button color='sky' className="mt-2" size={"sm"} onClick={() => {}}>
|
||||
적용
|
||||
</Button>
|
||||
</div>
|
||||
</SearchFormRight>
|
||||
</SearchDiv>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -92,7 +92,7 @@ export function SdmInfoRegForm({
|
||||
e.stopPropagation();
|
||||
//setIsCandidatePopup(true);
|
||||
const popupOptions = `width=1920,height=1080,resizable='y',scrollbars='y'`;
|
||||
window.open('/map/popup', 'title', popupOptions);
|
||||
window.open("/map/popup", "candidatePopup", popupOptions);
|
||||
};
|
||||
|
||||
const searchSimilarCase = (e: React.MouseEvent) => {
|
||||
|
||||
@@ -8,8 +8,6 @@ import * as olProj from 'ol/proj';
|
||||
import { register } from 'ol/proj/proj4';
|
||||
import proj4 from 'proj4';
|
||||
import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import GisLonLat from './GisLonLat';
|
||||
import GisMapToggle from './GisMapToggle';
|
||||
import GisSelect from './GisSelect';
|
||||
import GisToolBar from './GisToolBar';
|
||||
@@ -36,7 +34,8 @@ function Gis({
|
||||
detailView: DetailView,
|
||||
onFeatureSelect,
|
||||
setIsSearchModalOpen,
|
||||
onCheckedLayersChange
|
||||
onCheckedLayersChange,
|
||||
setData
|
||||
}) {
|
||||
|
||||
const mapRef = useRef();
|
||||
@@ -232,6 +231,7 @@ function Gis({
|
||||
// 편집 가능한 레이어 목록 생성
|
||||
const layerItems = getLayerItems(layerCode);
|
||||
//setEditLayerItems(prev => [...layerItems])
|
||||
setData([{'41110PB001R1':'수원제1,2 재이용1'},{'41110PB001R2':'수원제1,2 재이용2'}]);
|
||||
}, [treeData]);
|
||||
|
||||
const getLayerItems = (layerCode) => {
|
||||
|
||||
Reference in New Issue
Block a user