어드민 메뉴명, 브래드크럼 수정 및 위치 변경

This commit is contained in:
kimjhjjang
2022-11-17 10:15:08 +09:00
parent f80d307b0d
commit 69aec986af
6 changed files with 485 additions and 464 deletions

View File

@@ -1,10 +1,9 @@
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">문자 발신번호 관리</h3>
<p class="breadcrumb">발신번호관리 &gt; 문자 발신번호 관리</p>
<h3 class="title">발신번호 관리</h3>
<p class="breadcrumb">발신번호관리 &gt; 발신번호 관리</p>
</div>
<div class="search_wrap">
<div class="group">
@@ -42,15 +41,23 @@
</select>
</div>
<div class="input_box">
<input class="search-box" type="text" id="search" placeholder="검색어 입력"
v-model.trim="grid.params.searchText1"
maxlength="100" @keyup.enter="search"/>
<input
class="search-box"
type="text"
id="search"
placeholder="검색어 입력"
v-model.trim="grid.params.searchText1"
maxlength="100"
@keyup.enter="search"
/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div>
<div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="count">
<span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span
>
<div class="select_box NumberSe">
<select name="" id="perPage" v-model="perPageCnt" @change="changePerPage()">
<option value="20">20</option>
@@ -60,50 +67,48 @@
</div>
</div>
<div class="button_group">
<button type="button" class="button blue add" @click="numberRegPopOpen();">등록</button>
<button type="button" class="button blue add" @click="numberRegPopOpen()">등록</button>
<button type="button" class="button white del" @click="deleteNumber()">삭제</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"
:pageRange="grid.pageRange"
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"
:pageRange="grid.pageRange"
></custom-grid>
</div>
<number-reg-pop ref="numberRegPop"></number-reg-pop>
<number-detail-pop ref="numberDetailPop"/>
<number-detail-pop ref="numberDetailPop" />
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</template>
<script>
import customGrid from '@/components/CustomGrid';
import commonModal from "@/components/modal/commonModal";
import commonModal from '@/components/modal/commonModal';
import NumberRegPop from '../components/NumberRegPop';
import NumberDetailPop from "@/modules/sendNumMgt/components/NumberDetailPop";
import NumberDetailPop from '@/modules/sendNumMgt/components/NumberDetailPop';
import sendNumMgtApi from '../service/sendNumMgtApi';
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)
el.innerText = String(props.colValue);
this.el = el;
}
@@ -112,8 +117,8 @@ class CustomATagRenderer {
}
addEvent(selEl) {
selEl.addEventListener("click", () => {
const {callback} = this.props["cgrido" + this.props.colName].options;
selEl.addEventListener('click', () => {
const { callback } = this.props['cgrido' + this.props.colName].options;
callback(this.props);
});
}
@@ -126,13 +131,13 @@ export default {
row: {},
authType: [],
statType: [],
cate2Code: "",
cate2Code: '',
totalItems: 0,
searchType4: 'regNo',
searchType3: '',
searchType2: '',
searchType1: '',
isFirst:true,
isFirst: true,
// 테이블 리스트 데이터
perPageCnt: 50,
grid: {
@@ -145,39 +150,43 @@ export default {
pageRange: 1,
header: [
[
{header: 'No', childNames: []},
{header: '고객사명', childNames: []},
{header: '관리자ID', childNames: []},
{header: '등록자ID', childNames: []},
{header: '사업자번호', childNames: []},
{header: '명의자 구분', childNames: []},
{header: '인입채널', childNames: []},
{header: '발신번호', childNames: []},
{header: '승인상태', childNames: []},
{header: '등록일자', childNames: []}
]
{ header: 'No', childNames: [] },
{ header: '고객사명', childNames: [] },
{ header: '관리자ID', childNames: [] },
{ header: '등록자ID', childNames: [] },
{ header: '사업자번호', childNames: [] },
{ header: '명의자 구분', childNames: [] },
{ header: '인입채널', childNames: [] },
{ header: '발신번호', childNames: [] },
{ header: '승인상태', childNames: [] },
{ header: '등록일자', childNames: [] },
],
],
columns: [
{name: 'no', header: 'No', align: 'center', width: '5%'},
{name: 'regReqNo', hidden: true},
{name: 'bizrAuthYn', hidden: true},
{name: 'custNm', header: '고객사명', align: 'center', width: '5%'},
{name: 'adminId', header: '관리자ID', align: 'center', width: '10%'},
{name: 'register', header: '등록자ID', align: 'center', width: '10%'},
{name: 'bregNo', header: '사업자번호', align: 'center', width: '10%'},
{name: 'nmineeDivCd', header: '명의자 구분', align: 'center', width: '10%'},
{name: 'inchDivCd', header: '인입채널', align: 'center', width: '10%'},
{ name: 'no', header: 'No', align: 'center', width: '5%' },
{ name: 'regReqNo', hidden: true },
{ name: 'bizrAuthYn', hidden: true },
{ name: 'custNm', header: '고객사명', align: 'center', width: '5%' },
{ name: 'adminId', header: '관리자ID', align: 'center', width: '10%' },
{ name: 'register', header: '등록자ID', align: 'center', width: '10%' },
{ name: 'bregNo', header: '사업자번호', align: 'center', width: '10%' },
{ name: 'nmineeDivCd', header: '명의자 구분', align: 'center', width: '10%' },
{ name: 'inchDivCd', header: '인입채널', align: 'center', width: '10%' },
{
name: 'sndrno', header: '발신번호', align: 'center', width: '10%', renderer: {
type: CustomATagRenderer
, options: {
name: 'sndrno',
header: '발신번호',
align: 'center',
width: '10%',
renderer: {
type: CustomATagRenderer,
options: {
callback: this.numberDetail,
}
}
},
},
},
{name: 'sttusCd', header: '승인상태', align: 'center', width: '10%'},
{name: 'regDt', header: '등록일자', width: '10%', cls: 'td_line'}
{ name: 'sttusCd', header: '승인상태', align: 'center', width: '10%' },
{ name: 'regDt', header: '등록일자', width: '10%', cls: 'td_line' },
],
noDataStr: '검색 결과가 없습니다.',
params: {
@@ -187,10 +196,10 @@ export default {
searchType4: '',
searchText1: '',
pagePerRows: '',
page: ''
page: '',
},
excelHeader: []
}
excelHeader: [],
},
};
},
components: {
@@ -201,7 +210,7 @@ export default {
},
created() {
// this.grid.pagePerRows = 50
this.isFirst=true
this.isFirst = true;
},
destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', {
@@ -212,8 +221,8 @@ export default {
searchType2: '',
searchType3: '',
searchType4: '',
searchText1: ''
}
searchText1: '',
},
});
},
mounted() {
@@ -233,25 +242,24 @@ export default {
},
methods: {
search: function (isKeep) {
this.grid.params.searchType1 = this.searchType1
this.grid.params.searchType2 = this.searchType2
this.grid.params.searchType3 = this.searchType3
this.grid.params.searchType4 = this.searchType4
if(this.isFirst){
this.grid.pagePerRows = 50
this.grid.params.searchType1 = this.searchType1;
this.grid.params.searchType2 = this.searchType2;
this.grid.params.searchType3 = this.searchType3;
this.grid.params.searchType4 = this.searchType4;
if (this.isFirst) {
this.grid.pagePerRows = 50;
}
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
this.isFirst=false
this.isFirst = false;
},
sendStoreData: function () {
const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params
params: this.grid.params,
});
},
numberRegPopOpen: function () {
this.$refs.numberRegPop.numberRegPopopen();
@@ -265,16 +273,15 @@ export default {
deleteNumber() {
if (this.doValidate()) {
this.row.title = '문자발신번호 관리';
this.row.msg1 = '삭제 하시겠습니까?'
this.row.msg1 = '삭제 하시겠습니까?';
this.$refs.commmonModal.confirmModalOpen2(this.row);
}
},
async numberDelete() {
try {
let response = await sendNumMgtApi.deleteNumber(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
if (result != null && result.retCode == '0000') {
this.$refs.table.reloadData();
return;
} else {
@@ -288,7 +295,8 @@ export default {
this.$refs.commmonModal.alertModalOpen(this.row);
}
},
doValidate() { //로우데이터 삭제하도록 수정
doValidate() {
//로우데이터 삭제하도록 수정
if (this.totalItems == 0) {
this.row.title = '문자발신번호 관리';
@@ -304,7 +312,7 @@ export default {
return false;
}
//const param = chkList.map((row)=>({regReqNo:row.regReqNo} ));
const param = chkList.map((row) => ({seqNo: row.seqNo}));
const param = chkList.map((row) => ({ seqNo: row.seqNo }));
this.row.list = param;
return true;
},
@@ -313,20 +321,20 @@ export default {
this.numberDelete();
}
},
changePerPage: function () { // 페이지당 조회할 개수
changePerPage: function () {
// 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt;
},
},
beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params
params: this.grid.params,
});
// 라우트 하기전 실행
next();
}
},
};
</script>
</script>