Browse Source

비행승인 팝업 리스트 초기화 수정

master
김장현 2 weeks ago
parent
commit
748f66921c
  1. 39
      src/containers/flight/popup/ControlApprovalsPopupContainer.js
  2. 46
      src/containers/flight/popup/OperationApprovalsPopupContainer.js

39
src/containers/flight/popup/ControlApprovalsPopupContainer.js

@ -40,6 +40,17 @@ function ControlApprovalsPopupContainer() {
}; };
}, []); }, []);
useEffect(() => {
const searchStDt = dayjs().add(-7, 'day').format('YYYY-MM-DD');
const searchEndDt = dayjs().format('YYYY-MM-DD');
dispatch(
getLaancAprvList({
searchStDt,
searchEndDt
})
);
}, []);
const opnerMessage = e => { const opnerMessage = e => {
const { type } = e.data; const { type } = e.data;
const { payload } = e.data; const { payload } = e.data;
@ -104,20 +115,20 @@ function ControlApprovalsPopupContainer() {
dispatch(getLaancAprvList(param)); dispatch(getLaancAprvList(param));
dispatch(clientRefreshAprvListParam(param)); dispatch(clientRefreshAprvListParam(param));
localStorage.setItem( // localStorage.setItem(
'popupState', // 'popupState',
JSON.stringify({ // JSON.stringify({
filter: search, // filter: search,
ctprvn: filterArea.ctprvn === '시/도' ? '' : filterArea.ctprvn, // ctprvn: filterArea.ctprvn === '시/도' ? '' : filterArea.ctprvn,
sig: filterArea.sig === '군/구' ? '' : filterArea.sig, // sig: filterArea.sig === '군/구' ? '' : filterArea.sig,
address: filterArea.address, // address: filterArea.address,
startDate: searchDate.startDate, // startDate: searchDate.startDate,
endDate: searchDate.endDate, // endDate: searchDate.endDate,
reviewedType: checkState.reviewedType, // reviewedType: checkState.reviewedType,
reviewedProcType: checkState.reviewedProcType, // reviewedProcType: checkState.reviewedProcType,
limitZoneNm: checkState.limitZoneNm // limitZoneNm: checkState.limitZoneNm
}) // })
); // );
handlerOpnerPostMessage('search', { search, searchDate, filterArea }); handlerOpnerPostMessage('search', { search, searchDate, filterArea });
}; };

46
src/containers/flight/popup/OperationApprovalsPopupContainer.js

@ -9,8 +9,11 @@ import WebsocketClient from '@src/components/websocket/WebsocketClient';
function OperationApprovalsPopupContainer() { function OperationApprovalsPopupContainer() {
const [filter, setFilter] = useState(''); const [filter, setFilter] = useState('');
const [startDate, setStartDate] = useState(dayjs().format('YYYY-MM-DD'));
const [endDate, setEndDate] = useState(); const [startDate, setStartDate] = useState(
dayjs().add(-7, 'day').format('YYYY-MM-DD')
);
const [endDate, setEndDate] = useState(dayjs().format('YYYY-MM-DD'));
const [selected, setSelected] = useState(null); const [selected, setSelected] = useState(null);
const [selectedPlanSno, setSelectedPlanSno] = useState(null); const [selectedPlanSno, setSelectedPlanSno] = useState(null);
@ -42,6 +45,17 @@ function OperationApprovalsPopupContainer() {
}; };
}, []); }, []);
useEffect(() => {
const searchStDt = dayjs().add(-7, 'day').format('YYYY-MM-DD');
const searchEndDt = dayjs().format('YYYY-MM-DD');
dispatch(
getLaancAprvList({
searchStDt,
searchEndDt
})
);
}, []);
// 부모창에서 보내는 메세지 // 부모창에서 보내는 메세지
const opnerMessage = e => { const opnerMessage = e => {
const { type } = e.data; const { type } = e.data;
@ -129,20 +143,20 @@ function OperationApprovalsPopupContainer() {
dispatch(getLaancAprvList(param)); dispatch(getLaancAprvList(param));
dispatch(clientRefreshAprvListParam(param)); dispatch(clientRefreshAprvListParam(param));
localStorage.setItem( // localStorage.setItem(
'popupState', // 'popupState',
JSON.stringify({ // JSON.stringify({
filter: search, // filter: search,
ctprvn: filterArea.ctprvn === '시/도' ? '' : filterArea.ctprvn, // ctprvn: filterArea.ctprvn === '시/도' ? '' : filterArea.ctprvn,
sig: filterArea.sig === '군/구' ? '' : filterArea.sig, // sig: filterArea.sig === '군/구' ? '' : filterArea.sig,
address: filterArea.address, // address: filterArea.address,
startDate: searchDate.startDate, // startDate: searchDate.startDate,
endDate: searchDate.endDate, // endDate: searchDate.endDate,
reviewedType: checkState.reviewedType, // reviewedType: checkState.reviewedType,
reviewedProcType: checkState.reviewedProcType, // reviewedProcType: checkState.reviewedProcType,
limitZoneNm: checkState.limitZoneNm // limitZoneNm: checkState.limitZoneNm
}) // })
); // );
handlerOpnerPostMessage('search', { search, searchDate, filterArea }); handlerOpnerPostMessage('search', { search, searchDate, filterArea });
}; };

Loading…
Cancel
Save