mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 05:39:35 +09:00
TC 기능 수정 / 디자인 수정 변경
This commit is contained in:
@@ -1,73 +1,56 @@
|
||||
<template>
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">권한 관리</h3>
|
||||
<p class="breadcrumb">시스템관리 > 권한 관리</p>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{totalCnt}}</span>건</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue add" @click="insertAuth()">권한 추가</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="10%"/>
|
||||
<col width="20%"/>
|
||||
<col width="20%"/>
|
||||
<col width="15%"/>
|
||||
<col width="20%"/>
|
||||
<col width="15%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>NO</th>
|
||||
<th>코드</th>
|
||||
<th>권한명</th>
|
||||
<th>상태</th>
|
||||
<th>등록일</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||
<td>{{ option.no }}</td>
|
||||
<td>{{ option.authCd }}</td>
|
||||
<td>{{ option.authNm }}</td>
|
||||
<td>{{ option.authStat }}</td>
|
||||
<td>{{ option.regDt }}</td>
|
||||
<!-- <td v-if="option.authCd !== '1001' && option.authCd !== '1002'" class="two_btn_group">
|
||||
<button type="button" class="button grey" @click="updateAuth(option.authCd)">수정</button>
|
||||
<button type="button" class="button white delete" @click="deleteAuth(option.authCd)">삭제</button>
|
||||
</td> -->
|
||||
<td v-if="option.authCd === '1001' || option.authCd === '1002'" class="two_btn_group">
|
||||
</td>
|
||||
<td v-else class="two_btn_group">
|
||||
<button type="button" class="button grey" @click="updateAuth(option.authCd)">수정</button>
|
||||
<button type="button" class="button white delete" @click="authDelete(option.authCd)">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>Admin_01</td>
|
||||
<td>슈퍼관리자</td>
|
||||
<td>사용</td>
|
||||
<td>2022-03-10</td>
|
||||
<td class="two_btn_group">
|
||||
<button type="button" class="button grey" onclick="location.href='system_right_modify.html';">수정</button>
|
||||
<button type="button" class="button white delete">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">권한 관리</h3>
|
||||
<p class="breadcrumb">시스템관리 > 권한 관리</p>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{ totalCnt }}</span>건</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue add" @click="insertAuth()">권한 추가</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="10%"/>
|
||||
<col width="20%"/>
|
||||
<col width="20%"/>
|
||||
<col width="15%"/>
|
||||
<col width="20%"/>
|
||||
<col width="15%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>NO</th>
|
||||
<th>코드</th>
|
||||
<th>권한명</th>
|
||||
<th>상태</th>
|
||||
<th>등록일</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||
<td>{{ option.no }}</td>
|
||||
<td>{{ option.authCd }}</td>
|
||||
<td>{{ option.authNm }}</td>
|
||||
<td>{{ option.authStat }}</td>
|
||||
<td>{{ option.regDt }}</td>
|
||||
<td v-if="option.authCd === '1001' || option.authCd === '1002'" class="two_btn_group">
|
||||
</td>
|
||||
<td v-else class="two_btn_group">
|
||||
<button type="button" class="button grey" @click="updateAuth(option.authCd)">수정</button>
|
||||
<button type="button" class="button white delete" @click="authDelete(option.authCd)">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -78,87 +61,87 @@ export default {
|
||||
name: 'authList',
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
list:[],
|
||||
totalCnt: '',
|
||||
row: {},
|
||||
list: [],
|
||||
totalCnt: '',
|
||||
};
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
created(){
|
||||
this.getAuthList();
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
created() {
|
||||
this.getAuthList();
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
async getAuthList(){
|
||||
console.log('getAuthList Start');
|
||||
//this.row.serviceId = serviceId;
|
||||
try {
|
||||
const response = await sysMgtApi.authList(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.list = result.data.list;
|
||||
this.totalCnt = result.data.list.length;
|
||||
} else {
|
||||
this.row.title ='권한 관리';
|
||||
this.row.msg1 ='조회정보가 없습니다.'
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch(err) {
|
||||
this.row.title ='권한 관리';
|
||||
this.row.msg1 ='실패 하였습니다.'
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
insertAuth(){
|
||||
//console.log("권한추가 페이지 이동");
|
||||
this.$router.push({ name: 'authAdd'});
|
||||
},
|
||||
updateAuth(target){
|
||||
//console.log("수정페이지로 이동:"+target);
|
||||
this.$router.push({ name: 'authModify', params: { targetAuthCd: target }});
|
||||
},
|
||||
authDelete(target){
|
||||
this.row.authCd = target;
|
||||
this.row.title ='권한 관리';
|
||||
this.row.msg1 ='삭제 하시겠습니까?'
|
||||
this.$refs.commmonModal.confirmModalOpen2(this.row);
|
||||
},
|
||||
async deleteAuth(){
|
||||
//console.log("삭제처리:"+target);
|
||||
//this.row.authCd = target;
|
||||
try {
|
||||
let response = await sysMgtApi.deleteAuth(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.getAuthList();
|
||||
return;
|
||||
} else {
|
||||
this.row={}
|
||||
this.row.title = '권한 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch(err) {
|
||||
this.row={}
|
||||
this.row.title = '권한 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
confirmCalbackFnc(props){
|
||||
async getAuthList() {
|
||||
console.log('getAuthList Start');
|
||||
//this.row.serviceId = serviceId;
|
||||
try {
|
||||
const response = await sysMgtApi.authList(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.list = result.data.list;
|
||||
this.totalCnt = result.data.list.length;
|
||||
} else {
|
||||
this.row.title = '권한 관리';
|
||||
this.row.msg1 = '조회정보가 없습니다.'
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (err) {
|
||||
this.row.title = '권한 관리';
|
||||
this.row.msg1 = '실패 하였습니다.'
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
insertAuth() {
|
||||
//console.log("권한추가 페이지 이동");
|
||||
this.$router.push({name: 'authAdd'});
|
||||
},
|
||||
updateAuth(target) {
|
||||
//console.log("수정페이지로 이동:"+target);
|
||||
this.$router.push({name: 'authModify', params: {targetAuthCd: target}});
|
||||
},
|
||||
authDelete(target) {
|
||||
this.row.authCd = target;
|
||||
this.row.title = '권한 관리';
|
||||
this.row.msg1 = '삭제 하시겠습니까?'
|
||||
this.$refs.commmonModal.confirmModalOpen2(this.row);
|
||||
},
|
||||
async deleteAuth() {
|
||||
//console.log("삭제처리:"+target);
|
||||
//this.row.authCd = target;
|
||||
try {
|
||||
let response = await sysMgtApi.deleteAuth(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.getAuthList();
|
||||
return;
|
||||
} else {
|
||||
this.row = {}
|
||||
this.row.title = '권한 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (err) {
|
||||
this.row = {}
|
||||
this.row.title = '권한 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
confirmCalbackFnc(props) {
|
||||
console.log(props)
|
||||
if(props.result){
|
||||
if (props.result) {
|
||||
this.deleteAuth();
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user