유치채널관리 수정 / 정산관리 추가,수정 / 채널관리 수정 / 고객관리 수정 / 모니터링 추가 / 리스크관리 수정 / 발신번호관리

추가,수정 / 서비스관리 수정 / 발송통계 수정
This commit is contained in:
kimre
2022-07-06 16:00:09 +09:00
parent 7cdea9e61a
commit 3d05b45299
113 changed files with 6261 additions and 5039 deletions

View File

@@ -1,19 +1,19 @@
import SendList from '../views/SendList'
import LiveSendSttus from '../views/LiveSendSttus'
export default [
{
path: '/mntrng/sendList',
component: SendList,
name: 'sendList',
meta: { public: true }
},
{
path: '/mntrng/liveSendSttus',
component: LiveSendSttus,
name: 'liveSendSttus',
meta: { public: true }
},
]
import SendList from '../views/SendList'
import LiveSendSttus from '../views/LiveSendSttus'
export default [
{
path: '/mntrng/sendList',
component: SendList,
name: 'sendList',
meta: { public: true }
},
{
path: '/mntrng/liveSendSttus',
component: LiveSendSttus,
name: 'liveSendSttus',
meta: { public: true }
},
]

View File

@@ -0,0 +1,353 @@
import lodash from "lodash";
const utils_mixin = {
methods:{
/** * 이메일 형식 체크 * * @param 데이터 */
emailCheck(email,rtnArrYn) {
if(this.isNull(rtnArrYn)){
rtnArrYn='N';
}
// var regExp = /(^[A-Za-z0-9_\.\-]+)@([A-Za-z0-9\-]+\.[A-Za-z0-9\-]+)/;
var regExp = /^([0-9a-zA-Z_\.\-]([-_.]?[0-9a-zA-Z_\.\-])*)@([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$)/i;//이메일 정규식
if(regExp.test(email) == false) {
// 이메일 형식이 알파벳+숫자@알파벳+숫자.알파벳+숫자 형식이 아닐경우
if(rtnArrYn == 'Y'){
return email;
}
return false;
}else{
var myArray = regExp.exec(email);
if(rtnArrYn == 'Y'){
return myArray;
}
return true;
}
},
/** * 전화번호 포맷으로 변환 * * @param 데이터 */
formatPhone(phoneNum,fmt,rtnArrYn) {
if(this.isNull(fmt)){
fmt='';
}
if(this.isNull(rtnArrYn)){
fmt='N';
}
if(this.isPhone(phoneNum)) {
var rtnNum;
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt + myArray[2]+fmt+myArray[3];
if(rtnArrYn == 'Y'){
return myArray;
}
return rtnNum;
} else {
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3];
if(rtnArrYn == 'Y'){
return myArray;
}
return rtnNum;
} else {
return phoneNum;
}
}
} else {
return phoneNum;
}
},
/** * 핸드폰번호 포맷으로 변환 * * @param 데이터 */
formatMobile(phoneNum,fmt,rtnArrYn) {
if(this.isNull(fmt)){
fmt='';
}
if(this.isNull(rtnArrYn)){
fmt='N';
}
if(this.isMobile(phoneNum)) {
var rtnNum;
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3];
if(rtnArrYn == 'Y'){
return myArray;
}
return rtnNum;
} else {
return phoneNum;
}
} else {
return phoneNum;
}
},
/** * 전화번호 형식 체크 * * @param 데이터 */
isPhone(phoneNum) {
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){
return true;
} else {
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){
return true;
} else {
return false;
}
}
},
/** * 핸드폰번호 형식 체크 * * @param 데이터 */
isMobile(phoneNum) {
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
return true;
} else {
return false;
}
},
isMobile2(phoneNum) {
var regExp =/(1[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
return true;
} else {
return false;
}
},
isNull(obj){
if(lodash.isNil(obj) || lodash.trim(obj) == ''){
return true;
}
return false;
},
getParent(name){
let p = this.$parent;
while(typeof p !== 'undefined'){
if(p.$options.name == name) {
return p;
}else {
p = p.$parent;
}
}
return false;
},
getJsonObj(str){
return JSON.parse(JSON.stringify(str));
},
}
};
var chkPattern2 = {
data: function () {
return {
}
},
methods: {
selSesStorage(keyLike){
if(this.isNull(keyLike)){
return null;
}
if(sessionStorage.length > 0){
let keyList = [];
for(let i=0;i<sessionStorage.length;i++){
const keyNm = sessionStorage.key(i);
if(keyNm.indexOf(keyLike) > -1){
keyList.push({name : keyNm, value : sessionStorage.getItem(keyNm)});
}
}
if(keyList.length > 0){
return keyList;
}
return null;
}
return null;
},
delSesStorage(keyList){
if(this.isNull(keyList)){
return null;
}
if(keyList.length > 0){
keyList.map((o) => (sessionStorage.removeItem(o.name)));
return true;
}
},
setGridMouseDownActive(){
const ele = document.querySelector(`div.tui-grid-container.tui-grid-show-lside-area`);
if(window.getEventListeners(ele).mousedown){
ele.removeEventListener('mousedown',window.getEventListeners(ele).mousedown[0].listener);
}
},
restrictChars : function($event,regExp,hanYn){
if(this.isNull(hanYn)){
hanYn='N';
}
if(hanYn === 'N' && $event.type === 'keydown'){
if($event.keyCode === 229){
$event.preventDefault();
return false;
}
}
if($event.type === 'keypress'){
//한글 처리 불가
if(regExp.test(String.fromCharCode($event.charCode))) {
return true;
}else{
$event.preventDefault();
return false;
}
}
if(hanYn === 'N' && ( $event.type === 'keyup' || $event.type === 'input' || $event.type === 'change' || $event.type === 'blur')){
$event.target.value = $event.target.value.replace(/[ㄱ-ㅎㅏ-ㅣ가-힣]/g,'');
$event.preventDefault();
return false;
}
return true;
},
setLenth: function (e, len) {
this.cut(e, len);
},
onlyCustom: function (e,strRegExp,hanYn) {
var regExp_g = new RegExp(strRegExp,'g');
this.cut(e);
return this.restrictChars(e,regExp_g,hanYn);
},
onlyCommon: function(strRegExp, e, len, isEventCall, hanYn) {
var regExp_g = new RegExp(strRegExp,'g');
if(isEventCall === 'N'){
if(!this.cut(e, len, isEventCall)){
return false;
}
if(!regExp_g.test(e.value)){
return false;
}
return true;
}
this.cut(e, len);
return this.restrictChars(e,regExp_g,hanYn);
},
onlyNum: function (e, len, isEventCall) {
var strRegExp = '^[0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyEng: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyLowerEng: function (e, len, isEventCall) {
var strRegExp = '^[a-z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyUpperEng: function (e, len, isEventCall) {
var strRegExp = '^[A-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyEmail: function (e, len, isEventCall) {
var strRegExp = '^[a-zA-Z0-9_\.\-@._-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyName: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyTitle: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyText: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyPassword: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9!@#$%^&*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyId: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9_\.\-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyIp: function (e, len, isEventCall) {
var strRegExp = '^[0-9,.*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyRoleNm_Space: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyRoleId_UnderBar: function (e, len, isEventCall) {
var strRegExp = '^[a-zA-Z0-9_]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
cut: function (ele, len, isValidChk) {
let e=ele;
if (typeof ele.target != "undefined") {
e=ele.target;
}
let max = this.isNull(len) ? e.attributes.maxlength.value : len;
let str = e.value;
if (this.bytes(str) > max) {
if(this.isNull(isValidChk)){
e.value = this.cutBytes(str, max);
}
return false;
}
return true;
},
cutBytes: function (str, len) {
while(1 === 1){
if(this.bytes(str) <= len){
return str;
}
str = str.slice(0,-1);
}
},
bytes: function (str) {
var length = ((s,b,i,c) => {
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); // 한글 3바이트
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?1:1); //한글 2바이트
b=0,i=0;
while(1 === 1){
c = s.charCodeAt(i++);
if (isNaN(c)) {
break;
}
b += c >> 11 ? 2 : c >> 7 ? 1 : 1;
}
return b
})(str);
return length;
},
checkPhone: function(str) {
str = str.replace(/[-\s]+/g, '');
if (str.charAt(0)!="0"){
str = "0"+str;
}
if (str.length<10||str.length>12){return "";}
if (isNaN(str)){return ""; }
if (str.substr(0,2)!="01" && str.substr(0,3)!="070" && str.substr(0,4)!="0505" && str.substr(0,4)!="0503"){return ""; }
return str;
},
}
};
export { utils_mixin, chkPattern2 };

