로그인 및 메인 화면 수정 변경

This commit is contained in:
kimre
2022-07-10 20:53:26 +09:00
parent b2ff509948
commit fb40f49f09
61 changed files with 3660 additions and 1174 deletions

View File

@@ -71,8 +71,6 @@
</td>
</tr>
</div>
</td>
<td class="check">
<p>서비스관리</p>
@@ -188,8 +186,9 @@
<div class="pop-btn2">
<button class="btn-default" type="button" @click="authAddCancel()">취소</button>
<button class="btn-pcolor" type="button" @click="authAddSave()">저장</button>
</div>
</div>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</template>
@@ -197,6 +196,8 @@
import sysMgtApi from "../service/sysMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins';
//import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal";
export default {
name: 'authAdd',
@@ -215,6 +216,7 @@ export default {
};
},
components: {
commonModal,
},
created(){
//this.setCodeData();
@@ -230,29 +232,44 @@ export default {
// 필수 등록정보 체크
if(this.isNull(this.authNm)){
alert("권한명을 입력해 주세요");
this.$refs._authNm.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한명을 입력해 주세요.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.authCd)){
alert('권한 코드를 입력해주세요.');
this.$refs._authCd.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한 코드를 입력해 주세요.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.authCd.length > 5){
this.row.title = '시스템관리';
this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.stat)){
alert('상태를 체크해주세요.');
this.row.title = '시스템관리';
this.row.msg1 = '상태를 체크해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.checkedAuthMenu.length == 0){
alert('메뉴 권한 체크를 해주세요.');
this.row.title = '시스템관리';
this.row.msg1 = '메뉴 권한 체크를 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
}
return true;
return true;
},
authAddCancel() {
@@ -260,8 +277,17 @@ export default {
this.$router.push({ name: 'authList'});
},
async authAddSave(){
if(this.doValidate() && window.confirm('저장 하시겠습니까?')){
authAddSave(){
if(this.doValidate()){
this.row.title = '시스템관리';
this.row.msg1 = '권한 등록 저장하시겠습니까?';
this.row.focusTaget = '0';
this.$refs.commmonModal.confirmModalOpen(this.row);
return false;
}
},
async authInsert(){
var reqAuthMenuArr = this.checkedAuthMenu;
var listArr = [];
var dataMap = {};
@@ -275,6 +301,7 @@ export default {
listArr.push(dataMap);
}
this.row.authCd = this.authCd;
this.row.authNm = this.authNm;
this.row.authDesc = this.authDesc;
@@ -287,22 +314,50 @@ export default {
let response = await sysMgtApi.insertAuth(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
alert('저장 하였습니다.');
//alert('저장 하였습니다.');
// 권한리스트 페이지 이동
this.$router.push({ name: 'authList'});
} else if(result.retCode == "4017"){
alert("권한코드가 이미 존재합니다.");
this.$refs._authCd.focus();
//alert("권한코드가 이미 존재합니다.");
//this.$refs._authCd.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한코드가 이미 존재합니다.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
} else {
alert("실패 하였습니다.");
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
} catch(err) {
alert("실패 하였습니다.");
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
}
},
checkFocus(){
if(this.row.focusTaget === '1'){
this.$refs._authNm.focus();
} else if(this.row.focusTaget === '2'){
this.$refs._authCd.focus();
}
},
confirmCalbackFnc(props){
if(props.result){
this.authInsert();
}
}
},
computed: {
// 체크박스 전체선택 기능

View File

@@ -188,6 +188,7 @@
<button class="btn-pcolor" type="button" @click="authModifySave()">저장</button>
</div>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</template>
@@ -195,6 +196,7 @@
import sysMgtApi from "../service/sysMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins';
import commonModal from "../components/commonModal";
export default {
name: 'authModify',
@@ -219,6 +221,7 @@ export default {
}
},
components: {
commonModal,
},
created(){
//this.setCodeData();
@@ -235,24 +238,40 @@ export default {
// 필수 등록정보 체크
if(this.isNull(this.authNm)){
alert("권한명을 입력해 주세요");
this.$refs._authNm.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한명을 입력해 주세요.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.authCd)){
alert('권한 코드를 입력해주세요.');
this.$refs._authCd.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한 코드를 입력해 주세요.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.authCd.length > 5){
this.row.title = '시스템관리';
this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.stat)){
alert('상태를 체크해주세요.');
this.row.title = '시스템관리';
this.row.msg1 = '상태를 체크해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.checkedAuthMenu.length == 0){
alert('메뉴 권한 체크를 해주세요.');
this.row.title = '시스템관리';
this.row.msg1 = '메뉴 권한 체크를 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
@@ -294,15 +313,34 @@ export default {
}
} else {
alert("실패 하였습니다.");
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
} catch(err) {
alert("처리 실패 하였습니다.");
//alert("처리 실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
},
async authModifySave(){
if(this.doValidate() && window.confirm('저장 하시겠습니까?')){
authModifySave(){
if(this.doValidate()){
this.row.title = '시스템관리';
this.row.msg1 = '권한 수정 저장하시겠습니까?';
this.row.focusTaget = '0';
this.$refs.commmonModal.confirmModalOpen(this.row);
return false;
}
},
async authUpdate(){
var reqAuthMenuArr = this.checkedAuthMenu;
var listArr = [];
var dataMap = {};
@@ -328,18 +366,40 @@ export default {
let response = await sysMgtApi.updateAuth(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
alert('저장 하였습니다.');
//alert('저장 하였습니다.');
// 권한리스트 페이지 이동
this.$router.push({ name: 'authList'});
} else {
alert("실패 하였습니다.");
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
} catch(err) {
alert("실패 하였습니다.");
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
}
},
checkFocus(){
if(this.row.focusTaget === '1'){
this.$refs._authNm.focus();
} else if(this.row.focusTaget === '2'){
this.$refs._authCd.focus();
}
},
confirmCalbackFnc(props){
if(props.result){
this.authUpdate();
}
}
},
computed: {
// 체크박스 전체선택 기능