불필요한 파일 모두 삭제
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
'use client'
|
||||
|
||||
import { SearchDiv, SelectBox, UiTable } from '@common/business_components';
|
||||
import { Button, TableRow, Input, Label } from '@common/components';
|
||||
import { TableHead } from '@common/components';
|
||||
import { useSnStore } from '../../store';
|
||||
import type { TableUpperProps } from '../../store/table';
|
||||
|
||||
const headMakeColSpan = (upHeadList: TableUpperProps[]) => {
|
||||
return ( <>
|
||||
<TableRow>{
|
||||
upHeadList.map((head: TableUpperProps) =>
|
||||
(!head.upSequnce?<TableHead rowSpan={2}key={head.id}>{head.title}</TableHead>:
|
||||
head.upName === 'upChangeRe'&& head.upSequnce=== 1?<TableHead key={head.id} rowSpan={1} colSpan={3}>{'중축 개축 증축 '}</TableHead>:null))}
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
{upHeadList.map((head: TableUpperProps) =>
|
||||
(head.upName === 'upChangeRe'?<TableHead key={head.id}>{head.title}</TableHead>:null))}
|
||||
</TableRow>
|
||||
</> )
|
||||
}
|
||||
|
||||
export default function PublicReuseFaciltyInsert() {
|
||||
const { upHeadList, publicReuseFacilityUper} = useSnStore((state) => state);
|
||||
const nodeList= headMakeColSpan(upHeadList);
|
||||
const total = 100;
|
||||
const headName= ()=>{
|
||||
return(
|
||||
<p className="pl-3 text-xl">점검 및 진단 현황</p>
|
||||
)
|
||||
}
|
||||
return ( <>
|
||||
<div>
|
||||
<p className="pl-3 text-2xl"> 점검 및 진단 조회</p>
|
||||
<SearchDiv>
|
||||
<div className='flex'>
|
||||
<SelectBox label='시설물' selectArray={[{text:'관로', val:'1'}]} selectClass='w-24' className='mr-4' onSelectValue={()=>{}} />
|
||||
<SelectBox label='사용여부' selectArray={[{text:'사용', val:'1'}]} selectClass='w-24' className='mr-4' onSelectValue={()=>{}} />
|
||||
<SelectBox label='경과년도' selectArray={[{text:'10년', val:'1'}]} selectClass='w-24' className='mr-4' onSelectValue={()=>{}} />
|
||||
<SelectBox label='경사' selectArray={[{text:'', val:'1'}]} selectClass='w-24' className='mr-4' onSelectValue={()=>{}} />
|
||||
<SelectBox label='흐름방식' selectArray={[{text:'자연유하', val:'1'}]} selectClass='w-24' className='mr-4' onSelectValue={()=>{}} />
|
||||
<SelectBox label='용도' selectArray={[{text:'오수관', val:'1'}]} selectClass='w-24' className='mr-4' onSelectValue={()=>{}} />
|
||||
<SelectBox label='관종' selectArray={[{text:'PE관관', val:'1'}]} selectClass='w-24' className='mr-4' onSelectValue={()=>{}} />
|
||||
<SelectBox label='관경' selectArray={[{text:'50', val:'1'}]} selectClass='w-24' className='mr-4' onSelectValue={()=>{}} />
|
||||
<Button className='mr-4' size='sm'>조회</Button>
|
||||
</div>
|
||||
</SearchDiv>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="colsapn-1">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</> )
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
'use client'
|
||||
import "@common/assets/styles/grid.css";
|
||||
import { useEffect, useState } from "react";
|
||||
import { SearchDiv, SelectBox, UiTable, MainDiv, Title, ContentsDiv, SearchFormLeft, SearchFormRight } from '@common/business_components';
|
||||
import ListDiv from '@common/business_components/ui/list_div';
|
||||
import { Button, Input } from '@common/components';
|
||||
import { useRouter } from "next/navigation";
|
||||
import { pplinesService } from "@service";
|
||||
|
||||
const tableHeadlist = [
|
||||
{ id: "ftreSmbol", title: "지형지물부호"},
|
||||
{ id: "swageLnkgPplPk", title: "하수연결관로기본키"},
|
||||
{ id: "pbadmsEmd", title: "행정읍면동"},
|
||||
{ id: "sttyEmd", title: "법정읍면동"}
|
||||
];
|
||||
|
||||
export default function Pplines() {
|
||||
|
||||
const router = useRouter()
|
||||
const total = 20
|
||||
const pageSize = 20
|
||||
|
||||
const [data, setData] = useState<{ content: any[] }>({ content: [] }); // 초기값을 객체 또는 null로 설정
|
||||
|
||||
const fetchData = async () => {
|
||||
|
||||
try {
|
||||
const response = await pplinesService.getPplines();
|
||||
setData(response.data); // API 응답 저장
|
||||
} catch (error) {
|
||||
console.error("데이터 불러오기 실패:", error);
|
||||
}
|
||||
};
|
||||
|
||||
// 컴포넌트 마운트 시 1회 실행
|
||||
useEffect(() => {
|
||||
fetchData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<MainDiv>
|
||||
<Title title="관로시설" />
|
||||
<ContentsDiv>
|
||||
<SearchDiv>
|
||||
<SearchFormLeft>
|
||||
<SelectBox label='시설물' selectArray={[{text:'관로', val:'1'}]} className='col-span-3' onSelectValue={()=>{}} selectClass='w-24' />
|
||||
<SelectBox label='사용여부' selectArray={[{text:'사용', val:'1'}]} className='col-span-3' onSelectValue={()=>{}} selectClass='w-24' />
|
||||
<SelectBox label='경과년도' selectArray={[{text:'10년', val:'1'}]} className='col-span-3' onSelectValue={()=>{}} selectClass='w-24' />
|
||||
<SelectBox label='경사' selectArray={[{text:'', val:'1'}]} className='col-span-3' onSelectValue={()=>{}} selectClass='w-24' />
|
||||
<SelectBox label='흐름방식' selectArray={[{text:'자연유하', val:'1'}]} className='col-span-3' onSelectValue={()=>{}} selectClass='w-24' />
|
||||
<SelectBox label='용도' selectArray={[{text:'오수관', val:'1'}]} className='col-span-3' onSelectValue={()=>{}} selectClass='w-24' />
|
||||
<SelectBox label='관종' selectArray={[{text:'PE관관', val:'1'}]} className='col-span-3' onSelectValue={()=>{}} selectClass='w-24' />
|
||||
<SelectBox label='관경' selectArray={[{text:'50', val:'1'}]} className='col-span-3' onSelectValue={()=>{}} selectClass='w-24' />
|
||||
</SearchFormLeft>
|
||||
<SearchFormRight>
|
||||
<Button className="px-4 py2 bg-blue-600 text-white rounded-sm text-sm font-medium hover:bg-blue-700" size="sm" onClick={fetchData}>조회</Button>
|
||||
</SearchFormRight>
|
||||
</SearchDiv>
|
||||
|
||||
<ListDiv>
|
||||
<UiTable tableData={data.content} headlist={tableHeadlist} pageSize={pageSize} total={total} children={null} headName="현황정보" cellClick={()=>{}} />
|
||||
</ListDiv>
|
||||
</ContentsDiv>
|
||||
</MainDiv> );
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
'use client'
|
||||
|
||||
import { SearchDiv, SelectBox, UiTable } from '@common/business_components';
|
||||
import { Button } from '@common/components';
|
||||
import { useSnStore } from '@store';
|
||||
import { type TableUpperProps } from '@/store/table';
|
||||
import { StoreZus } from '@/store/store';
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
const upHeadList: TableUpperProps[] = [
|
||||
{ id: "sido", title: "자산ID111"},
|
||||
{ id: "sigungo", title: "설비시설"},
|
||||
{ id: "facilityName", title: "주소"},
|
||||
{ id: "location", title: "자산코드"},
|
||||
{ id: "locationgubun", title: "자산명"},
|
||||
{ id: "facilityCapacity", title: "용도"},
|
||||
{ id: "yn", title: '신설/교체'},
|
||||
{ id: "authoDay", title: '처리구역'},
|
||||
{ id: "area", title: '내용연수' },
|
||||
{ id: "reuse", title: '취득금액' },
|
||||
]
|
||||
|
||||
const useAStore = StoreZus();
|
||||
|
||||
export default function PublicReuseFaciltyInsert() {
|
||||
|
||||
//const upHeadList = useSnStore((state) => state.upHeadList)
|
||||
//const publicReuseFacilityUper = useSnStore((state) => state.publicReuseFacilityUper)
|
||||
|
||||
//const { upHeadList, publicReuseFacilityUper, setHeadList, setTableData, decrementList, addRow } = useAStore.getState();
|
||||
const upHeadList = useSnStore(useAStore => useAStore.upHeadList);
|
||||
const publicReuseFacilityUper = useSnStore(useAStore => useAStore.publicReuseFacilityUper);
|
||||
const setHeadList = useSnStore(useAStore => useAStore.setHeadList);
|
||||
const setTableData = useSnStore(useAStore => useAStore.setTableData);
|
||||
const addRow = useSnStore(useAStore => useAStore.addRow);
|
||||
const decrementList = useSnStore(useAStore => useAStore.decrementList);
|
||||
|
||||
|
||||
//const { upHeadList, publicReuseFacilityUper} = useSnStore((state) => state)
|
||||
|
||||
//const setHeadList = useSnStore((state) => state.setHeadList)
|
||||
//const setTableData = useSnStore((state) => state.setTableData)
|
||||
//const decrementList = useSnStore((state) => state.decrementList)
|
||||
|
||||
const handleChangeHeader = () => {
|
||||
setHeadList(upHeadList)
|
||||
}
|
||||
|
||||
const add = () => {
|
||||
console.log(11111)
|
||||
addRow({
|
||||
sido: "xxxxxxxxxx",
|
||||
sigungo: "bbbbbbbbb",
|
||||
facilityName: "newFacility",
|
||||
location: "S-T-S-000000",
|
||||
locationgubun: "000000",
|
||||
facilityCapacity: "오수관",
|
||||
});
|
||||
};
|
||||
|
||||
const searchDataList = () => {
|
||||
//if (newFacility.trim() === "") return;
|
||||
|
||||
setTableData([ {
|
||||
sido: "123456",
|
||||
sigungo: "관로1",
|
||||
facilityName: "newFacility",
|
||||
location: "S-T-S-000000",
|
||||
locationgubun: "000000",
|
||||
facilityCapacity: "오수관",
|
||||
}]);
|
||||
|
||||
|
||||
};
|
||||
|
||||
const total = 100;
|
||||
const headName= ()=>{
|
||||
return(
|
||||
<p className="pl-3 text-xl">현황정보</p>
|
||||
)
|
||||
}
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<p className="pl-3 text-2xl"> 현황정보 조회</p>
|
||||
<SearchDiv >
|
||||
<div className='grid grid-cols-12 gap-1 w-4/5'>
|
||||
<SelectBox label='시설물' selectArray={[{text:'관로', val:'1'}]} className='col-span-3' onSelectValue={(val: string)=>{}} selectClass='w-24' />
|
||||
<SelectBox label='사용여부' selectArray={[{text:'사용', val:'1'}]} className='col-span-3' onSelectValue={(val: string)=>{}} selectClass='w-24' />
|
||||
<SelectBox label='경과년도' selectArray={[{text:'10년', val:'1'}]} className='col-span-3' onSelectValue={(val: string)=>{}} selectClass='w-24' />
|
||||
<SelectBox label='경사' selectArray={[{text:'', val:'1'}]} className='col-span-3' onSelectValue={(val: string)=>{}} selectClass='w-24' />
|
||||
<SelectBox label='흐름방식' selectArray={[{text:'자연유하', val:'1'}]} className='col-span-3' onSelectValue={(val: string)=>{}} selectClass='w-24' />
|
||||
<SelectBox label='용도' selectArray={[{text:'오수관', val:'1'}]} className='col-span-3' onSelectValue={(val: string)=>{}} selectClass='w-24' />
|
||||
<SelectBox label='관종' selectArray={[{text:'PE관관', val:'1'}]} className='col-span-3' onSelectValue={(val: string)=>{}} selectClass='w-24' />
|
||||
{/* <SelectBox label='관경' selectArray={[{text:'50', val:'1'}]} className='col-span-3'/> */}
|
||||
</div>
|
||||
<div className='w-1/5 flex justify-end items-center'>
|
||||
<Button className='mr-10 rounded-lg'>조회</Button>
|
||||
</div>
|
||||
</SearchDiv>
|
||||
{/* </div> */}
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="col-span-2">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button onClick={searchDataList} className="mr-3 mt-4 bg-red-500 text-white px-4 py-2 rounded">
|
||||
조회
|
||||
</button>
|
||||
<button onClick={handleChangeHeader} className="mr-3 mt-4 bg-red-500 text-white px-4 py-2 rounded">
|
||||
헤더
|
||||
</button>
|
||||
<button onClick={decrementList} className="mr-3 mt-4 bg-red-500 text-white px-4 py-2 rounded">
|
||||
삭제
|
||||
</button>
|
||||
<button onClick={() => router.push("/oper/pplines")} className="mr-3 mt-4 bg-red-500 text-white px-4 py-2 rounded">
|
||||
이동
|
||||
</button>
|
||||
</div> );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
export * from './ppline'
|
||||
export * from './map'
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
|
||||
import axios from 'axios'
|
||||
|
||||
/**
|
||||
* 하수관로 API
|
||||
*/
|
||||
const API_URL = `${process.env.NEXT_PUBLIC_SEWERAGE_API_URL}/v1/pplines`
|
||||
const PAGE_NO = 1
|
||||
const PAGE_SIZE = 20
|
||||
|
||||
export type PplineProps = {
|
||||
ftreSmbol: string
|
||||
swageLnkgPplPk: string
|
||||
pbadmsEmd: string
|
||||
sttyEmd: string
|
||||
}
|
||||
|
||||
export const pplinesService = {
|
||||
//목록
|
||||
getPplines: (size: number = PAGE_SIZE, page: number = PAGE_NO) => {
|
||||
return axios.get(`${API_URL}`)
|
||||
},
|
||||
//상세
|
||||
getPpline: (swageLnkgPplPk: string) => {
|
||||
return axios.get(`${API_URL}/${swageLnkgPplPk}`)
|
||||
},
|
||||
//저장
|
||||
savePpline: (swageLnkgPplPk: string) => {
|
||||
return axios.post(`${API_URL}`)
|
||||
},
|
||||
//수정
|
||||
updatePpline: (swageLnkgPplPk: string) => {
|
||||
return axios.put(`${API_URL}/${swageLnkgPplPk}`)
|
||||
},
|
||||
//삭제
|
||||
removePpline: (swageLnkgPplPk: string) => {
|
||||
return axios.delete(`${API_URL}/${swageLnkgPplPk}`)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user