Browse Source

Merge branch 'master' of http://gitea.palntour.com/pav/pav-home

pull/2/head
김장현 2 years ago
parent
commit
19f51348c1
  1. 10
      src/assets/css/custom.css
  2. 2
      src/components/account/register/AccountRegisterForm.js
  3. 59
      src/components/basis/flight/plan/FlightPlanAreaMap.js
  4. 4
      src/modules/account/login/sagas/authSaga.ts
  5. 12
      src/modules/basis/flight/actions/basisFlightAction.ts
  6. 4
      src/modules/basis/flight/apis/basisFlightApi.ts
  7. 14
      src/modules/basis/flight/sagas/basisFlightSaga.ts

10
src/assets/css/custom.css

@ -251,15 +251,17 @@ h1.logo span{display:block;color:#f4f4f4;font-weight:bold;letter-spacing:2px;fon
.left-menu-nav .test .btn-use{margin-left:20px; width: 35px; height: 35px; display: block; border: 0px solid transparent; box-sizing: content-box !important; background-color: #009cad;}
.measure-control{position:absolute; z-index:100;}
.area-button{position:relative; z-index:100; margin-top:10px; margin-left:10px;}
.area-input{position:relative; z-index:100; margin-top:10px; margin-left:10px;width:200px;}
/* 지도 안에 버튼들 관리 */
.area-input{margin-top:10px; margin-left:10px;width:200px;}
.area-button{margin-top:10px; margin-left:10px;}
.map-comp{position:relative; z-index:100;display:flex;}
.control-btn{margin-left: 7px; border-bottom: solid 1px #283046; margin-bottom:5px;}
.buffer-input{text-align: center; border-radius: 100px; border: 1px solid #283046; width: 70px; margin-left: 5px;}
.buffer-btn{text-align: center; border-radius: 100px; border: 1px solid #283046; width: 30px; margin-left: 5px;}
/*메인-알림*/
.notice{width:650px;height:45px;overflow:hidden;position:absolute;left:50%;top:20px;transform: translate(-50%,0px);background:#283046;display:flex;font-size:0.9375rem;color:#f4f4f4;padding:0px 20px;border-radius:30px;}
.notice-icon{padding:10px 0;}

2
src/components/account/register/AccountRegisterForm.js

@ -212,7 +212,7 @@ export const AccountRegisterForm = ({
agreeTerms: agreeTerms
});
console.log(res);
// console.log(res);
if (res.data?.errCode === -1) {
setModal({

59
src/components/basis/flight/plan/FlightPlanAreaMap.js

@ -9,6 +9,7 @@ import {
import { FlightPlanDraw } from '../../../map/naver/draw/FlightPlanDraw';
import { initFlightBas } from '../../../../modules/basis/flight/models/basisFlightModel';
import { AREA_COORDINATE_LIST_SAVE } from '../../../../modules/basis/flight/actions/basisFlightAction';
import {flightPlanAPI} from '../../../../modules/basis/flight/apis/basisFlightApi'
const FlightPlanAreaMap = props => {
const dispatch = useDispatch();
@ -24,7 +25,7 @@ const FlightPlanAreaMap = props => {
initFlightBas.initDetail.areaList
);
const [searchData, setSearchData] = useState();
const [query, setQuery] = useState();
useEffect(() => {
NaverMapInit();
@ -135,15 +136,16 @@ const FlightPlanAreaMap = props => {
setMapAreaCoordList(areaList);
};
const handleSearch = () => {
// console.log(searchData, 'encoding');
};
const handleSearch = async() => {
const res = await flightPlanAPI.searchArea({query: query});
console.log(res.data.items, '<<<')
}
const handleChange = e => {
const { name, value } = e.target;
if (name == 'searchInput') {
setSearchData(encodeURI(value));
setQuery(value);
}
};
@ -173,19 +175,7 @@ const FlightPlanAreaMap = props => {
/>
) : null}
<Button.Ripple
color='primary'
className='area-button'
onClick={e => handlerDrawType('RESET')}
// {...props.test? (
// {}
// ):(
// {disabled:false}
// )}
disabled={props.test}
>
초기화
</Button.Ripple>
<div className='map-comp'>
<Input
type='text'
id='searchInput'
@ -193,17 +183,31 @@ const FlightPlanAreaMap = props => {
className='area-input'
placeholder='검색명을 입력하세요.'
onChange={handleChange}
// bsSize='sm'
bsSize='sm'
/>
<Button.Ripple
// className='mr-1'
className='area-button'
color='primary'
onClick={handleSearch}
// size='sm'
size='sm'
>
검색
</Button.Ripple>
{/* <Button.Ripple
color='primary'
className='area-button'
onClick={e => handlerDrawType('RESET')}
// {...props.test? (
// {}
// ):(
// {disabled:false}
// )}
disabled={props.test}
size='sm'
>
초기화
</Button.Ripple> */}
</div>
</div>
</div>
@ -229,12 +233,25 @@ const FlightPlanAreaMap = props => {
Circle
</Button.Ripple>
<Button.Ripple
className='mr-1'
color='primary'
onClick={e => handlerDrawType('POLYGON')}
disabled={props.test}
>
Polygon
</Button.Ripple>
<Button.Ripple
color='primary'
onClick={e => handlerDrawType('RESET')}
// {...props.test? (
// {}
// ):(
// {disabled:false}
// )}
disabled={props.test}
>
초기화
</Button.Ripple>
</div>
</CardBody>
</Card>

4
src/modules/account/login/sagas/authSaga.ts

@ -200,7 +200,7 @@ function* userPwSaga(
yield put(
MessageActions.IS_ERROR({
errorCode: ERROR_MESSAGE.code,
errorMessage: ERROR_MESSAGE.message,
errorMessage: '기존 비밀번호를 확인해주세요',
isHistoryBack: false,
isRefresh: false
})
@ -219,7 +219,7 @@ function* userPwSaga(
yield put(
MessageActions.IS_ERROR({
errorCode: ERROR_MESSAGE.code,
errorMessage: '비밀번호를 확인해주세요',
errorMessage: '처리 중 에러입니다.',
isHistoryBack: false,
isRefresh: false
})

12
src/modules/basis/flight/actions/basisFlightAction.ts

@ -87,6 +87,15 @@ const FLIGHT_APRV_PROC_REQUEST = 'basis/flight/aprv/proc/FLIGHT_APRV_PROC_REQUES
const FLIGHT_APRV_PROC_SUCCESS = 'basis/flight/aprv/proc/FLIGHT_APRV_PROC_SUCCESS';
const FLIGHT_APRV_PROC_FAILURE = 'basis/flight/aprv/proc/FLIGHT_APRV_PROC_FAILURE';
//지도 검색
const FLIGHT_SEARCH_AREA_REQUEST = 'basis/flight/search/area/FLIGHT_SEARCH_AREA_REQUEST';
const FLIGHT_SEARCH_AREA_SUCCESS = 'basis/flight/search/area/FLIGHT_SEARCH_AREA_SUCCESS';
const FLIGHT_SEARCH_AREA_FAILURE = 'basis/flight/search/area/FLIGHT_SEARCH_AREA_FAILURE';
export const SEARCH_AREA = createAsyncAction(
FLIGHT_SEARCH_AREA_REQUEST,
FLIGHT_SEARCH_AREA_SUCCESS,
FLIGHT_SEARCH_AREA_FAILURE
)<{query: string}, string, AxiosError>();
export const PUBLIC_AREA_LIST = createAsyncAction(
PUBLIC_AREA_LIST_REQUEST,
@ -206,7 +215,8 @@ const actions = {
FLIGHT_PLAN_AREA_BUFFER_LIST,
AREA_DETAIL_INIT,
FLIGHT_APRV_LIST,
FLIGHT_APRV_PROC
FLIGHT_APRV_PROC,
SEARCH_AREA
};
export type FlightAction = ActionType<typeof actions>;

4
src/modules/basis/flight/apis/basisFlightApi.ts

@ -66,5 +66,9 @@ export const flightPlanAPI = {
const res = await axios.put(`api/bas/flight/aprv/proc`, data);
return res;
},
searchArea: async(param) => {
return await axios.get(`api/bas/flight/plan/area/search?query=${param.query}`);
}
}

14
src/modules/basis/flight/sagas/basisFlightSaga.ts

@ -406,6 +406,19 @@ function* aprvProcSaga(action: ActionType<typeof Actions.FLIGHT_APRV_PROC.reques
}
}
function* searchAreaSaga(
action: ActionType<typeof Actions.SEARCH_AREA.request>
) {
try{
const { query } = action.payload;
const res = yield call(Apis.flightPlanAPI.searchArea, { query });
yield put(Actions.SEARCH_AREA.success(res));
} catch (error) {
yield put(Actions.SEARCH_AREA.failure(error));
}
}
export function* flightSaga() {
yield takeEvery(Actions.PUBLIC_AREA_LIST.request, listAreaSaga);
// yield takeEvery(Actions.FLIGHT_PLAN_AREA.request, createFlightPlanArea);
@ -419,4 +432,5 @@ export function* flightSaga() {
yield takeEvery(Actions.FLIGHT_PLAN_AREA_BUFFER_LIST.request, listBuffer)
yield takeEvery(Actions.FLIGHT_APRV_LIST.request, listAprvSaga)
yield takeEvery(Actions.FLIGHT_APRV_PROC.request, aprvProcSaga)
yield takeEvery(Actions.SEARCH_AREA.request, searchAreaSaga)
}

Loading…
Cancel
Save