From 15e81daacaac36b32a8e6bfe8cf10d05d00cf6b2 Mon Sep 17 00:00:00 2001 From: pjs Date: Thu, 19 Feb 2026 22:12:34 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A1=B0=ED=9A=8C=EC=A1=B0=EA=B1=B4=20?= =?UTF-8?q?=EC=A0=95=EC=83=81=ED=99=94,=20=EB=93=9C=EB=9E=98=EA=B7=B8?= =?UTF-8?q?=EC=95=A4=EB=93=9C=EB=9E=8D=20=EA=B8=B0=EB=8A=A5=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ctrl/ContentsBbsController.java | 38 ++ .../service/ContentsBbsService.java | 27 +- .../service/impl/ContentsBbsServiceImpl.java | 27 ++ .../resources/mappers/WebMainBannerSqlMap.xml | 10 +- .../crm/contentsBbs/ContentsBbsSql.xml | 14 +- .../static/css/web/ContentsBbsSelectList.css | 449 ++++++++++++++++++ .../static/css/web/webPopupSelectList.css | 9 +- .../css/web/webTreatmentPetitSelectList.css | 107 ----- .../web/contentsBbs/ContentsBbsSelectList.js | 394 ++------------- .../js/web/webpopup/webPopupSelectList.js | 224 +++++---- .../contentsBbs/ContentsBbsSelectList.html | 40 +- .../webMainBannerSelectList.html | 72 +-- .../web/webpopup/webPopupSelectList.html | 57 ++- 13 files changed, 770 insertions(+), 698 deletions(-) create mode 100644 src/main/resources/static/css/web/ContentsBbsSelectList.css delete mode 100644 src/main/resources/static/css/web/webTreatmentPetitSelectList.css diff --git a/src/main/java/com/madeu/crm/contentsBbs/ctrl/ContentsBbsController.java b/src/main/java/com/madeu/crm/contentsBbs/ctrl/ContentsBbsController.java index c2a73b6..3d74b30 100644 --- a/src/main/java/com/madeu/crm/contentsBbs/ctrl/ContentsBbsController.java +++ b/src/main/java/com/madeu/crm/contentsBbs/ctrl/ContentsBbsController.java @@ -110,6 +110,44 @@ public class ContentsBbsController extends ManagerDraftAction { return HttpUtil.makeHashToJsonModelAndView(map); } + /** + * 카테고리 목록 조회 + * + * @param request + * @param response + * @return + */ + @PostMapping("/contentsBbs/getCategoryList.do") + public ModelAndView getCategoryList(HttpSession session, HttpServletRequest request, + HttpServletResponse response) { + + HashMap paramMap = HttpUtil.getParameterMap(request); + HashMap map = new HashMap(); + + try { + if (!webCheckLogin(session)) { + return null; + } else { + map = contentsBbsService.getCategoryList(paramMap); + } + } catch (Exception e) { + e.printStackTrace(); + return null; + } finally { + if (Constants.OK == map.get("msgCode")) { + + } else { + map.put("msgCode", Constants.FAIL); + map.put("success", false); + if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { + map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); + } + } + } + log.debug("ContentsBbsController getCategoryList END"); + return HttpUtil.makeHashToJsonModelAndView(map); + } + /** * 홈페이지 시술예약(쁘띠) 정보 상세 조회 * diff --git a/src/main/java/com/madeu/crm/contentsBbs/service/ContentsBbsService.java b/src/main/java/com/madeu/crm/contentsBbs/service/ContentsBbsService.java index b95bcc9..a85a2a8 100644 --- a/src/main/java/com/madeu/crm/contentsBbs/service/ContentsBbsService.java +++ b/src/main/java/com/madeu/crm/contentsBbs/service/ContentsBbsService.java @@ -5,25 +5,28 @@ import org.springframework.web.multipart.MultipartFile; import java.util.HashMap; public interface ContentsBbsService { - public HashMap selectListWebTreatmentPetitIntro(HashMap paramMap) throws Exception; + public HashMap selectListWebTreatmentPetitIntro(HashMap paramMap) + throws Exception; - public HashMap getContentsBbsList(HashMap paramMap) throws Exception; + public HashMap getContentsBbsList(HashMap paramMap) throws Exception; - public HashMap getContentsBbs(HashMap paramMap) throws Exception; + public HashMap getContentsBbs(HashMap paramMap) throws Exception; - public HashMap insertWebTreatmentPetitIntro(HashMap paramMap) throws Exception; + public HashMap insertWebTreatmentPetitIntro(HashMap paramMap) throws Exception; - public HashMap putContentsBbs(HashMap paramMap, MultipartFile file, - MultipartFile content_file) throws Exception; + public HashMap putContentsBbs(HashMap paramMap, MultipartFile file, + MultipartFile content_file) throws Exception; - public HashMap moveContentsBbs(HashMap paramMap) throws Exception; + public HashMap moveContentsBbs(HashMap paramMap) throws Exception; - public HashMap modContentsBbs(HashMap paramMap, MultipartFile file, - MultipartFile content_file) throws Exception; + public HashMap modContentsBbs(HashMap paramMap, MultipartFile file, + MultipartFile content_file) throws Exception; - public HashMap delContentsBbs(HashMap paramMap) throws Exception; + public HashMap delContentsBbs(HashMap paramMap) throws Exception; - public HashMap selectListTreatmentOption(HashMap paramMap) throws Exception; + public HashMap selectListTreatmentOption(HashMap paramMap) throws Exception; - public HashMap updateContentsBbsOrdNo(HashMap paramMap) throws Exception; + public HashMap updateContentsBbsOrdNo(HashMap paramMap) throws Exception; + + public HashMap getCategoryList(HashMap paramMap) throws Exception; } diff --git a/src/main/java/com/madeu/crm/contentsBbs/service/impl/ContentsBbsServiceImpl.java b/src/main/java/com/madeu/crm/contentsBbs/service/impl/ContentsBbsServiceImpl.java index 8e1448d..f856cda 100644 --- a/src/main/java/com/madeu/crm/contentsBbs/service/impl/ContentsBbsServiceImpl.java +++ b/src/main/java/com/madeu/crm/contentsBbs/service/impl/ContentsBbsServiceImpl.java @@ -1012,4 +1012,31 @@ public class ContentsBbsServiceImpl implements ContentsBbsService { log.debug("ContentsBbsServiceImpl updateContentsBbsOrdNo END"); return map; } + + /** + * 카테고리 목록 조회 + * + * @param paramMap + * @return + * @throws Exception + */ + @Override + public HashMap getCategoryList(HashMap paramMap) throws Exception { + log.debug("ContentsBbsServiceImpl getCategoryList START"); + + HashMap map = new HashMap(); + + try { + List> listMap = cmmnDAO.selectList("ContentsBbsSql.getCategoryList", paramMap); + map.put("msgCode", Constants.OK); + map.put("rows", listMap); + } catch (Exception e) { + e.printStackTrace(); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "카테고리 목록 조회 중 오류가 발생하였습니다."); + } + + log.debug("ContentsBbsServiceImpl getCategoryList END"); + return map; + } } diff --git a/src/main/resources/mappers/WebMainBannerSqlMap.xml b/src/main/resources/mappers/WebMainBannerSqlMap.xml index d602441..d1e3692 100644 --- a/src/main/resources/mappers/WebMainBannerSqlMap.xml +++ b/src/main/resources/mappers/WebMainBannerSqlMap.xml @@ -9,10 +9,7 @@ AND MWMB.BANNER_TYPE = #{webMainBannerSearchType} - - AND DATE_FORMAT(MWMB.WRITE_DATE, '%Y-%m-%d') >= #{webMainBannerSearchStartDate} - AND DATE_FORMAT(MWMB.WRITE_DATE, '%Y-%m-%d') <= #{webMainBannerSearchEndDate} - + AND MWMB.TITLE LIKE CONCAT('%',TRIM(#{webMainBannerSearchKeywordParam}),'%') @@ -57,10 +54,7 @@ AND MWMB.BANNER_TYPE = #{webMainBannerSearchType} - - AND DATE_FORMAT(MWMB.WRITE_DATE, '%Y-%m-%d') >= #{webMainBannerSearchStartDate} - AND DATE_FORMAT(MWMB.WRITE_DATE, '%Y-%m-%d') <= #{webMainBannerSearchEndDate} - + AND MWMB.TITLE LIKE CONCAT('%',TRIM(#{webMainBannerSearchKeywordParam}),'%') diff --git a/src/main/resources/mappers/crm/contentsBbs/ContentsBbsSql.xml b/src/main/resources/mappers/crm/contentsBbs/ContentsBbsSql.xml index f0624a1..b9202d8 100644 --- a/src/main/resources/mappers/crm/contentsBbs/ContentsBbsSql.xml +++ b/src/main/resources/mappers/crm/contentsBbs/ContentsBbsSql.xml @@ -12,15 +12,12 @@ AND HC.CATEGORY_NO = HCB.CATEGORY_NO AND HCB.USE_YN = 'Y' AND HCB.CATEGORY_DIV_CD = #{categoryDivCd} - - AND HCB.CATEGORY_NM LIKE CONCAT('%', #{categoryNm}, '%') + + AND HC.CATEGORY_NO = #{searchCategoryNo} AND HCB.TITLE LIKE CONCAT('%', #{title}, '%') - - AND MM.NAME = #{regNm} - ) total @@ -52,15 +49,12 @@ AND HCB.USE_YN = 'Y' AND HC.USE_YN = 'Y' AND HCB.CATEGORY_DIV_CD = #{categoryDivCd} - - AND HCB.CATEGORY_NM LIKE CONCAT('%', #{categoryNm}, '%') + + AND HC.CATEGORY_NO = #{searchCategoryNo} AND HCB.TITLE LIKE CONCAT('%', #{title}, '%') - - AND MM.NAME = #{regNm} - ORDER BY ${webTreatmentPetitSort} diff --git a/src/main/resources/static/css/web/ContentsBbsSelectList.css b/src/main/resources/static/css/web/ContentsBbsSelectList.css new file mode 100644 index 0000000..8c21c22 --- /dev/null +++ b/src/main/resources/static/css/web/ContentsBbsSelectList.css @@ -0,0 +1,449 @@ +.project_wrap { + width: 100%; + min-width: 1080px; + margin: 0 auto; +} + +/*오른쪽영역*/ +.project_wrap .content_section { + margin-top: 50px; + width: 100%; + min-width: 1080px; + display: table; +} + +.project_wrap .content_section .hospital_wrap { + width: calc(100% - 72px); + min-width: calc(1080px - 72px); + height: calc(100vh - 50px); + float: left; + position: relative; +} + + +/* 왼쪽_메뉴 영역 */ +.project_wrap .content_section .hospital_wrap .left_box { + position: absolute; + width: 240px; + height: calc(100vh - 50px); + overflow: auto; + padding: 10px 20px; +} + +.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list { + width: 100%; +} + +.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu { + width: 100%; + height: auto; + margin: 20px 0 10px 0; + padding: 0; + font-size: 14px; + font-weight: 700; +} + +.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu.first { + margin-top: 0; +} + +.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list a { + width: 100%; + height: 100%; + display: block; + margin-bottom: 8px; + padding: 8px; + font-size: 14px; + text-align: left; + border-radius: 5px; +} + +.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list a.on { + background: #3985EA; + border: none; +} + +.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li { + width: 100%; + height: 36px; + margin-bottom: 8px; +} + +.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li a.on { + color: #fff; +} + +/* 센터쪽 */ +.project_wrap .content_section .hospital_wrap .center_box { + width: calc(100% - 240px); + height: calc(100vh - 50px); + position: absolute; + left: 240px; + padding: 10px 10px 10px 0; +} + +.project_wrap .content_section .hospital_wrap .center_box .page_title { + min-width: 90px; + padding-left: 10px; + font-size: 18px; + font-weight: 700; + line-height: 50px; + float: left; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box { + display: table; + width: 100%; + padding: 20px 0; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box { + width: 140px; + height: 36px; + margin-left: 10px; + border: 1px solid #E9ECF0; + border-radius: 5px; + background: url(/image/web/select_arrow.svg) no-repeat 95% 55%/20px auto #fff; + float: left; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.first { + width: 150px; + margin-left: 0; + float: left; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.active { + z-index: 10; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .label { + width: 100%; + height: 100%; + padding: 0 10px; + outline: none; + font-size: 14px; + font-weight: 400; + text-align: left; + color: #494E53; + cursor: pointer; + background: none; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list { + min-width: 100%; + border-radius: 5px; + transition: .4s ease-in; + border: Solid 1px #E9ECF0; + padding: 10px; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item { + width: 100%; + line-height: 30px; + transition: .1s; + position: relative; + display: table; + font-size: 14px; + color: #494E53; + cursor: pointer; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item label { + width: 100%; + line-height: 30px; + margin-bottom: 0px; + clear: both; + font-weight: 400; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list { + float: left; + position: relative; + margin-left: 10px; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box { + width: 150px; + float: left; + height: 36px; + position: relative; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box img { + position: absolute; + top: 50%; + transform: translateY(-50%); + left: 5px; + z-index: 1; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input { + width: 100%; + height: 36px; + border: 1px solid #E9ECF0; + border-radius: 5px; + background: none; + position: absolute; + left: 0; + padding: 0 10px 0 30px; + font-size: 14px; + background: #fff; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input::placeholder { + color: #B5BDC4; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box .search_list { + position: absolute; + top: 40px; + left: 0; + width: 150px; + background: #fff; + color: #fff; + border-radius: 5px; + transition: .4s ease-in; + z-index: 1; + border: solid 1px #E9ECF0; + display: none; + margin: 0; + padding: 10px; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_btn { + background: #3985EA; + border-radius: 5px; + color: #fff; + margin-left: 5px; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box { + float: right; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .treatmentpetit_btn { + background: #3985EA; + color: #fff; + border-radius: 5px; + float: left; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .treatmentpetit_btn img { + position: relative; + top: -2px; + width: 20px; + margin-right: 5px; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .delete_btn { + background: #FF2222; + color: #fff; + border-radius: 5px; + margin-left: 10px; +} + +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .delete_btn img { + position: relative; + top: -2px; + width: 20px; + margin-right: 5px; +} + +/* table_box */ +.project_wrap .content_section .hospital_wrap .center_box .table_box { + width: 100%; + height: calc(100% - 180px); + overflow: auto; + background: #fff; + border: solid 1px #E9ECF0; + border-radius: 5px; +} + +/* 페이지게이션 */ +.project_wrap .content_section .hospital_wrap .center_box .page_box { + position: absolute; + bottom: 20px; + width: 100%; + height: 24px; +} + +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation { + height: 24px; +} + +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination { + margin: 0 auto; + display: table; +} + +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li { + display: inline-block; + padding: 0 +} + +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a, +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a { + position: relative; + width: 24px; + height: 24px; + background: none; +} + +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a:hover, +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a:hover { + background: none; +} + +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a img { + position: absolute; + top: 50%; + left: 50%; + transform: translate3d(-50%, -50%, 0); + width: 10px; +} + +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a img { + position: absolute; + top: 50%; + left: 50%; + transform: translate3d(-50%, -50%, 0) rotate(180deg); + width: 10px; +} + +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a { + width: 24px; + height: 24px; + padding: 0; + border: none; + text-align: center; + line-height: 22px; + font-size: 14px; + font-weight: 500; + background: #FFF; +} + +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a:hover, +.project_wrap .content_section .hospital_wrap .center_box .right_note .page_box .navigation .pagination li a:focus { + background: #3985EA; + color: #fff; + font-weight: 700; +} + +.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li.active a { + background: #3985EA; + color: #fff; +} + +/*반응형 View*/ +@media only screen and (max-width:1500px) { + .project_wrap .content_section .hospital_wrap .left_box { + width: 160px; + padding: 10px 15px; + } + + .project_wrap .content_section .hospital_wrap .center_box { + width: calc(100% - 160px); + left: 160px; + } +} + +@media only screen and (max-width:1280px) { + .project_wrap .content_section .hospital_wrap { + width: calc(100% - 60px); + } + + .project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu { + font-size: 12px; + } + + .project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li { + height: 32px; + margin-bottom: 5px; + } + + .project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li a { + font-size: 12px; + } + + .project_wrap .content_section .hospital_wrap .center_box .page_title { + min-width: 80px; + height: 40px; + font-size: 16px; + line-height: 40px; + } + + .project_wrap .content_section .hospital_wrap .center_box .total { + font-size: 12px; + line-height: 40px; + } + + .project_wrap .content_section .hospital_wrap .center_box .filter_box { + padding: 15px 0; + } + + .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box { + width: 120px; + height: 32px; + background-size: 18px; + } + + .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .label { + padding: 0 10px; + font-size: 12px; + } + + .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item { + font-size: 12px; + } + + .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box { + width: 120px; + height: 32px; + } + + .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box img { + width: 22px; + } + + .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input { + height: 32px; + padding-left: 35px; + font-size: 12px; + } + + .project_wrap .content_section .hospital_wrap .center_box .page_box { + height: 23px; + } + + .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation { + height: 23px; + } + + .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a { + width: 23px; + height: 23px; + font-size: 12px; + } + + .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a, + .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a { + width: 23px; + height: 23px; + } + + .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a img, + .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a img { + width: 9px; + } + + .project_wrap .content_section .hospital_wrap .center_box .table_box { + height: calc(100% - 155px); + } +} + +@media only screen and (max-width:1080px) { + .project_wrap .content_section .hospital_wrap { + width: calc(100% - 50px); + } +} \ No newline at end of file diff --git a/src/main/resources/static/css/web/webPopupSelectList.css b/src/main/resources/static/css/web/webPopupSelectList.css index 000f582..eb7524e 100644 --- a/src/main/resources/static/css/web/webPopupSelectList.css +++ b/src/main/resources/static/css/web/webPopupSelectList.css @@ -1,11 +1,6 @@ .project_wrap {width:100%; min-width:1080px; margin:0 auto;} -#homepageDivCd{ - float:left; - font-size:18px; - padding: 5px; - border-radius: 5px; - border-color: #ddd; -} +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.first { width:150px; } +.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item { cursor:pointer; } /*오른쪽영역*/ .project_wrap .content_section {margin-top:50px; width:100%; min-width:1080px; display:table;} .project_wrap .content_section .hospital_wrap {width: calc(100% - 72px); min-width:calc(1080px - 72px); height:calc(100vh - 50px); float:left; position:relative;} diff --git a/src/main/resources/static/css/web/webTreatmentPetitSelectList.css b/src/main/resources/static/css/web/webTreatmentPetitSelectList.css deleted file mode 100644 index 356e714..0000000 --- a/src/main/resources/static/css/web/webTreatmentPetitSelectList.css +++ /dev/null @@ -1,107 +0,0 @@ -.project_wrap {width:100%; min-width:1080px; margin:0 auto;} - -/*오른쪽영역*/ -.project_wrap .content_section {margin-top:50px; width:100%; min-width:1080px; display:table;} -.project_wrap .content_section .hospital_wrap {width: calc(100% - 72px); min-width:calc(1080px - 72px); height:calc(100vh - 50px); float:left; position:relative;} - - -/* 왼쪽_메뉴 영역 */ -.project_wrap .content_section .hospital_wrap .left_box {position:absolute; width:240px; height:calc(100vh - 50px); overflow:auto; padding:10px 20px;} -.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list {width:100%;} -.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu {width:100%; height:auto; margin:20px 0 10px 0; padding:0; font-size:14px; font-weight:700;} -.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu.first {margin-top:0;} -.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list a {width:100%; height:100%; display:block; margin-bottom:8px; padding:8px; font-size:14px; text-align:left; border-radius:5px;} -.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list a.on {background:#3985EA; border:none;} -.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li {width:100%; height:36px; margin-bottom:8px;} -.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li a.on {color:#fff;} - -/* 센터쪽 */ -.project_wrap .content_section .hospital_wrap .center_box {width:calc(100% - 240px); height:calc(100vh - 50px); position:absolute; left:240px; padding:10px 10px 10px 0;} -.project_wrap .content_section .hospital_wrap .center_box .page_title {min-width:90px; padding-left:10px; font-size:18px; font-weight:700; line-height:50px; float:left;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box {display:table; width:100%; padding:20px 0;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box {width:140px; height:36px; margin-left:10px; border:1px solid #E9ECF0; border-radius:5px; background:url(/image/web/select_arrow.svg) no-repeat 95% 55%/20px auto #fff;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.first { width:100px; margin-left:0; float:left; } -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .slash {width:6px; font-size:14px; font-weight:400; color:#000; line-height:36px; margin:0 12px; display:block; float:left;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list_box { margin-left:10px; } -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.active {z-index:10;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .label {width:100%; height:100%; padding:0 10px; outline:none; font-size:14px; font-weight:400; text-align:left; color: #494E53; cursor:pointer; background:none;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list {min-width:100%; border-radius:5px; transition:.4s ease-in; border:Solid 1px #E9ECF0; padding:10px; } -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item {width:100%; line-height:30px; transition:.1s; position:relative; display:table; font-size:14px; color:#494E53;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item label {width:100%; line-height:30px; margin-bottom:0px; clear:both; font-weight:400;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box {border-radius:8px; float:left; position:relative;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box {position:relative; width:140px; height:36px; float:left; margin-left:10px;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box.last {margin-left:0;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box img {position:absolute; top:50%; transform:translateY(-50%); left:10px; z-index:1; width:22px;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box .date_picker {line-height:34px; display:block; margin-right:20px; width:100%; font-size:14px; padding:0 12px; padding-left:40px; outline:none; border:1px solid #E9ECF0; border-radius:5px;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box input[type="date"]::-webkit-calendar-picker-indicator {display:none;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box .date_picker {-webkit-appearance:none; -moz-appearance:none; appearance:none; position:absolute; cursor:pointer;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .slash {color:#000; font-size:14px; font-weight:400; line-height:36px; margin:0 5px; width:6px; display:block; float:left;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list {float:left; position:relative; margin-left:10px;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box {width:150px; float:left; height:36px; position:relative;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box img {position:absolute; top:50%; transform:translateY(-50%); left:5px; z-index:1;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input {width:100%; height:36px; border:1px solid #E9ECF0; border-radius:5px; background:none; position:absolute; left:0; padding:0 10px 0 30px; font-size:14px; background:#fff;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input::placeholder {color:#B5BDC4;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box .search_list {position:absolute; top:40px; left:0; width:150px; background:#fff; color:#fff; border-radius:5px; transition:.4s ease-in; z-index:1; border:solid 1px #E9ECF0; display:none; margin:0; padding:10px;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_btn {background:#3985EA; border-radius:5px; color:#fff; margin-left:5px;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box {float:right;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .treatmentpetit_btn {background:#3985EA; color:#fff; border-radius:5px; float:left;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .treatmentpetit_btn img {position:relative; top:-2px; width:20px; margin-right:5px;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .delete_btn {background:#FF2222; color:#fff; border-radius:5px; margin-left:10px;} -.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .delete_btn img {position:relative; top:-2px; width:20px; margin-right:5px;} - -/* table_box */ -.project_wrap .content_section .hospital_wrap .center_box .table_box {width:100%; height:calc(100% - 180px); overflow:auto; background:#fff; border:solid 1px #E9ECF0; border-radius:5px;} - -/* 페이지게이션 */ -.project_wrap .content_section .hospital_wrap .center_box .page_box {position:absolute; bottom:20px; width:100%; height:24px;} -.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation {height:24px;} -.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination {margin:0 auto; display:table;} -.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li {display:inline-block; padding:0} -.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a, .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a {position:relative; width:24px; height:24px; background:none;} -.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a:hover, .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a:hover {background:none;} -.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a img {position:absolute; top:50%; left:50%; transform:translate3d(-50%, -50%, 0); width:10px;} -.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a img {position:absolute; top:50%; left:50%; transform:translate3d(-50%, -50%, 0) rotate(180deg); width:10px;} -.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a {width:24px; height:24px; padding:0; border:none; text-align:center; line-height:22px; font-size:14px; font-weight:500; background:#FFF; font-size:14px;} -.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a:hover, .project_wrap .content_section .hospital_wrap .center_box .right_note .page_box .navigation .pagination li a:focus {background:#3985EA; color:#fff; font-weight:700;} -.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li.active a {background:#3985EA; color:#fff;} - -/*반응형 View*/ -@media only screen and (max-width:1500px) { - .project_wrap .content_section .hospital_wrap .left_box { width:160px; padding:10px 15px; } - .project_wrap .content_section .hospital_wrap .center_box { width:calc(100% - 160px); left:160px; } -} - -@media only screen and (max-width:1280px) { - .project_wrap .content_section .hospital_wrap { width:calc(100% - 60px); } - .project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu { font-size:12px; } - .project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li { height:32px; margin-bottom:5px; } - .project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li a { font-size:12px; } - .project_wrap .content_section .hospital_wrap .center_box .page_title { min-width:80px; height:40px; font-size:16px; line-height:40px; } - .project_wrap .content_section .hospital_wrap .center_box .total { font-size:12px; line-height:40px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box { padding:15px 0; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box { width:120px; height:32px; background-size:18px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .label { padding:0 10px; font-size:12px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item { font-size:12px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box { width:120px; height:32px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box img { width:20px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box .date_picker { height:32px; padding-left:35px; font-size:12px; line-height:32px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .slash { line-height:32px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box { width:120px; height:32px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box img { width:22px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input { height:32px; padding-left:35px; font-size:12px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .right_btn_box .download_btn { margin-left:5px; padding-left:10px; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .right_btn_box .download_btn p { display:none; } - .project_wrap .content_section .hospital_wrap .center_box .filter_box .right_btn_box .download_btn img { width:12px; margin-top:-3px; position:static; transform:none; } - .project_wrap .content_section .hospital_wrap .center_box .page_box { height:23px; } - .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation { height:23px; } - .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a { width:23px; height:23px; font-size:12px; } - .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a, - .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a { width:23px; height:23px; } - .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a img, - .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a img { width:9px; } - .project_wrap .content_section .hospital_wrap .center_box .table_box { height:calc(100% - 155px); } -} - -@media only screen and (max-width:1080px) { - .project_wrap .content_section .hospital_wrap { width:calc(100% - 50px); } -} \ No newline at end of file diff --git a/src/main/resources/static/js/web/contentsBbs/ContentsBbsSelectList.js b/src/main/resources/static/js/web/contentsBbs/ContentsBbsSelectList.js index b4342e2..8130863 100644 --- a/src/main/resources/static/js/web/contentsBbs/ContentsBbsSelectList.js +++ b/src/main/resources/static/js/web/contentsBbs/ContentsBbsSelectList.js @@ -7,189 +7,6 @@ let webTreatmentPetitAgGridData = []; let delList = []; -/**************************************************************************** - * 검색 날짜 설정 - //(A:오늘, B:3일, C:7일, D:최근30일, E:최근90일, F:이번달, G:올해, H:지난주, I:지난달) - ****************************************************************************/ -function fn_webTreatmentPetitSetDate(param) { - if ("A" == param) { - // 오늘 - let toDate = new Date(); - let year = toDate.getFullYear(); - let month = toDate.getMonth() + 1; - let day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - webTreatmentPetitSearchStartDate = year + '-' + month + '-' + day; - webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day; - } - else if ("B" == param) { - // 3일 - // 검색 종료일자 - let toDate = new Date(); - let year = toDate.getFullYear(); - let month = toDate.getMonth() + 1; - let day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day; - - // 검색 시작일자 - toDate.setDate(toDate.getDate() - 3); - year = toDate.getFullYear(); - month = toDate.getMonth() + 1; - day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - webTreatmentPetitSearchStartDate = year + '-' + month + '-' + day; - } - else if ("C" == param) { - // 이번주 - // 검색 종료일자 - let toDate = new Date(); - let year = toDate.getFullYear(); - let month = toDate.getMonth() + 1; - let day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day; - - // 검색 시작일자 - toDate.setDate(toDate.getDate() - 7); - year = toDate.getFullYear(); - month = toDate.getMonth() + 1; - day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - webTreatmentPetitSearchStartDate = year + '-' + month + '-' + day; - } - else if ("D" == param) { - // 최근30일 - let toDate = new Date(); - let year = toDate.getFullYear(); - let month = toDate.getMonth() + 1; - let day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - //최근30일 - toDate.setDate(toDate.getDate() - 30); - startYear = toDate.getFullYear(); - startMonth = toDate.getMonth() + 1; - startDay = toDate.getDate(); - - if (startMonth < 10) startMonth = "0" + startMonth; - if (startDay < 10) startDay = "0" + startDay; - - webTreatmentPetitSearchStartDate = startYear + '-' + startMonth + '-' + startDay; - webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day; - - } - else if ("E" == param) { - // 최근90일 - // 검색 종료일자 - let toDate = new Date(); - let year = toDate.getFullYear(); - let month = toDate.getMonth() + 1; - let day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day; - - // 검색 시작일자 - toDate.setDate(toDate.getDate() - 90); - year = toDate.getFullYear(); - month = toDate.getMonth() + 1; - day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - webTreatmentPetitSearchStartDate = year + '-' + month + '-' + day; - } - else if ("F" == param) { - //F:이번달 - // 검색 종료일자 - let toDate = new Date(); - let year = toDate.getFullYear(); - let month = toDate.getMonth() + 1; - let day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day; - - // 검색 시작일자 - webTreatmentPetitSearchStartDate = year + '-' + month + '-01'; - } - else if ("G" == param) { - // G:올해 - // 검색 종료일자 - let toDate = new Date(); - let year = toDate.getFullYear(); - let month = toDate.getMonth() + 1; - let day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day; - - // 검색 시작일자 - webTreatmentPetitSearchStartDate = year + '-01-01'; - } - else if ("H" == param) { - // H:지난주, I:지난달 - // 검색 종료일자 - let toDate = new Date(); - let year = toDate.getFullYear(); - let month = toDate.getMonth() + 1; - let day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day; - - // 검색 시작일자 - webTreatmentPetitSearchStartDate = year + '-01-01'; - } - else if ("I" == param) { - // I:지난달 - // 검색 종료일자 - let toDate = new Date(); - let year = toDate.getFullYear(); - let month = toDate.getMonth() + 1; - let day = toDate.getDate(); - - if (month < 10) month = "0" + month; - if (day < 10) day = "0" + day; - - webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day; - - // 검색 시작일자 - webTreatmentPetitSearchStartDate = year + '-01-01'; - } - - $("#webTreatmentPetitSearchStartDate").val(webTreatmentPetitSearchStartDate).trigger("change"); - $("#webTreatmentPetitSearchEndDate").val(webTreatmentPetitSearchEndDate).trigger("change"); -} - - /**************************************************************************** * 이벤트 정보 리스트 조회 ****************************************************************************/ @@ -197,17 +14,12 @@ function fn_selectListWebTreatmentPetitJson() { let formData = new FormData(); formData.append("menuClass", menuClass); formData.append("categoryDivCd", categoryDivCd); - formData.append("webTreatmentPetitSearchKeywordParam0", webTreatmentPetitSearchKeywordParam0); - formData.append("webTreatmentPetitSearchKeywordParam1", webTreatmentPetitSearchKeywordParam1); - formData.append("webTreatmentPetitSearchKeywordParam2", webTreatmentPetitSearchKeywordParam2); - formData.append("webTreatmentPetitSearchKeywordParam3", webTreatmentPetitSearchKeywordParam3); + formData.append("searchCategoryNo", webTreatmentPetitSearchKeywordParam0); + formData.append("title", webTreatmentPetitSearchKeywordParam1); formData.append("webTreatmentPetitSort", webTreatmentPetitSort); formData.append("webTreatmentPetitDir", webTreatmentPetitDir); formData.append("webTreatmentPetitStart", webTreatmentPetitStart); formData.append("webTreatmentPetitLimit", webTreatmentPetitLimit); - formData.append("webTreatmentPetitSearchStartDate", webTreatmentPetitSearchStartDate); - formData.append("webTreatmentPetitSearchEndDate", webTreatmentPetitSearchEndDate); - formData.append("webTreatmentPetitSearchDateType", webTreatmentPetitSearchDateType); $.ajax({ url: encodeURI('/contentsBbs/getContentsBbsList.do'), @@ -221,7 +33,6 @@ function fn_selectListWebTreatmentPetitJson() { if ('0' == data.msgCode) { // 페이징 처리 webTreatmentPetitTotalCount = data.totalCount; - //$("#txt_noticeTotalCount").text(noticeTotalCount); webTreatmentPetitTotalPages = Math.ceil(webTreatmentPetitTotalCount / webTreatmentPetitLimit); @@ -244,12 +55,8 @@ function fn_selectListWebTreatmentPetitJson() { fn_webTreatmentPetitPagination(page); } }).on('page', function (treatmentpetit, page) { - //console.info(page + ' (from treatmentpetit listening)'); }); } - else { - - } } else { modalEvent.danger("조회 오류", data.msgDesc); @@ -281,32 +88,10 @@ function fn_webTreatmentPetitSearch(param) { webTreatmentPetitSearchKeywordParam0 = $("#webTreatmentPetitSearchKeyword0").val(); webTreatmentPetitSearchKeywordParam1 = $("#webTreatmentPetitSearchKeyword1").val(); - webTreatmentPetitSearchKeywordParam2 = $("#webTreatmentPetitSearchKeyword2").val(); - webTreatmentPetitSearchKeywordParam3 = $("#webTreatmentPetitSearchKeyword3").val(); - - webTreatmentPetitSearchDateType = $("#webTreatmentPetitSearchDateType").val(); - webTreatmentPetitSearchStartDate = $("#webTreatmentPetitSearchStartDate").val(); - webTreatmentPetitSearchEndDate = $("#webTreatmentPetitSearchEndDate").val(); fn_selectListWebTreatmentPetitJson(); } - -/**************************************************************************** - * 초기화하기 - ****************************************************************************/ -function fn_webTreatmentPetitReset() { - fn_webTreatmentPetitSetDate('D'); - $("#webTreatmentPetitSearchDateType option:eq(0)").prop("selected", true); - - $("#webTreatmentPetitSearchKeyword0").val(""); - $("#webTreatmentPetitSearchKeyword1").val(""); - $("#webTreatmentPetitSearchKeyword2").val(""); - $("#webTreatmentPetitSearchKeyword3").val(""); - - fn_webTreatmentPetitSearch(); -} - /**************************************************************************** * 페이징 처리 ****************************************************************************/ @@ -322,8 +107,6 @@ function fn_webTreatmentPetitPagination(param) { function fn_webTreatmentPetitPaginReset() { webTreatmentPetitSearchKeywordParam0 = ''; webTreatmentPetitSearchKeywordParam1 = ''; - webTreatmentPetitSearchKeywordParam2 = ''; - webTreatmentPetitSearchKeywordParam3 = ''; webTreatmentPetitStart = 0; webTreatmentPetitLimit = 100; @@ -351,10 +134,6 @@ function fn_deleteWebTreatmentPetit() { } modalEvent.info("삭제", "선택한 이벤트 정보를 삭제하시겠습니까?", function () { - /*let formData = new FormData(); - formData.append("menuClass", menuClass); - formData.append("delList", delList);*/ - let data = { menuClass: menuClass, categoryDivCd: categoryDivCd, @@ -371,7 +150,7 @@ function fn_deleteWebTreatmentPetit() { success: function (data) { if ('0' == data.msgCode) { modalEvent.success("삭제 성공", data.msgDesc, function () { - fn_webTreatmentPetitOk(); + fn_webTreatmentPetitSearch("A"); }); } else { @@ -380,12 +159,6 @@ function fn_deleteWebTreatmentPetit() { }, error: function (xhr, status, error) { modalEvent.danger("삭제 오류", "삭제 중 오류가 발생하였습니다. 잠시후 다시시도하십시오."); - }, - beforeSend: function () { - - }, - complete: function () { - } }); }); @@ -448,81 +221,17 @@ function fn_saveOrdNo() { ****************************************************************************/ function fn_webTreatmentPetitEnter(e) { if (e.which) { - // 파이어폭스 if (13 == e.which) { - //로그인 액션 스크립트 fn_webTreatmentPetitSearch(); } } else { - // 윈도우, 사파리, 크롬 - if (13 == treatmentpetit.keyCode) { - //로그인 액션 스크립트 + if (13 == e.keyCode) { fn_webTreatmentPetitSearch(); } } } -/**************************************************************************** - * 정렬 이벤트 - ****************************************************************************/ -function fn_alignTreatmentPetit(param, param2) { - let align = ""; - - if ("A" == param) { - align = "오늘"; - - fn_webTreatmentPetitSetDate('A'); - } - else if ("B" == param) { - align = "최근30일"; - - fn_webTreatmentPetitSetDate('D'); - } - else if ("C" == param) { - align = "최근90일"; - - fn_webTreatmentPetitSetDate('E'); - } - else if ("D" == param) { - align = "이번주"; - - fn_webTreatmentPetitSetDate('C'); - } - else if ("E" == param) { - align = "이번달"; - - fn_webTreatmentPetitSetDate('F'); - } - else if ("F" == param) { - align = "올해"; - - fn_webTreatmentPetitSetDate('G'); - } - else if ("G" == param) { - align = "지난주"; - - fn_webTreatmentPetitSetDate('H'); - } - else if ("H" == param) { - align = "지난달"; - - fn_webTreatmentPetitSetDate('I'); - } - else { - align = ""; - } - $("#webTreatmentPetitSearchDateType").val(param); - $("#webTreatmentPetitSearchDateType").siblings("button").text(align); -} - -/**************************************************************************** - * 완료 - ****************************************************************************/ -function fn_webTreatmentPetitOk() { - fn_webTreatmentPetitReset(); -} - /**************************************************************************** * 등록 화면으로 이동. ****************************************************************************/ @@ -566,7 +275,6 @@ let webTreatmentPetitColumnDefs = [ { field: "regNm", headerName: "작성자", minWidth: 100, maxWidth: 120, cellStyle: { textAlign: 'center' } }, ]; -console.log('Current categoryDivCd:', categoryDivCd); if (categoryDivCd === '02' || categoryDivCd === '04') { webTreatmentPetitColumnDefs = [ { field: "checkbox", headerName: "", minWidth: 55, maxWidth: 55, rowDrag: true, headerCheckboxSelection: true, checkboxSelection: true }, @@ -594,12 +302,9 @@ let webTreatmentPetitGridOptions = { resizable: true, //리사이즈 editable: true, // 그리드에서 데이터 수정 cellStyle: { textAlign: 'left', fontSize: '14px', padding: '0' }, - //suppressSizeToFit:true, //자동 맞춤 - //enableRowGroup: true, // 그룹 묶음 enablePivot: true, enableValue: true }, - //suppressMultiSort:true, //단일솔트 true가 단일, false가 다중 shift + sort 시 headerHeight: 41, // header 높이 rowHeight: 41, // row 높이 rowData: webTreatmentPetitAgGridData, @@ -609,9 +314,8 @@ let webTreatmentPetitGridOptions = { }, //데이터 없을 시 나오는 문구 rowSelection: 'multiple', // row 다중 선택 debug: false, - onCellClicked: function (cell) { //셀 클릭 이벤트\ + onCellClicked: function (cell) { //셀 클릭 이벤트 - /* alert(treatmentpetit.column.colId); */ if ('title' == cell.column.colId) { fn_updateWebTreatmentPetitIntro(cell.data.postNo, cell.data.categoryNo); } @@ -622,15 +326,6 @@ let webTreatmentPetitGridOptions = { }, onSelectionChanged: function (treatmentpetit) { //체크박스 선택 delList = treatmentpetit.api.getSelectedRows(); - console.log(delList); - /*let selectRows = []; - selectRows = treatmentpetit.api.getSelectedRows(); - console.log(selectRows); - webTreatmentPetitSelectId = ''; - for(let i=0; i' + rows[i].categoryNm + ''); + optionList.append(li); + } + } + }, + error: function (xhr, status, error) { + console.error("카테고리 목록 조회 오류", error); + } + }); +} + +/**************************************************************************** + * 페이지 이벤트 바인딩 ****************************************************************************/ function fn_pageTreatmentPetit() { - // 검색 input - $(document).on('keypress', '#webTreatmentPetitSearchKeyword0', function (e) { - fn_webTreatmentPetitEnter(e); - }); - // 검색 input + // 검색 input 엔터 $(document).on('keypress', '#webTreatmentPetitSearchKeyword1', function (e) { fn_webTreatmentPetitEnter(e); }); - // 검색 input - $(document).on('keypress', '#webTreatmentPetitSearchKeyword2', function (e) { - fn_webTreatmentPetitEnter(e); - }); - // 검색 input - $(document).on('keypress', '#webTreatmentPetitSearchKeyword3', function (e) { - fn_webTreatmentPetitEnter(e); - }); // 검색 조회 버튼 $("#btnSearchWebTreatmentPetit").click(function () { @@ -742,17 +442,17 @@ function fn_pageTreatmentPetit() { fn_saveOrdNo(); }); - // 기간 선택 콤보 이벤트 - const target = $("#webTreatmentPetitSearchDateType").siblings("ul.select_option_list"); - target.find("li.option_list_item").click(function () { + // 카테고리 선택 콤보 이벤트 + $(document).on('click', '#categoryOptionList .option_list_item', function () { let selectIdArr = $(this).prop("id").split('_'); let selectId = selectIdArr[1]; let selectName = $(this).text(); + if (selectName === '전체') { + selectId = ''; + } $(this).parent().siblings("button").text(selectName); $(this).parent().siblings("input").val(selectId); - - fn_alignTreatmentPetit(selectId); }); } @@ -760,6 +460,6 @@ $(function () { // 페이지 init fn_pageInit(); - // 페이지 treatmentpetit + // 페이지 이벤트 바인딩 fn_pageTreatmentPetit(); }); \ No newline at end of file diff --git a/src/main/resources/static/js/web/webpopup/webPopupSelectList.js b/src/main/resources/static/js/web/webpopup/webPopupSelectList.js index eba2014..7988551 100644 --- a/src/main/resources/static/js/web/webpopup/webPopupSelectList.js +++ b/src/main/resources/static/js/web/webpopup/webPopupSelectList.js @@ -1,6 +1,6 @@ /* 페이징 관련 변수 */ -let webPopupTotalCount = 0; -let webPopupTotalPages = 0; +let webPopupTotalCount = 0; +let webPopupTotalPages = 0; /*aggird*/ let webPopupAgGridData = []; @@ -10,7 +10,7 @@ let webPopupSelectId = ""; /**************************************************************************** * 콘텐츠 정보 리스트 조회 ****************************************************************************/ -function fn_selectListWebPopupJson(){ +function fn_selectListWebPopupJson() { let formData = new FormData(); formData.append("menuClass", menuClass); formData.append("webPopupSearchKeywordParam", webPopupSearchKeywordParam); @@ -19,7 +19,7 @@ function fn_selectListWebPopupJson(){ formData.append("webPopupDir", webPopupDir); formData.append("webPopupStart", webPopupStart); formData.append("webPopupLimit", webPopupLimit); - formData.append("homepageDivCd", $("#homepageDivCd").val()); + formData.append("homepageDivCd", $("#homepageDivCd").val()); //formData.append("webPopupSearchStartDate", webPopupSearchStartDate); //formData.append("webPopupSearchEndDate", webPopupSearchEndDate); //formData.append("webPopupSearchDateType", webPopupSearchDateType); @@ -32,34 +32,34 @@ function fn_selectListWebPopupJson(){ contentType: false, type: 'POST', async: true, - success: function(data){ - if('0'==data.msgCode){ + success: function (data) { + if ('0' == data.msgCode) { // 페이징 처리 - webPopupTotalCount = data.totalCount; + webPopupTotalCount = data.totalCount; //$("#txt_noticeTotalCount").text(noticeTotalCount); - webPopupTotalPages = Math.ceil(webPopupTotalCount/webPopupLimit); + webPopupTotalPages = Math.ceil(webPopupTotalCount / webPopupLimit); // 리스트 조회 webPopupAgGridData = data.rows.map(row => { - if(row.filePath) { + if (row.filePath) { return { ...row, filePath: CDN_URL + row.filePath.replace(/^C:/, "") }; } return row; }); webPopupGridOptions.api.setRowData(webPopupAgGridData); - if(0', - next : 'next', - first : '', - last : '', + prev: 'prev', + next: 'next', + first: '', + last: '', onPageClick: function (event, page) { fn_webPopupPagination(page); } @@ -67,22 +67,22 @@ function fn_selectListWebPopupJson(){ //console.info(page + ' (from event listening)'); }); } - else{ + else { } } - else{ + else { modalEvent.danger("조회 오류", data.msgDesc); } }, - error : function(xhr, status, error) { + error: function (xhr, status, error) { modalEvent.danger("조회 오류", "조회 중 오류가 발생하였습니다. 잠시후 다시시도하십시오."); }, - beforeSend:function(){ + beforeSend: function () { // 로딩열기 webPopupGridOptions.api.showLoadingOverlay(); }, - complete:function(){ + complete: function () { } }); @@ -91,8 +91,8 @@ function fn_selectListWebPopupJson(){ /**************************************************************************** * 검색하기 ****************************************************************************/ -function fn_webPopupSearch(param){ - if("A"!=param && "Y"!=selectUseYn){ +function fn_webPopupSearch(param) { + if ("A" != param && "Y" != selectUseYn) { modalEvent.warning("", "조회 권한이 없습니다."); return false; } @@ -114,7 +114,7 @@ function fn_webPopupSearch(param){ /**************************************************************************** * 초기화하기 ****************************************************************************/ -function fn_webPopupReset(){ +function fn_webPopupReset() { $("#webPopupSearchKeyword").val(""); fn_webPopupSearch(); @@ -123,8 +123,8 @@ function fn_webPopupReset(){ /**************************************************************************** * 페이징 처리 ****************************************************************************/ -function fn_webPopupPagination(param){ - webPopupStart = (parseInt(param)-1)*webPopupLimit; +function fn_webPopupPagination(param) { + webPopupStart = (parseInt(param) - 1) * webPopupLimit; fn_selectListWebPopupJson(); } @@ -132,16 +132,16 @@ function fn_webPopupPagination(param){ /**************************************************************************** * 페이징 리셋 ****************************************************************************/ -function fn_webPopupPaginReset(){ +function fn_webPopupPaginReset() { webPopupSearchKeywordParam = ''; - webPopupStart = 0; - webPopupLimit = 100; - webPopupTotalCount = 0; - webPopupTotalPages = 0; + webPopupStart = 0; + webPopupLimit = 100; + webPopupTotalCount = 0; + webPopupTotalPages = 0; //페이징 초기화 - if($("#webPopupPagination").data("twbs-pagination")){ + if ($("#webPopupPagination").data("twbs-pagination")) { $("#webPopupPagination").twbsPagination("destroy"); } } @@ -149,18 +149,18 @@ function fn_webPopupPaginReset(){ /**************************************************************************** * 콘텐츠 삭제 ****************************************************************************/ -function fn_deleteWebPopup(){ - if("Y"!=deleteUseYn){ +function fn_deleteWebPopup() { + if ("Y" != deleteUseYn) { modalEvent.warning("", "삭제 권한이 없습니다."); return false; } - if(!webPopupSelectId){ + if (!webPopupSelectId) { modalEvent.warning("", "삭제할 대상을 선택하세요."); return false; } - modalEvent.info("삭제", "선택한 콘텐츠 정보를 삭제하시겠습니까?", function(){ + modalEvent.info("삭제", "선택한 콘텐츠 정보를 삭제하시겠습니까?", function () { let formData = new FormData(); formData.append("menuClass", menuClass); formData.append("selectId", webPopupSelectId); @@ -173,23 +173,23 @@ function fn_deleteWebPopup(){ contentType: false, type: 'POST', async: true, - success: function(data){ - if('0'==data.msgCode){ - modalEvent.success("삭제 성공", data.msgDesc, function(){ + success: function (data) { + if ('0' == data.msgCode) { + modalEvent.success("삭제 성공", data.msgDesc, function () { fn_webPopupOk(); }); } - else{ + else { modalEvent.danger("삭제 오류", data.msgDesc); } }, - error : function(xhr, status, error) { + error: function (xhr, status, error) { modalEvent.danger("삭제 오류", "삭제 중 오류가 발생하였습니다. 잠시후 다시시도하십시오."); }, - beforeSend:function(){ + beforeSend: function () { }, - complete:function(){ + complete: function () { } }); @@ -199,17 +199,17 @@ function fn_deleteWebPopup(){ /**************************************************************************** * 검색 엔터 이벤트 ****************************************************************************/ -function fn_webPopupEnter(e){ - if(e.which){ +function fn_webPopupEnter(e) { + if (e.which) { // 파이어폭스 - if(13 == e.which) { + if (13 == e.which) { //로그인 액션 스크립트 fn_webPopupSearch(); } } - else{ + else { // 윈도우, 사파리, 크롬 - if(13 == event.keyCode) { + if (13 == event.keyCode) { //로그인 액션 스크립트 fn_webPopupSearch(); } @@ -219,23 +219,23 @@ function fn_webPopupEnter(e){ /**************************************************************************** * 완료 ****************************************************************************/ -function fn_webPopupOk(){ +function fn_webPopupOk() { fn_webPopupReset(); } /**************************************************************************** * 등록 화면으로 이동. ****************************************************************************/ -function fn_insertWebPopupIntro(){ - if("Y"==insertUseYn){ - if(10<=webPopupAgGridData.length){ +function fn_insertWebPopupIntro() { + if ("Y" == insertUseYn) { + if (10 <= webPopupAgGridData.length) { modalEvent.warning("", "등록 갯수를 초과하였습니다."); return false; - }else{ - let pagingParam = "?menuClass="+menuClass; - fn_leftFormAction("/webpopup/insertWebPopupIntro.do"+pagingParam); + } else { + let pagingParam = "?menuClass=" + menuClass; + fn_leftFormAction("/webpopup/insertWebPopupIntro.do" + pagingParam); } - }else{ + } else { modalEvent.warning("", "등록 권한이 없습니다."); return false; } @@ -245,38 +245,40 @@ function fn_insertWebPopupIntro(){ /**************************************************************************** * 수정 화면으로 이동. ****************************************************************************/ -function fn_updateWebPopupIntro(muWebPopupId){ - if("Y"==updateUseYn){ - let pagingParam = "?menuClass="+menuClass; - pagingParam += "&muWebPopupId="+muWebPopupId; - fn_leftFormAction("/webpopup/updateWebPopupIntro.do"+pagingParam); - }else{ +function fn_updateWebPopupIntro(muWebPopupId) { + if ("Y" == updateUseYn) { + let pagingParam = "?menuClass=" + menuClass; + pagingParam += "&muWebPopupId=" + muWebPopupId; + fn_leftFormAction("/webpopup/updateWebPopupIntro.do" + pagingParam); + } else { modalEvent.warning("", "수정 권한이 없습니다."); return false; } } function thumbnailCellRenderer(params) { - if(!params.value) + if (!params.value) return else return `Thumbnail`; } let webPopupColumnDefs = [ - {field: "checkbox", headerName:"", minWidth:55, maxWidth:55, headerCheckboxSelection: true, checkboxSelection: true}, - /* {field: "rowNum", headerName:"번호", minWidth:80,maxWidth:80, sortable: false}, */ - {field: "rowNum", headerName:"번호", minWidth:60, maxWidth:60,sortable: false, cellStyle:{textAlign: 'center'}}, - {field: "homepageDivCd", headerName:"홈페이지 구분", minWidth:150, maxWidth:150, cellStyle:{textAlign: 'center'}, - valueFormatter: function(params) { - if (params.value === "01") return "다이어트"; - if (params.value === "02") return "쁘띠"; - return params.value; - }}, - {field: "filePath", headerName:"이미지", minWidth:100, cellRenderer: thumbnailCellRenderer}, - {field: "title", headerName:"제목", minWidth:250, cellStyle:{cursor: 'pointer', color:'#3985EA'}}, + { field: "checkbox", headerName: "", minWidth: 55, maxWidth: 55, headerCheckboxSelection: true, checkboxSelection: true }, + /* {field: "rowNum", headerName:"번호", minWidth:80,maxWidth:80, sortable: false}, */ + { field: "rowNum", headerName: "번호", minWidth: 60, maxWidth: 60, sortable: false, cellStyle: { textAlign: 'center' } }, + { + field: "homepageDivCd", headerName: "홈페이지 구분", minWidth: 150, maxWidth: 150, cellStyle: { textAlign: 'center' }, + valueFormatter: function (params) { + if (params.value === "01") return "다이어트"; + if (params.value === "02") return "쁘띠"; + return params.value; + } + }, + { field: "filePath", headerName: "이미지", minWidth: 100, cellRenderer: thumbnailCellRenderer }, + { field: "title", headerName: "제목", minWidth: 250, cellStyle: { cursor: 'pointer', color: '#3985EA' } }, // {field: "content", headerName:"내용",minWidth:500}, - {field: "writeDate", headerName:"등록일",minWidth:150, maxWidth:150}, - {field: "writeName", headerName:"작성자",minWidth:150, maxWidth:150}, + { field: "writeDate", headerName: "등록일", minWidth: 150, maxWidth: 150 }, + { field: "writeName", headerName: "작성자", minWidth: 150, maxWidth: 150 }, ]; // let the grid know which columns and what data to use @@ -288,60 +290,60 @@ let webPopupGridOptions = { sortable: true, //정렬 여부 resizable: true, //리사이즈 editable: false, // 그리드에서 데이터 수정 - cellStyle:{textAlign:'left',fontSize:'14px',padding:'0'}, + cellStyle: { textAlign: 'left', fontSize: '14px', padding: '0' }, //suppressSizeToFit:true, //자동 맞춤 //enableRowGroup: true, // 그룹 묶음 enablePivot: true, - enableValue : true + enableValue: true }, //suppressMultiSort:true, //단일솔트 true가 단일, false가 다중 shift + sort 시 - headerHeight : 41, // header 높이 - rowHeight : 41, // row 높이 - rowData : webPopupAgGridData, - suppressRowClickSelection : true, // 로우 클릭시 체크박스 선택 true no, false yes - localeText : { - noRowsToShow : '조회 결과가 없습니다.' + headerHeight: 41, // header 높이 + rowHeight: 41, // row 높이 + rowData: webPopupAgGridData, + suppressRowClickSelection: true, // 로우 클릭시 체크박스 선택 true no, false yes + localeText: { + noRowsToShow: '조회 결과가 없습니다.' }, //데이터 없을 시 나오는 문구 - rowSelection : 'multiple', // row 다중 선택 - debug : false, - onCellClicked: function(event){ //셀 클릭 이벤트 + rowSelection: 'multiple', // row 다중 선택 + debug: false, + onCellClicked: function (event) { //셀 클릭 이벤트 /* alert(event.column.colId); */ - if('title'==event.column.colId){ + if ('title' == event.column.colId) { fn_updateWebPopupIntro(event.data.muWebPopupId); } }, - onSelectionChanged: function(event){ //체크박스 선택 + onSelectionChanged: function (event) { //체크박스 선택 let selectRows = []; selectRows = event.api.getSelectedRows(); webPopupSelectId = ''; - for(let i=0; i - + @@ -21,17 +21,11 @@ /* 검색 관련 변수 */ let webTreatmentPetitSearchKeywordParam0 = "[[${param.webTreatmentPetitSearchKeywordParam0}]]"; let webTreatmentPetitSearchKeywordParam1 = "[[${param.webTreatmentPetitSearchKeywordParam1}]]"; - let webTreatmentPetitSearchKeywordParam2 = "[[${param.webTreatmentPetitSearchKeywordParam2}]]"; - let webTreatmentPetitSearchKeywordParam3 = "[[${param.webTreatmentPetitSearchKeywordParam3}]]"; let webTreatmentPetitSort = "[[${param.webTreatmentPetitSort}]]"; let webTreatmentPetitDir = "[[${param.webTreatmentPetitDir}]]"; let webTreatmentPetitStart = "[[${param.webTreatmentPetitStart}]]" == "" ? 0 : "[[${param.webTreatmentPetitStart}]]"; let webTreatmentPetitLimit = "[[${param.webTreatmentPetitLimit}]]" == "" ? 500 : "[[${param.webTreatmentPetitLimit}]]"; - - let webTreatmentPetitSearchStartDate = "[[${param.webTreatmentPetitSearchStartDate}]]"; - let webTreatmentPetitSearchEndDate = "[[${param.webTreatmentPetitSearchEndDate}]]"; - let webTreatmentPetitSearchDateType = "[[${param.webTreatmentPetitSearchDateType}]]" == "" ? "A" : "[[${param.webTreatmentPetitSearchDateType}]]"; @@ -42,32 +36,24 @@
- + + + +
- - -
@@ -102,7 +88,7 @@ - + \ No newline at end of file diff --git a/src/main/resources/templates/web/webmainbanner/webMainBannerSelectList.html b/src/main/resources/templates/web/webmainbanner/webMainBannerSelectList.html index dc5e8bc..2104847 100644 --- a/src/main/resources/templates/web/webmainbanner/webMainBannerSelectList.html +++ b/src/main/resources/templates/web/webmainbanner/webMainBannerSelectList.html @@ -1,8 +1,6 @@ - + @@ -10,27 +8,27 @@ @@ -41,38 +39,11 @@
- - -
-
- calendar - -
- - - - -
- calendar - -
-