하석형 하석형 04-11
250411 하석형 트리관련 메뉴 데이터 변경 알림 추가, 회원 관리 아이디 유효성 영문 대소문자 -> 소문자, 페이징 알림 주석처리
@c092cdade61512db2544c2a9da142b9b020927ba
client/resources/js/validateParams.js
--- client/resources/js/validateParams.js
+++ client/resources/js/validateParams.js
@@ -28,6 +28,12 @@
       return check.test(text);
     },
 
+    // 입력제한(소문자영어/숫자)
+    checkLEN(text) {
+      const check = /^[a-z0-9]+$/;
+      return check.test(text);
+    },
+
 
     /* 사용자 정보 */
     // 아이디
@@ -47,8 +53,8 @@
         this.$refs.lgnId.focus();
         return false;
       } // 최대 길이
-      if (!this.checkEN(key)) {
-        alert("아이디는 영어와 숫자만 사용하세요.");
+      if (!this.checkLEN(key)) {
+        alert("아이디는 영문 소문자와 숫자만 사용 가능합니다.");
         this.$refs.lgnId.focus();
         return false;
       } // 입력 제한(영어/숫자)
client/views/component/pagination/PaginationButton.vue
--- client/views/component/pagination/PaginationButton.vue
+++ client/views/component/pagination/PaginationButton.vue
@@ -60,7 +60,7 @@
           return;
         }
       } else {
-        alert("이동할 페이지가 없습니다.");
+        // alert("이동할 페이지가 없습니다.");
       }
     },
   },
client/views/pages/adm/departmentManagement/DepartmentManagement.vue
--- client/views/pages/adm/departmentManagement/DepartmentManagement.vue
+++ client/views/pages/adm/departmentManagement/DepartmentManagement.vue
@@ -245,7 +245,7 @@
         const res = await findAll();
         if (res.status == 200) {
           this.deptList = res.data.data.hierachyList; // 부서 목록
-          if(this.deptList.length > 0) {
+          if(this.deptList.length > 0 && this.selectedDeptId == null) {
             this.fnViewDetail(this.deptList[0].id); // 부서 최상단 조회
           }
           this.authList = res.data.data.authList; // 권한 목록
@@ -296,7 +296,7 @@
         alert(res.data.message);
         if (res.status == 200) {
           this.findAll();
-          this.selectedDeptId = res.data.data.deptId;
+          // this.selectedDeptId = res.data.data.deptId;
         }
       } catch (error) {
         alert(error.response.data.message);
@@ -343,17 +343,26 @@
     },
     // 최상위 신규 객체 생성
     topAdd() {
+      if (this.selectedDeptId != null) {
+        if (!confirm("작성 중인 부서정보는 저장되지 않습니다.\n계속 하시겠습니까?")) {
+          return;
+        }
+      }
       this.fnReset(); // 초기화
       this.submitStts = true;
     },
     // 하위 신규 객체 생성
     subAdd() {
       if (
-        Object.keys(this.viewDept).length === 0 ||
+        // Object.keys(this.viewDept).length === 0 ||
         this.selectedDeptId == null
       ) {
         alert("상위 부서를 지정해주세요.");
         return;
+      } else {
+        if (!confirm("작성 중인 부서정보는 저장되지 않습니다.\n계속 하시겠습니까?")) {
+          return;
+        }
       }
       const upDeptId = this.viewDept.deptId; // 상위 부서 아이디
       const upDeptNm = this.viewDept.deptNm; // 상위 부서명
@@ -482,10 +491,14 @@
     // axios: 목록 수정
     async fnListUpdate() {
       try {
+        if (!confirm("부서 목록을 저장하시겠습니까?\n 작성 중인 부서정보는 저장되지 않습니다.")) {
+          return;
+        }
         const res = await updateListProc(this.deptList);
         alert(res.data.message);
         if (res.status == 200) {
           this.findAll();
+          this.findByDept();
         }
       } catch (error) {
         alert(error.res.data.message);
client/views/pages/adm/menuManagement/menuManagement/MenuManagement.vue
--- client/views/pages/adm/menuManagement/menuManagement/MenuManagement.vue
+++ client/views/pages/adm/menuManagement/menuManagement/MenuManagement.vue
@@ -275,6 +275,11 @@
     },
     // 최상위 신규 객체 생성
     fnTopAdd() {
+      if (this.selectedMenuId != null) {
+        if (!confirm("작성 중인 메뉴정보는 저장되지 않습니다.\n계속 하시겠습니까?")) {
+          return;
+        }
+      }
       this.editMode = true;
       this.viewMenu = JSON.parse(JSON.stringify(this.newMenu));
       this.selectedMenuId = this.viewMenu.deptId;
@@ -284,6 +289,10 @@
       if (this.viewMenu.menuId == null) {
         alert("상위 메뉴를 지정해주세요.");
         return;
+      } else {
+        if (!confirm("작성 중인 메뉴정보는 저장되지 않습니다.\n계속 하시겠습니까?")) {
+          return;
+        }
       }
       const upMenuId = this.viewMenu.menuId;
       const upMenuNm = this.viewMenu.menuNm;
@@ -378,7 +387,7 @@
         const res = await menuFindAll();
         if (res.status == 200) {
           this.menuList = res.data.data.hierachyList; // 메뉴 목록
-          if (this.menuList.length > 0) {
+          if (this.menuList.length > 0 && this.selectedMenuId == null) {
             this.fnViewDetail(this.menuList[0].id); // 최상위 메뉴 조회
           }
           this.codeList = res.data.data.codeList; // 메뉴 타입 목록
@@ -516,10 +525,17 @@
     // axios: 목록 수정
     async fnListUpdate() {
       try {
+        if (!confirm("메뉴 목록을 저장하시겠습니까?\n 작성 중인 메뉴정보는 저장되지 않습니다.")) {
+          return;
+        }
         const res = await updateListProc(this.menuList);
         alert(res.data.message);
         if (res.status == 200) {
           this.fnViewList(); // 목록 새로고침
+          const data = {
+            menuId: this.selectedMenuId,
+          };
+          this.axiosViewDetail(data);
         }
       } catch (error) {
         alert(error.res.data.message);
client/views/pages/adm/preferences/commonCodeManagement/CommonCodeManagement.vue
--- client/views/pages/adm/preferences/commonCodeManagement/CommonCodeManagement.vue
+++ client/views/pages/adm/preferences/commonCodeManagement/CommonCodeManagement.vue
@@ -136,7 +136,7 @@
         const res = await findAll();
         if (res.status == 200) {
           this.codeList = res.data.data.hierachyList;
-          if(this.codeList.length > 0) {
+          if(this.codeList.length > 0 && this.selectedCd == null) {
             this.fnViewDetail(this.codeList[0].id);
           }
           this.newCode = res.data.data.newCode;
@@ -179,6 +179,7 @@
         alert(res.data.message);
         if (res.status == 200) {
           this.findAll();
+          // this.selectedCd = res.data.data.cd;
         }
       } catch (error) {
         alert(error.response.data.message);
Add a comment
List