View File

@@ -0,0 +1,16 @@
import httpClient from '@/common/http-client';
// HUBEZ_BO_API - 일별 통계 목록 조회.
const sendList = (params) => {
return httpClient.post('/api/v1/bo/mntrng/sendList', params, { withCredentials: false });
}
// HUBEZ_BO_API - 월별 통계 목록 조회.
const liveSendSttus = (params) => {
return httpClient.post('/api/v1/bo/mntrng/liveSendSttus', params, { withCredentials: false });
}
export default {
sendList,
liveSendSttus,
}

View File

@@ -1,165 +1,322 @@
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">실시간 발송 현황 정보 조회</h3>
<p class="breadcrumb">시스템관리 &gt; 관리자/유치채널 관리</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">
<option value="전체">전체</option>
<option value="대리점">대리점</option>
<option value="운영자">운영자</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">상태</label>
<select name="" id="right">
<option value="전체">전체</option>
<option value="사용">사용</option>
<option value="중지">중지</option>
</select>
</div>
<div class="input_box id">
<label for="id1" class="label">ID</label>
<input type="text" id="id1" placeholder="검색어 입력"/>
</div>
<div class="input_box">
<label for="name" class="label">이름(대리점명)</label>
<input type="text" id="name" placeholder="검색어 입력"/>
</div>
<button type="button" class="button grey">조회</button>
</div>
</form>
<div class="info">
<div class="count"> <span>100</span></div>
<div class="button_group">
<button type="button" class="button blue admin">관리자 등록</button>
<button type="button" class="button blue channel">유지채널 등록</button>
<button type="button" class="button white delete">삭제</button>
</div>
</div>
<!-- <div class="table">
<table>
<colgroup>
<col width="5%"/>
<col width="15%"/>
<col width="15%"/>
<col width="20%"/>
<col width="20%"/>
<col width="5%"/>
<col width="20%"/>
</colgroup>
<thead>
<tr>
<th><input type="checkbox" id="admin_check1"><label for="admin_check1"></label></th>
<th>NO</th>
<th>권한</th>
<th>이름(대리점명)</th>
<th>ID</th>
<th>상태</th>
<th>등록일</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" checked id="admin_check2"><label for="admin_check2"></label></td>
<td>10</td>
<td>대리점</td>
<td>유플러스</td>
<td><a href="javascript:void(0)">uplus1</a></td>
<td>사용</td>
<td>2022-03-10</td>
</tr>
</tbody>
</table>
</div> -->
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="testList.url"
:perPage="testList.perPage"
:initialRequest="testList.initialRequest"
:pagination="testList.pagination"
:isCheckbox="testList.isCheckbox"
:columns="testList.columns"
:noDataStr="testList.noDataStr"
:addCls="testList.addCls"
:header="testList.header"
></custom-grid>
</div>
</div>
</div>
</template>
<script>
import customGrid from '@/components/CustomGrid';
//import api from '../service/api';
export default {
name: 'sendList',
data() {
return {
testList: {
url: '/api/v1/bo/sysMgt/adminList',
perPage: 20,
pagination: true,
isCheckbox: true,
initialRequest: false,
addCls: 'box_OFvis',
header: [
[
{ header: 'NO', childNames: [] },
{ header: '권한', childNames: [] },
{ header: '이름(대리점명)', childNames: [] },
{ header: 'ID', childNames: [] },
{ header: '상태', childNames: [] },
{ header: '등록일', childNames: [] }
]
],
columns: [
{ name: 'no', header: 'NO', align: 'center', width: 60 },
{ name: 'auth', header: '권한', align: 'left', width: 160 },
{ name: 'name', header: '이름(대리점명)', align: 'center', width: 130},
{ name: 'adminId', header: 'ID', align: 'center', width: 130},
{ name: 'adminStat', header: '상태', align: 'center', width: 130},
{ name: 'regDt', header: '등록일', width: 90, cls: 'td_line' }
],
noDataStr: '검색 결과가 없습니다.',
// params: {
// apprResult: '',
// searchType: '',
// searchText: '',
// startDate: '',
// endDate: ''
// },
excelHeader: []
}
};
},
components: {
customGrid: customGrid
},
destroyed() {
},
mounted() {
let isKeep = false;
isKeep = true;
this.search(isKeep);
},
methods: {
search: function(isKeep) {
console.log(this.testList.params);
this.$refs.table.search(this.testList.params, isKeep);
},
}
};
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">실시간발송현황</h3>
<p class="breadcrumb">모니터링 &gt; 실시간발송현황</p>
</div>
<div class="title_wrap">
<h3>발송집계</h3>
<div class="select_box NumberSe">
<p>자동갱신시간</p>
<select name="" id="" @change="switchSelect($event)" v-model="selectedKey">
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
</select>
</div>
</div>
<div class="info">
<div class="count">최근 10 발송 현황
<p>{{startTimeM}} ~ {{endTimeM}}</p></div>
</div>
<div class="table">
<table>
<colgroup>
<col width="25%"/>
<col width="25%"/>
<col width="25%"/>
<col width="25%"/>
</colgroup>
<thead>
<tr>
<th>채널</th>
<th>발송건수</th>
<th>성공건수</th>
<th>성공율</th>
</tr>
</thead>
<tbody>
<tr>
<td>SMS</td>
<td>{{ sendingCntSmsM }}</td>
<td>{{ succesCntSmsM }}</td>
<td>{{ succesRtSmsM }}%</td>
</tr>
<tr>
<td>LMS</td>
<td>{{ sendingCntLmsM }}</td>
<td>{{ succesCntLmsM }}</td>
<td>{{ succesRtLmsM }}%</td>
</tr>
<tr>
<td>MMS</td>
<td>{{ sendingCntMmsM }}</td>
<td>{{ succesCntMmsM }}</td>
<td>{{ succesRtMmsM }}%</td>
</tr>
<tr>
<td>알림톡</td>
<td>{{ sendingCntAlmtM }}</td>
<td>{{ succesCntAlmtM }}</td>
<td>{{ succesRtAlmtM }}%</td>
</tr>
</tbody>
</table>
</div>
<div class="info">
<div class="count">최근 1시간 발송 현황
<p>{{startTimeH}} ~ {{endTimeH}}</p></div>
</div>
<div class="table">
<table>
<colgroup>
<col width="25%"/>
<col width="25%"/>
<col width="25%"/>
<col width="25%"/>
</colgroup>
<thead>
<tr>
<th>채널</th>
<th>발송건수</th>
<th>성공건수</th>
<th>성공율</th>
</tr>
</thead>
<tbody>
<tr>
<td>SMS</td>
<td>{{ sendingCntSmsH }}</td>
<td>{{ succesCntSmsH }}</td>
<td>{{ succesRtSmsH }}%</td>
</tr>
<tr>
<td>LMS</td>
<td>{{ sendingCntLmsH }}</td>
<td>{{ succesCntLmsH }}</td>
<td>{{ succesRtLmsH }}%</td>
</tr>
<tr>
<td>MMS</td>
<td>{{ sendingCntMmsH }}</td>
<td>{{ succesCntMmsH }}</td>
<td>{{ succesRtMmsH }}%</td>
</tr>
<tr>
<td>알림톡</td>
<td>{{ sendingCntAlmtH }}</td>
<td>{{ succesCntAlmtH }}</td>
<td>{{ succesRtAlmtH }}%</td>
</tr>
</tbody>
</table>
</div>
<div class="info">
<div class="count">당일 발송 현황
<p>{{startTimeD}} ~ {{endTimeD}}</p></div>
</div>
<div class="table">
<table>
<colgroup>
<col width="25%"/>
<col width="25%"/>
<col width="25%"/>
<col width="25%"/>
</colgroup>
<thead>
<tr>
<th>채널</th>
<th>발송건수</th>
<th>성공건수</th>
<th>성공율</th>
</tr>
</thead>
<tbody>
<tr>
<td>SMS</td>
<td>{{ sendingCntSmsD }}</td>
<td>{{ succesCntSmsD }}</td>
<td>{{ succesRtSmsD }}%</td>
</tr>
<tr>
<td>LMS</td>
<td>{{ sendingCntLmsD }}</td>
<td>{{ succesCntLmsD }}</td>
<td>{{ succesRtLmsD }}%</td>
</tr>
<tr>
<td>MMS</td>
<td>{{ sendingCntMmsD }}</td>
<td>{{ succesCntMmsD }}</td>
<td>{{ succesRtMmsD }}%</td>
</tr>
<tr>
<td>알림톡</td>
<td>{{ sendingCntAlmtD }}</td>
<td>{{ succesCntAlmtD }}</td>
<td>{{ succesRtAlmtD }}%</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</template>
<script>
import customGrid from '@/components/CustomGrid';
import mntrngApi from "../service/mntrngApi.js";
//import api from '../service/api';
export default {
name: 'liveSendSttus',
data() {
return {
selectedKey:10,
timer: '',
startTimeM: '',
endTimeM: '',
sendingCntSmsM: '0',
succesCntSmsM: '0',
succesRtSmsM: '0',
sendingCntMmsM: '0',
succesCntMmsM: '0',
succesRtMmsM: '0',
sendingCntLmsM: '0',
succesCntLmsM: '0',
succesRtLmsM: '0',
sendingCntAlmtM: '0',
succesCntAlmtM: '0',
succesRtAlmtM: '0',
startTimeH: '',
endTimeH: '',
sendingCntSmsH: '0',
succesCntSmsH: '0',
succesRtSmsH: '0',
sendingCntMmsH: '0',
succesCntMmsH: '0',
succesRtMmsH: '0',
sendingCntLmsH: '0',
succesCntLmsH: '0',
succesRtLmsH: '0',
sendingCntAlmtH: '0',
succesCntAlmtH: '0',
succesRtAlmtH: '0',
startTimeD: '',
endTimeD: '',
sendingCntSmsD: '0',
succesCntSmsD: '0',
succesRtSmsD: '0',
sendingCntMmsD: '0',
succesCntMmsD: '0',
succesRtMmsD: '0',
sendingCntLmsD: '0',
succesCntLmsD: '0',
succesRtLmsD: '0',
sendingCntAlmtD: '0',
succesCntAlmtD: '0',
succesRtAlmtD: '0',
};
},
components: {
customGrid: customGrid
},
created(){
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", true);
this.getLiveSendSttus();
this.timer = setInterval(this.getLiveSendSttus, this.selectedKey * 1000 * 60)
},
beforeDestroy (){
clearInterval(this.timer)
},
destroyed() {
},
mounted() {
},
methods: {
async getLiveSendSttus(){
console.log('getLiveSendSttus Start');
try {
const response = await mntrngApi.liveSendSttus();
const result = response.data;
console.log(result);
if (result != null && result.retCode == "0000") {
this.startTimeM = result.data.startTimeM;
this.endTimeM = result.data.endTimeM;
this.sendingCntSmsM = result.data.sendingCntSmsM;
this.succesCntSmsM = result.data.succesCntSmsM;
this.succesRtSmsM = result.data.succesRtSmsM;
this.sendingCntMmsM = result.data.sendingCntMmsM;
this.succesCntMmsM = result.data.succesCntMmsM;
this.succesRtMmsM = result.data.succesRtMmsM;
this.sendingCntLmsM = result.data.sendingCntLmsM;
this.succesCntLmsM = result.data.succesCntLmsM;
this.succesRtLmsM = result.data.succesRtLmsM;
this.sendingCntAlmtM = result.data.sendingCntAlmtM;
this.succesCntAlmtM = result.data.succesCntAlmtM;
this.succesRtAlmtM = result.data.succesRtAlmtM;
this.startTimeH = result.data.startTimeH;
this.endTimeH = result.data.endTimeH;
this.sendingCntSmsH = result.data.sendingCntSmsH;
this.succesCntSmsH = result.data.succesCntSmsH;
this.succesRtSmsH = result.data.succesRtSmsH;
this.sendingCntMmsH = result.data.sendingCntMmsH;
this.succesCntMmsH = result.data.succesCntMmsH;
this.succesRtMmsH = result.data.succesRtMmsH;
this.sendingCntLmsH = result.data.sendingCntLmsH;
this.succesCntLmsH = result.data.succesCntLmsH;
this.succesRtLmsH = result.data.succesRtLmsH;
this.sendingCntAlmtH = result.data.sendingCntAlmtH;
this.succesCntAlmtH = result.data.succesCntAlmtH;
this.succesRtAlmtH = result.data.succesRtAlmtH;
this.startTimeD = result.data.startTimeD;
this.endTimeD = result.data.endTimeD;
this.sendingCntSmsD = result.data.sendingCntSmsD;
this.succesCntSmsD = result.data.succesCntSmsD;
this.succesRtSmsD = result.data.succesRtSmsD;
this.sendingCntMmsD = result.data.sendingCntMmsD;
this.succesCntMmsD = result.data.succesCntMmsD;
this.succesRtMmsD = result.data.succesRtMmsD;
this.sendingCntLmsD = result.data.sendingCntLmsD;
this.succesCntLmsD = result.data.succesCntLmsD;
this.succesRtLmsD = result.data.succesRtLmsD;
this.sendingCntAlmtD = result.data.sendingCntAlmtD;
this.succesCntAlmtD = result.data.succesCntAlmtD;
this.succesRtAlmtD = result.data.succesRtAlmtD;
} else {
alert("조회정보가 없습니다.");
}
} catch(err) {
alert("실패 하였습니다.");
}
},
switchSelect: function(event) {
this.selectedKey = event.target.value;
console.log('>>>>>>>>>>>> [selectedKey]:'+this.selectedKey)
this.changeAutoUpdate();
},
cancelAutoUpdate () {
clearInterval(this.timer)
},
changeAutoUpdate () {
clearInterval(this.timer)
this.timer = setInterval(this.getLiveSendSttus, this.selectedKey * 1000 * 60)
console.log('>>>>>>>>>>>> [changeAutoUpdate()_selectTime]:'+this.selectedKey * 1000 * 60)
}
},
};
</script>

