mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 00:17:26 +09:00
TC 기능 수정 / 디자인 수정 변경
This commit is contained in:
@@ -1,70 +1,69 @@
|
||||
<template>
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">관리자/유치채널 관리</h3>
|
||||
<p class="breadcrumb">시스템관리 > 관리자/유치채널 관리</p>
|
||||
</div>
|
||||
<form autocomplete="off" class="search_form">
|
||||
<div class="search_wrap">
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">권한</label>
|
||||
<select name="" id="right" v-model="searchType1" @keyup.enter="search">
|
||||
<option value="">전체</option>
|
||||
<option v-for="(option, i) in authType" v-bind:value="option.autCd" v-bind:key="i">
|
||||
{{ option.autNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">상태</label>
|
||||
<select name="" id="" v-model="searchType2" @keyup.enter="search">
|
||||
<option value="" selected>전체</option>
|
||||
<option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i">
|
||||
{{ option.codeNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box id">
|
||||
<label for="id1" class="label">ID</label>
|
||||
<input type="text" id="id1" placeholder="검색어 입력" v-model="grid.params.searchText1" @keyup.enter="search"/>
|
||||
</div>
|
||||
<div class="input_box">
|
||||
<label for="name" class="label">이름(대리점명)</label>
|
||||
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.searchText2" @keyup.enter="search"/>
|
||||
</div>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>건</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue admin add" @click="adminRegPopOpen();">관리자 등록</button>
|
||||
<button type="button" class="button blue channel add" @click="adminReg2PopOpen();">유치채널 등록</button>
|
||||
<button type="button" class="button white delete del" @click="rowDelete();">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<custom-grid
|
||||
ref="table"
|
||||
:totalItems="'totalItems'"
|
||||
:url="grid.url"
|
||||
:pagePerRows="grid.pagePerRows"
|
||||
:initialRequest="grid.initialRequest"
|
||||
:pagination="grid.pagination"
|
||||
:isCheckbox="grid.isCheckbox"
|
||||
:columns="grid.columns"
|
||||
:noDataStr="grid.noDataStr"
|
||||
:addCls="grid.addCls"
|
||||
:header="grid.headder"
|
||||
></custom-grid>
|
||||
</div>
|
||||
<admin-reg-pop ref="adminRegModal"> </admin-reg-pop>
|
||||
<!-- <admin-reg2-pop ref="adminReg2Modal"> </admin-reg2-pop> -->
|
||||
<admin-detail-pop ref="adminDetailModal"> </admin-detail-pop>
|
||||
<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="search_wrap">
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">권한</label>
|
||||
<select name="" id="right" v-model="searchType1" @keyup.enter="search">
|
||||
<option value="">전체</option>
|
||||
<option v-for="(option, i) in authType" v-bind:value="option.autCd" v-bind:key="i">
|
||||
{{ option.autNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">상태</label>
|
||||
<select name="" id="" v-model="searchType2" @keyup.enter="search">
|
||||
<option value="" selected>전체</option>
|
||||
<option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i">
|
||||
{{ option.codeNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box id">
|
||||
<label for="id1" class="label">ID</label>
|
||||
<input type="text" id="id1" placeholder="검색어 입력" v-model.trim="grid.params.searchText1"
|
||||
@keyup.enter="search"/>
|
||||
</div>
|
||||
<div class="input_box">
|
||||
<label for="name" class="label">이름(대리점명)</label>
|
||||
<input type="text" id="name" placeholder="검색어 입력" v-model.trim="grid.params.searchText2"
|
||||
@keyup.enter="search"/>
|
||||
</div>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>건</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue admin add" @click="adminRegPopOpen();">관리자 등록</button>
|
||||
<button type="button" class="button blue channel add" @click="adminReg2PopOpen();">유치채널 등록</button>
|
||||
<button type="button" class="button white delete del" @click="rowDelete();">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<custom-grid
|
||||
ref="table"
|
||||
:totalItems="'totalItems'"
|
||||
:url="grid.url"
|
||||
:pagePerRows="grid.pagePerRows"
|
||||
:initialRequest="grid.initialRequest"
|
||||
:pagination="grid.pagination"
|
||||
:isCheckbox="grid.isCheckbox"
|
||||
:columns="grid.columns"
|
||||
:noDataStr="grid.noDataStr"
|
||||
:addCls="grid.addCls"
|
||||
:header="grid.headder"
|
||||
></custom-grid>
|
||||
</div>
|
||||
<admin-reg-pop ref="adminRegModal"></admin-reg-pop>
|
||||
<admin-detail-pop ref="adminDetailModal"></admin-detail-pop>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -77,219 +76,220 @@ import sysMgtApi from "../service/sysMgtApi.js";
|
||||
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('a');
|
||||
el.href = 'javascript:void(0);';
|
||||
el.className = 'btn_text';
|
||||
el.innerText= String(props.colValue)
|
||||
this.el = el;
|
||||
}
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('a');
|
||||
el.href = 'javascript:void(0);';
|
||||
el.className = 'btn_text';
|
||||
el.innerText = String(props.colValue)
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
selEl.addEventListener("click", () => {
|
||||
const { callback } = this.props["cgrido" + this.props.colName].options;
|
||||
callback(this.props);
|
||||
});
|
||||
}
|
||||
addEvent(selEl) {
|
||||
selEl.addEventListener("click", () => {
|
||||
const {callback} = this.props["cgrido" + this.props.colName].options;
|
||||
callback(this.props);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'adminList',
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
row: {},
|
||||
authType: [],
|
||||
statType: [],
|
||||
statType: [],
|
||||
cate2Code: "",
|
||||
totalItems: 0,
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 20,
|
||||
searchType1:'',
|
||||
searchType2:'',
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
grid: {
|
||||
url: '/api/v1/bo/sysMgt/adminList',
|
||||
pagePerRows: 20,
|
||||
pagination: true,
|
||||
pagination: true,
|
||||
isCheckbox: true, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
columns: [
|
||||
{ name: 'no', header: 'NO', align: 'center', width: '15%'},
|
||||
{ name: 'auth', header: '권한', align: 'center', width: '15%' },
|
||||
{ name: 'name', header: '이름(대리점명)', align: 'center', width: '20%'},
|
||||
{ name: 'adminId', header: 'ID', align: 'center', width: '20%', renderer: {
|
||||
columns: [
|
||||
{name: 'no', header: 'NO', align: 'center', width: '15%'},
|
||||
{name: 'auth', header: '권한', align: 'center', width: '15%'},
|
||||
{name: 'name', header: '이름(대리점명)', align: 'center', width: '20%'},
|
||||
{
|
||||
name: 'adminId', header: 'ID', align: 'center', width: '20%', renderer: {
|
||||
type: CustomATagRenderer
|
||||
, options: {
|
||||
callback: this.detailPop,
|
||||
callback: this.detailPop,
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'adminStat', header: '상태', align: 'center', width: '5%', cls: 'td_line'},
|
||||
{ name: 'regDt', header: '등록일', align: 'center', width: '20%'}
|
||||
{name: 'adminStat', header: '상태', align: 'center', width: '5%', cls: 'td_line'},
|
||||
{name: 'regDt', header: '등록일', align: 'center', width: '20%'}
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchText1: '',
|
||||
searchText2: ''
|
||||
},
|
||||
},
|
||||
excelHeader: []
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid,
|
||||
// SystemPopup,
|
||||
customGrid: customGrid,
|
||||
// SystemPopup,
|
||||
AdminRegPop,
|
||||
commonModal,
|
||||
AdminDetailPop,
|
||||
},
|
||||
created(){
|
||||
this.setCodeData();
|
||||
created() {
|
||||
this.setCodeData();
|
||||
//let cont = document.querySelector(".wrap");
|
||||
//cont.classList.add("main_wrap");
|
||||
},
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition : '+getCondition);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
console.log('getCondition : ' + getCondition);
|
||||
console.log(getCondition)
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
if (getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
this.grid.params = getCondition.params;
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
this.search(isKeep);
|
||||
this.search(isKeep);
|
||||
},
|
||||
methods: {
|
||||
search: function(isKeep) {
|
||||
console.log('this.perPageCnt'+this.perPageCnt);
|
||||
search: function (isKeep) {
|
||||
console.log(isKeep)
|
||||
console.log('this.perPageCnt' + this.perPageCnt);
|
||||
//console.log(this.grid.params);
|
||||
this.grid.params.searchType1 = this.searchType1
|
||||
this.grid.params.searchType2 = this.searchType2
|
||||
this.grid.pagePerRows = this.perPageCnt
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
detailPop(props) {
|
||||
// this.getMainSlot().popupView(4);
|
||||
// this.setDtlPpPrm(props);
|
||||
this.$refs.adminDetailModal.adminDetailModalOpen(props);
|
||||
// this.getMainSlot().popupView(4);
|
||||
// this.setDtlPpPrm(props);
|
||||
this.$refs.adminDetailModal.adminDetailModalOpen(props);
|
||||
},
|
||||
ModalOpen: function(target){
|
||||
ModalOpen: function (target) {
|
||||
//this.$refs.systemModal.ModalOpen(target);
|
||||
},
|
||||
adminRegPopOpen: function(){
|
||||
adminRegPopOpen: function () {
|
||||
this.$refs.adminRegModal.ModalOpen(1);
|
||||
},
|
||||
adminReg2PopOpen: function(){
|
||||
adminReg2PopOpen: function () {
|
||||
this.$refs.adminRegModal.ModalOpen(2);
|
||||
//this.$refs.adminReg2Modal.adminReg2ModalOpen();//
|
||||
},
|
||||
doValidate(){ //로우데이터 삭제하도록 수정
|
||||
|
||||
doValidate() { //로우데이터 삭제하도록 수정
|
||||
|
||||
console.log("totalItems >> " + this.totalItems);
|
||||
if(this.totalItems == 0){
|
||||
if (this.totalItems == 0) {
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '검색 결과가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
var chkList = this.$refs.table.checkedElementDatas();
|
||||
if(chkList.length == 0){
|
||||
if (chkList.length == 0) {
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '삭제대상을 체크 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
// for(var i = 0; i < chkList.length; i++){
|
||||
// alert(chkList[i].adminId);
|
||||
// }
|
||||
const param = chkList.map((row)=>({adminId:row.adminId}));
|
||||
// for(var i = 0; i < chkList.length; i++){
|
||||
// alert(chkList[i].adminId);
|
||||
// }
|
||||
const param = chkList.map((row) => ({adminId: row.adminId}));
|
||||
console.log(param)
|
||||
this.row.list = param;
|
||||
console.log(this.row);
|
||||
return true;
|
||||
},
|
||||
sendStoreData: function() {
|
||||
sendStoreData: function () {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
//console.log("getCondition : "+ getCondition.perPage);
|
||||
},
|
||||
setCodeData() {
|
||||
setCodeData() {
|
||||
|
||||
// 상태 옵션 셋팅.
|
||||
api.commCode({'grpCd' : 'ADM_STTUS_CD'}).then(response => {
|
||||
this.statType = response.data.data.list;
|
||||
// 상태 옵션 셋팅.
|
||||
api.commCode({'grpCd': 'ADM_STTUS_CD'}).then(response => {
|
||||
this.statType = response.data.data.list;
|
||||
});
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
rowDelete(){
|
||||
if(this.doValidate()){
|
||||
this.row.title ='관리자/유치채널 관리';
|
||||
this.row.msg1 ='삭제 하시겠습니까?'
|
||||
this.$refs.commmonModal.confirmModalOpen2(this.row);
|
||||
rowDelete() {
|
||||
if (this.doValidate()) {
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '삭제 하시겠습니까?'
|
||||
this.$refs.commmonModal.confirmModalOpen2(this.row);
|
||||
}
|
||||
},
|
||||
async deleteRow(){
|
||||
try {
|
||||
let response = await sysMgtApi.deleteAdmin(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.$refs.table.reloadData();
|
||||
return;
|
||||
}
|
||||
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);
|
||||
}
|
||||
async deleteRow() {
|
||||
try {
|
||||
let response = await sysMgtApi.deleteAdmin(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.$refs.table.reloadData();
|
||||
return;
|
||||
}
|
||||
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);
|
||||
}
|
||||
},
|
||||
confirmCalbackFnc(props){
|
||||
confirmCalbackFnc(props) {
|
||||
console.log(props)
|
||||
if(props.result){
|
||||
if (props.result) {
|
||||
this.deleteRow();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,201 +1,189 @@
|
||||
<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="title">권한 추가</div>
|
||||
</div>
|
||||
<div class="table table_form">
|
||||
<form autocomplete="off">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="tr_input w30">
|
||||
<th>권한명</th>
|
||||
<td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm"></td>
|
||||
</tr>
|
||||
<tr class="tr_input w75">
|
||||
<th>권한 코드</th>
|
||||
<td colspan="2"><input type="text" v-model.trim="authCd" ref="_authCd"></td>
|
||||
<th class="center">상태</th>
|
||||
<td class="td_radio" colspan="2">
|
||||
<input type="radio" name="state" value="01" id="right_radio1" v-model="stat" checked>
|
||||
<label for="right_radio1">사용</label>
|
||||
<input type="radio" name="state" value="02" id="right_radio2" v-model="stat">
|
||||
<label for="right_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr_input w100">
|
||||
<th>권한 설명</th>
|
||||
<td colspan="5"><input type="text" v-model="authDesc"></td>
|
||||
</tr>
|
||||
<tr class="tr_checkbox">
|
||||
<td class="check" rowspan="2">
|
||||
<p>메뉴 권한 체크</p>
|
||||
<input type="checkbox" id="right_check0" v-model="checkedAuthMenuAll">
|
||||
<div class="label_group">
|
||||
<label for="right_check0"></label>
|
||||
<label for="right_check0">전체 체크</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>고객관리</p>
|
||||
<input type="checkbox" id="right_check1" value="2001" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check1"></label>
|
||||
<label for="right_check1">청약고객관리</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>유치현황관리</p>
|
||||
<!-- <input type="checkbox" id="right_check2" value="" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check2"></label>
|
||||
<label for="right_check2">유치현황관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check3" value="2003" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check3"></label>
|
||||
<label for="right_check3">유치관리자 현황</label>
|
||||
</div> -->
|
||||
<div class="label_group">
|
||||
<tr>
|
||||
<td class="td_radio" >
|
||||
<input type="radio" name="userStat" value="2002" id="channel_radio1" v-model="channelAuth">
|
||||
<label for="channel_radio1">유치채널현황</label>
|
||||
<br/><br/>
|
||||
<input type="radio" name="userStat" value="2003" id="channel_radio2" v-model="channelAuth">
|
||||
<label for="channel_radio2">유치현황관리</label>
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>서비스관리</p>
|
||||
<input type="checkbox" id="right_check4" value="2004" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check4"></label>
|
||||
<label for="right_check4">080수신거부 인증코드 조회</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>정산</p>
|
||||
<input type="checkbox" id="right_check5" value="2005" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check5"></label>
|
||||
<label for="right_check5">정산이력</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>채널관리</p>
|
||||
<input type="checkbox" id="right_check6" value="2006" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check6"></label>
|
||||
<label for="right_check6">알림톡 템플릿 관리</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="check">
|
||||
<p>발신번호관리</p>
|
||||
<input type="checkbox" id="right_check7" value="2007" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check7"></label>
|
||||
<label for="right_check7">발신프로필 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check8" value="2008" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check8"></label>
|
||||
<label for="right_check8">문자 발신번호 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check9" value="2009" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check9"></label>
|
||||
<label for="right_check9">발신번호 승인</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>모니터링</p>
|
||||
<input type="checkbox" id="right_check10" value="2010" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check10"></label>
|
||||
<label for="right_check10">발송내역</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check11" value="2011" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check11"></label>
|
||||
<label for="right_check11">실시간발송현황</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>리스크관리</p>
|
||||
<input type="checkbox" id="right_check12" value="2012" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check12"></label>
|
||||
<label for="right_check12">발신번호 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check13" value="2013" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check13"></label>
|
||||
<label for="right_check13">080수신번호 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check14" value="2014" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check14"></label>
|
||||
<label for="right_check14">메시지 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check15" value="2015" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check15"></label>
|
||||
<label for="right_check15">차단 내역</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>발송통계</p>
|
||||
<input type="checkbox" id="right_check16" value="2016" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check16"></label>
|
||||
<label for="right_check16">날짜별 통계</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check17" value="2017" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check17"></label>
|
||||
<label for="right_check17">사업자별 통계</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>시스템 관리</p>
|
||||
<input type="checkbox" id="right_check18" value="2018" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check18"></label>
|
||||
<label for="right_check18">관리자/유치채널 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check19" value="2019" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check19"></label>
|
||||
<label for="right_check19">권한 관리</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" type="button" @click="authAddCancel()">취소</button>
|
||||
<button class="btn-pcolor" type="button" @click="authAddSave()">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</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="title">권한 추가</div>
|
||||
</div>
|
||||
<div class="table table_form">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="tr_input w30">
|
||||
<th>권한명</th>
|
||||
<td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm"></td>
|
||||
</tr>
|
||||
<tr class="tr_input w75">
|
||||
<th>권한 코드</th>
|
||||
<td colspan="2"><input type="text" v-model.trim="authCd" ref="_authCd"></td>
|
||||
<th class="center">상태</th>
|
||||
<td class="td_radio" colspan="2">
|
||||
<input type="radio" name="state" value="01" id="right_radio1" v-model="stat" checked>
|
||||
<label for="right_radio1">사용</label>
|
||||
<input type="radio" name="state" value="02" id="right_radio2" v-model="stat">
|
||||
<label for="right_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr_input w100">
|
||||
<th>권한 설명</th>
|
||||
<td colspan="5"><input type="text" v-model="authDesc"></td>
|
||||
</tr>
|
||||
<tr class="tr_checkbox">
|
||||
<td class="check" rowspan="2">
|
||||
<p>메뉴 권한 체크</p>
|
||||
<input type="checkbox" id="right_check0" ref="checkedAuthMenuAll_" v-model="checkedAuthMenuAll">
|
||||
<div class="label_group">
|
||||
<label for="right_check0"></label>
|
||||
<label for="right_check0">전체 체크</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>고객관리</p>
|
||||
<input type="checkbox" id="right_check1" value="2001" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check1"></label>
|
||||
<label for="right_check1">청약고객관리</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>유치현황관리</p>
|
||||
<div class="label_group">
|
||||
<tr>
|
||||
<td class="td_radio">
|
||||
<input type="radio" name="userStat" value="2002" id="channel_radio1" v-model="channelAuth">
|
||||
<label for="channel_radio1">유치채널현황</label>
|
||||
<br/><br/>
|
||||
<input type="radio" name="userStat" value="2003" id="channel_radio2" v-model="channelAuth">
|
||||
<label for="channel_radio2">유치현황관리</label>
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>서비스관리</p>
|
||||
<input type="checkbox" id="right_check4" value="2004" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check4"></label>
|
||||
<label for="right_check4">080수신거부 인증코드 조회</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>정산</p>
|
||||
<input type="checkbox" id="right_check5" value="2005" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check5"></label>
|
||||
<label for="right_check5">정산이력</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>채널관리</p>
|
||||
<input type="checkbox" id="right_check6" value="2006" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check6"></label>
|
||||
<label for="right_check6">알림톡 템플릿 관리</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="check">
|
||||
<p>발신번호관리</p>
|
||||
<input type="checkbox" id="right_check7" value="2007" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check7"></label>
|
||||
<label for="right_check7">발신프로필 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check8" value="2008" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check8"></label>
|
||||
<label for="right_check8">문자 발신번호 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check9" value="2009" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check9"></label>
|
||||
<label for="right_check9">발신번호 승인</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>모니터링</p>
|
||||
<input type="checkbox" id="right_check10" value="2010" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check10"></label>
|
||||
<label for="right_check10">발송내역</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check11" value="2011" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check11"></label>
|
||||
<label for="right_check11">실시간발송현황</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>리스크관리</p>
|
||||
<input type="checkbox" id="right_check12" value="2012" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check12"></label>
|
||||
<label for="right_check12">발신번호 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check13" value="2013" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check13"></label>
|
||||
<label for="right_check13">080수신번호 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check14" value="2014" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check14"></label>
|
||||
<label for="right_check14">메시지 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check15" value="2015" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check15"></label>
|
||||
<label for="right_check15">차단 내역</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>발송통계</p>
|
||||
<input type="checkbox" id="right_check16" value="2016" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check16"></label>
|
||||
<label for="right_check16">날짜별 통계</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check17" value="2017" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check17"></label>
|
||||
<label for="right_check17">사업자별 통계</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>시스템 관리</p>
|
||||
<input type="checkbox" id="right_check18" value="2018" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check18"></label>
|
||||
<label for="right_check18">관리자/유치채널 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check19" value="2019" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check19"></label>
|
||||
<label for="right_check19">권한 관리</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" type="button" @click="authAddCancel()">취소</button>
|
||||
<button class="btn-pcolor" type="button" @click="authAddSave()">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import sysMgtApi from "../service/sysMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import {utils_mixin, chkPattern2} from '../service/mixins';
|
||||
//import commonModal from "@/components/modal/commonModal";
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
@@ -204,181 +192,186 @@ export default {
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
authType: [],
|
||||
authNm: "",
|
||||
authCd: "",
|
||||
authDesc: "",
|
||||
stat: "01", // 등록화면 상태 Default 값 지정(사용:01)
|
||||
defaultAuthMenu:["2001","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016","2017","2018","2019"],
|
||||
checkedAuthMenu:[],
|
||||
channelAuth: "",
|
||||
row: {},
|
||||
authType: [],
|
||||
authNm: "",
|
||||
authCd: "",
|
||||
authDesc: "",
|
||||
stat: "01", // 등록화면 상태 Default 값 지정(사용:01)
|
||||
defaultAuthMenu: ["2001", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019"],
|
||||
checkedAuthMenu: [],
|
||||
channelAuth: "",
|
||||
};
|
||||
},
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
commonModal,
|
||||
},
|
||||
created() {
|
||||
//this.setCodeData();
|
||||
},
|
||||
created(){
|
||||
//this.setCodeData();
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doValidate(){
|
||||
doValidate() {
|
||||
|
||||
// 필수 등록정보 체크
|
||||
if(this.isNull(this.authNm)){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한명을 입력해 주세요.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
// 필수 등록정보 체크
|
||||
if (this.isNull(this.authNm)) {
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한명을 입력해 주세요.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.authCd)){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한 코드를 입력해 주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
if (this.isNull(this.authCd)) {
|
||||
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.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)){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '상태를 체크해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
if (this.isNull(this.stat)) {
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '상태를 체크해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.checkedAuthMenu.length == 0){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '메뉴 권한 체크를 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
if (this.checkedAuthMenu.length == 0) {
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '메뉴 권한 체크를 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
},
|
||||
authAddCancel() {
|
||||
// 권한리스트 페이지로 이동
|
||||
this.$router.push({ name: 'authList'});
|
||||
return true;
|
||||
|
||||
},
|
||||
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 = {};
|
||||
if(this.channelAuth !== ''){
|
||||
dataMap.menuNo = this.channelAuth;
|
||||
listArr.push(dataMap);
|
||||
}
|
||||
for(var i = 0; i< reqAuthMenuArr.length; i++){
|
||||
dataMap = {};
|
||||
dataMap.menuNo = reqAuthMenuArr[i];
|
||||
listArr.push(dataMap);
|
||||
authAddCancel() {
|
||||
// 권한리스트 페이지로 이동
|
||||
this.$router.push({name: 'authList'});
|
||||
|
||||
},
|
||||
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 = {};
|
||||
if (this.channelAuth !== '') {
|
||||
dataMap.menuNo = this.channelAuth;
|
||||
listArr.push(dataMap);
|
||||
}
|
||||
for (var i = 0; i < reqAuthMenuArr.length; i++) {
|
||||
dataMap = {};
|
||||
dataMap.menuNo = reqAuthMenuArr[i];
|
||||
listArr.push(dataMap);
|
||||
}
|
||||
|
||||
|
||||
this.row.authCd = this.authCd;
|
||||
this.row.authNm = this.authNm;
|
||||
this.row.authDesc = this.authDesc;
|
||||
this.row.stat = this.stat;
|
||||
this.row.list = listArr;
|
||||
|
||||
console.log(this.row);
|
||||
|
||||
try {
|
||||
let response = await sysMgtApi.insertAuth(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
//alert('저장 하였습니다.');
|
||||
// 권한리스트 페이지 이동
|
||||
this.$router.push({name: 'authList'});
|
||||
|
||||
} else if (result.retCode == "4017") {
|
||||
//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("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
this.row.authCd = this.authCd;
|
||||
this.row.authNm = this.authNm;
|
||||
this.row.authDesc = this.authDesc;
|
||||
this.row.stat = this.stat;
|
||||
this.row.list = listArr;
|
||||
|
||||
console.log(this.row);
|
||||
|
||||
try {
|
||||
let response = await sysMgtApi.insertAuth(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
//alert('저장 하였습니다.');
|
||||
// 권한리스트 페이지 이동
|
||||
this.$router.push({ name: 'authList'});
|
||||
|
||||
} else if(result.retCode == "4017"){
|
||||
//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("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
} catch(err) {
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
//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();
|
||||
}
|
||||
}
|
||||
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: {
|
||||
// 체크박스 전체선택 기능
|
||||
checkedAuthMenuAll : {
|
||||
get: function () {
|
||||
return this.defaultAuthMenu.length === this.checkedAuthMenu.length;
|
||||
},
|
||||
set: function (e) {
|
||||
//this.checkedAuthMenu = e ? this.defaultAuthMenu : [];
|
||||
if(e){
|
||||
this.checkedAuthMenu = this.defaultAuthMenu;
|
||||
if(this.channelAuth === ''){
|
||||
this.channelAuth = '2002';
|
||||
}
|
||||
} else {
|
||||
this.checkedAuthMenu = [];
|
||||
this.channelAuth = '';
|
||||
}
|
||||
// 체크박스 전체선택 기능
|
||||
checkedAuthMenuAll: {
|
||||
get: function () {
|
||||
if (this.defaultAuthMenu.length === this.checkedAuthMenu.length) {
|
||||
if (this.channelAuth === '') {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
set: function (e) {
|
||||
if (e) {
|
||||
this.checkedAuthMenu = this.defaultAuthMenu;
|
||||
if (this.channelAuth === '') {
|
||||
this.channelAuth = '2002';
|
||||
}
|
||||
} else {
|
||||
this.checkedAuthMenu = [];
|
||||
this.channelAuth = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
@@ -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>
|
||||
@@ -1,201 +1,189 @@
|
||||
<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="title">권한 수정</div>
|
||||
</div>
|
||||
<div class="table table_form">
|
||||
<form autocomplete="off">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="tr_input w30">
|
||||
<th>권한명</th>
|
||||
<td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm"></td>
|
||||
</tr>
|
||||
<tr class="tr_input w75">
|
||||
<th>권한 코드</th>
|
||||
<td colspan="2"><input type="text" v-model.trim="authCd" ref="_authCd" disabled></td>
|
||||
<th class="center">상태</th>
|
||||
<td class="td_radio" colspan="2">
|
||||
<input type="radio" name="state" value="01" id="right_radio1" v-model="stat" checked>
|
||||
<label for="right_radio1">사용</label>
|
||||
<input type="radio" name="state" value="02" id="right_radio2" v-model="stat">
|
||||
<label for="right_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr_input w100">
|
||||
<th>권한 설명</th>
|
||||
<td colspan="5"><input type="text" v-model="authDesc"></td>
|
||||
</tr>
|
||||
<tr class="tr_checkbox">
|
||||
<td class="check" rowspan="2">
|
||||
<p>메뉴 권한 체크</p>
|
||||
<input type="checkbox" id="right_check0" v-model="checkedAuthMenuAll">
|
||||
<div class="label_group">
|
||||
<label for="right_check0"></label>
|
||||
<label for="right_check0">전체 체크</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>고객관리</p>
|
||||
<input type="checkbox" id="right_check1" value="2001" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check1"></label>
|
||||
<label for="right_check1">청약고객관리</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>유치현황관리</p>
|
||||
<!-- <input type="checkbox" id="right_check2" value="2002" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check2"></label>
|
||||
<label for="right_check2">유치채널 현황</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check3" value="2003" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check3"></label>
|
||||
<label for="right_check3">유치관리자 현황</label>
|
||||
</div> -->
|
||||
<div class="label_group">
|
||||
<tr>
|
||||
<td class="td_radio" >
|
||||
<input type="radio" name="userStat" value="2002" id="channel_radio1" v-model="channelAuth">
|
||||
<label for="channel_radio1">유치채널현황</label>
|
||||
<br/><br/>
|
||||
<input type="radio" name="userStat" value="2003" id="channel_radio2" v-model="channelAuth">
|
||||
<label for="channel_radio2">유치현황관리</label>
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>서비스관리</p>
|
||||
<input type="checkbox" id="right_check4" value="2004" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check4"></label>
|
||||
<label for="right_check4">080수신거부 인증코드 조회</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>정산</p>
|
||||
<input type="checkbox" id="right_check5" value="2005" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check5"></label>
|
||||
<label for="right_check5">정산이력</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>채널관리</p>
|
||||
<input type="checkbox" id="right_check6" value="2006" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check6"></label>
|
||||
<label for="right_check6">알림톡 템플릿 관리</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="check">
|
||||
<p>발신번호관리</p>
|
||||
<input type="checkbox" id="right_check7" value="2007" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check7"></label>
|
||||
<label for="right_check7">발신프로필 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check8" value="2008" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check8"></label>
|
||||
<label for="right_check8">문자 발신번호 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check9" value="2009" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check9"></label>
|
||||
<label for="right_check9">발신번호 승인</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>모니터링</p>
|
||||
<input type="checkbox" id="right_check10" value="2010" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check10"></label>
|
||||
<label for="right_check10">발송내역</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check11" value="2011" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check11"></label>
|
||||
<label for="right_check11">실시간발송현황</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>리스크관리</p>
|
||||
<input type="checkbox" id="right_check12" value="2012" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check12"></label>
|
||||
<label for="right_check12">발신번호 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check13" value="2013" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check13"></label>
|
||||
<label for="right_check13">080수신번호 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check14" value="2014" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check14"></label>
|
||||
<label for="right_check14">메시지 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check15" value="2015" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check15"></label>
|
||||
<label for="right_check15">차단 내역</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>발송통계</p>
|
||||
<input type="checkbox" id="right_check16" value="2016" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check16"></label>
|
||||
<label for="right_check16">날짜별 통계</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check17" value="2017" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check17"></label>
|
||||
<label for="right_check17">사업자별 통계</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>시스템 관리</p>
|
||||
<input type="checkbox" id="right_check18" value="2018" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check18"></label>
|
||||
<label for="right_check18">관리자/유치채널 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check19" value="2019" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check19"></label>
|
||||
<label for="right_check19">권한 관리</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" type="button" @click="authModifyCancel()">취소</button>
|
||||
<button class="btn-pcolor" type="button" @click="authModifySave()">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</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="title">권한 수정</div>
|
||||
</div>
|
||||
<div class="table table_form">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="tr_input w30">
|
||||
<th>권한명</th>
|
||||
<td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm"></td>
|
||||
</tr>
|
||||
<tr class="tr_input w75">
|
||||
<th>권한 코드</th>
|
||||
<td colspan="2"><input type="text" v-model.trim="authCd" ref="_authCd" disabled></td>
|
||||
<th class="center">상태</th>
|
||||
<td class="td_radio" colspan="2">
|
||||
<input type="radio" name="state" value="01" id="right_radio1" v-model="stat" checked>
|
||||
<label for="right_radio1">사용</label>
|
||||
<input type="radio" name="state" value="02" id="right_radio2" v-model="stat">
|
||||
<label for="right_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr_input w100">
|
||||
<th>권한 설명</th>
|
||||
<td colspan="5"><input type="text" v-model="authDesc"></td>
|
||||
</tr>
|
||||
<tr class="tr_checkbox">
|
||||
<td class="check" rowspan="2">
|
||||
<p>메뉴 권한 체크</p>
|
||||
<input type="checkbox" id="right_check0" v-model="checkedAuthMenuAll">
|
||||
<div class="label_group">
|
||||
<label for="right_check0"></label>
|
||||
<label for="right_check0">전체 체크</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>고객관리</p>
|
||||
<input type="checkbox" id="right_check1" value="2001" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check1"></label>
|
||||
<label for="right_check1">청약고객관리</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>유치현황관리</p>
|
||||
<div class="label_group">
|
||||
<tr>
|
||||
<td class="td_radio">
|
||||
<input type="radio" name="userStat" value="2002" id="channel_radio1" v-model="channelAuth">
|
||||
<label for="channel_radio1">유치채널현황</label>
|
||||
<br/><br/>
|
||||
<input type="radio" name="userStat" value="2003" id="channel_radio2" v-model="channelAuth">
|
||||
<label for="channel_radio2">유치현황관리</label>
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>서비스관리</p>
|
||||
<input type="checkbox" id="right_check4" value="2004" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check4"></label>
|
||||
<label for="right_check4">080수신거부 인증코드 조회</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>정산</p>
|
||||
<input type="checkbox" id="right_check5" value="2005" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check5"></label>
|
||||
<label for="right_check5">정산이력</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>채널관리</p>
|
||||
<input type="checkbox" id="right_check6" value="2006" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check6"></label>
|
||||
<label for="right_check6">알림톡 템플릿 관리</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="check">
|
||||
<p>발신번호관리</p>
|
||||
<input type="checkbox" id="right_check7" value="2007" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check7"></label>
|
||||
<label for="right_check7">발신프로필 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check8" value="2008" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check8"></label>
|
||||
<label for="right_check8">문자 발신번호 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check9" value="2009" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check9"></label>
|
||||
<label for="right_check9">발신번호 승인</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>모니터링</p>
|
||||
<input type="checkbox" id="right_check10" value="2010" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check10"></label>
|
||||
<label for="right_check10">발송내역</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check11" value="2011" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check11"></label>
|
||||
<label for="right_check11">실시간발송현황</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>리스크관리</p>
|
||||
<input type="checkbox" id="right_check12" value="2012" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check12"></label>
|
||||
<label for="right_check12">발신번호 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check13" value="2013" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check13"></label>
|
||||
<label for="right_check13">080수신번호 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check14" value="2014" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check14"></label>
|
||||
<label for="right_check14">메시지 차단</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check15" value="2015" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check15"></label>
|
||||
<label for="right_check15">차단 내역</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>발송통계</p>
|
||||
<input type="checkbox" id="right_check16" value="2016" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check16"></label>
|
||||
<label for="right_check16">날짜별 통계</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check17" value="2017" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check17"></label>
|
||||
<label for="right_check17">사업자별 통계</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>시스템 관리</p>
|
||||
<input type="checkbox" id="right_check18" value="2018" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check18"></label>
|
||||
<label for="right_check18">관리자/유치채널 관리</label>
|
||||
</div>
|
||||
<input type="checkbox" id="right_check19" value="2019" v-model="checkedAuthMenu">
|
||||
<div class="label_group">
|
||||
<label for="right_check19"></label>
|
||||
<label for="right_check19">권한 관리</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" type="button" @click="authModifyCancel()">취소</button>
|
||||
<button class="btn-pcolor" type="button" @click="authModifySave()">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import sysMgtApi from "../service/sysMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import {utils_mixin, chkPattern2} from '../service/mixins';
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
export default {
|
||||
@@ -203,224 +191,224 @@ export default {
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
authType: [],
|
||||
authNm: "",
|
||||
authCd: "",
|
||||
authDesc: "",
|
||||
stat: "",
|
||||
defaultAuthMenu:["2001","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016","2017","2018","2019"],
|
||||
checkedAuthMenu:[],
|
||||
channelAuth: "",
|
||||
row: {},
|
||||
authType: [],
|
||||
authNm: "",
|
||||
authCd: "",
|
||||
authDesc: "",
|
||||
stat: "",
|
||||
defaultAuthMenu: ["2001", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019"],
|
||||
checkedAuthMenu: [],
|
||||
channelAuth: "",
|
||||
};
|
||||
},
|
||||
},
|
||||
props: {
|
||||
targetAuthCd : {
|
||||
type: String,
|
||||
default: "",
|
||||
}
|
||||
targetAuthCd: {
|
||||
type: String,
|
||||
default: "",
|
||||
}
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
commonModal,
|
||||
},
|
||||
created() {
|
||||
//this.setCodeData();
|
||||
this.authDetail();
|
||||
},
|
||||
created(){
|
||||
//this.setCodeData();
|
||||
this.authDetail();
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doValidate(){
|
||||
|
||||
// 필수 등록정보 체크
|
||||
if(this.isNull(this.authNm)){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한명을 입력해 주세요.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
doValidate() {
|
||||
|
||||
if(this.isNull(this.authCd)){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한 코드를 입력해 주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
// 필수 등록정보 체크
|
||||
if (this.isNull(this.authNm)) {
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한명을 입력해 주세요.';
|
||||
this.row.focusTaget = '1';
|
||||
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.authCd)) {
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한 코드를 입력해 주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.stat)){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '상태를 체크해 주세요.';
|
||||
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.checkedAuthMenu.length == 0){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '메뉴 권한 체크를 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
if (this.isNull(this.stat)) {
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '상태를 체크해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.checkedAuthMenu.length == 0) {
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '메뉴 권한 체크를 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
},
|
||||
authModifyCancel() {
|
||||
// 권한리스트 페이지로 이동
|
||||
this.$router.push({ name: 'authList'});
|
||||
|
||||
},
|
||||
async authDetail(){
|
||||
//console.log(this.$route.params.targetAuthCd);
|
||||
this.row.authCd = this.$route.params.targetAuthCd;
|
||||
try {
|
||||
const response = await sysMgtApi.authDetail(this.row);
|
||||
const result = response.data;
|
||||
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.authCd = result.data.authCd;
|
||||
this.authNm = result.data.authNm;
|
||||
this.authDesc = result.data.authDesc;
|
||||
this.stat = result.data.authStat;
|
||||
|
||||
// 메뉴리스트 처리
|
||||
var dataList = result.data.list;
|
||||
var rsArr = [];
|
||||
for(var i=0; i< dataList.length; i++){
|
||||
if(dataList[i].upperMenuNo != null || dataList[i].upperMenuNo != ""){
|
||||
if(dataList[i].menuNo === '2002' || dataList[i].menuNo === '2003'){
|
||||
this.channelAuth = dataList[i].menuNo;
|
||||
} else {
|
||||
this.checkedAuthMenu.push(dataList[i].menuNo);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
authModifyCancel() {
|
||||
// 권한리스트 페이지로 이동
|
||||
this.$router.push({name: 'authList'});
|
||||
|
||||
},
|
||||
async authDetail() {
|
||||
//console.log(this.$route.params.targetAuthCd);
|
||||
this.row.authCd = this.$route.params.targetAuthCd;
|
||||
try {
|
||||
const response = await sysMgtApi.authDetail(this.row);
|
||||
const result = response.data;
|
||||
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.authCd = result.data.authCd;
|
||||
this.authNm = result.data.authNm;
|
||||
this.authDesc = result.data.authDesc;
|
||||
this.stat = result.data.authStat;
|
||||
|
||||
// 메뉴리스트 처리
|
||||
var dataList = result.data.list;
|
||||
var rsArr = [];
|
||||
for (var i = 0; i < dataList.length; i++) {
|
||||
if (dataList[i].upperMenuNo != null || dataList[i].upperMenuNo != "") {
|
||||
if (dataList[i].menuNo === '2002' || dataList[i].menuNo === '2003') {
|
||||
this.channelAuth = dataList[i].menuNo;
|
||||
} else {
|
||||
this.checkedAuthMenu.push(dataList[i].menuNo);
|
||||
}
|
||||
|
||||
} else {
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
} catch(err) {
|
||||
//alert("처리 실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
//alert("처리 실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
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 = {};
|
||||
if(this.channelAuth !== ''){
|
||||
dataMap.menuNo = this.channelAuth;
|
||||
listArr.push(dataMap);
|
||||
}
|
||||
for(var i = 0; i< reqAuthMenuArr.length; i++){
|
||||
dataMap = {};
|
||||
dataMap.menuNo = reqAuthMenuArr[i];
|
||||
listArr.push(dataMap);
|
||||
}
|
||||
|
||||
this.row.authCd = this.authCd;
|
||||
this.row.authNm = this.authNm;
|
||||
this.row.authDesc = this.authDesc;
|
||||
this.row.stat = this.stat;
|
||||
this.row.list = listArr;
|
||||
|
||||
console.log(this.row);
|
||||
|
||||
try {
|
||||
let response = await sysMgtApi.updateAuth(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
//alert('저장 하였습니다.');
|
||||
// 권한리스트 페이지 이동
|
||||
this.$router.push({ name: 'authList'});
|
||||
} else {
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
} catch(err) {
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
authModifySave() {
|
||||
if (this.doValidate()) {
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한 수정 저장하시겠습니까?';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.confirmModalOpen(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();
|
||||
}
|
||||
}
|
||||
async authUpdate() {
|
||||
|
||||
var reqAuthMenuArr = this.checkedAuthMenu;
|
||||
var listArr = [];
|
||||
var dataMap = {};
|
||||
if (this.channelAuth !== '') {
|
||||
dataMap.menuNo = this.channelAuth;
|
||||
listArr.push(dataMap);
|
||||
}
|
||||
for (var i = 0; i < reqAuthMenuArr.length; i++) {
|
||||
dataMap = {};
|
||||
dataMap.menuNo = reqAuthMenuArr[i];
|
||||
listArr.push(dataMap);
|
||||
}
|
||||
|
||||
this.row.authCd = this.authCd;
|
||||
this.row.authNm = this.authNm;
|
||||
this.row.authDesc = this.authDesc;
|
||||
this.row.stat = this.stat;
|
||||
this.row.list = listArr;
|
||||
|
||||
console.log(this.row);
|
||||
|
||||
try {
|
||||
let response = await sysMgtApi.updateAuth(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
//alert('저장 하였습니다.');
|
||||
// 권한리스트 페이지 이동
|
||||
this.$router.push({name: 'authList'});
|
||||
} else {
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
//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: {
|
||||
// 체크박스 전체선택 기능
|
||||
checkedAuthMenuAll : {
|
||||
get: function () {
|
||||
return this.defaultAuthMenu.length === this.checkedAuthMenu.length;
|
||||
},
|
||||
set: function (e) {
|
||||
//this.checkedAuthMenu = e ? this.defaultAuthMenu : [];
|
||||
if(e){
|
||||
this.checkedAuthMenu = this.defaultAuthMenu;
|
||||
if(this.channelAuth === ''){
|
||||
this.channelAuth = '2002';
|
||||
}
|
||||
} else {
|
||||
this.checkedAuthMenu = [];
|
||||
this.channelAuth = '';
|
||||
}
|
||||
// 체크박스 전체선택 기능
|
||||
checkedAuthMenuAll: {
|
||||
get: function () {
|
||||
return this.defaultAuthMenu.length === this.checkedAuthMenu.length;
|
||||
},
|
||||
set: function (e) {
|
||||
//this.checkedAuthMenu = e ? this.defaultAuthMenu : [];
|
||||
if (e) {
|
||||
this.checkedAuthMenu = this.defaultAuthMenu;
|
||||
if (this.channelAuth === '') {
|
||||
this.channelAuth = '2002';
|
||||
}
|
||||
} else {
|
||||
this.checkedAuthMenu = [];
|
||||
this.channelAuth = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user