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

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> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">알림톡 템플릿 관리</h3> <h3 class="title">알림톡 템플릿 관리</h3>
<p class="breadcrumb">채널관리 &gt; 알림톡 템플릿 관리</p> <p class="breadcrumb">카카오 채널관리 &gt; 알림톡 템플릿 관리</p>
</div> </div>
<div class="search_wrap"> <div class="search_wrap">
<div class="select_box id"> <div class="select_box id">
@@ -25,18 +24,26 @@
</select> </select>
</div> </div>
<div class="input_box"> <div class="input_box">
<input class="search-box" type="text" id="id1" placeholder="검색어 입력" v-model.trim="grid.params.searchText1" <input
@keyup.enter="search" maxlength="100"/> class="search-box"
type="text"
id="id1"
placeholder="검색어 입력"
v-model.trim="grid.params.searchText1"
@keyup.enter="search"
maxlength="100"
/>
</div> </div>
<button type="button" class="button grey" @click="search">조회</button> <button type="button" class="button grey" @click="search">조회</button>
</div> </div>
<div class="info"> <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"> <div class="select_box NumberSe">
<select name="" id="perPage" v-model="perPageCnt" @change="changePerPage()"> <select name="" id="perPage" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ <option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">
option.text {{ option.text }}
}}
</option> </option>
</select> </select>
</div> </div>
@@ -58,7 +65,6 @@
></custom-grid> ></custom-grid>
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commmonModal"></common-modal>
</div> </div>
</div> </div>
</div> </div>
@@ -69,8 +75,8 @@ import customGrid from '@/components/CustomGrid';
import channelMgtApi from '../service/channelMgtApi'; import channelMgtApi from '../service/channelMgtApi';
import xlsx from '@/common/excel'; import xlsx from '@/common/excel';
import moment from 'moment'; import moment from 'moment';
import commonModal from "@/components/modal/commonModal"; import commonModal from '@/components/modal/commonModal';
import api from "@/service/api"; import api from '@/service/api';
export default { export default {
name: 'temltList', name: 'temltList',
@@ -79,7 +85,7 @@ export default {
row: {}, row: {},
authType: [], authType: [],
statType: [], statType: [],
cate2Code: "", cate2Code: '',
totalItems: 0, totalItems: 0,
pageType: 'CHANN', pageType: 'CHANN',
searchType1: '', searchType1: '',
@@ -87,9 +93,9 @@ export default {
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
options: [ options: [
{text: '20', value: 20}, { text: '20', value: 20 },
{text: '50', value: 50}, { text: '50', value: 50 },
{text: '100', value: 100} { text: '100', value: 100 },
], ],
grid: { grid: {
url: '/api/v1/bo/channelMgt/tmpltList', url: '/api/v1/bo/channelMgt/tmpltList',
@@ -99,40 +105,39 @@ export default {
initialRequest: false, initialRequest: false,
addCls: 'box_OFvis', addCls: 'box_OFvis',
header: [ header: [
[ [
{header: 'No', childNames: []}, { header: 'No', childNames: [] },
{header: '고객사명', childNames: []}, { header: '고객사명', childNames: [] },
{header: '사업자번호', childNames: []}, { header: '사업자번호', childNames: [] },
{header: '템플릿코드', childNames: []}, { header: '템플릿코드', childNames: [] },
{header: '템플릿명', childNames: []}, { header: '템플릿명', childNames: [] },
{header: '템플릿 유형', childNames: []}, { header: '템플릿 유형', childNames: [] },
{header: '상태', childNames: []}, { header: '상태', childNames: [] },
{header: '발신프로필', childNames: []}, { header: '발신프로필', childNames: [] },
{header: '마지막 수정일', childNames: []} { header: '마지막 수정일', childNames: [] },
] ],
], ],
columns: [ columns: [
{name: 'no', header: 'No', align: 'center', width: '4%'}, { name: 'no', header: 'No', align: 'center', width: '4%' },
{name: 'custNm', header: '고객사명', align: 'center', width: '12%'}, { name: 'custNm', header: '고객사명', align: 'center', width: '12%' },
{name: 'bregNo', header: '사업자번호', align: 'center', width: '10%'}, { name: 'bregNo', header: '사업자번호', align: 'center', width: '10%' },
{name: 'tmpltCd', header: '템플릿코드', align: 'center', width: '12%'}, { name: 'tmpltCd', header: '템플릿코드', align: 'center', width: '12%' },
{name: 'tmpltNm', header: '템플릿명', align: 'center', width: '18%'}, { name: 'tmpltNm', header: '템플릿명', align: 'center', width: '18%' },
{name: 'tmpltType', header: '템플릿 유형', align: 'center', width: '8%'}, { name: 'tmpltType', header: '템플릿 유형', align: 'center', width: '8%' },
{name: 'stat', header: '상태', align: 'center', width: '8%'}, { name: 'stat', header: '상태', align: 'center', width: '8%' },
{name: 'sendProfile', header: '발신프로필', align: 'center', width: '18%'}, { name: 'sendProfile', header: '발신프로필', align: 'center', width: '18%' },
{name: 'lastChgDt', header: '마지막 수정일', width: '10%', cls: 'td_line'} { name: 'lastChgDt', header: '마지막 수정일', width: '10%', cls: 'td_line' },
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
searchType1: '', searchType1: '',
searchType2: 'custNm', searchType2: 'custNm',
searchText1: '' searchText1: '',
},
excelHeader: [],
}, },
excelHeader: []
}
}; };
}, },
components: { components: {
@@ -151,13 +156,11 @@ export default {
params: { params: {
searchType1: '', searchType1: '',
searchType2: 'custNm', searchType2: 'custNm',
searchText1: '' searchText1: '',
} },
}); });
}, },
mounted() { mounted() {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
@@ -187,7 +190,7 @@ export default {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params,
}); });
}, },
async getExcelDataDown() { async getExcelDataDown() {
@@ -196,7 +199,7 @@ export default {
const params = { const params = {
searchType1: this.grid.params.searchType1, searchType1: this.grid.params.searchType1,
searchType2: this.grid.params.searchType2, searchType2: this.grid.params.searchType2,
searchText1: this.grid.params.searchText1 searchText1: this.grid.params.searchText1,
}; };
response = await channelMgtApi.tmpltListExcel(params); response = await channelMgtApi.tmpltListExcel(params);
@@ -206,10 +209,10 @@ export default {
result.data.list = result.data.list.map((item) => { result.data.list = result.data.list.map((item) => {
return { return {
...item, ...item,
custNm: this.fromHtmlEntities(item.custNm) custNm: this.fromHtmlEntities(item.custNm),
} };
}); });
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == '0000') {
return result.data; return result.data;
} else { } else {
return false; return false;
@@ -232,24 +235,24 @@ export default {
const data = await this.getExcelDataDown(); const data = await this.getExcelDataDown();
let options = { let options = {
header: this.excelHeader, header: this.excelHeader,
dataOrder: 'header' dataOrder: 'header',
}; };
xlsx.export(data.list, saveFileName, options).then(() => { xlsx.export(data.list, saveFileName, options).then(() => {});
});
}, },
getExcelHeader() { getExcelHeader() {
// 헤더를 mockup으로 관리한다. // 헤더를 mockup으로 관리한다.
channelMgtApi.getExcelHeader(this.pageType).then(res => { channelMgtApi.getExcelHeader(this.pageType).then((res) => {
this.excelHeader = res; this.excelHeader = res;
}); });
}, },
setCodeData() { setCodeData() {
// 상태 옵션 셋팅. // 상태 옵션 셋팅.
api.commCode({'grpCd': 'TMPLT_STTUS_CD'}).then(response => { api.commCode({ grpCd: 'TMPLT_STTUS_CD' }).then((response) => {
this.statType = response.data.data.list; this.statType = response.data.data.list;
}); });
}, },
changePerPage: function () { // 페이지당 조회할 개수 changePerPage: function () {
// 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
@@ -261,15 +264,14 @@ export default {
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params,
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
} },
}; };
</script> </script>

View File

@@ -1,10 +1,9 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">청약정보조회</h3> <h3 class="title">청약고객관리</h3>
<p class="breadcrumb">고객관리 &gt; 청약정보조회 &gt; 청약고객관리</p> <p class="breadcrumb">고객관리 &gt; 청약고객관리 &gt; 청약고객관리</p>
</div> </div>
<div class="top_tab"> <div class="top_tab">
@@ -12,7 +11,7 @@
<a href="javascript:void(0);" @click="toMove('memberList')">회원관리</a> <a href="javascript:void(0);" @click="toMove('memberList')">회원관리</a>
</div> </div>
<!-- <div class="search_form">--> <!-- <div class="search_form">-->
<div class="search_wrap"> <div class="search_wrap">
<div class="group"> <div class="group">
<div class="input_box cal"> <div class="input_box cal">
@@ -26,8 +25,8 @@
v-model="startDate" v-model="startDate"
@selected="selectedStartDate(0)" @selected="selectedStartDate(0)"
@closed="closeDate('start')" @closed="closeDate('start')"
></vuejs-datepicker> ></vuejs-datepicker> </span
</span>~ >~
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
@@ -73,29 +72,36 @@
</select> </select>
</div> </div>
<div class="input_box"> <div class="input_box">
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.searchText1" <input
maxlength="100" @keyup.enter="search"/> class="search-box"
type="text"
id="search"
placeholder="검색어 입력"
v-model.trim="grid.params.searchText1"
maxlength="100"
@keyup.enter="search"
/>
</div> </div>
<button type="button" class="button grey" @click="search">조회</button> <button type="button" class="button grey" @click="search">조회</button>
</div> </div>
</div> </div>
<!-- </div>--> <!-- </div>-->
<div class="info"> <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"> <div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()"> <select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ <option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">
option.text {{ option.text }}
}}
</option> </option>
</select> </select>
</div> </div>
</div> </div>
<div class="button_group"> <div class="button_group">
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button> <button type="button" class="button blue download" @click="excelDown()">엑셀 다운로드</button>
</div> </div>
</div> </div>
<div class="table"> <div class="table">
<custom-grid <custom-grid
@@ -114,7 +120,6 @@
</div> </div>
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commmonModal"></common-modal>
</div> </div>
</div> </div>
</template> </template>
@@ -123,9 +128,9 @@
import customGrid from '@/components/CustomGrid'; import customGrid from '@/components/CustomGrid';
import moment from 'moment'; import moment from 'moment';
import api from '@/service/api.js'; import api from '@/service/api.js';
import custMgtApi from "../service/custMgtApi.js"; import custMgtApi from '../service/custMgtApi.js';
import xlsx from '@/common/excel'; import xlsx from '@/common/excel';
import commonModal from "@/components/modal/commonModal"; import commonModal from '@/components/modal/commonModal';
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
@@ -133,7 +138,7 @@ class CustomATagRenderer {
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText = String(props.colValue) el.innerText = String(props.colValue);
this.el = el; this.el = el;
} }
@@ -142,8 +147,8 @@ class CustomATagRenderer {
} }
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener('click', () => {
const {callback} = this.props["cgrido" + this.props.colName].options; const { callback } = this.props['cgrido' + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
@@ -171,9 +176,9 @@ export default {
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
options: [ options: [
{text: '20', value: 20}, { text: '20', value: 20 },
{text: '50', value: 50}, { text: '50', value: 50 },
{text: '100', value: 100} { text: '100', value: 100 },
], ],
totalItems: 0, totalItems: 0,
grid: { grid: {
@@ -185,22 +190,26 @@ export default {
addCls: 'box_OFvis', addCls: 'box_OFvis',
columns: [ columns: [
{name: 'no', header: 'No', align: 'center', width: '4%'}, { name: 'no', header: 'No', align: 'center', width: '4%' },
{ {
name: 'serviceId', header: '서비스 ID\n(관리자 ID)', align: 'center', width: '12%', renderer: { name: 'serviceId',
type: CustomATagRenderer header: '서비스 ID\n(관리자 ID)',
, options: { align: 'center',
width: '12%',
renderer: {
type: CustomATagRenderer,
options: {
callback: this.custDetail, callback: this.custDetail,
}
}
}, },
{name: 'custNm', header: '고객사명', align: 'center', width: '12%'}, },
{name: 'regNo', header: '가입번호', align: 'center', width: '12%'}, },
{name: 'regDt', header: '가입일', align: 'center', width: '12%', cls: 'td_line'}, { name: 'custNm', header: '고객사명', align: 'center', width: '12%' },
{name: 'stat', header: '상태', align: 'center', width: '12%'}, { name: 'regNo', header: '가입번호', align: 'center', width: '12%' },
{name: 'channel', header: '유치채널', align: 'center', width: '12%'}, { name: 'regDt', header: '가입일', align: 'center', width: '12%', cls: 'td_line' },
{name: 'plan', header: '요금제', align: 'center', width: '12%'}, { name: 'stat', header: '상태', align: 'center', width: '12%' },
{name: 'carryOver', header: '이월누적금액', align: 'center', width: '12%'} { name: 'channel', header: '유치채널', align: 'center', width: '12%' },
{ name: 'plan', header: '요금제', align: 'center', width: '12%' },
{ name: 'carryOver', header: '이월누적금액', align: 'center', width: '12%' },
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
@@ -209,10 +218,10 @@ export default {
searchType3: '', searchType3: '',
searchText1: '', searchText1: '',
startDt: '', startDt: '',
endDt: '' endDt: '',
},
excelHeader: [],
}, },
excelHeader: []
}
}; };
}, },
components: { components: {
@@ -221,11 +230,9 @@ export default {
vuejsDatepicker, vuejsDatepicker,
}, },
created() { created() {
this.setCodeData(); this.setCodeData();
this.getExcelHeader(); this.getExcelHeader();
this.setPeriodDay(0); this.setPeriodDay(0);
}, },
destroyed() { destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
@@ -237,10 +244,9 @@ export default {
searchType3: '', searchType3: '',
searchText1: '', searchText1: '',
startDt: '', startDt: '',
endDt: '' endDt: '',
} },
}); });
}, },
mounted() { mounted() {
// 달력 세팅 // 달력 세팅
@@ -260,12 +266,11 @@ export default {
this.search(isKeep); this.search(isKeep);
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params,
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
@@ -275,21 +280,22 @@ export default {
this.grid.params.startDt = moment(this.startDate).format('YYYYMMDD'); this.grid.params.startDt = moment(this.startDate).format('YYYYMMDD');
this.grid.params.endDt = moment(this.endDate).format('YYYYMMDD'); this.grid.params.endDt = moment(this.endDate).format('YYYYMMDD');
this.grid.params.searchType1 = this.searchType1 this.grid.params.searchType1 = this.searchType1;
this.grid.params.searchType2 = this.searchType2 this.grid.params.searchType2 = this.searchType2;
this.grid.params.searchType3 = this.searchType3 this.grid.params.searchType3 = this.searchType3;
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
toMove(routeName) { toMove(routeName) {
this.$router.push({name: routeName, params: {page: 1, searchText: ''}}); this.$router.push({ name: routeName, params: { page: 1, searchText: '' } });
}, },
custDetail(props) { custDetail(props) {
this.row.serviceId = props.serviceId; this.row.serviceId = props.serviceId;
this.$router.push({name: 'subsDetail', params: this.row}); this.$router.push({ name: 'subsDetail', params: this.row });
}, },
changePerPage: function () { // 페이지당 조회할 개수 changePerPage: function () {
// 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
@@ -298,18 +304,18 @@ export default {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params,
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
}, },
setCodeData() { setCodeData() {
// 상태 옵션 셋팅. // 상태 옵션 셋팅.
api.commCode({'grpCd': 'SUBS_STTUS_CD'}).then(response => { api.commCode({ grpCd: 'SUBS_STTUS_CD' }).then((response) => {
this.statType = response.data.data.list; this.statType = response.data.data.list;
}); });
// //
api.commCode({'grpCd': 'SVCUSER_TP_CD'}).then(response => { api.commCode({ grpCd: 'SVCUSER_TP_CD' }).then((response) => {
this.userType = response.data.data.list; this.userType = response.data.data.list;
}); });
}, },
@@ -322,7 +328,7 @@ export default {
searchType1: this.grid.params.searchType1, searchType1: this.grid.params.searchType1,
searchType2: this.grid.params.searchType2, searchType2: this.grid.params.searchType2,
searchType3: this.grid.params.searchType3, searchType3: this.grid.params.searchType3,
searchText1: this.grid.params.searchText1 searchText1: this.grid.params.searchText1,
}; };
response = await custMgtApi.subsListExcel(params); response = await custMgtApi.subsListExcel(params);
@@ -332,10 +338,10 @@ export default {
result.data.list = result.data.list.map((item) => { result.data.list = result.data.list.map((item) => {
return { return {
...item, ...item,
custNm: this.fromHtmlEntities(item.custNm) custNm: this.fromHtmlEntities(item.custNm),
} };
}); });
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == '0000') {
return result.data; return result.data;
} else { } else {
return false; return false;
@@ -365,14 +371,13 @@ export default {
let options = { let options = {
header: this.excelHeader, header: this.excelHeader,
dataOrder: 'header' dataOrder: 'header',
}; };
xlsx.export(data.list, saveFileName, options).then(() => { xlsx.export(data.list, saveFileName, options).then(() => {});
});
}, },
getExcelHeader() { getExcelHeader() {
// 헤더를 mockup으로 관리한다. // 헤더를 mockup으로 관리한다.
custMgtApi.getExcelHeader(this.pageType).then(res => { custMgtApi.getExcelHeader(this.pageType).then((res) => {
this.excelHeader = res; this.excelHeader = res;
}); });
}, },
@@ -392,7 +397,6 @@ export default {
if (this.startDate > this.endDate) { if (this.startDate > this.endDate) {
this.startDate = this.endDate; this.startDate = this.endDate;
} }
}, },
selectedEndDate(day) { selectedEndDate(day) {
if (day != undefined && day != null) { if (day != undefined && day != null) {
@@ -402,11 +406,11 @@ export default {
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
if (type == 'start') { if (type == 'start') {
this.disabledSDate = {from: this.endDate}; this.disabledSDate = { from: this.endDate };
this.disabledEDate = {to: this.startDate, from: this.endDate}; this.disabledEDate = { to: this.startDate, from: this.endDate };
} else if (type == 'end') { } else if (type == 'end') {
this.disabledSDate = {from: this.endDate}; this.disabledSDate = { from: this.endDate };
this.disabledEDate = {to: this.startDate, from: new Date()}; this.disabledEDate = { to: this.startDate, from: new Date() };
} }
} }
}, },

View File

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

View File

@@ -3,7 +3,7 @@
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">관리자/유치채널 관리</h3> <h3 class="title">관리자/유치채널 관리</h3>
<p class="breadcrumb">시스템관리 &gt; 관리자/유치채널 관리</p> <p class="breadcrumb">운영 관리 &gt; 관리자/유치채널 관리</p>
</div> </div>
<div class="search_wrap"> <div class="search_wrap">
<div class="select_box"> <div class="select_box">
@@ -26,22 +26,43 @@
</div> </div>
<div class="input_box id"> <div class="input_box id">
<label for="id1" class="label">ID</label> <label for="id1" class="label">ID</label>
<input class="search-box" type="text" id="id1" placeholder="검색어 입력" v-model.trim="grid.params.searchText1" <input
@keyup.enter="search" :readonly="!isFocused" @focus="isFocused = true" @blur="isFocused = false"/> class="search-box"
type="text"
id="id1"
placeholder="검색어 입력"
v-model.trim="grid.params.searchText1"
@keyup.enter="search"
:readonly="!isFocused"
@focus="isFocused = true"
@blur="isFocused = false"
/>
</div> </div>
<div class="input_box"> <div class="input_box">
<label for="name" class="label">이름(대리점명)</label> <label for="name" class="label">이름(대리점명)</label>
<input class="search-box" type="text" id="name" placeholder="검색어 입력" v-model.trim="grid.params.searchText2" <input
@keyup.enter="search" :readonly="!isFocused" @focus="isFocused = true" @blur="isFocused = false"/> class="search-box"
type="text"
id="name"
placeholder="검색어 입력"
v-model.trim="grid.params.searchText2"
@keyup.enter="search"
:readonly="!isFocused"
@focus="isFocused = true"
@blur="isFocused = false"
/>
</div> </div>
<button type="button" class="button grey" @click="search">조회</button> <button type="button" class="button grey" @click="search">조회</button>
</div> </div>
<div class="info"> <div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span></div> <div class="count">
<span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span
>
</div>
<div class="button_group"> <div class="button_group">
<button type="button" class="button blue admin add" @click="adminRegPopOpen();">관리자 등록</button> <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 blue channel add" @click="adminReg2PopOpen()">유치채널 등록</button>
<button type="button" class="button white delete del" @click="rowDelete();">삭제</button> <button type="button" class="button white delete del" @click="rowDelete()">삭제</button>
</div> </div>
</div> </div>
<div class="table"> <div class="table">
@@ -69,11 +90,10 @@
<script> <script>
import customGrid from '@/components/CustomGrid'; import customGrid from '@/components/CustomGrid';
import AdminRegPop from '../components/AdminRegPop'; import AdminRegPop from '../components/AdminRegPop';
import commonModal from "@/components/modal/commonModal"; import commonModal from '@/components/modal/commonModal';
import AdminDetailPop from '../components/AdminDetailPop'; import AdminDetailPop from '../components/AdminDetailPop';
import api from '@/service/api.js'; import api from '@/service/api.js';
import sysMgtApi from "../service/sysMgtApi.js"; import sysMgtApi from '../service/sysMgtApi.js';
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
@@ -81,7 +101,7 @@ class CustomATagRenderer {
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText = String(props.colValue) el.innerText = String(props.colValue);
this.el = el; this.el = el;
} }
@@ -90,8 +110,8 @@ class CustomATagRenderer {
} }
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener('click', () => {
const {callback} = this.props["cgrido" + this.props.colName].options; const { callback } = this.props['cgrido' + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
@@ -105,7 +125,7 @@ export default {
row: {}, row: {},
authType: [], authType: [],
statType: [], statType: [],
cate2Code: "", cate2Code: '',
totalItems: 0, totalItems: 0,
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 20, perPageCnt: 20,
@@ -120,29 +140,33 @@ export default {
addCls: 'box_OFvis', addCls: 'box_OFvis',
columns: [ columns: [
{name: 'no', header: 'No', align: 'center', width: '6%'}, { name: 'no', header: 'No', align: 'center', width: '6%' },
{name: 'auth', header: '권한', align: 'center', width: '18%'}, { name: 'auth', header: '권한', align: 'center', width: '18%' },
{name: 'name', header: '이름(대리점명)', align: 'center', width: '18%'}, { name: 'name', header: '이름(대리점명)', align: 'center', width: '18%' },
{ {
name: 'adminId', header: 'ID', align: 'center', width: '18%', renderer: { name: 'adminId',
type: CustomATagRenderer header: 'ID',
, options: { align: 'center',
width: '18%',
renderer: {
type: CustomATagRenderer,
options: {
callback: this.detailPop, callback: this.detailPop,
}
}
}, },
{name: 'adminStat', header: '상태', align: 'center', width: '18%', cls: 'td_line'}, },
{name: 'regDt', header: '등록일', align: 'center', width: '18%'} },
{ name: 'adminStat', header: '상태', align: 'center', width: '18%', cls: 'td_line' },
{ name: 'regDt', header: '등록일', align: 'center', width: '18%' },
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
searchText1: '', searchText1: '',
searchText2: '' searchText2: '',
},
excelHeader: [],
}, },
excelHeader: []
}
}; };
}, },
components: { components: {
@@ -157,9 +181,7 @@ export default {
//let cont = document.querySelector(".wrap"); //let cont = document.querySelector(".wrap");
//cont.classList.add("main_wrap"); //cont.classList.add("main_wrap");
}, },
destroyed() { destroyed() {},
},
mounted() { mounted() {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
@@ -173,29 +195,26 @@ export default {
isKeep = true; isKeep = true;
} }
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function (isKeep) { search: function (isKeep) {
this.grid.params.searchType1 = this.searchType1 this.grid.params.searchType1 = this.searchType1;
this.grid.params.searchType2 = this.searchType2 this.grid.params.searchType2 = this.searchType2;
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
detailPop(props) { detailPop(props) {
this.$refs.adminDetailModal.adminDetailModalOpen(props); this.$refs.adminDetailModal.adminDetailModalOpen(props);
}, },
ModalOpen: function (target) { ModalOpen: function (target) {},
},
adminRegPopOpen: function () { adminRegPopOpen: function () {
this.$refs.adminRegModal.ModalOpen(1); this.$refs.adminRegModal.ModalOpen(1);
}, },
adminReg2PopOpen: function () { adminReg2PopOpen: function () {
this.$refs.adminRegModal.ModalOpen(2); this.$refs.adminRegModal.ModalOpen(2);
}, },
doValidate() { //로우데이터 삭제하도록 수정 doValidate() {
//로우데이터 삭제하도록 수정
if (this.totalItems == 0) { if (this.totalItems == 0) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
@@ -211,7 +230,7 @@ export default {
return false; return false;
} }
const param = chkList.map((row) => ({adminId: row.adminId})); const param = chkList.map((row) => ({ adminId: row.adminId }));
this.row.list = param; this.row.list = param;
return true; return true;
}, },
@@ -220,7 +239,7 @@ export default {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params,
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
@@ -228,27 +247,23 @@ export default {
async setCodeData() { async setCodeData() {
// 상태 // 상태
try { try {
const res = await api.commCode({'grpCd': 'ADM_STTUS_CD'}); const res = await api.commCode({ grpCd: 'ADM_STTUS_CD' });
if(res.data.retCode == '0000'){ if (res.data.retCode == '0000') {
this.statType = res.data.data.list; this.statType = res.data.data.list;
} }
}catch(err){ } catch (err) {}
}
// 권한 // 권한
try { try {
const response = await api.commAuth(); const response = await api.commAuth();
if(response.data.retCode == '0000'){ if (response.data.retCode == '0000') {
this.authType = response.data.data.list; this.authType = response.data.data.list;
} }
}catch(err){ } catch (err) {}
}
}, },
rowDelete() { rowDelete() {
if (this.doValidate()) { if (this.doValidate()) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '삭제 하시겠습니까?' this.row.msg1 = '삭제 하시겠습니까?';
this.$refs.commmonModal.confirmModalOpen2(this.row); this.$refs.commmonModal.confirmModalOpen2(this.row);
} }
}, },
@@ -256,7 +271,7 @@ export default {
try { try {
let response = await sysMgtApi.deleteAdmin(this.row); let response = await sysMgtApi.deleteAdmin(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == '0000') {
this.$refs.table.reloadData(); this.$refs.table.reloadData();
return; return;
} }
@@ -277,15 +292,14 @@ export default {
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params,
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
} },
}; };
</script> </script>

View File

@@ -3,10 +3,13 @@
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">권한 관리</h3> <h3 class="title">권한 관리</h3>
<p class="breadcrumb">시스템관리 &gt; 권한 관리</p> <p class="breadcrumb">운영 관리 &gt; 권한 관리</p>
</div> </div>
<div class="info"> <div class="info">
<div class="count"> <span>{{ totalCnt }}</span></div> <div class="count">
<span>{{ totalCnt }}</span
>
</div>
<div class="button_group"> <div class="button_group">
<button type="button" class="button blue add" @click="insertAuth()">권한 추가</button> <button type="button" class="button blue add" @click="insertAuth()">권한 추가</button>
</div> </div>
@@ -14,12 +17,12 @@
<div class="table"> <div class="table">
<table> <table>
<colgroup> <colgroup>
<col width="10%"/> <col width="10%" />
<col width="20%"/> <col width="20%" />
<col width="20%"/> <col width="20%" />
<col width="15%"/> <col width="15%" />
<col width="20%"/> <col width="20%" />
<col width="15%"/> <col width="15%" />
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
@@ -38,8 +41,7 @@
<td>{{ option.authNm }}</td> <td>{{ option.authNm }}</td>
<td>{{ option.authStat }}</td> <td>{{ option.authStat }}</td>
<td>{{ option.regDt }}</td> <td>{{ option.regDt }}</td>
<td v-if="option.authCd === '1001' || option.authCd === '1002'" class="two_btn_group"> <td v-if="option.authCd === '1001' || option.authCd === '1002'" class="two_btn_group"></td>
</td>
<td v-else class="two_btn_group"> <td v-else class="two_btn_group">
<button type="button" class="button grey" @click="updateAuth(option.authCd)">수정</button> <button type="button" class="button grey" @click="updateAuth(option.authCd)">수정</button>
<button type="button" class="button white delete" @click="authDelete(option.authCd)">삭제</button> <button type="button" class="button white delete" @click="authDelete(option.authCd)">삭제</button>
@@ -54,8 +56,8 @@
</template> </template>
<script> <script>
import sysMgtApi from "../service/sysMgtApi.js"; import sysMgtApi from '../service/sysMgtApi.js';
import commonModal from "@/components/modal/commonModal"; import commonModal from '@/components/modal/commonModal';
export default { export default {
name: 'authList', name: 'authList',
@@ -72,23 +74,19 @@ export default {
created() { created() {
this.getAuthList(); this.getAuthList();
}, },
destroyed() { destroyed() {},
mounted() {},
},
mounted() {
},
methods: { methods: {
async getAuthList() { async getAuthList() {
try { try {
const response = await sysMgtApi.authList(this.row); const response = await sysMgtApi.authList(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == '0000') {
this.list = result.data.list; this.list = result.data.list;
this.totalCnt = result.data.list.length; this.totalCnt = result.data.list.length;
} else { } else {
this.row.title = '권한 관리'; this.row.title = '권한 관리';
this.row.msg1 = '조회정보가 없습니다.' this.row.msg1 = '조회정보가 없습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} }
} catch (err) { } catch (err) {
@@ -98,31 +96,31 @@ export default {
} }
}, },
insertAuth() { insertAuth() {
this.$router.push({name: 'authAdd'}); this.$router.push({ name: 'authAdd' });
}, },
updateAuth(target) { updateAuth(target) {
this.$router.push({name: 'authModify', params: {targetAuthCd: target}}); this.$router.push({ name: 'authModify', params: { targetAuthCd: target } });
}, },
authDelete(target) { authDelete(target) {
this.row.authCd = target; this.row.authCd = target;
this.row.title = '권한 관리'; this.row.title = '권한 관리';
this.row.msg1 = '삭제 하시겠습니까?' this.row.msg1 = '삭제 하시겠습니까?';
this.$refs.commmonModal.confirmModalOpen2(this.row); this.$refs.commmonModal.confirmModalOpen2(this.row);
}, },
async deleteAuth() { async deleteAuth() {
try { try {
let response = await sysMgtApi.deleteAuth(this.row); let response = await sysMgtApi.deleteAuth(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == '0000') {
this.getAuthList(); this.getAuthList();
return; return;
}else if(result != null && result.retCode == "4020"){ } else if (result != null && result.retCode == '4020') {
this.row = {} this.row = {};
this.row.title = '권한 관리'; this.row.title = '권한 관리';
this.row.msg1 = '해당 권한에 매핑된 사용자가 있습니다.'; this.row.msg1 = '해당 권한에 매핑된 사용자가 있습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} else { } else {
this.row = {} this.row = {};
this.row.title = '권한 관리'; this.row.title = '권한 관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
@@ -139,6 +137,6 @@ export default {
this.deleteAuth(); this.deleteAuth();
} }
}, },
} },
}; };
</script> </script>

View File

@@ -1,18 +1,12 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">배치 모니터링</h3> <h3 class="title">배치 모니터링</h3>
<p class="breadcrumb">모니터링 &gt; 배치 모니터링</p> <p class="breadcrumb">운영 관리 &gt; 배치 모니터링</p>
</div> </div>
<div class= "table"> <div class="table">
<custom-grid <custom-grid ref="table" :url="grid.url" :columns="grid.columns"></custom-grid>
ref="table"
:url="grid.url"
:columns="grid.columns"
></custom-grid>
</div> </div>
</div> </div>
</div> </div>
@@ -27,7 +21,7 @@ class CustomATagRenderer {
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText = String(props.colValue) el.innerText = String(props.colValue);
this.el = el; this.el = el;
} }
@@ -36,8 +30,8 @@ class CustomATagRenderer {
} }
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener('click', () => {
const {callback} = this.props["cgrido" + this.props.colName].options; const { callback } = this.props['cgrido' + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
@@ -53,33 +47,38 @@ export default {
url: '/api/v1/bo/sysMgt/batchList', url: '/api/v1/bo/sysMgt/batchList',
header: [ header: [
[ [
{header: '배치ID', childNames: {}}, { header: '배치ID', childNames: {} },
{header: '배치명', childNames: {}}, { header: '배치명', childNames: {} },
] ],
], ],
columns: [ columns: [
{name: 'batchType', header: '배치유형', align: 'center', width: '4%'}, { name: 'batchType', header: '배치유형', align: 'center', width: '4%' },
{name: 'batchId', header:'배치ID', align:'center', width:'10%'}, { name: 'batchId', header: '배치ID', align: 'center', width: '10%' },
{ {
name: 'batchNm', header:'배치명',align:'left', width:'15%', renderer: { name: 'batchNm',
type: CustomATagRenderer header: '배치명',
, options: { align: 'left',
width: '15%',
renderer: {
type: CustomATagRenderer,
options: {
callback: this.batchDetail, callback: this.batchDetail,
} },
}}, },
{name: 'batchCycle', header:'실행일자',align:'center', width:'7%'}, },
{name: 'batchTime', header:'실행시간',align:'center', width:'6%'}, { name: 'batchCycle', header: '실행일자', align: 'center', width: '7%' },
{name: 'regDt', header:'배치 수행시간',align:'center', width:'13%'}, { name: 'batchTime', header: '행시간', align: 'center', width: '6%' },
{name: 'sttusCd', header:'상태',align:'center', width:'5%'}, { name: 'regDt', header: '배치 수행시간', align: 'center', width: '13%' },
{name: 'errMsg', header:'메시지',align:'left', width:'40%'} { name: 'sttusCd', header: '상태', align: 'center', width: '5%' },
] { name: 'errMsg', header: '메시지', align: 'left', width: '40%' },
} ],
},
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
}, },
created(){ created() {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
}, },
destroyed() { destroyed() {
@@ -89,21 +88,20 @@ export default {
perPage: 50, perPage: 50,
params: { params: {
startDt: '', startDt: '',
endDt: '' endDt: '',
} },
}); });
}, },
mounted(){ mounted() {
let page = 1; let page = 1;
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
let isKeep = false; let isKeep = false;
if(getCondition){ if (getCondition) {
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
isKeep = true; isKeep = true;
} }
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
@@ -111,23 +109,20 @@ export default {
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
batchDetail(props){ batchDetail(props) {
this.row.batchId = props.batchId; this.row.batchId = props.batchId;
this.$router.push({path: `/sysMgt/batchDetail/${props.batchId}`, params: this.row}); this.$router.push({ path: `/sysMgt/batchDetail/${props.batchId}`, params: this.row });
}, },
sendStoreData: function () { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params,
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
}, },
}, },
}; };
</script> </script>