박정하 박정하 01-09
250109 박정하 라우터, 메뉴 수정정
@2333e02711b5810eb4dacfd830082363267fccb4
 
client/views/layout/SideMenu.vue (deleted)
--- client/views/layout/SideMenu.vue
@@ -1,117 +0,0 @@
-<template>
-    <nav class="side-menu">
-        <ul class="main-menu">
-            <li v-for="(mainMenu, idx) in menuList" :key="idx" @click="toggleMenu(mainMenu)">
-                <div class="flex-between">
-                    <p>{{ mainMenu.pathName }}</p>
-                    <svg-icon v-if="mainMenu.subMenu" type="mdi" :path="mainMenu.path" color="#fff"></svg-icon>
-                </div>
-                <ul v-if="mainMenu.subMenu" class="sub-menu" :style="{ 'max-height': mainMenu.isOpen ? '360px' : '0' }">
-                    <li v-for="(subMenu, idx) in mainMenu.subMenu" :key="idx">
-                        <router-link :to="subMenu.subPath">{{ subMenu.pathName }}</router-link>
-                    </li>
-                </ul>
-            </li>
-        </ul>
-    </nav>
-</template>
-
-<script>
-import SvgIcon from '@jamescoyle/vue-icon';
-import { mdiMenuUp, mdiMenuDown } from '@mdi/js';
-export default {
-    data() {
-        return {
-            menuList: [
-                // { path: "/", pathName: "Dashboard", },
-                {
-                    mainPath: "/", pathName: "데이터관리",
-                    subMenu: [
-                        { subPath: "/fileManagement.page", pathName: "파일관리" },
-                        { subPath: "/hostManagement.page", pathName: "호스트관리" },
-                        { subPath: "/", pathName: "데이터셋 목록" },
-                        { subPath: "/", pathName: "데이터 공유 관리" },
-                    ],
-                    isOpen: false,
-                    path: mdiMenuUp,
-                },
-                {
-                    mainPath: "/", pathName: "메타관리",
-                    subMenu: [
-                        { subPath: "/", pathName: "데이터 메타 정보" },
-                        { subPath: "/", pathName: "표준 용어 관리" },
-                    ],
-                    isOpen: false,
-                    path: mdiMenuUp,
-                },
-                {
-                    mainPath: "/", pathName: "작업관리",
-                    subMenu: [
-                        { subPath: "/scheduleManagement.page", pathName: "작업 스케줄 관리" },
-                        { subPath: "/scheduleLogManagement.page", pathName: "로그 관리" },
-                    ],
-                    isOpen: false,
-                    path: mdiMenuUp,
-                },
-                {
-                    mainPath: "/", pathName: "데이터활용",
-                    subMenu: [
-                        { subPath: "/", pathName: "데이터 활용 관리" },
-                        { subPath: "/", pathName: "데이터 활용 공유 관리" },
-                        { subPath: "/", pathName: "GIS데이터 관리" },
-                        { subPath: "/", pathName: "데이터현황 관리" },
-                        { subPath: "/openApiList.page", pathName: "OpenAPI 목록" },
-                    ],
-                    isOpen: false,
-                    path: mdiMenuUp,
-                },
-                {
-                    mainPath: "/", pathName: "통합관리",
-                    subMenu: [
-                        { subPath: "/user.page", pathName: "사용자관리" },
-                        { subPath: "/department.page", pathName: "부서관리" },
-                        { subPath: "/", pathName: "연계정보관리" },
-                    ],
-                    isOpen: false,
-                    path: mdiMenuUp,
-                },
-                {
-                    mainPath: "/", pathName: "정보관리",
-                    subMenu: [
-                        { subPath: "/", pathName: "내정보관리" },
-                        { subPath: "/", pathName: "비밀번호 변경" },
-                        { subPath: "/", pathName: "부서메일" },
-                    ],
-                    isOpen: false,
-                    path: mdiMenuUp,
-                },
-                { mainPath: "/", pathName: "ai solution", path: mdiMenuUp, },
-            ],
-
-        }
-    },
-    methods: {
-        toggleMenu: function (menu) {
-            this.menuList.forEach(item => {
-                if (item === menu) {
-                    item.isOpen = !menu.isOpen;
-                    item.path = item.isOpen ? mdiMenuDown : mdiMenuUp
-
-                } else{
-                    item.isOpen = false;
-                    item.path = mdiMenuUp;
-                }
-            });
-        },
-    },
-    watch: {
-
-    },
-    computed: {
-
-    },
-    components: {
-        'SvgIcon': SvgIcon
-    },
-}
-</script>(파일 끝에 줄바꿈 문자 없음)
client/views/layout/TopMenu.vue
--- client/views/layout/TopMenu.vue
+++ client/views/layout/TopMenu.vue
@@ -24,7 +24,6 @@
           pathName: "데이터관리",
           subMenu: [
             { path: "/fileManagement.page", pathName: "파일관리" },
-            { path: "/hostManagement.page", pathName: "호스트관리" },
             { path: "/dataManagement.page", pathName: "데이터관리" },
           ],
         },
