fo: exceldown시 조건 나머지 적용
This commit is contained in:
@@ -191,6 +191,22 @@ export default function FacilityPrecipitation() {
|
||||
|
||||
// 엑셀다운로드
|
||||
const excelDownload = useCallback((searchReturn: ReturnType) => {
|
||||
if (ref.current.partValue === 'A') { // 행정별
|
||||
if (!ref.current.sidoValue || ref.current.sidoValue === '0') {
|
||||
alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'R') { // 유역별
|
||||
if (!ref.current.regionValue || ref.current.regionValue === '0') {
|
||||
alert('엑셀 다운로드는 유역 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'G') { // 환경청별
|
||||
if (!ref.current.envPartValue || ref.current.envPartValue === '0') {
|
||||
alert('엑셀 다운로드는 환경청 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
searchFacilityPrecipitation(searchReturn, 1, 10000);
|
||||
}, [searchFacilityPrecipitation]);
|
||||
|
||||
|
||||
@@ -170,6 +170,23 @@ export default function ProcessFacilitySearch() {
|
||||
}, [upHeadList1, upHeadList2, upHeadList3]);
|
||||
|
||||
const excelDownload = useCallback(() => {
|
||||
if (ref.current.partValue === 'A') { // 행정별
|
||||
if (!ref.current.sidoValue || ref.current.sidoValue === '0') {
|
||||
alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'R') { // 유역별
|
||||
if (!ref.current.regionValue || ref.current.regionValue === '0') {
|
||||
alert('엑셀 다운로드는 유역 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'G') { // 환경청별
|
||||
if (!ref.current.envPartValue || ref.current.envPartValue === '0') {
|
||||
alert('엑셀 다운로드는 환경청 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
setExcelTrigger(true);
|
||||
searchFcltyQltyList(ref.current, 1, 10000);
|
||||
}, [searchFcltyQltyList]);
|
||||
|
||||
@@ -176,6 +176,23 @@ export default function ProcessFacilitySearch() {
|
||||
}, [upHeadList1, upHeadList2, upHeadList3]);
|
||||
|
||||
const excelDownload = useCallback(() => {
|
||||
if (ref.current.partValue === 'A') { // 행정별
|
||||
if (!ref.current.sidoValue || ref.current.sidoValue === '0') {
|
||||
alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'R') { // 유역별
|
||||
if (!ref.current.regionValue || ref.current.regionValue === '0') {
|
||||
alert('엑셀 다운로드는 유역 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'G') { // 환경청별
|
||||
if (!ref.current.envPartValue || ref.current.envPartValue === '0') {
|
||||
alert('엑셀 다운로드는 환경청 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
searchFlowRate(ref.current, 1, 10000);
|
||||
setExcelTrigger(true);
|
||||
}, [searchFlowRate]);
|
||||
|
||||
@@ -178,6 +178,23 @@ export default function PlanSewage() {
|
||||
|
||||
// 엑셀다운로드
|
||||
const excelDownload = useCallback((searchReturn: ReturnType) => {
|
||||
if (ref.current.partValue === 'A') { // 행정별
|
||||
if (!ref.current.sidoValue || ref.current.sidoValue === '0') {
|
||||
alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'R') { // 유역별
|
||||
if (!ref.current.regionValue || ref.current.regionValue === '0') {
|
||||
alert('엑셀 다운로드는 유역 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'G') { // 환경청별
|
||||
if (!ref.current.envPartValue || ref.current.envPartValue === '0') {
|
||||
alert('엑셀 다운로드는 환경청 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
searchPlanSewage(searchReturn, 1, 10000);
|
||||
setExcelTrigger(true);
|
||||
}, [searchPlanSewage]);
|
||||
|
||||
@@ -132,6 +132,23 @@ export default function ProcessArea() {
|
||||
}, [excelList]);
|
||||
|
||||
const excelDownload = useCallback(() => {
|
||||
if (ref.current.partValue === 'A') { // 행정별
|
||||
if (!ref.current.sidoValue || ref.current.sidoValue === '0') {
|
||||
alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'R') { // 유역별
|
||||
if (!ref.current.regionValue || ref.current.regionValue === '0') {
|
||||
alert('엑셀 다운로드는 유역 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'G') { // 환경청별
|
||||
if (!ref.current.envPartValue || ref.current.envPartValue === '0') {
|
||||
alert('엑셀 다운로드는 환경청 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
searchProcessArea(ref.current, 1, 10000);
|
||||
}, [searchProcessArea]);
|
||||
|
||||
|
||||
@@ -236,6 +236,23 @@ export default function ProcessFacilitySearch() {
|
||||
}
|
||||
|
||||
const excelDownload = useCallback(() => {
|
||||
if (ref.current.partValue === 'A') { // 행정별
|
||||
if (!ref.current.sidoValue || ref.current.sidoValue === '0') {
|
||||
alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'R') { // 유역별
|
||||
if (!ref.current.regionValue || ref.current.regionValue === '0') {
|
||||
alert('엑셀 다운로드는 유역 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'G') { // 환경청별
|
||||
if (!ref.current.envPartValue || ref.current.envPartValue === '0') {
|
||||
alert('엑셀 다운로드는 환경청 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
searchFcltyList(ref.current, 1, 10000);
|
||||
}, [searchFcltyList]);
|
||||
|
||||
|
||||
@@ -175,6 +175,23 @@ export default function Rdi() {
|
||||
|
||||
// 엑셀다운로드
|
||||
const excelDownload = useCallback(() => {
|
||||
if (ref.current.partValue === 'A') { // 행정별
|
||||
if (!ref.current.sidoValue || ref.current.sidoValue === '0') {
|
||||
alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'R') { // 유역별
|
||||
if (!ref.current.regionValue || ref.current.regionValue === '0') {
|
||||
alert('엑셀 다운로드는 유역 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
} else if (ref.current.partValue === 'G') { // 환경청별
|
||||
if (!ref.current.envPartValue || ref.current.envPartValue === '0') {
|
||||
alert('엑셀 다운로드는 환경청 조건을 선택한 후 이용 가능합니다.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
searchRdi(ref.current, 1, 5000);
|
||||
setIsInitExcelDownload(true);
|
||||
}, [searchRdi]);
|
||||
|
||||
Reference in New Issue
Block a user