feat : 메뉴별 아이콘 표시 기능 추가

main
이범준 2 years ago
parent 27105d372a
commit 943ec266b4

@ -19,6 +19,7 @@
, ( SELECT COUNT(1) , ( SELECT COUNT(1)
FROM TREE_QUERY SA FROM TREE_QUERY SA
WHERE SA.parnt_menu_id = D.menu_id) AS "childCnt" WHERE SA.parnt_menu_id = D.menu_id) AS "childCnt"
, D.icon_class AS "iconClass"
FROM xit_menu_creat_dtls A FROM xit_menu_creat_dtls A
INNER JOIN xit_menu_info B INNER JOIN xit_menu_info B
ON A.menu_no = B.menu_no ON A.menu_no = B.menu_no
@ -50,6 +51,7 @@
, (SELECT COUNT(1) , (SELECT COUNT(1)
FROM TREE_QUERY SA FROM TREE_QUERY SA
WHERE SA.parnt_menu_id = D.menu_id) AS "childCnt" WHERE SA.parnt_menu_id = D.menu_id) AS "childCnt"
, D.icon_class AS "iconClass"
FROM xit_menu_creat_dtls A FROM xit_menu_creat_dtls A
JOIN xit_menu_info B JOIN xit_menu_info B
ON A.menu_no = B.menu_no ON A.menu_no = B.menu_no
@ -67,6 +69,7 @@
, menu_full_path , menu_full_path
, menu_full_path_name , menu_full_path_name
, menu_depth , menu_depth
, icon_class
) AS ( ) AS (
SELECT A.menu_no AS "menu_id" SELECT A.menu_no AS "menu_id"
, A.upper_menu_no AS "parnt_menu_id" , A.upper_menu_no AS "parnt_menu_id"
@ -74,6 +77,7 @@
, CONCAT('', A.menu_no) AS "menu_full_path" , CONCAT('', A.menu_no) AS "menu_full_path"
, CONCAT('', A.menu_nm) AS "menu_full_path_name" , CONCAT('', A.menu_nm) AS "menu_full_path_name"
, 1 AS "menu_depth" , 1 AS "menu_depth"
, A.icon_class AS "icon_class"
FROM xit_menu_info A FROM xit_menu_info A
INNER JOIN xit_progrm_list B INNER JOIN xit_progrm_list B
ON A.progrm_file_nm = B.progrm_file_nm ON A.progrm_file_nm = B.progrm_file_nm
@ -85,6 +89,7 @@
, CONCAT(B.menu_full_path, '_', A.menu_no) AS "menu_full_path" , CONCAT(B.menu_full_path, '_', A.menu_no) AS "menu_full_path"
, CONCAT(B.menu_full_path_name, ' > ', A.menu_nm) AS "menu_full_path_name" , CONCAT(B.menu_full_path_name, ' > ', A.menu_nm) AS "menu_full_path_name"
, B.menu_depth + 1 AS "menu_depth" , B.menu_depth + 1 AS "menu_depth"
, A.icon_class AS "icon_class"
FROM xit_menu_info A FROM xit_menu_info A
INNER JOIN tree_query B INNER JOIN tree_query B
ON A.upper_menu_no = B.menu_id ON A.upper_menu_no = B.menu_id

@ -91,7 +91,11 @@
let i = document.createElement("i"); let i = document.createElement("i");
i.classList.add("menu-icon"); i.classList.add("menu-icon");
i.classList.add("bx"); i.classList.add("bx");
if(menuObj.iconClass != null && menuObj.iconClass != ""){
i.classList.add(menuObj.iconClass);
} else {
menuObj.childCnt > 0 ? i.classList.add("bx-folder-plus") : i.classList.add("bx-file"); menuObj.childCnt > 0 ? i.classList.add("bx-folder-plus") : i.classList.add("bx-file");
}
a.appendChild(i); a.appendChild(i);

Loading…
Cancel
Save