@@ -47,15 +46,21 @@
             { path: "/customSelectList.page", pathName: "데이터 활용 관리" },
             { path: "/gisInfoList.page", pathName: "GIS 기능 관리" },
             { path: "/openApiList.page", pathName: "OpenAPI 목록" },
-            { path: "/openApiKeyList.page", pathName: "OpenAPI key 관리" },
           ],
         },
         {
-          pathName: "통합관리",
+          pathName: "회원관리",
           subMenu: [
-            { path: "/user.page", pathName: "사용자관리" },
+            { path: "/user.page", pathName: "일반사용자관리" },
             { path: "/adminManagement.page", pathName: "관리자관리" },
-            { path: "/department.page", pathName: "부서관리" },
+            { path: "/departmentManagement.page", pathName: "부서관리" },
+          ],
+        },
+        {
+          pathName: "시스템 관리",
+          subMenu: [
+            { path: "/hostManagement.page", pathName: "호스트관리" },
+            { path: "/openApiKeyList.page", pathName: "OpenAPI key 관리" },
             { path: "/dbConnectionList.page", pathName: "연계정보관리" },
           ],
         },
@@ -84,9 +89,31 @@
       ],
       userMenu: [
         {
+          pathName: "데이터관리",
+          subMenu: [
+            { path: "/fileManagement.page", pathName: "파일관리" },
+            { path: "/dataManagement.page", pathName: "데이터관리" },
+          ],
+        },
+        {
+          pathName: "메타관리",
+          subMenu: [
+            { path: "/dataMetaManagement.page", pathName: "데이터 메타 정보" },
+            { path: "/termManagement.page", pathName: "표준 용어 관리" },
+          ],
+        },
+        {
+          pathName: "작업관리",
+          subMenu: [
+            { path: "/scheduleManagement.page", pathName: "작업 스케줄 관리" },
+          ],
+        },
+        {
           pathName: "데이터활용",
           subMenu: [
             { path: "/customSelectList.page", pathName: "데이터 활용 관리" },
+            { path: "/gisInfoList.page", pathName: "GIS 기능 관리" },
+            { path: "/openApiList.page", pathName: "OpenAPI 목록" },
           ],
         },
         {
client/views/pages/App.vue
--- client/views/pages/App.vue
+++ client/views/pages/App.vue
@@ -1,75 +1,51 @@
 <template>
-   <div v-cloak :class="layoutType === 'side' ? 'dashboard-wrap' : 'layout-wrap'">
-      <Header v-if="store.state.loginUser != null" :className="layoutType" />
-      <SideMenu v-if="layoutType === 'side' && store.state.loginUser != null" />
-      <TopMenu v-else-if="layoutType === 'top'&& store.state.loginUser != null"/>
-      <div :class="store.state.loginUser != null ? 'main' : 'login'">
-         <PageNavigation v-if="layoutType === 'side'&& store.state.loginUser != null" />
-         <router-view />
-      </div>
-   </div>
-   <AlertModal id="cmmnAlert" ref="Alert"></AlertModal>
+  <div v-cloak :class="layoutType === 'side' ? 'dashboard-wrap' : 'layout-wrap'">
+    <Header v-if="store.state.loginUser != null" :className="layoutType" />
+    <TopMenu v-if="layoutType === 'top' && store.state.loginUser != null" />
+    <div :class="store.state.loginUser != null ? 'main' : 'login'">
+      <PageNavigation v-if="layoutType === 'side' && store.state.loginUser != null" />
+      <router-view />
+    </div>
+  </div>
+  <AlertModal id="cmmnAlert" ref="Alert"></AlertModal>
 </template>
-
 <script>
 import Header from '../layout/Header.vue';
-import SideMenu from '../layout/SideMenu.vue';
 import TopMenu from '../layout/TopMenu.vue';
 import PageNavigation from '../component/PageNavigation.vue';
 import AlertModal from '../component/common/AlertModal.vue';
 import store from './AppStore'
-import Vue from "vue";
 
 const App = {
-   data: () => {
-      return {
-         // side혹은 top 둘중 한개 타입
-         layoutType: "top",
-         loginpage : false,
-         store : store,
-      }
-   },
-   methods: {
-
-   },
-   watch: {
-
-   },
-   computed: {
-
-   },
-   components: {
-      'Header': Header,
-      'SideMenu': SideMenu,
-      'TopMenu': TopMenu,
-      'PageNavigation': PageNavigation,
-      'AlertModal' : AlertModal,
-   },
-   mounted: function() {
-      // 공통 모듈 alert
-      this.$setAlertRef(this.$refs.Alert);
-      this.$setDefaultObject();
-      let vm = this;
-      // this.$router.beforeEach((to, from, next) => {
-
-      //    if( to.path === "/login.page" || from.path == "/login.page" ) vm.loginpage = true;
-      //    else vm.loginpage = false;
-      //    next();
-
-      // });
-   }
+  data: () => {
+    return {
+      layoutType: "top",
+      loginpage: false,
+      store: store,
+    }
+  },
+  components: {
+    'Header': Header,
+    'TopMenu': TopMenu,
+    'PageNavigation': PageNavigation,
+    'AlertModal': AlertModal,
+  },
+  mounted: function () {
+    // 공통 모듈 alert
+    this.$setAlertRef(this.$refs.Alert);
+    this.$setDefaultObject();
+  }
 }
 
 export default App;
 </script>
-
 <style scoped>
 [v-cloak] {
-   display: none;
+  display: none;
 }
 
 .main-warp {
-   border: 1px solid #000;
-   margin: 20px 0px;
+  border: 1px solid #000;
+  margin: 20px 0px;
 }
 </style>
client/views/pages/AppRouter.js
--- client/views/pages/AppRouter.js
+++ client/views/pages/AppRouter.js
@@ -3,10 +3,10 @@
 import { createWebHistory, createRouter } from "vue-router";
 // #페이지
 // 통합관리
-import UserManagement from "../pages/integrated/UserManagement.vue"; // 사용자관리
-import AdminManagement from "../pages/integrated/AdminManagement.vue"; // 관리자관리
-import Department from "../pages/integrated/DepartmentManagement.vue"; // 부서관리
-import DBConnectionList from "../pages/dbConnection/DBConnectionList.vue"; // 연계정보관리
+import UserManagement from "../pages/integrated/UserManagement.vue"; // 사용자 관리
+import AdminManagement from "../pages/integrated/AdminManagement.vue"; // 관리자 관리
+import DepartmentManagement from "../pages/integrated/DepartmentManagement.vue"; // 부서 관리
+import DBConnectionList from "../pages/dbConnection/DBConnectionList.vue"; // 연계정보 관리
 
 import DBConnectionDetail from "../pages/dbConnection/DBConnectionDetail.vue";
 import FileManagement from "../pages/data/FileManagement.vue";
@@ -54,10 +54,10 @@
 
 const routes = [
   // 통합관리
-  { path: "/user.page", name: "User", component: UserManagement }, // 사용자관리
-  { path: "/adminManagement.page", name: "AdminManagement", component: AdminManagement }, // 관리자관리
-  { path: "/department.page", name: "Department", component: Department }, // 부서관리
-  { path: "/dbConnectionList.page", name: "DBConnectionList", component: DBConnectionList }, // 연계정보관리
+  { path: "/user.page", name: "User", component: UserManagement }, // 사용자 관리
+  { path: "/adminManagement.page", name: "AdminManagement", component: AdminManagement }, // 관리자 관리
+  { path: "/departmentManagement.page", name: "Department", component: DepartmentManagement }, // 부서 관리
+  { path: "/dbConnectionList.page", name: "DBConnectionList", component: DBConnectionList }, // 연계정보 관리
 
   { path: "/fileManagement.page", name: "FileManagement", component: FileManagement },
   { path: "/hostManagement.page", name: "HostManagement", component: HostManagement },
@@ -102,54 +102,50 @@
 ];
 
 function userAuthCheck(to, from, next) {
-  const vm = this;
+  const authList = store.state.loginUser.user_auth;
 
-  let authList = store.state.loginUser.user_auth;
-  let userAdmAuthCheck = false;
+  let userAdmAuthCheck = "ROLE_USER";
+  for (let auth of authList) {
+    if (auth == "ROLE_VIEWER") {
+      userAdmAuthCheck = "ROLE_VIEWER";
+      break;
+    }
+  }
   for (let auth of authList) {
     if (auth == "ROLE_ADMIN") {
-      userAdmAuthCheck = true;
+      userAdmAuthCheck = "ROLE_ADMIN";
       break;
     }
   }
 
-  if (userAdmAuthCheck) { // ROLE_ADMIN
-    if (to.path == "/login.page") {
+  if (userAdmAuthCheck == "ROLE_ADMIN") {
+    if (to.path == "/" || to.path == "/login.page") {
       next("/fileManagement.page");
     } else {
       next();
     }
-  } else { // ROLE_ADMIN 외 모든 롤
-    let userViewerAuthCheck = false;
-    for (let auth of authList) {
-      if (auth == "ROLE_VIEWER") {
-        userViewerAuthCheck = true;
-        break;
-      }
-    }
-
-    if (userViewerAuthCheck) {
-      if (to.path == "/openApiList.page" || to.path == "/openApiListOne.page" || to.path == "/myPage.page" || to.path == "/myPagePwd.page") {
-        next();
-      } else {
-        alert("접근 권한이 없습니다.");
-        next("/openApiList.page");
-      }
+  } else if (userAdmAuthCheck == "ROLE_VIEWER") {
+    if (to.path == "/openApiList.page" || to.path == "/openApiListOne.page" || to.path == "/myPage.page" || to.path == "/myPagePwd.page") {
+      next();
     } else {
-      if (to.path == "/customSelectList.page" || to.path == "/customSelectOne.page" || to.path == "/customInsert.page" || to.path == "/customInsertDev.page" || to.path == "/myPage.page" || to.path == "/myPagePwd.page") {
-        next();
-      } else {
+      if (to.path != "/") {
         alert("접근 권한이 없습니다.");
-        next("/customSelectList.page");
       }
+      next("/openApiList.page");
+    }
+  } else {
+    if (to.path == "/") {
+      next("/fileManagement.page");
+    } else if (to.path != "/user.page" && to.path != "/adminManagement.page" && to.path != "/departmentManagement.page" && to.path != "/hostManagement.page" && to.path != "/openApiKeyList.page" || to.path != "/dbConnectionList.page") {
+      next();
+    } else {
+      alert("접근 권한이 없습니다.");
+      next("/fileManagement.page");
     }
   }
 }
 
-const AppRouter = createRouter({
-  history: createWebHistory(),
-  routes,
-});
+const AppRouter = createRouter({ history: createWebHistory(), routes, });
 
 AppRouter.beforeEach(async (to, from, next) => {
   const userId = store.state.loginUser;
client/views/pages/integrated/AdminManagement.vue
--- client/views/pages/integrated/AdminManagement.vue
+++ client/views/pages/integrated/AdminManagement.vue
@@ -199,7 +199,7 @@
 import axios from "axios";
 // icon용 svg import
 import SvgIcon from "@jamescoyle/vue-icon";
-import { mdiClose, mdiMagnify } from "@mdi/js";
+import { mdiMagnify, mdiClose } from "@mdi/js";
 // 컴포넌트 import
 import PageNavigation from "../../component/PageNavigation.vue";
 import PaginationButton from "../../component/PaginationButton.vue";
client/views/pages/integrated/UserManagement.vue
--- client/views/pages/integrated/UserManagement.vue
+++ client/views/pages/integrated/UserManagement.vue
@@ -208,7 +208,7 @@
 import axios from "axios";
 // icon용 svg import
 import SvgIcon from "@jamescoyle/vue-icon";
-import { mdiClose, mdiMagnify } from "@mdi/js";
+import { mdiMagnify, mdiClose } from "@mdi/js";
 // 컴포넌트 import
 import PageNavigation from "../../component/PageNavigation.vue";
 import PaginationButton from "../../component/PaginationButton.vue";
@@ -252,7 +252,7 @@
   },
 
   mounted() {
-    this.fnSelectUser(); // 사용자 개별 조회
+    this.fnSelectUser(); // 사용자 상세 조회
     this.fnSelectUserList(); // 사용자 목록 조회
     this.fnSelectDeptList(); // 부서 목록 조회
   },
@@ -303,7 +303,7 @@
         this.userSelectList = [];
       }
     },
-    // 사용자 목록 개별 선택
+    // 사용자 목록 상세 선택
     fnChangeChk() {
       if (this.userSelectList.length == this.userList.length) {
         this.isChkAll = true;
@@ -351,7 +351,7 @@
     // 부서 목록 조회
     fnSelectDeptList() {
       const vm = this;
-      // 데이터 세팅팅
+      // 데이터 세팅
       let search = Object.assign({}, this.$getDefaultSerchVO());
       search.currentPage = 0;
       search.perPage = 0;
@@ -402,7 +402,7 @@
         });
     },
 
-    // 사용자 개별 조회
+    // 사용자 상세 조회
     fnSelectUser(userId) {
       const vm = this;
       // 데이터 세팅
@@ -537,7 +537,7 @@
         .then(response => {
           if (response.data.checkMessage.status === 200) {
             vm.$showAlert("사용자 관리", "사용자 잠금이 해제되었습니다.");
-            vm.fnSelectUser(vm.currentUser.userId); // 사용자 개별 재조회
+            vm.fnSelectUser(vm.currentUser.userId); // 사용자 상세 재조회
           } else {
             vm.$showAlert("사용자 관리", response.data.checkMessage.message);
           }
Add a comment
List