View File

@@ -1,165 +1,321 @@
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">발송내역 목록 조회</h3>
<p class="breadcrumb">시스템관리 &gt; 관리자/유치채널 관리</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">
<option value="전체">전체</option>
<option value="대리점">대리점</option>
<option value="운영자">운영자</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">상태</label>
<select name="" id="right">
<option value="전체">전체</option>
<option value="사용">사용</option>
<option value="중지">중지</option>
</select>
</div>
<div class="input_box id">
<label for="id1" class="label">ID</label>
<input type="text" id="id1" placeholder="검색어 입력"/>
</div>
<div class="input_box">
<label for="name" class="label">이름(대리점명)</label>
<input type="text" id="name" placeholder="검색어 입력"/>
</div>
<button type="button" class="button grey">조회</button>
</div>
</form>
<div class="info">
<div class="count"> <span>100</span></div>
<div class="button_group">
<button type="button" class="button blue admin">관리자 등록</button>
<button type="button" class="button blue channel">유지채널 등록</button>
<button type="button" class="button white delete">삭제</button>
</div>
</div>
<!-- <div class="table">
<table>
<colgroup>
<col width="5%"/>
<col width="15%"/>
<col width="15%"/>
<col width="20%"/>
<col width="20%"/>
<col width="5%"/>
<col width="20%"/>
</colgroup>
<thead>
<tr>
<th><input type="checkbox" id="admin_check1"><label for="admin_check1"></label></th>
<th>NO</th>
<th>권한</th>
<th>이름(대리점명)</th>
<th>ID</th>
<th>상태</th>
<th>등록일</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" checked id="admin_check2"><label for="admin_check2"></label></td>
<td>10</td>
<td>대리점</td>
<td>유플러스</td>
<td><a href="javascript:void(0)">uplus1</a></td>
<td>사용</td>
<td>2022-03-10</td>
</tr>
</tbody>
</table>
</div> -->
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="testList.url"
:perPage="testList.perPage"
:initialRequest="testList.initialRequest"
:pagination="testList.pagination"
:isCheckbox="testList.isCheckbox"
:columns="testList.columns"
:noDataStr="testList.noDataStr"
:addCls="testList.addCls"
:header="testList.header"
></custom-grid>
</div>
</div>
</div>
</template>
<script>
import customGrid from '@/components/CustomGrid';
//import api from '../service/api';
export default {
name: 'sendList',
data() {
return {
testList: {
url: '/api/v1/bo/sysMgt/adminList',
perPage: 20,
pagination: true,
isCheckbox: true,
initialRequest: false,
addCls: 'box_OFvis',
header: [
[
{ header: 'NO', childNames: [] },
{ header: '권한', childNames: [] },
{ header: '이름(대리점명)', childNames: [] },
{ header: 'ID', childNames: [] },
{ header: '상태', childNames: [] },
{ header: '등록일', childNames: [] }
]
],
columns: [
{ name: 'no', header: 'NO', align: 'center', width: 60 },
{ name: 'auth', header: '권한', align: 'left', width: 160 },
{ name: 'name', header: '이름(대리점명)', align: 'center', width: 130},
{ name: 'adminId', header: 'ID', align: 'center', width: 130},
{ name: 'adminStat', header: '상태', align: 'center', width: 130},
{ name: 'regDt', header: '등록일', width: 90, cls: 'td_line' }
],
noDataStr: '검색 결과가 없습니다.',
// params: {
// apprResult: '',
// searchType: '',
// searchText: '',
// startDate: '',
// endDate: ''
// },
excelHeader: []
}
};
},
components: {
customGrid: customGrid
},
destroyed() {
},
mounted() {
let isKeep = false;
isKeep = true;
this.search(isKeep);
},
methods: {
search: function(isKeep) {
console.log(this.testList.params);
this.$refs.table.search(this.testList.params, isKeep);
},
}
};
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">발송내역</h3>
<p class="breadcrumb">모니터링 &gt; 발송내역</p>
</div>
<form autocomplete="off" class="search_form">
<div class="search_wrap">
<div class="group">
<div class="input_box cal one essential">
<label for="right" class="label"><span>*</span>발송일</label>
<!-- <input class="" type="text" id="" placeholder="2022-10-12"> -->
<div class="term">
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledSDate"
v-model="startDate"
@selected="selectedStartDate(0)"
@closed="closeDate('start')"
></vuejs-datepicker>
</span>
</div>
</div>
<div class="select_box id">
<label for="right" class="label">요청채널</label>
<select name="" id="" v-model="grid.params.searchType1" @keyup.enter="search">
<option value="ALL" selected>전체</option>
<option value="SMS">SMS</option>
<option value="LMS">LMS</option>
<option value="MMS">MMS</option>
<option value="ALIMTALK">알림톡</option>
</select>
</div>
</div>
<div class="group">
<div class="input_box essential">
<label for="right" class="label"><span>*</span>수신번호</label>
<input class="search-box" type="number" id="search" placeholder="- 자 제외 숫자만 입력" v-model="grid.params.searchText1" v-on:keyup="onlyNum" @input="onlyNum" minlength="10" maxlength="11">
</div>
<div class="input_box essential">
<label for="right" class="label"><span>*</span>발신번호</label>
<input class="search-box" type="number" id="search" placeholder="- 자 제외 숫자만 입력" v-model="grid.params.searchText2" v-on:keyup="onlyNum" @input="onlyNum" minlength="10" maxlength="11">
</div>
<div class="input_box">
<label for="right" class="label">고객사명</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText3" >
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div>
</form>
<div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe">
<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.text }}</option>
</select>
</div>
</div>
</div>
<div class="table">
<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>
</table>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</template>
<script>
import customGrid from '@/components/CustomGrid';
import { utils_mixin, chkPattern2 } from '../service/mixins';
import moment from 'moment';
import xlsx from '@/common/excel';
import commonModal from "@/components/modal/commonModal";
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;
}
getElement() {
return this.el;
}
addEvent(selEl) {
selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options;
callback(this.props);
});
}
}
export default {
name: 'sendList',
mixins: [utils_mixin, chkPattern2],
data() {
return {
// 달력 데이터
ko: vdp_translation_ko.js,
periodDay: 7,
sDateDiv: 'day',
startDate: new Date(),
endDate: new Date(),
statType: [],
userType: [],
row:{},
pageType: 'SUBS',
// 테이블 리스트 데이터
perPageCnt: 50,
options: [
{ text: '20', value: 20},
{ text: '50', value: 50},
{ text: '100', value: 100}
],
totalItems: 0,
grid: {
url: '/api/v1/bo/mntrng/sendList',
perPage: 20,
pagination: true,
isCheckbox: false,
initialRequest: false,
addCls: 'box_OFvis',
header: [
[
{ header: 'NO', childNames: [] },
{ header: '발송일자', childNames: [] },
{ header: '고객사명', childNames: [] },
{ header: '발송아이디(사용자ID)', childNames: [] },
{ header: '수신번호', childNames: [] },
{ header: '발신번호', childNames: [] },
{ header: '요청채널', childNames: [] },
{ header: '최종채널', childNames: [] },
{ header: '이통사', childNames: [] },
{ header: '결과(코드)', childNames: [] },
{ header: '요청일시', childNames: [] },
{ header: '완료일시', childNames: [] },
]
],
columns: [
{ name: 'no', header: 'NO', align: 'center', width: '5%' },
{ name: '', header: '발송일자', align: 'left', width: '11%' },
{ name: '', header: '고객사명', align: 'left', width: '9%' },
{ name: '', header: '발송아이디(사용자ID)', align: 'center', width: '9%'},
{ name: '', header: '수신번호', align: 'center', width: '11%'},
{ name: '', header: '발신번호', align: 'center', width: '11%'},
{ name: '', header: '요청채널', align: 'center', width: '5%'},
{ name: '', header: '최종채널', align: 'center', width: '5%'},
{ name: '', header: '이통사', align: 'center', width: '5%'},
{ name: '', header: '결과(코드)', align: 'center', width: '9%'},
{ name: '', header: '요청일시', align: 'center', width: '10%'},
{ name: '', header: '완료일시', align: 'center', width: '10%'},
],
noDataStr: '검색 결과가 없습니다.',
params: {
searchType1: 'ALL',
searchText1: '',
searchText2: '',
searchText3: '',
sentDate: '',
},
excelHeader: []
}
};
},
components: {
customGrid: customGrid,
commonModal,
vuejsDatepicker,
},
created(){
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", true);
// this.setCodeData();
// this.getExcelHeader();
this.setPeriodDay(0);
this.grid.params.searchType1 = 'ALL';
},
destroyed() {
},
mounted() {
let page = 1;
// 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false;
if (getCondition) {
this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params;
page = getCondition.page;
isKeep = true;
}
//this.search(isKeep);
},
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();
},
methods: {
search: function(isKeep) {
// 발송일자 필수입력체크
// 수신번호 필수입력체크
// 발신번호 필수입력체크
this.grid.params.sentDate = moment(this.startDate).format('YYYYMMDD');
this.grid.params.reqChennel = this.grid.params.searchType1;
this.grid.params.phone = this.grid.params.searchText1;
this.grid.params.callbackNumber = this.grid.params.searchText2;
this.grid.params.custNm = this.grid.params.searchText3;
console.log(this.grid.params);
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
},
setPeriodDay(day) {
this.periodDay = day;
this.endDate = new Date();
this.startDate = moment(this.endDate)
.subtract(day, 'day')
.toDate();
this.closeDate('start');
this.closeDate('end');
},
selectedStartDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
if (this.startDate > this.endDate) {
this.startDate = this.endDate;
}
// console.log(this.disabledSDate)
// this.grid.params.startDt = day
},
selectedEndDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
},
closeDate(type) {
if (type != undefined && type != null) {
if (type == 'start') {
this.disabledSDate = { from: this.endDate };
this.disabledEDate = { to: this.startDate, from: this.endDate };
} else if (type == 'end') {
this.disabledSDate = { from: this.endDate };
this.disabledEDate = { to: this.startDate, from: new Date() };
}
}
},
customFormatter: function(date) {
if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') {
return moment(date).format('YYYY');
} else {
return moment(date).format('YYYY-MM-DD');
}
},
changePerPage: function(){ // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt;
this.search(true);
},
sendStoreData: function() {
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
});
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage);
},
}
};
</script>