feat: 공지사항등록 - 조회수 count 반영

main
minuk926 3 years ago
parent 68e8747a63
commit 04cae8b120

@ -9,7 +9,8 @@ import {
GET_CMM_CODE_LIST, GET_CMM_CODE_LIST,
SAVE_PUBLIC_BOARD, SAVE_PUBLIC_BOARD,
DELETE_PUBLIC_BOARD, DELETE_PUBLIC_BOARD,
GET_FILE_DOWNLOAD GET_FILE_DOWNLOAD,
SAVE_PUBLIC_BOARD_HIT_CNT
} from 'commons/ApiUrl'; } from 'commons/ApiUrl';
import axios from 'utils/axios'; import axios from 'utils/axios';
import FileSaver from 'file-saver'; import FileSaver from 'file-saver';
@ -60,6 +61,14 @@ class OpstBizService {
return res; return res;
}; };
modifyPublicBoardHitCount = async (inCode) => {
const res = await axios.put(SAVE_PUBLIC_BOARD_HIT_CNT + inCode);
if (res.success) {
return res;
}
return res;
};
// eslint-disable-next-line no-return-await // eslint-disable-next-line no-return-await
getBoardList = async (params) => { getBoardList = async (params) => {
const res = await axios.get(GET_BOARD_LIST, { params }); const res = await axios.get(GET_BOARD_LIST, { params });
@ -70,13 +79,6 @@ class OpstBizService {
return res; return res;
}; };
// const res = await axios.get(BOARD_LIST_URL, { params });
// return res;
// axios.get(BOARD_LIST_URL, { params }).then((r) => {
// console.log(r);
// return r;
// });
// eslint-disable-next-line no-return-await // eslint-disable-next-line no-return-await
getSimsa680GroupList = async (params) => { getSimsa680GroupList = async (params) => {
const res = await axios.get(GET_PARKING_SIMSA_LIST, { params }); const res = await axios.get(GET_PARKING_SIMSA_LIST, { params });

@ -7,6 +7,7 @@ export const GET_FILE_DOWNLOAD = '/api/v1/ctgy/file/download/';
// 공지사항 // 공지사항
export const GET_PUBLIC_BOARD_LIST = '/api/v1/ctgy/pboard'; export const GET_PUBLIC_BOARD_LIST = '/api/v1/ctgy/pboard';
export const GET_PUBLIC_BOARD = '/api/v1/ctgy/pboard/'; export const GET_PUBLIC_BOARD = '/api/v1/ctgy/pboard/';
export const SAVE_PUBLIC_BOARD_HIT_CNT = '/api/v1/ctgy/pboard/hit/';
export const SAVE_PUBLIC_BOARD = '/api/v1/ctgy/file/pboard'; export const SAVE_PUBLIC_BOARD = '/api/v1/ctgy/file/pboard';
export const DELETE_PUBLIC_BOARD = '/api/v1/ctgy/file/pboard/'; export const DELETE_PUBLIC_BOARD = '/api/v1/ctgy/file/pboard/';

@ -83,6 +83,7 @@ const PublicBoard = () => {
const handleOnCellClick = (e) => { const handleOnCellClick = (e) => {
if (e?.field === 'inTitle') { if (e?.field === 'inTitle') {
setSelectedRow(e?.row); setSelectedRow(e?.row);
opstBizService.modifyPublicBoardHitCount(e?.row?.inCode);
setOpen(true); setOpen(true);
} }
}; };

@ -137,6 +137,7 @@ const PublicBoardForm = (props) => {
<Grid item xs={12} sm={6}> <Grid item xs={12} sm={6}>
{/* <TextField required label="업무구분" value={inDept} fullWidth /> */} {/* <TextField required label="업무구분" value={inDept} fullWidth /> */}
<Select <Select
disabled
label="업무구분" label="업무구분"
required required
id="inDept" id="inDept"

Loading…
Cancel
Save