jichoi / calendar star
박정하 박정하 07-23
250723 박정하 접근제어관리 목록 정렬 및 표현 방식 수정
@25da134b3466857019475c3c13adcbc595482661
client/views/pages/Manager/system/MenuAuthorManagement.vue
--- client/views/pages/Manager/system/MenuAuthorManagement.vue
+++ client/views/pages/Manager/system/MenuAuthorManagement.vue
@@ -35,7 +35,7 @@
               <tbody>
                 <template v-if="menuAuthorLists.length > 0">
                   <tr v-for="(item, idx) in menuAuthorLists" :key="idx">
-                    <td>{{ item.menuNm }}</td>
+                    <td :style="getMenuStyle(item)"> {{ item.menuNm }} </td>
                     <td>
                       <div class="form-check">
                         <input type="checkbox" :id="`all_${idx}`" :checked="isAllChecked(item)" @change="toggleAll(idx)" />
@@ -93,7 +93,6 @@
   data() {
     return {
       selectedAuthor: null,
-
       authorLists: [], // 권한 목록 정보
       menuAuthorLists: [], // 메뉴 권한 목록 정보
     }
@@ -140,6 +139,14 @@
       };
     },
 
+    // 메뉴 스타일 계산 (들여쓰기)
+    getMenuStyle(item) {
+      const depth = item.dp || 1;
+      return {
+        paddingLeft: (depth - 1) * 20 + 'px'
+      };
+    },
+
     // 개별 권한 업데이트
     updatePermission(index, permission, event) {
       this.menuAuthorLists[index][permission] = event.target.checked ? 'Y' : 'N';
@@ -163,7 +170,7 @@
       return item.redng === 'Y' && item.write === 'Y' && item.updt === 'Y' && item.delete === 'Y';
     },
 
-    // 수정
+    // 수정 (모든 메뉴 권한 저장)
     async fnUpdate() {
       try {
         let data = [];
@@ -175,7 +182,7 @@
             write: menuAuthor.write,
             updt: menuAuthor.updt,
             delete: menuAuthor.delete,
-          })
+          });
         }
 
         const response = await updateMenuAuthorsProc(data);
@@ -205,4 +212,9 @@
   color: #FFFFFF;
   background-color: #213F9A;
 }
+
+.menu-indent {
+  color: #6c757d;
+  margin-right: 5px;
+}
 </style>
(파일 끝에 줄바꿈 문자 없음)
Add a comment
List