mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 18:13:18 +09:00
로그인 및 메인 화면 수정 변경
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<!-- 선택한 메뉴 li.is-current -->
|
||||
<li v-for="child in menuList" :key="child.menuNo" :class="child.classNm">
|
||||
<div class="menu_btn" ></div>
|
||||
<a href="javascript:void(0);" class="menu_target" @click="actionMenu" :data-menu-no="child.menuNo">{{child.menuNm}}</a>
|
||||
<a class="menu_target" @click="actionMenu" :data-menu-no="child.menuNo">{{child.menuNm}}</a>
|
||||
<div class="sub_menu_wrap">
|
||||
<ul class="sub_menu" v-if="child.children.length > 0">
|
||||
<li v-for="child2 in child.children" :key="child2.menuNo">
|
||||
|
||||
@@ -220,8 +220,6 @@ export default {
|
||||
AdminNmPop,
|
||||
},
|
||||
created(){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
console.log(this.$route.params.userSeq);
|
||||
this.loginId = this.$route.params.loginId;
|
||||
this.getExcelHeader();
|
||||
|
||||
@@ -230,13 +230,14 @@ export default {
|
||||
vuejsDatepicker,
|
||||
},
|
||||
created(){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
this.setCodeData();
|
||||
this.getExcelHeader();
|
||||
this.setPeriodDay(0);
|
||||
|
||||
this.grid.params.subsSttusCd = '';
|
||||
},
|
||||
destroyed() {
|
||||
this.grid.params.subsSttusCd = '';
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
34
frontend/src/modules/calculate/service/calcMgtApi.js
Normal file
34
frontend/src/modules/calculate/service/calcMgtApi.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import httpClient from '@/common/http-client';
|
||||
import calcListExcelHeader from './mock/calcExcelHeader.json';
|
||||
// 공통 코드.
|
||||
const getCommCode = (params) => {
|
||||
return httpClient.post('/api/v1/bo/comm/getCode', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
// 엑셀다운로드 목록 조회
|
||||
const calcListExcel = (params) => {
|
||||
return httpClient.post('/api/v1/bo/calculate/calcListExcel', params);
|
||||
}
|
||||
|
||||
|
||||
const getExcelHeader = category => {
|
||||
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
|
||||
return new Promise(function(resolve, reject) {
|
||||
let header = [];
|
||||
switch (category) {
|
||||
case 'CALC':
|
||||
header = calcListExcelHeader.header;
|
||||
break;
|
||||
default:
|
||||
header = '';
|
||||
break;
|
||||
}
|
||||
resolve(header);
|
||||
});
|
||||
};
|
||||
|
||||
export default {
|
||||
getCommCode,
|
||||
getExcelHeader,
|
||||
calcListExcel,
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"header": [
|
||||
[
|
||||
{
|
||||
"key": "useYm",
|
||||
"name": "날짜",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "custNm",
|
||||
"name": "고객사명",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "bizrno",
|
||||
"name": "사업자번호",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "prodNm",
|
||||
"name": "요금제",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "startAmt",
|
||||
"name": "시작금액",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "useAmt",
|
||||
"name": "사용금액",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "cfwdAmt",
|
||||
"name": "이월금액",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "mrtUseAmt",
|
||||
"name": "종량금액",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "extncAmt",
|
||||
"name": "소멸금액",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "billingAmt",
|
||||
"name": "청구금액",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"name": "채널별 발송 건수",
|
||||
"colspan": 5
|
||||
}
|
||||
],
|
||||
[{
|
||||
"key": "totalSndCnt",
|
||||
"name": "전체"
|
||||
},
|
||||
{
|
||||
"key": "smsSndCnt",
|
||||
"name": "SMS"
|
||||
},
|
||||
{
|
||||
"key": "lmsSndCnt",
|
||||
"name": "LMS"
|
||||
},
|
||||
{
|
||||
"key": "mmsSndCnt",
|
||||
"name": "MMS"
|
||||
},
|
||||
{
|
||||
"key": "atlkSndCnt",
|
||||
"name": "알림톡"
|
||||
}]
|
||||
]
|
||||
}
|
||||
@@ -63,7 +63,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue download">엑셀 다운로드</button>
|
||||
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -93,15 +93,14 @@
|
||||
|
||||
<script>
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
//import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import moment from "moment";
|
||||
import xlsx from '@/common/excel';
|
||||
import lodash from 'lodash';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import calcMgtApi from "@/modules/calculate/service/calcMgtApi";
|
||||
|
||||
export default {
|
||||
name: 'calcList',
|
||||
//mixins: [utils_mixin, chkPattern2],
|
||||
data() {
|
||||
return {
|
||||
// 달력 데이터
|
||||
@@ -121,7 +120,7 @@ export default {
|
||||
list:[],
|
||||
totalCnt: '',
|
||||
|
||||
pageType: 'SUBS',
|
||||
pageType: 'CALC',
|
||||
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 50,
|
||||
@@ -159,7 +158,7 @@ export default {
|
||||
columns: [
|
||||
{ name: 'useYm', header: '날짜', align: 'center'},
|
||||
{ name: 'custNm', header: '고객사명', align: 'center', width: '130px'},
|
||||
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '120px'
|
||||
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '120px'
|
||||
,formatter: props => {
|
||||
let result = props.bizrno.substring(0,3)+'-'+ props.bizrno.substring(3,5)+'-'+ props.bizrno.substring(5,10)
|
||||
return result;
|
||||
@@ -256,6 +255,7 @@ export default {
|
||||
created(){
|
||||
this.setPeriodDay(0);
|
||||
this.gridParamSet();
|
||||
this.getExcelHeader();
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
@@ -397,7 +397,60 @@ export default {
|
||||
}
|
||||
|
||||
console.log("gridParamSet()-startMonth : "+ this.grid.params.startMonth);
|
||||
}
|
||||
},
|
||||
getExcelHeader() {
|
||||
// 헤더를 mockup으로 관리한다.
|
||||
calcMgtApi.getExcelHeader(this.pageType).then(res => {
|
||||
this.excelHeader = res;
|
||||
});
|
||||
},
|
||||
async excelDown() {
|
||||
if (this.$refs.table.getData().length <= 0) {
|
||||
this.row.title = '정산이력';
|
||||
this.row.msg1 = '조회된 데이터가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
let today = moment().format('YYYYMMDDHHmmss');
|
||||
const saveFileName = `정산이력_${today}.xlsx`;
|
||||
|
||||
const data = await this.getExcelDataDown();
|
||||
let options = {
|
||||
header: this.excelHeader,
|
||||
dataOrder: 'header'
|
||||
};
|
||||
// console.log(data);
|
||||
xlsx.export(data.list, saveFileName, options).then(() => {});
|
||||
},
|
||||
async getExcelDataDown() {
|
||||
try {
|
||||
let response;
|
||||
// params: {
|
||||
// startMonth: '',
|
||||
// endMonth: '',
|
||||
// },
|
||||
// const params = {
|
||||
// startDt: this.grid.params.startDt,
|
||||
// endDt: this.grid.params.endDt,
|
||||
// searchType1: this.grid.params.searchType1,
|
||||
// searchType2: this.grid.params.searchType2,
|
||||
// searchType3: this.grid.params.searchType3,
|
||||
// searchText1: this.grid.params.searchText1
|
||||
// };
|
||||
|
||||
response = await calcMgtApi.calcListExcel(this.grid.params);
|
||||
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
return result.data;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,26 +1,22 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dimmed modal26" @click="ModalClose();"></div>
|
||||
<div class="popup-wrap modal26">
|
||||
<div class="popup modal26">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">관리자명 조회</h3>
|
||||
</div>
|
||||
|
||||
<div class="pop-cont-detail input_box">
|
||||
<!-- <div class="pop-cont-detail">-->
|
||||
<label>ID</label>
|
||||
<div class="input_search">
|
||||
<input class="search-box" type="text" placeholder="아이디 입력" v-model.trim="madangId" ref="madangId">
|
||||
<button type="button" class="button grey" @click="searchMadangId()">조회</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-pcolor">확인</button>
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="popup modal26">
|
||||
<div class="pop-head modal26">
|
||||
<h3 class="pop-tit">관리자명 조회</h3>
|
||||
</div>
|
||||
<div class="pop-cont-detail">
|
||||
<label>ID</label>
|
||||
<div class="input_search">
|
||||
<input class="search-box" type="text" placeholder="아이디 입력" v-model.trim="madangId" ref="madangId">
|
||||
<button type="button" class="button btn-p2color" @click="searchMadangId()">조회</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor">확인</button>
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<search-id-popup ref="searchIdPopModal"> </search-id-popup>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
|
||||
|
||||
@@ -2,51 +2,45 @@
|
||||
|
||||
<div>
|
||||
<div class="dimmed modal25" onClick="ModalClose();"></div>
|
||||
<div class="popup-wrap modal25">
|
||||
<!-- 이월금액 상세내역 -->
|
||||
<div class="popup modal25 popup_form price">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">이월금액 상세내역</h3>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{totalCnt}}</span>건
|
||||
<p>최근 3개월 내역을 확인할 수 있습니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
<form autocomplete="off">
|
||||
<table class="table-r">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>날짜</th>
|
||||
<th>시작 금액</th>
|
||||
<th>사용 금액</th>
|
||||
<th>이월 금액</th>
|
||||
<th>소멸 금액</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||
<td>{{ option.lmtYm }}</td>
|
||||
<td>{{ option.startAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.useAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.krrrAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.extshAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
</tr>
|
||||
<tr v-if="list.length === 0">
|
||||
<td colspan="5">검색 결과가 없습니다.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" @click="carryOverListPopClose();">닫기</button>
|
||||
<button class="btn-pcolor download" @click="excelDown();">엑셀 다운로드</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
|
||||
<div class="popup modal25 popup_form price">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">이월금액 상세내역</h3>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{totalCnt}}</span>건
|
||||
<p>최근 3개월 내역을 확인할 수 있습니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table-r">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>날짜</th>
|
||||
<th>시작 금액</th>
|
||||
<th>사용 금액</th>
|
||||
<th>이월 금액</th>
|
||||
<th>소멸 금액</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||
<td>{{ option.lmtYm }}</td>
|
||||
<td>{{ option.startAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.useAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.krrrAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.extshAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
</tr>
|
||||
<tr v-if="list.length === 0">
|
||||
<td colspan="5">검색 결과가 없습니다.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor download" @click="excelDown();">엑셀 다운로드</button>
|
||||
<button class="btn-default" @click="carryOverListPopClose();">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -137,8 +131,8 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
|
||||
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
|
||||
.popup-btn-wrap button:hover {background: #000; color: #fff;}
|
||||
</style>
|
||||
<!--<style>-->
|
||||
<!-- .popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}-->
|
||||
<!-- .popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }-->
|
||||
<!-- .popup-btn-wrap button:hover {background: #000; color: #fff;}-->
|
||||
<!--</style>-->
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<MainSlot ref="mainSlot">
|
||||
<template #list="slotProps">
|
||||
<template>
|
||||
<div class="info">
|
||||
<div class="count">사용자ID 정보
|
||||
<p>( 최대 100개까지 등록 가능 )</p>
|
||||
|
||||
@@ -70,7 +70,8 @@ import custMgtApi from "../service/custMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import ValidationConfirmPop from '../components/ValidationConfirmPop.vue';
|
||||
import lodash from "lodash";
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
//import commonModal from "@/components/modal/commonModal";
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
export default {
|
||||
name: "memberModifyPop",
|
||||
@@ -102,13 +103,13 @@ export default {
|
||||
email:'',
|
||||
auth:'',
|
||||
stat: "",
|
||||
userId: "",
|
||||
adminId: "",
|
||||
userId: "",
|
||||
adminId: "",
|
||||
userNm:"",
|
||||
userPwd1:"",
|
||||
userPwd2:"",
|
||||
userPwd1:"",
|
||||
userPwd2:"",
|
||||
code:"",
|
||||
userStat:"",
|
||||
userStat:"",
|
||||
}
|
||||
},
|
||||
methods :{
|
||||
@@ -127,14 +128,14 @@ export default {
|
||||
this.mdn = result.data.mdn;
|
||||
this.userStat = result.data.userStat;
|
||||
} else {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch(err) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
// 모달 오픈
|
||||
var dimmed = document.getElementsByClassName('memberUpdate');
|
||||
@@ -162,20 +163,20 @@ export default {
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '수정 완료하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.toComplete();
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '수정 완료하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.toComplete();
|
||||
|
||||
} else {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch(err) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 모달 Close
|
||||
@@ -193,36 +194,36 @@ export default {
|
||||
doPwdValidate(){
|
||||
if(this.isNull(this.userPwd2)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호 확인을 입력해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._pwd2.focus();
|
||||
this.row.msg1 = '비밀번호 확인을 입력해 주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
if(!lodash.isEqual(this.userPwd1, this.userPwd2)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호가 일치하지 않습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._pwd2.focus();
|
||||
this.row.msg1 = '비밀번호가 일치하지 않습니다.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const pwdLen = this.bytes(this.userPwd1);
|
||||
if(!(pwdLen >= 8 && pwdLen <= 16)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._pwd1.focus();
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const pEng = /[A-Za-z]/g; // 영문자
|
||||
const pNum = /[0-9]/g; // 숫자
|
||||
const pSpc = /[!@$%^&*]/g; // 특수문자
|
||||
if(!(pEng.test(this.userPwd1) && pNum.test(this.userPwd1) && pSpc.test(this.userPwd1))) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._pwd1.focus();
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
@@ -231,65 +232,78 @@ export default {
|
||||
if(!this.doPwdValidate()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.isNull(this.userPwd1) && !this.isNull(this.userPwd2)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호를 입력해 주세요.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.userNm)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '이름을 입력해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._userNm.focus();
|
||||
if(this.isNull(this.userNm)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '이름을 입력해 주세요.';
|
||||
this.row.focusTaget = '3';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.email)){
|
||||
if(this.isNull(this.mdn)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '이메일을 입력해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._email.focus();
|
||||
return false;
|
||||
}
|
||||
const email = this.email;
|
||||
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
|
||||
// alert("이메일 형식이 잘못되었습니다. 확인해 주세요");
|
||||
// this.$refs._email.focus();
|
||||
this.$refs.validationConfirmPopModal.validationEmailOpen();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.mdn)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '휴대폰번호를 입력해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._phone.focus();
|
||||
this.row.msg1 = '휴대폰번호를 입력해주세요.';
|
||||
this.row.focusTaget = '4';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const hp = this.mdn;
|
||||
if(!this.isNull(hp) && !this.isMobile(hp)){
|
||||
//alert("휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요");
|
||||
//this.$refs._phone.focus();
|
||||
this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
|
||||
|
||||
this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.userStat)){
|
||||
if(this.isNull(this.email)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '상태를 선택 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.row.msg1 = '이메일을 입력해주세요.';
|
||||
this.row.focusTaget = '5';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const email = this.email;
|
||||
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
|
||||
this.$refs.validationConfirmPopModal.validationEmailOpen();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.userStat)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '상태를 선택 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
checkPhoneFocus(){
|
||||
//this.mdn = '';
|
||||
this.$refs._phone.focus();
|
||||
},
|
||||
checkEmailFocus(){
|
||||
//this.email = '';
|
||||
this.$refs._email.focus();
|
||||
},
|
||||
checkPhoneFocus(){
|
||||
this.$refs._phone.focus();
|
||||
},
|
||||
checkEmailFocus(){
|
||||
this.$refs._email.focus();
|
||||
},
|
||||
checkFocus(){
|
||||
if(this.row.focusTaget === '1'){
|
||||
this.$refs._pwd1.focus();
|
||||
} else if(this.row.focusTaget === '2'){
|
||||
this.$refs._pwd2.focus();
|
||||
} else if(this.row.focusTaget === '3'){
|
||||
this.$refs._userNm.focus();
|
||||
} else if(this.row.focusTaget === '4'){
|
||||
this.$refs._phone.focus();
|
||||
} else if(this.row.focusTaget === '5'){
|
||||
this.$refs._email.focus();
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,8 @@ import custMgtApi from "../service/custMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import ValidationConfirmPop from '../components/ValidationConfirmPop.vue';
|
||||
import lodash from "lodash";
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
//import commonModal from "@/components/modal/commonModal";
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
export default {
|
||||
name: "memberRegPop",
|
||||
@@ -82,22 +83,22 @@ export default {
|
||||
//props: ['sendData'],
|
||||
created(){
|
||||
// this.setAuthData();
|
||||
// this.formReset();
|
||||
this.formReset();
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
row:{},
|
||||
madangId:'',
|
||||
adminId:'',
|
||||
adminId:'',
|
||||
name:'',
|
||||
mdn:'',
|
||||
email:'',
|
||||
auth:'',
|
||||
stat: "",
|
||||
userId:"",
|
||||
stat: "01",
|
||||
userId:"",
|
||||
userNm:"",
|
||||
code:"",
|
||||
userTotalCnt:0,
|
||||
userTotalCnt:0,
|
||||
}
|
||||
},
|
||||
methods :{
|
||||
@@ -132,22 +133,22 @@ export default {
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '사용자 생성 완료하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.toComplete();
|
||||
} else if(result != null && result.retCode == "4018"){
|
||||
// 이미 사용중인 ID
|
||||
this.$refs.validationConfirmPopModal.validationIdDuplicateOpen();
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '사용자 생성 완료하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.toComplete();
|
||||
} else if(result != null && result.retCode == "4018"){
|
||||
// 이미 사용중인 ID
|
||||
this.$refs.validationConfirmPopModal.validationIdDuplicateOpen();
|
||||
} else {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch(err) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
//사용자ID 생성 모달 Close
|
||||
@@ -156,7 +157,7 @@ export default {
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
//this.formReset();
|
||||
this.formReset();
|
||||
},
|
||||
toComplete(){
|
||||
this.row.serviceId = this.adminId;
|
||||
@@ -169,86 +170,91 @@ export default {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
// formReset(){
|
||||
// var targetAdminId = this.adminId;
|
||||
// Object.assign(this.$data, this.$options.data());
|
||||
// this.adminId = targetAdminId;
|
||||
// },
|
||||
formReset(){
|
||||
var targetAdminId = this.adminId;
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
this.adminId = targetAdminId;
|
||||
},
|
||||
doValidate(){
|
||||
if(this.userTotalCnt >= 100){
|
||||
// 사용자등록제한_최대100개까지
|
||||
this.$refs.validationConfirmPopModal.validationMaxlimitOpen();
|
||||
return false;
|
||||
}
|
||||
if(this.userTotalCnt >= 100){
|
||||
// 사용자등록제한_최대100개까지
|
||||
this.$refs.validationConfirmPopModal.validationMaxlimitOpen();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.userId)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = 'ID를 입력해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
if(this.isNull(this.userId)){
|
||||
this.$refs._userId.focus();
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = 'ID를 입력해 주세요.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.userNm)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '이름을 입력해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._userNm.focus();
|
||||
if(this.isNull(this.userNm)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '이름을 입력해 주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.email)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '이메일을 입력해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._email.focus();
|
||||
return false;
|
||||
}
|
||||
const email = this.email;
|
||||
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
|
||||
|
||||
this.$refs.validationConfirmPopModal.validationEmailOpen();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.mdn)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '휴대폰번호를 입력해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._phone.focus();
|
||||
if(this.isNull(this.mdn)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '휴대폰번호를 입력해주세요.';
|
||||
this.row.focusTaget = '3';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const hp = this.mdn;
|
||||
if(!this.isNull(hp) && !this.isMobile(hp)){
|
||||
|
||||
this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
|
||||
|
||||
this.row.focusTaget = '3';
|
||||
this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.stat)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '상태를 선택 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
if(this.isNull(this.email)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '이메일을 입력해주세요.';
|
||||
this.row.focusTaget = '4';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const email = this.email;
|
||||
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
|
||||
this.$refs.validationConfirmPopModal.validationEmailOpen();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.stat)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '상태를 선택 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
checkFocus(){
|
||||
if(this.row.focusTaget === '1'){
|
||||
this.$refs._userId.focus();
|
||||
} else if(this.row.focusTaget === '2'){
|
||||
this.$refs._userNm.focus();
|
||||
} else if(this.row.focusTaget === '3'){
|
||||
this.$refs._phone.focus();
|
||||
} else if(this.row.focusTaget === '4'){
|
||||
this.$refs._email.focus();
|
||||
}
|
||||
},
|
||||
checkPhoneFocus(){
|
||||
//this.mdn = '';
|
||||
this.$refs._phone.focus();
|
||||
},
|
||||
checkEmailFocus(){
|
||||
//this.email = '';
|
||||
this.$refs._email.focus();
|
||||
},
|
||||
checkIdDupFocus(){
|
||||
//this.email = '';
|
||||
this.$refs._userId.focus();
|
||||
},
|
||||
|
||||
checkPhoneFocus(){
|
||||
this.$refs._phone.focus();
|
||||
},
|
||||
checkEmailFocus(){
|
||||
this.$refs._email.focus();
|
||||
},
|
||||
checkIdDupFocus(){
|
||||
this.$refs._userId.focus();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -4,42 +4,39 @@
|
||||
<!-- s: 팝업 -->
|
||||
<!-- 관리자명 조회 실패시 -->
|
||||
<div class="dimmed modal27" @click="searchIdFailModalClose();"></div>
|
||||
<div class="popup-wrap modal27">
|
||||
<div class="popup modal27">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">관리자명 조회</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>입력하신 마당 ID를 조회할 수 없습니다.</p>
|
||||
</div>
|
||||
<div class="pop-btn1">
|
||||
<button class="btn-pcolor" @click="searchIdFailModalClose();">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup modal27">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">관리자명 조회</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>입력하신 마당 ID를 조회할 수 없습니다.</p>
|
||||
</div>
|
||||
<div class="popup-btn1">
|
||||
<button class="btn-pcolor" @click="searchIdFailModalClose();">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 관리자 ID 조회 -->
|
||||
<div class="dimmed modal28" @click="searchIdModalCancelClose();"></div>
|
||||
<div class="popup-wrap modal28">
|
||||
<div class="popup modal28">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">관리자 ID 조회</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>선택하신 정보가 아래와 같습니다.</p>
|
||||
<p>유치자 정보를 수정하시겠습니까?</p>
|
||||
</div>
|
||||
<ul class="pop-cont-detail">
|
||||
<li>마당ID : {{madangId}}</li>
|
||||
<li>코드 : {{code}}</li>
|
||||
<li>이름 : {{name}}</li>
|
||||
<li>대리점명 : {{agencyNm}}</li>
|
||||
</ul>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-pcolor" @click="searchIdModalOkClose();">확인</button>
|
||||
<button class="btn-default" @click="searchIdModalCancelClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup modal28">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">관리자 ID 조회</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>선택하신 정보가 아래와 같습니다.</p>
|
||||
<p>유치자 정보를 수정하시겠습니까?</p>
|
||||
</div>
|
||||
<ul class="pop-cont-detail">
|
||||
<li>마당ID : {{madangId}}</li>
|
||||
<li>코드 : {{code}}</li>
|
||||
<li>이름 : {{name}}</li>
|
||||
<li>대리점명 : {{agencyNm}}</li>
|
||||
</ul>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="searchIdModalOkClose();">확인</button>
|
||||
<button class="btn-default" @click="searchIdModalCancelClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 시스템관리 팝업 끝-->
|
||||
|
||||
@@ -434,8 +434,8 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<!-- <style>
|
||||
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
|
||||
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
|
||||
.popup-btn-wrap button:hover {background: #000; color: #fff;}
|
||||
</style>
|
||||
</style> -->
|
||||
188
frontend/src/modules/custMgt/components/commonModal.vue
Normal file
188
frontend/src/modules/custMgt/components/commonModal.vue
Normal file
@@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
|
||||
<div class="dimmed alertModal" @click="alertModalCancel();"></div>
|
||||
<div class="popup-wrap alertModal">
|
||||
<!-- 로그인실패: 확인 -->
|
||||
<div class="popup alertModal">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn1">
|
||||
<button class="btn-pcolor" @click="alertModalClose();">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dimmed confirm" @click="confirmModalCancel();"></div>
|
||||
<div class="popup-wrap confirm">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup confirm">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmModalClose();">확인</button>
|
||||
<button class="btn-default" @click="confirmModalCancel();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dimmed confirm2" @click="confirmModalCancel2();"></div>
|
||||
<div class="popup-wrap confirm2">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup confirm2">
|
||||
<div class="pop-head">
|
||||
<h3 class="popup-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmModalClose2();">확인</button>
|
||||
<button class="btn-default" @click="confirmModalCancel2();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "confirm",
|
||||
data(){
|
||||
return{
|
||||
row:{},
|
||||
title:'',
|
||||
msg1: '',
|
||||
msg2: '',
|
||||
msg3: '',
|
||||
msg4: '',
|
||||
targetFocus: '',
|
||||
}
|
||||
},
|
||||
methods :{
|
||||
alertModalOpen(props){
|
||||
console.log('>>>>>>>>>> alertModalOpen');
|
||||
console.log(props.msg1);
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
|
||||
var dimmed = document.getElementsByClassName('alertModal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
},
|
||||
alertModalClose(){
|
||||
var dimmed = document.getElementsByClassName('alertModal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.checkFocus();
|
||||
},
|
||||
alertModalCancel(){
|
||||
var dimmed = document.getElementsByClassName('alertModal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.checkFocus();
|
||||
},
|
||||
// 모달 오픈
|
||||
confirmModalOpen(props){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
},
|
||||
confirmModalOpen2(props){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
},
|
||||
// 모달 끄기(ok)
|
||||
confirmModalClose(){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(ok)
|
||||
confirmModalClose2(){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(취소)
|
||||
confirmModalCancel(){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = false;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(취소)
|
||||
confirmModalCancel2(){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = false;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!--
|
||||
<style>
|
||||
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
|
||||
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
|
||||
.popup-btn-wrap button:hover {background: #000; color: #fff;}
|
||||
</style> -->
|
||||
@@ -2,7 +2,7 @@
|
||||
"header": [
|
||||
[
|
||||
{
|
||||
"key": "date",
|
||||
"key": "lmtYm",
|
||||
"name": "날짜"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"name": "상태"
|
||||
},
|
||||
{
|
||||
"key": "",
|
||||
"key": "channel",
|
||||
"name": "유치채널"
|
||||
},
|
||||
{
|
||||
|
||||
188
frontend/src/modules/login/components/commonModal.vue
Normal file
188
frontend/src/modules/login/components/commonModal.vue
Normal file
@@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
|
||||
<div class="dimmed modal01" @click="alertModalCancel();"></div>
|
||||
<div class="popup-wrap modal01">
|
||||
<!-- 로그인실패: 확인 -->
|
||||
<div class="popup modal01">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn1">
|
||||
<button class="btn-pcolor" @click="alertModalClose();">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dimmed confirm" @click="confirmModalCancel();"></div>
|
||||
<div class="popup-wrap confirm">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup confirm">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmModalClose();">확인</button>
|
||||
<button class="btn-default" @click="confirmModalCancel();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dimmed confirm2" @click="confirmModalCancel2();"></div>
|
||||
<div class="popup-wrap confirm2">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup confirm2">
|
||||
<div class="pop-head">
|
||||
<h3 class="popup-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmModalClose2();">확인</button>
|
||||
<button class="btn-default" @click="confirmModalCancel2();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "confirm",
|
||||
data(){
|
||||
return{
|
||||
row:{},
|
||||
title:'',
|
||||
msg1: '',
|
||||
msg2: '',
|
||||
msg3: '',
|
||||
msg4: '',
|
||||
callFnc:'',
|
||||
}
|
||||
},
|
||||
methods :{
|
||||
alertModalOpen(props){
|
||||
var dimmed = document.getElementsByClassName('modal01');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
this.callFnc = props.callFnc;
|
||||
console.log(props)
|
||||
},
|
||||
alertModalClose(){
|
||||
var dimmed = document.getElementsByClassName('modal01');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
console.log(this.callFnc)
|
||||
if(this.callFnc !== ''){
|
||||
this.$parent.alertCalbackFnc(this.callFnc);
|
||||
}
|
||||
},
|
||||
alertModalCancel(){
|
||||
var dimmed = document.getElementsByClassName('modal01');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
// 모달 오픈
|
||||
confirmModalOpen(props){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
},
|
||||
confirmModalOpen2(props){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
},
|
||||
// 모달 끄기(ok)
|
||||
confirmModalClose(){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(ok)
|
||||
confirmModalClose2(){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(취소)
|
||||
confirmModalCancel(){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = false;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(취소)
|
||||
confirmModalCancel2(){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = false;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
|
||||
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
|
||||
.popup-btn-wrap button:hover {background: #000; color: #fff;}
|
||||
</style>
|
||||
@@ -1,258 +1,353 @@
|
||||
var commonPwdView = {
|
||||
data: function() {
|
||||
return {
|
||||
err_msg: null,
|
||||
message: {
|
||||
oldPw: '', newPw: '',
|
||||
},
|
||||
param: {
|
||||
userId: null,
|
||||
},
|
||||
oldPw: '', newPw: '',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
verifyNewPw: function (evt) {
|
||||
var valid = this.checkPassword(evt.target.value);
|
||||
if (valid) {
|
||||
this.err_msg = '';
|
||||
}
|
||||
this.message.newPw = this.err_msg;
|
||||
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;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
verifyCfmPwd: function() {
|
||||
this.message.cfmPw = '';
|
||||
if (this.newPw != this.cfmPw) {
|
||||
this.message.cfmPw = this.cfmPwdFailMsg();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var validation = {
|
||||
methods: {
|
||||
checkId: function (id) {
|
||||
if (id == null || id.trim() == "") {
|
||||
this.err_msg = "아이디를 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
if (id.length < 8 || id.length > 16) {
|
||||
this.err_msg = "아이디는 영문, 숫자를 이용하여 4자리 이상 15자리 이하이어야 합니다.";
|
||||
return false;
|
||||
}
|
||||
if (!id.match(/^[0-9a-zA-Z]+$/)) {
|
||||
this.err_msg = "아이디는 영문, 숫자를 이용하여야 합니다.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
checkPassword: function (pw) {
|
||||
if (pw == null || pw.trim() == "") {
|
||||
this.err_msg = "비밀번호를 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof this.param.userId != "undefined") {
|
||||
if (pw.indexOf(this.param.userId) >= 0) {
|
||||
this.err_msg = "아이디가 포함된 문자열은 사용할 수 없습니다.";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < pw.length; i++) {
|
||||
var ch1 = pw.charAt(i);
|
||||
var ch2 = pw.charAt(i + 1);
|
||||
var ch3 = pw.charAt(i + 2);
|
||||
var ch4 = pw.charAt(i + 3);
|
||||
if (ch1 == ch2 && ch2 == ch3 && ch3 == ch4) {
|
||||
//console.log(ch1 + "" + ch2 + "" + ch3 + ch4 + " is equality");
|
||||
this.err_msg = "연속적인 숫자 또는 문자열은 사용할 수 없습니다.";
|
||||
return false;
|
||||
}
|
||||
if (ch1.charCodeAt(0) - ch2.charCodeAt(0) == 1 && ch2.charCodeAt(0) - ch3.charCodeAt(0) == 1 && ch3.charCodeAt(0) - ch4.charCodeAt(0) == 1) {
|
||||
//console.log(ch1 + "" + ch2 + "" + ch3 + ch4 + " is continuity");
|
||||
this.err_msg = "연속적인 숫자 또는 문자열은 사용할 수 없습니다.";
|
||||
return false;
|
||||
}
|
||||
if (ch1.charCodeAt(0) - ch2.charCodeAt(0) == -1 && ch2.charCodeAt(0) - ch3.charCodeAt(0) == -1 && ch3.charCodeAt(0) - ch4.charCodeAt(0) == -1) {
|
||||
//console.log(ch1 + "" + ch2 + "" + ch3 + ch4 + " is continuity");
|
||||
this.err_msg = "연속적인 숫자 또는 문자열은 사용할 수 없습니다.";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof this.param.phone != "undefined" && this.param.phone != null) {
|
||||
var phone = this.param.phone;
|
||||
phone = phone.substring(3, phone.length); // 앞 3자리 제거
|
||||
|
||||
var last = phone.substring(phone.length - 4, phone.length); // 뒤 4자리 추출
|
||||
var middle = phone.substring(0, phone.length - 4); // 뒤 4자리 제거 == 국번
|
||||
|
||||
if (pw.indexOf(middle) >= 0 || pw.indexOf(last) >= 0) {
|
||||
this.err_msg = "휴대폰번호가 포함된 문자열은 사용할 수 없습니다.";
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
if (pw.length >= 10) {
|
||||
if (pw.match(/^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[!@#$%^&*])([a-zA-Z0-9!@#$%^&*]+)$/)) {
|
||||
return true;
|
||||
} else if (!pw.match(/^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/)
|
||||
&& !pw.match(/^(?=.*[0-9])(?=.*[!@#$%^&*])([0-9!@#$%^&*]+)$/)
|
||||
&& !pw.match(/^(?=.*[a-zA-Z])(?=.*[!@#$%^&*])([a-zA-Z!@#$%^&*]+)$/)) {
|
||||
this.err_msg = "영문, 숫자, 특수문자 중 2가지 이상 조합하여 10자리 이상 또는 3가지 이상 조합하여 8자리 이상이어야 합니다.";
|
||||
return false;
|
||||
}
|
||||
} else if (pw.length >= 8) {
|
||||
if (!pw.match(/^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[!@#$%^&*])([a-zA-Z0-9!@#$%^&*]+)$/)) {
|
||||
this.err_msg = "영문, 숫자, 특수문자 중 2가지 이상 조합하여 10자리 이상 또는 3가지 이상 조합하여 8자리 이상이어야 합니다.";
|
||||
return false;
|
||||
}
|
||||
/** * 전화번호 포맷으로 변환 * * @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 {
|
||||
this.err_msg = "영문, 숫자, 특수문자 중 2가지 이상 조합하여 10자리 이상 또는 3가지 이상 조합하여 8자리 이상이어야 합니다.";
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
checkName: function (name) {
|
||||
if (name == null || name.trim() == "") {
|
||||
this.err_msg = "이름을 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
checkDeptNm: function (dept) {
|
||||
if (dept == null || dept.trim() == "") {
|
||||
this.err_msg = "부서명을 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
checkPhone: function (phone) {
|
||||
if (phone == null || phone.trim() == "") {
|
||||
this.err_msg = "휴대폰번호를 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
if (phone.length < 10) {
|
||||
this.err_msg = "휴대폰번호를 정확히 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
checkEmail: function (email) {
|
||||
if (email == null || email.trim() == "") {
|
||||
this.err_msg = "이메일을 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
// eslint-disable-next-line
|
||||
if (!email.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)) {
|
||||
this.err_msg = "이메일을 정확히 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
checkIp: function (param) {
|
||||
if ((param.ip1 == null || param.ip1 == "") && (param.ip2 == null || param.ip2 == "") && (param.ip3 == null || param.ip3 == "") && (param.ip4 == null || param.ip4 == "")) {
|
||||
this.err_msg = "접근허용 IP를 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
if ((param.ip1 == null || param.ip1 == "")
|
||||
|| (param.ip2 == null || param.ip2 == "")
|
||||
|| (param.ip3 == null || param.ip3 == "")
|
||||
|| (param.ip4 == null || param.ip4 == "")) {
|
||||
this.err_msg = "IP 주소를 정확히 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
checkIpEach: function (ip, msg) {
|
||||
if (ip == null || ip == "") {
|
||||
this.err_msg = typeof msg != "undefined" ? msg : "접근허용 IP를 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
if (!ip.match(/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/)) {
|
||||
this.err_msg = "IP 주소를 정확히 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
checkIpWithAsterisk: function (ip, msg) {
|
||||
if (ip == null || ip == "") {
|
||||
this.err_msg = typeof msg != "undefined" ? msg : "접근허용 IP를 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
// 3레벨 이후 * 허용... 2레벨 이후 시 {2,3} 1레벨 이후시 {1,3} 필요 시 구문 추가
|
||||
if (!ip.match(/^((((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}\*))$/)) {
|
||||
this.err_msg = "IP 주소를 정확히 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
checkRole: function (role) {
|
||||
if (role == null || role == "") {
|
||||
this.err_msg = "권한을 선택해 주세요.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
//리스크관리
|
||||
checkSpamCliId: function (comnId, spamCliId) {
|
||||
if (comnId == "N") {
|
||||
if (spamCliId == null || spamCliId.trim() == "") {
|
||||
this.err_msg = "SMID를 입력해 주세요.";
|
||||
return false;
|
||||
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;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return phoneNum;
|
||||
}
|
||||
},
|
||||
checkReqType: function (reqType) {
|
||||
if (reqType == null || reqType.trim() == "") {
|
||||
this.err_msg = "요청자를 선택해 주세요.";
|
||||
/** * 핸드폰번호 포맷으로 변환 * * @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;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
checkSpamType: function (spamType) {
|
||||
if (spamType == null || spamType.trim() == "") {
|
||||
this.err_msg = "차단사유를 선택해 주세요.";
|
||||
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;
|
||||
}
|
||||
},
|
||||
checkSpamContents: function (blockType) {
|
||||
var str = "";
|
||||
for (var k in this.callBacks) {
|
||||
str = this.callBacks[k].spamContent;
|
||||
|
||||
|
||||
if (blockType == "CLB") {
|
||||
if (str == null || str.trim() == "") {
|
||||
this.err_msg = "발신번호를 입력해 주세요.";
|
||||
return false;
|
||||
} else {
|
||||
if (this.bytes(str) < 8) {
|
||||
this.err_msg = "발신번호가 8자리 미만입니다.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.bytes(str) > 11) {
|
||||
this.err_msg = "발신번호가 11자리 초과입니다.";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (str == null || str.trim() == "") {
|
||||
this.err_msg = "차단메시지를 입력해 주세요.";
|
||||
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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export { commonPwdView, validation };
|
||||
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 };
|
||||
373
frontend/src/modules/login/service/utils_mixin.js
Normal file
373
frontend/src/modules/login/service/utils_mixin.js
Normal file
@@ -0,0 +1,373 @@
|
||||
import lodash from "lodash";
|
||||
import moment from "moment";
|
||||
import '@/modules/mgt/components/eventlisteners.js';
|
||||
|
||||
const filter_mixin = {
|
||||
filters: {
|
||||
_yyyy_mm_dd(val){
|
||||
if(lodash.isNil(val) || lodash.trim(val) == '') return '';
|
||||
const orgin = val;
|
||||
if(orgin.length < 8) {
|
||||
return orgin;
|
||||
}
|
||||
if(!Number(orgin)) return orgin;
|
||||
const date = orgin.substring(0,8);
|
||||
if(moment(date).isValid()){
|
||||
return moment(date).format('YYYY[-]MM[-]DD');
|
||||
}
|
||||
return orgin;
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
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, filter_mixin };
|
||||
@@ -46,11 +46,13 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import api from '../service/api';
|
||||
import tokenSvc from '@/common/token-service';
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import LoginPopup from '@/components/LoginPopup.vue'
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
|
||||
export default {
|
||||
name: 'Params',
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
props: {
|
||||
userId: {
|
||||
type: String,
|
||||
@@ -63,7 +65,7 @@ export default {
|
||||
errors: [],
|
||||
mdn: '',
|
||||
confirmNum: '',
|
||||
userId: '',
|
||||
// userId: '',
|
||||
isAuthNum: false,
|
||||
isLogin: false,
|
||||
isAuth: false,
|
||||
@@ -141,13 +143,16 @@ export default {
|
||||
vm.$router.push({ path: '/'});
|
||||
return;
|
||||
}
|
||||
if (vm.mdn == null || vm.mdn.trim() == "" || vm.mdn.length < 11 || !vm.mdn){
|
||||
// vm.ModalOpen('modal06');
|
||||
this.row.title = '휴대폰번호 확인';
|
||||
this.row.msg1 = '휴대폰번호를 확인해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
const hp = this.mdn;
|
||||
if(!this.isNull(hp) && !this.isMobile(hp)){
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._phone.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var params = {
|
||||
"oprtrId": userId,
|
||||
"hpNo": this.mdn,
|
||||
@@ -163,8 +168,6 @@ export default {
|
||||
this.row.title = '인증번호 발송';
|
||||
this.row.msg1 = '인증번호를 발송하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// vm.ModalOpen('modal07');
|
||||
// console.log('시간 3:00 카운트 하기');
|
||||
this.isAuthNum = true;
|
||||
}else if (!this.timer) {
|
||||
this.timerStop(this.timer);
|
||||
@@ -172,9 +175,6 @@ export default {
|
||||
this.row.title = '인증번호 발송';
|
||||
this.row.msg1 = '인증번호를 발송하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// vm.ModalOpen('modal06');
|
||||
// 실패 -> 실패 코드에 따라 실패 팝업 보여주기
|
||||
//인증시간 초과 후 “시간초과!” 문구로 변경
|
||||
}
|
||||
} catch(err) {
|
||||
this.row.title = '로그인';
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
import api from '../service/api';
|
||||
import LoginPopup from '@/components/LoginPopup.vue';
|
||||
import tokenSvc from '@/common/token-service';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
export default {
|
||||
data: function() {
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
// 로그인 페이지 진입시
|
||||
if(!!tokenSvc.getToken()){
|
||||
if(tokenSvc.getToken()){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
this.$router.push({ path: '/' });
|
||||
@@ -130,11 +130,14 @@ export default {
|
||||
} else if(rsp.retCode == '4004') { // ID/PWD 불일치
|
||||
this.row.title = '비밀번호 오류';
|
||||
this.row.msg1 = '비밀번호를 확인해주세요.';
|
||||
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
} else if(rsp.retCode == '4005') { // ID/PWD 불일치 횟수초과로 계정 잠김 4005
|
||||
this.row.title = '로그인 실패';
|
||||
this.row.msg1 = '로그인 5회 실패하였습니다.';
|
||||
this.row.msg2 = '비밀번호 초기화 후 비밀번호를 변경해 주세요.';
|
||||
this.row.callFnc = 'resetPassword'
|
||||
console.log(this.row)
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
} else if(rsp.retCode == '4006') {
|
||||
// msg = '비밀번호를 변경하신지 90일이 지났습니다.\n비밀번호 변경 화면으로 이동합니다.';
|
||||
@@ -172,6 +175,11 @@ export default {
|
||||
ModalOpen: function(target){
|
||||
this.$refs.LoginPopup.ModalOpen(target);
|
||||
},
|
||||
alertCalbackFnc(callFnc){
|
||||
if(callFnc === 'resetPassword'){
|
||||
this.$router.push({ name: 'resetPassword',params: {}});
|
||||
}
|
||||
},
|
||||
|
||||
} //method 끝
|
||||
};
|
||||
|
||||
@@ -1,42 +1,35 @@
|
||||
<template>
|
||||
|
||||
<div class="wrap bg-wrap">
|
||||
|
||||
<!-- s: 패스워드초기화 -->
|
||||
<div class="login-box pw-reset">
|
||||
<div class="logo"></div>
|
||||
<div class="wbox">
|
||||
<h3 class="title">비밀번호 초기화</h3>
|
||||
<!-- <form action=""> -->
|
||||
<div class="login-form">
|
||||
<div>
|
||||
<input type="text" placeholder="아이디를 입력하세요" v-model="userId"></div>
|
||||
<div class="button_group">
|
||||
<button class="btn-pcolor" @click="ajaxReset">비밀번호 초기화 문자 발송하기</button>
|
||||
<button class="btn-default" @click="clickMenu('/login')">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
<div class="login-notice">
|
||||
<div>
|
||||
<li>초기화된 비밀번호는 등록된 휴대폰 문자메시지로 발송됩니다.</li>
|
||||
<li>휴대폰 번호 변경 시 관리자로 문의해주세요.</li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="login-box pw-reset">
|
||||
<div class="logo"></div>
|
||||
<div class="wbox">
|
||||
<h3 class="title">비밀번호 초기화</h3>
|
||||
<ul class="login-form">
|
||||
<li><input type="text" placeholder="아이디를 입력하세요" v-model="userId"></li>
|
||||
<li>
|
||||
<button class="btn-pcolor" @click="ajaxReset">비밀번호 초기화 문자 발송하기</button>
|
||||
<button class="btn-default" @click="clickMenu('/login')">취소</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="login-notice">
|
||||
<ul>
|
||||
<li>초기화된 비밀번호는 등록된 휴대폰 문자메시지로 발송됩니다.</li>
|
||||
<li>휴대폰 번호 변경 시 관리자로 문의해주세요.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commonModal"></common-modal>
|
||||
<login-popup ref="LoginPopup"> </login-popup>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from '../service/api';
|
||||
import LoginPopup from '@/components/LoginPopup.vue';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
export default {
|
||||
name: 'resetPassword',
|
||||
@@ -48,7 +41,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$store.commit("login/isLogin", false);
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", false);
|
||||
},
|
||||
components: {
|
||||
@@ -85,40 +78,42 @@ export default {
|
||||
console.log("RESULT_CODE : "+rsp.retCode);
|
||||
|
||||
if(rsp.retCode == '0000'){
|
||||
// vm.$store.commit("login/isLogin", true);
|
||||
//vm.$store.commit("login/isAuthChk", true);
|
||||
this.row.title = '비밀번호 초기화';
|
||||
this.row.msg1 = '해당 아이디에 저장되어 있는 핸드폰번호로';
|
||||
this.row.msg2 = '비밀번호 초기화 문자가 발송되었습니다.';
|
||||
this.row.callFnc = 'login'
|
||||
vm.$store.commit("login/isLogin", false);
|
||||
vm.$store.commit("login/isAuthChk", false);
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
// vm.ModalOpen('modal12');
|
||||
//vm.$router.push({ path : 'view/login'});
|
||||
// console.log(this.row)
|
||||
|
||||
} else if(rsp.retCode == '4003') {
|
||||
this.row.title = '비밀번호 초기화';
|
||||
this.row.msg1 = '등록되지 않은 아이디입니다.';
|
||||
this.row.msg2 = '아이디를 다시 확인하세요.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
// vm.ModalOpen('modal13');
|
||||
}
|
||||
// document.getElementsByClassName('modal12')[0].getElementsByClassName('btn-pcolor')[0].addEventListener('click',() => {
|
||||
// vm.$router.push({path: '/login'});
|
||||
} catch(err) {
|
||||
//alert("실패 하였습니다.");
|
||||
console.log(err)
|
||||
this.row.title = '비밀번호 초기화';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
,
|
||||
clickMenu(link) {
|
||||
this.$router.push({path: link});
|
||||
},
|
||||
},
|
||||
clickMenu(link) {
|
||||
this.$router.push({path: link});
|
||||
},
|
||||
|
||||
ModalOpen: function(target){
|
||||
this.$refs.LoginPopup.ModalOpen(target);
|
||||
},
|
||||
ModalOpen: function(target){
|
||||
this.$refs.LoginPopup.ModalOpen(target);
|
||||
},
|
||||
alertCalbackFnc(callFnc){
|
||||
if(callFnc === 'login'){
|
||||
this.$router.push({ name: 'login',params: {}});
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,25 +1,19 @@
|
||||
<template>
|
||||
<div class="wrap bg-wrap">
|
||||
<!-- s: 비밀번호변경 -->
|
||||
<div id="cpf" class="login-box pw-change">
|
||||
<div>
|
||||
<div class="login-box pw-change">
|
||||
<div class="logo"></div>
|
||||
<div class="wbox">
|
||||
<h3 class="title">비밀번호 변경</h3>
|
||||
<p class="desc">임시비밀번호로 로그인할 경우 비밀번호를 변경 후<br>서비스 이용이 가능합니다.</p>
|
||||
<form @submit.prevent="changedPwd">
|
||||
<ul class="pw-form">
|
||||
<div><input id="oldPw" type="password" placeholder="기존 비밀번호를 입력하세요" v-model="oldPw" ref="oldPw"></div>
|
||||
<div>
|
||||
<input id="newPw" type="password" placeholder="새로운 비밀번호를 입력하세요" required minlength="8" maxlength="16" v-model.trim="newPw" ref="_newPw">
|
||||
</div>
|
||||
<div><input type="password" placeholder="새로운 비밀번호를 다시 한 번 입력하세요" required minlength="8" maxlength="16" v-model.trim="newPw2" ref="_newPw2"></div>
|
||||
<div><button class="btn-pcolor" @click="changedPwd()">비밀번호 변경하기</button></div>
|
||||
<li><input type="password" placeholder="기존 비밀번호를 입력하세요" v-model="oldPw" ref="oldPw"></li>
|
||||
<li><input type="password" placeholder="새로운 비밀번호를 입력하세요" required minlength="8" maxlength="16" v-model.trim="newPw" ref="_newPw"></li>
|
||||
<li><input type="password" placeholder="새로운 비밀번호를 다시 한 번 입력하세요" required minlength="8" maxlength="16" v-model.trim="newPw2" ref="_newPw2"></li>
|
||||
<li><button class="btn-pcolor" @click="changedPwd()">비밀번호 변경하기</button></li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commonModal"></common-modal>
|
||||
<login-popup ref="LoginPopup"> </login-popup>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -29,10 +23,9 @@
|
||||
import lodash from "lodash";
|
||||
import api from '../service/api';
|
||||
import { mapGetters } from 'vuex';
|
||||
import LoginPopup from '@/components/LoginPopup.vue';
|
||||
import tokenSvc from '@/common/token-service';
|
||||
import { commonPwdView, validation } from '../service/mixins';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
export default {
|
||||
mixins: [commonPwdView, validation],
|
||||
@@ -48,20 +41,13 @@ export default {
|
||||
},
|
||||
|
||||
created: function() {
|
||||
if(!!tokenSvc.getToken()){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
this.$router.push({ path: '/' });
|
||||
}else{
|
||||
// if(!this.getLogin){
|
||||
// this.$router.push({ path: '/login' });
|
||||
// }
|
||||
}
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", false);
|
||||
},
|
||||
mounted() {
|
||||
mounted() {
|
||||
// this.$refs.chkSaveId.checked = true;
|
||||
|
||||
if (localStorage.hubwebUserId) {
|
||||
if (localStorage.hubwebUserId) {
|
||||
this.userId = localStorage.hubwebUserId;
|
||||
}
|
||||
this.isLogin = this.getLogin;
|
||||
@@ -72,16 +58,16 @@ export default {
|
||||
...mapGetters({
|
||||
getLogin: 'login/isLogin',
|
||||
getPwd: 'login/getPwd'
|
||||
}),
|
||||
}),
|
||||
},
|
||||
|
||||
watch: {
|
||||
getLogin(data) {
|
||||
getLogin(data) {
|
||||
if (data != null && data != '' && data == true) {
|
||||
this.isLogin = true;
|
||||
this.isLogin = true;
|
||||
} else {
|
||||
this.isLogin = false;
|
||||
}
|
||||
this.isLogin = false;
|
||||
}
|
||||
},
|
||||
getPwd(data) {
|
||||
if(data != null && data != ''){
|
||||
@@ -91,7 +77,6 @@ export default {
|
||||
},
|
||||
|
||||
components: {
|
||||
LoginPopup : LoginPopup,
|
||||
commonModal,
|
||||
},
|
||||
|
||||
@@ -148,7 +133,7 @@ export default {
|
||||
},
|
||||
|
||||
//비밀번호 유효성 체크
|
||||
changedPwd: function() {
|
||||
async changedPwd() {
|
||||
|
||||
if(this.doPwdValidate()){
|
||||
var vm = this;
|
||||
@@ -159,11 +144,10 @@ export default {
|
||||
"oldPw": this.oldPw,
|
||||
"newPw": this.newPw
|
||||
}
|
||||
|
||||
api.updatePassword(params).then(function(response) {
|
||||
var rsp = response.data;
|
||||
// var pofo = document.getElementById('oldPw');
|
||||
|
||||
try {
|
||||
const response = await api.updatePassword(params)
|
||||
const rsp = response.data;
|
||||
console.log("RESULT_CODE : "+rsp.retCode);
|
||||
if(rsp.retCode == '0000') {
|
||||
// vm.chgChkUserId();
|
||||
this.row.title = '비밀번호 변경';
|
||||
@@ -188,11 +172,50 @@ export default {
|
||||
} else if(rsp.retCode == '4003') {
|
||||
this.row.title = '아이디 오류';
|
||||
this.row.msg1 = '등록되지 않은 아이디입니다.';
|
||||
this.row.msg1 = '아이디를 다시 확인하세요';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
|
||||
}
|
||||
});
|
||||
} catch(err) {
|
||||
//alert("실패 하였습니다.");
|
||||
console.log(err)
|
||||
this.row.title = '비밀번호 초기화';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
// api.updatePassword(params).then(function(response) {
|
||||
// var rsp = response.data;
|
||||
// // var pofo = document.getElementById('oldPw');
|
||||
//
|
||||
// if(rsp.retCode == '0000') {
|
||||
// // vm.chgChkUserId();
|
||||
// this.row.title = '비밀번호 변경';
|
||||
// this.row.msg1 = '비밀번호가 정상적으로 변경되었습니다.';
|
||||
// this.row.msg2 = '변경된 비밀번호로 다시 로그인 해주세요.';
|
||||
// this.$refs.commonModal.alertModalOpen(this.row);
|
||||
// // if(vm.ModalOpen('modal16')){
|
||||
// vm.$router.push({ path: '/login' });
|
||||
// // }
|
||||
// } else if(rsp.retCode == '4016') {
|
||||
// this.row.title = '비밀번호 변경';
|
||||
// this.row.msg1 = '비밀번호를 확인해주세요.';
|
||||
// this.$refs.commonModal.alertModalOpen(this.row);
|
||||
// // vm.ModalOpen('modal14')
|
||||
// } else if(rsp.retCode == '4017') {
|
||||
// this.row.title = '비밀번호 오류';
|
||||
// this.row.msg1 = '비밀번호를 사용할 수 없습니다.';
|
||||
// this.row.msg2 = '비밀번호는 영문/숫자/특수기호를 혼합하여';
|
||||
// this.row.msg3 = '8~16자리로 설정해주세요.';
|
||||
// this.$refs.commonModal.alertModalOpen(this.row);
|
||||
// // vm.ModalOpen('modal15')
|
||||
// } else if(rsp.retCode == '4003') {
|
||||
// this.row.title = '아이디 오류';
|
||||
// this.row.msg1 = '등록되지 않은 아이디입니다.';
|
||||
// this.row.msg1 = '아이디를 다시 확인하세요';
|
||||
// this.$refs.commonModal.alertModalOpen(this.row);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
},
|
||||
@@ -211,7 +234,7 @@ export default {
|
||||
return length;
|
||||
},
|
||||
ModalOpen: function(target){
|
||||
this.$refs.LoginPopup.ModalOpen(target);
|
||||
// this.$refs.LoginPopup.ModalOpen(target);
|
||||
// this.$refs.oldPw.focus(target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
<label for="blckRsnCd" class="label">차단사유</label>
|
||||
<select name="" id="blckRsnCd" v-model="grid.params.blckRsnCd" @keyup="search">
|
||||
<option value="" selected>전체</option>
|
||||
<option value="">일반</option>
|
||||
<option value="">대출</option>
|
||||
<option value="">의약품</option>
|
||||
<option value="">도박</option>
|
||||
<option value="">스미싱</option>
|
||||
<option value="">기타</option>
|
||||
<option value="01">일반</option>
|
||||
<option value="02">대출</option>
|
||||
<option value="03">의약품</option>
|
||||
<option value="04">도박</option>
|
||||
<option value="05">스미싱</option>
|
||||
<option value="06">기타</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,22 +31,22 @@
|
||||
<label for="right" class="label">차단여부</label>
|
||||
<select name="" id="" v-model="grid.params.blckYn">
|
||||
<option value="" selected>전체</option>
|
||||
<option value="">차단</option>
|
||||
<option value="">해제</option>
|
||||
<option value="Y">차단</option>
|
||||
<option value="N">해제</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">발송타입</label>
|
||||
<select name="" id="" v-model="grid.params.sndblckTpCd">
|
||||
<option value="" selected>전체</option>
|
||||
<option value="">공용</option>
|
||||
<option value="">문자</option>
|
||||
<option value="">RCS</option>
|
||||
<option value="01">공용</option>
|
||||
<option value="02">문자</option>
|
||||
<option value="03">RCS</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box">
|
||||
<label for="right" class="label">발신번호</label>
|
||||
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.blcksndrno">
|
||||
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.blckSndrno">
|
||||
</div>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
@@ -171,7 +171,7 @@ export default {
|
||||
blckYn: '',
|
||||
sndblckTpCd: '',
|
||||
sndblckTpNm: '',
|
||||
blcksndrno: ''
|
||||
blckSndrno: ''
|
||||
},
|
||||
excelHeader: []
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
<div class="count">총 <span> {{ totalItems }} </span>건
|
||||
<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>
|
||||
|
||||
103
frontend/src/modules/stats/service/mock/bsnmDayExcelHeader.json
Normal file
103
frontend/src/modules/stats/service/mock/bsnmDayExcelHeader.json
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"header": [
|
||||
[
|
||||
{
|
||||
"key": "sumYmd",
|
||||
"name": "날짜",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "custNm",
|
||||
"name": "고객사명",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "bizrno",
|
||||
"name": "사업자번호",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"name": "전체",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "SMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "LMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "MMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "알림톡",
|
||||
"colspan": 3
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"key": "sndCnt",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCnt",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRt",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntS",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntS",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtS",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntL",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntL",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtL",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntM",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntM",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtM",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntR",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntR",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtR",
|
||||
"name": "성공률(%)"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"header": [
|
||||
[
|
||||
{
|
||||
"key": "sumYm",
|
||||
"name": "날짜",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "custNm",
|
||||
"name": "고객사명",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "bizrno",
|
||||
"name": "사업자번호",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"name": "전체",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "SMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "LMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "MMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "알림톡",
|
||||
"colspan": 3
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"key": "sndCnt",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCnt",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRt",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntS",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntS",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtS",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntL",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntL",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtL",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntM",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntM",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtM",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntR",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntR",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtR",
|
||||
"name": "성공률(%)"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
93
frontend/src/modules/stats/service/mock/dayExcelHeader.json
Normal file
93
frontend/src/modules/stats/service/mock/dayExcelHeader.json
Normal file
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"header": [
|
||||
[
|
||||
{
|
||||
"key": "sumYmd",
|
||||
"name": "날짜",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"name": "전체",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "SMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "LMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "MMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "알림톡",
|
||||
"colspan": 3
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"key": "sndCnt",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCnt",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRt",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntS",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntS",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtS",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntL",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntL",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtL",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntM",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntM",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtM",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntR",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntR",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtR",
|
||||
"name": "성공률(%)"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"header": [
|
||||
[
|
||||
{
|
||||
"key": "sumYm",
|
||||
"name": "날짜",
|
||||
"rowspan": 2
|
||||
},
|
||||
{
|
||||
"name": "전체",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "SMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "LMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "MMS",
|
||||
"colspan": 3
|
||||
},
|
||||
{
|
||||
"name": "알림톡",
|
||||
"colspan": 3
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"key": "sndCnt",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCnt",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRt",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntS",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntS",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtS",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntL",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntL",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtL",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntM",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntM",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtM",
|
||||
"name": "성공률(%)"
|
||||
},
|
||||
{
|
||||
"key": "sndCntR",
|
||||
"name": "발송건수"
|
||||
},
|
||||
{
|
||||
"key": "succCntR",
|
||||
"name": "성공건수"
|
||||
},
|
||||
{
|
||||
"key": "succRtR",
|
||||
"name": "성공률(%)"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
import httpClient from '@/common/http-client';
|
||||
import dayExcelHeader from './mock/dayExcelHeader.json';
|
||||
import monthExcelHeader from './mock/monthExcelHeader.json'
|
||||
import bsnmDayExcelHeader from './mock/bsnmDayExcelHeader.json'
|
||||
import bsnmMonthExcelHeader from './mock/bsnmMonthExcelHeader.json'
|
||||
|
||||
// HUBEZ_BO_API - 일별 통계 목록 조회.
|
||||
const dayList = (params) => {
|
||||
@@ -20,10 +24,46 @@ const bsnmMonthList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/stats/bsnmMonthList', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
const bsnmMonthListExcel = (params) => {
|
||||
return httpClient.post('/api/v1/bo/stats/bsnmMonthListExcel', params);
|
||||
}
|
||||
|
||||
const bsnmDayListExcel = (params) => {
|
||||
return httpClient.post('/api/v1/bo/stats/bsnmDayListExcel', params);
|
||||
}
|
||||
|
||||
const getExcelHeader = category => {
|
||||
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
|
||||
return new Promise(function(resolve, reject) {
|
||||
let header = [];
|
||||
switch (category) {
|
||||
case 'DAY':
|
||||
header = dayExcelHeader.header;
|
||||
break;
|
||||
case 'MONTH':
|
||||
header = monthExcelHeader.header;
|
||||
break;
|
||||
case 'BSNM_DAY':
|
||||
header = bsnmDayExcelHeader.header;
|
||||
break;
|
||||
case 'BSNM_MONTH':
|
||||
header = bsnmMonthExcelHeader.header;
|
||||
break;
|
||||
default:
|
||||
header = '';
|
||||
break;
|
||||
}
|
||||
resolve(header);
|
||||
});
|
||||
};
|
||||
|
||||
export default {
|
||||
dayList,
|
||||
monthList,
|
||||
bsnmDayList,
|
||||
bsnmMonthList,
|
||||
getExcelHeader,
|
||||
bsnmMonthListExcel,
|
||||
bsnmDayListExcel,
|
||||
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="search_wrap">
|
||||
<div class="input_box cal">
|
||||
<label for="right" class="label txt">날짜</label>
|
||||
<p> 최대 3개월까지 조회 가능합니다.</p>
|
||||
<p> 최대 1개월까지 조회 가능합니다.</p>
|
||||
<div class="term">
|
||||
<!--
|
||||
<input class="date" type="text" id="" placeholder="2022-10-12"/>
|
||||
@@ -63,7 +63,7 @@
|
||||
<div class="info">
|
||||
<div class="count">집계결과</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue download">엑셀 다운로드</button>
|
||||
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
list:[],
|
||||
totalCnt: '',
|
||||
|
||||
pageType: 'SUBS',
|
||||
pageType: 'BSNM_DAY',
|
||||
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 50,
|
||||
@@ -243,7 +243,9 @@ export default {
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
this.grid.params.custNm='';
|
||||
this.grid.params.bizrno='';
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let page = 1;
|
||||
@@ -360,6 +362,53 @@ export default {
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log("getCondition : "+ getCondition.perPage);
|
||||
},
|
||||
initSetStartDate(){
|
||||
let initStartDate = new Date();
|
||||
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -2);
|
||||
this.startDate = initStartDate;
|
||||
console.log(moment(this.startDate).format('YYYY-MM-DD'));
|
||||
},
|
||||
async getExcelDataDown() {
|
||||
try {
|
||||
let response;
|
||||
|
||||
response = await statsApi.bsnmDayListExcel(this.grid.params);
|
||||
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
return result.data;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
}, // end of getExcelDataDown
|
||||
async excelDown() {
|
||||
if (this.$refs.table.getData().length <= 0) {
|
||||
this.row.title = '사업자별 일별통계';
|
||||
this.row.msg1 = '조회된 데이터가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
let today = moment().format('YYYYMMDDHHmmss');
|
||||
const saveFileName = `사업자별 일별통계_${today}.xlsx`;
|
||||
|
||||
const data = await this.getExcelDataDown();
|
||||
let options = {
|
||||
header: this.excelHeader,
|
||||
dataOrder: 'header'
|
||||
};
|
||||
// console.log(data);
|
||||
xlsx.export(data.list, saveFileName, options).then(() => {});
|
||||
},
|
||||
getExcelHeader() {
|
||||
// 헤더를 mockup으로 관리한다.
|
||||
custMgtApi.getExcelHeader(this.pageType).then(res => {
|
||||
this.excelHeader = res;
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -67,7 +67,7 @@
|
||||
<div class="info">
|
||||
<div class="count">집계결과</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue download">엑셀 다운로드</button>
|
||||
<button type="button" class="button blue download" @click="monthExcelDown();">엑셀 다운로드</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -119,7 +119,7 @@ export default {
|
||||
list:[],
|
||||
totalCnt: '',
|
||||
|
||||
pageType: 'SUBS',
|
||||
pageType: 'BSNM_MONTH',
|
||||
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 50,
|
||||
@@ -248,10 +248,13 @@ export default {
|
||||
},
|
||||
created(){
|
||||
this.setPeriodDay(0);
|
||||
this.getExcelHeader();
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
this.grid.params.custNm='';
|
||||
this.grid.params.bizrno='';
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let page = 1;
|
||||
@@ -310,9 +313,10 @@ export default {
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.endDate = new Date();
|
||||
this.startDate = moment(this.endDate)
|
||||
.subtract(day, 'day')
|
||||
.toDate();
|
||||
// this.startDate = moment(this.endDate)
|
||||
// .subtract(day, 'day')
|
||||
// .toDate();
|
||||
this.initSetStartDate();
|
||||
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
@@ -368,6 +372,54 @@ export default {
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log("getCondition : "+ getCondition.perPage);
|
||||
},
|
||||
initSetStartDate(){
|
||||
let initStartDate = new Date();
|
||||
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -3);
|
||||
this.startDate = initStartDate;
|
||||
console.log(moment(this.startDate).format('YYYY-MM-DD'));
|
||||
},
|
||||
getExcelHeader() {
|
||||
// 헤더를 mockup으로 관리한다.
|
||||
custMgtApi.getExcelHeader(this.pageType).then(res => {
|
||||
this.excelHeader = res;
|
||||
});
|
||||
},
|
||||
async getExcelDataDown() {
|
||||
try {
|
||||
let response;
|
||||
|
||||
response = await statsApi.bsnmMonthListExcel(this.grid.params);
|
||||
|
||||
const result = response.data;
|
||||
console.log(result)
|
||||
if (result != null && result.retCode == "0000") {
|
||||
return result.data;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
}, // end of getExcelDataDown
|
||||
async monthExcelDown() {
|
||||
if (this.$refs.table.getData().length <= 0) {
|
||||
this.row.title = '사업자별 월별통계';
|
||||
this.row.msg1 = '조회된 데이터가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
let today = moment().format('YYYYMMDDHHmmss');
|
||||
const saveFileName = `사업자별 월별통계_${today}.xlsx`;
|
||||
|
||||
const data = await this.getExcelDataDown();
|
||||
let options = {
|
||||
header: this.excelHeader,
|
||||
dataOrder: 'header'
|
||||
};
|
||||
console.log(data);
|
||||
xlsx.export(data.list, saveFileName, options).then(() => {});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -46,7 +46,7 @@
|
||||
<div class="info">
|
||||
<div class="count">집계결과</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue download">엑셀 다운로드</button>
|
||||
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -92,13 +92,13 @@
|
||||
<td>{{ option.sumYmd }}</td>
|
||||
<td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRt }}%)</td>
|
||||
<td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtS }}%)</td>
|
||||
<td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtL }}%)</td>
|
||||
<td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtM }}%)</td>
|
||||
<td>{{ option.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtR }}%)</td>
|
||||
</tr>
|
||||
|
||||
@@ -132,7 +132,9 @@ export default {
|
||||
startDt:'',
|
||||
endDt:'',
|
||||
|
||||
row: {},
|
||||
pageType:'DAY',
|
||||
|
||||
row: {},
|
||||
list:[],
|
||||
totalCnt: '',
|
||||
};
|
||||
@@ -146,6 +148,7 @@ export default {
|
||||
// this.endDt = moment().format('YYYY-MM-DD');
|
||||
this.setPeriodDay(0);
|
||||
this.getDayList();
|
||||
this.getExcelHeader();
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
@@ -223,9 +226,10 @@ export default {
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.endDate = new Date();
|
||||
this.startDate = moment(this.endDate)
|
||||
.subtract(day, 'day')
|
||||
.toDate();
|
||||
// this.startDate = moment(this.endDate)
|
||||
// .subtract(day, 'day')
|
||||
// .toDate();
|
||||
this.initSetStartDate();
|
||||
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
@@ -265,7 +269,38 @@ export default {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
}
|
||||
},
|
||||
|
||||
initSetStartDate(){
|
||||
let initStartDate = new Date();
|
||||
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -2);
|
||||
this.startDate = initStartDate;
|
||||
console.log(moment(this.startDate).format('YYYY-MM-DD'));
|
||||
},
|
||||
|
||||
excelDown() {
|
||||
if (this.list.length <= 0) {
|
||||
this.row.title = '일별통계';
|
||||
this.row.msg1 = '조회된 데이터가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
let today = moment().format('YYYYMMDDHHmmss');
|
||||
const saveFileName = `일별통계_${today}.xlsx`;
|
||||
|
||||
let options = {
|
||||
header: this.excelHeader,
|
||||
dataOrder: 'header'
|
||||
};
|
||||
// console.log(data);
|
||||
xlsx.export(this.list, saveFileName, options).then(() => {});
|
||||
},
|
||||
getExcelHeader() {
|
||||
// 헤더를 mockup으로 관리한다.
|
||||
statsApi.getExcelHeader(this.pageType).then(res => {
|
||||
this.excelHeader = res;
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -52,7 +52,7 @@
|
||||
<div class="info">
|
||||
<div class="count">집계결과</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue download">엑셀 다운로드</button>
|
||||
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -199,9 +199,10 @@ export default {
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.endDate = new Date();
|
||||
this.startDate = moment(this.endDate)
|
||||
.subtract(day, 'day')
|
||||
.toDate();
|
||||
// this.startDate = moment(this.endDate)
|
||||
// .subtract(day, 'day')
|
||||
// .toDate();
|
||||
this.initSetStartDate();
|
||||
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
@@ -240,6 +241,37 @@ export default {
|
||||
} else {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
}
|
||||
},
|
||||
initSetStartDate(){
|
||||
let initStartDate = new Date();
|
||||
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -3);
|
||||
this.startDate = initStartDate;
|
||||
console.log(moment(this.startDate).format('YYYY-MM-DD'));
|
||||
},
|
||||
excelDown() {
|
||||
if (this.list.length <= 0) {
|
||||
this.row.title = '월별통계';
|
||||
this.row.msg1 = '조회된 데이터가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
let today = moment().format('YYYYMMDDHHmmss');
|
||||
const saveFileName = `월별통계_${today}.xlsx`;
|
||||
|
||||
let options = {
|
||||
header: this.excelHeader,
|
||||
dataOrder: 'header'
|
||||
};
|
||||
// console.log(data);
|
||||
xlsx.export(this.list, saveFileName, options).then(() => {});
|
||||
},
|
||||
getExcelHeader() {
|
||||
// 헤더를 mockup으로 관리한다.
|
||||
statsApi.getExcelHeader(this.pageType).then(res => {
|
||||
this.excelHeader = res;
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
188
frontend/src/modules/sysMgt/components/commonModal.vue
Normal file
188
frontend/src/modules/sysMgt/components/commonModal.vue
Normal file
@@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
|
||||
<div class="dimmed alertModal" @click="alertModalCancel();"></div>
|
||||
<div class="popup-wrap alertModal">
|
||||
<!-- 로그인실패: 확인 -->
|
||||
<div class="popup alertModal">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn1">
|
||||
<button class="btn-pcolor" @click="alertModalClose();">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dimmed confirm" @click="confirmModalCancel();"></div>
|
||||
<div class="popup-wrap confirm">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup confirm">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmModalClose();">확인</button>
|
||||
<button class="btn-default" @click="confirmModalCancel();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dimmed confirm2" @click="confirmModalCancel2();"></div>
|
||||
<div class="popup-wrap confirm2">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup confirm2">
|
||||
<div class="pop-head">
|
||||
<h3 class="popup-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmModalClose2();">확인</button>
|
||||
<button class="btn-default" @click="confirmModalCancel2();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "confirm",
|
||||
data(){
|
||||
return{
|
||||
row:{},
|
||||
title:'',
|
||||
msg1: '',
|
||||
msg2: '',
|
||||
msg3: '',
|
||||
msg4: '',
|
||||
targetFocus: '',
|
||||
}
|
||||
},
|
||||
methods :{
|
||||
alertModalOpen(props){
|
||||
console.log('>>>>>>>>>> alertModalOpen');
|
||||
console.log(props.msg1);
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
|
||||
var dimmed = document.getElementsByClassName('alertModal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
},
|
||||
alertModalClose(){
|
||||
var dimmed = document.getElementsByClassName('alertModal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.checkFocus();
|
||||
},
|
||||
alertModalCancel(){
|
||||
var dimmed = document.getElementsByClassName('alertModal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.checkFocus();
|
||||
},
|
||||
// 모달 오픈
|
||||
confirmModalOpen(props){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
},
|
||||
confirmModalOpen2(props){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
},
|
||||
// 모달 끄기(ok)
|
||||
confirmModalClose(){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(ok)
|
||||
confirmModalClose2(){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(취소)
|
||||
confirmModalCancel(){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = false;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(취소)
|
||||
confirmModalCancel2(){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = false;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!--
|
||||
<style>
|
||||
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
|
||||
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
|
||||
.popup-btn-wrap button:hover {background: #000; color: #fff;}
|
||||
</style> -->
|
||||
@@ -71,8 +71,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
<td class="check">
|
||||
<p>서비스관리</p>
|
||||
@@ -188,8 +186,9 @@
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" type="button" @click="authAddCancel()">취소</button>
|
||||
<button class="btn-pcolor" type="button" @click="authAddSave()">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -197,6 +196,8 @@
|
||||
|
||||
import sysMgtApi from "../service/sysMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
//import commonModal from "@/components/modal/commonModal";
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
export default {
|
||||
name: 'authAdd',
|
||||
@@ -215,6 +216,7 @@ export default {
|
||||
};
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
created(){
|
||||
//this.setCodeData();
|
||||
@@ -230,29 +232,44 @@ export default {
|
||||
|
||||
// 필수 등록정보 체크
|
||||
if(this.isNull(this.authNm)){
|
||||
alert("권한명을 입력해 주세요");
|
||||
this.$refs._authNm.focus();
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한명을 입력해 주세요.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.authCd)){
|
||||
alert('권한 코드를 입력해주세요.');
|
||||
this.$refs._authCd.focus();
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한 코드를 입력해 주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.authCd.length > 5){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.stat)){
|
||||
alert('상태를 체크해주세요.');
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '상태를 체크해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.checkedAuthMenu.length == 0){
|
||||
alert('메뉴 권한 체크를 해주세요.');
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '메뉴 권한 체크를 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
return true;
|
||||
|
||||
},
|
||||
authAddCancel() {
|
||||
@@ -260,8 +277,17 @@ export default {
|
||||
this.$router.push({ name: 'authList'});
|
||||
|
||||
},
|
||||
async authAddSave(){
|
||||
if(this.doValidate() && window.confirm('저장 하시겠습니까?')){
|
||||
authAddSave(){
|
||||
if(this.doValidate()){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한 등록 저장하시겠습니까?';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.confirmModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
async authInsert(){
|
||||
|
||||
var reqAuthMenuArr = this.checkedAuthMenu;
|
||||
var listArr = [];
|
||||
var dataMap = {};
|
||||
@@ -275,6 +301,7 @@ export default {
|
||||
listArr.push(dataMap);
|
||||
}
|
||||
|
||||
|
||||
this.row.authCd = this.authCd;
|
||||
this.row.authNm = this.authNm;
|
||||
this.row.authDesc = this.authDesc;
|
||||
@@ -287,22 +314,50 @@ export default {
|
||||
let response = await sysMgtApi.insertAuth(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('저장 하였습니다.');
|
||||
//alert('저장 하였습니다.');
|
||||
// 권한리스트 페이지 이동
|
||||
this.$router.push({ name: 'authList'});
|
||||
|
||||
} else if(result.retCode == "4017"){
|
||||
alert("권한코드가 이미 존재합니다.");
|
||||
this.$refs._authCd.focus();
|
||||
//alert("권한코드가 이미 존재합니다.");
|
||||
//this.$refs._authCd.focus();
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한코드가 이미 존재합니다.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
|
||||
} else {
|
||||
alert("실패 하였습니다.");
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
checkFocus(){
|
||||
if(this.row.focusTaget === '1'){
|
||||
this.$refs._authNm.focus();
|
||||
} else if(this.row.focusTaget === '2'){
|
||||
this.$refs._authCd.focus();
|
||||
}
|
||||
},
|
||||
confirmCalbackFnc(props){
|
||||
if(props.result){
|
||||
this.authInsert();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 체크박스 전체선택 기능
|
||||
|
||||
@@ -188,6 +188,7 @@
|
||||
<button class="btn-pcolor" type="button" @click="authModifySave()">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -195,6 +196,7 @@
|
||||
|
||||
import sysMgtApi from "../service/sysMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
export default {
|
||||
name: 'authModify',
|
||||
@@ -219,6 +221,7 @@ export default {
|
||||
}
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
created(){
|
||||
//this.setCodeData();
|
||||
@@ -235,24 +238,40 @@ export default {
|
||||
|
||||
// 필수 등록정보 체크
|
||||
if(this.isNull(this.authNm)){
|
||||
alert("권한명을 입력해 주세요");
|
||||
this.$refs._authNm.focus();
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한명을 입력해 주세요.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.authCd)){
|
||||
alert('권한 코드를 입력해주세요.');
|
||||
this.$refs._authCd.focus();
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한 코드를 입력해 주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.authCd.length > 5){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.stat)){
|
||||
alert('상태를 체크해주세요.');
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '상태를 체크해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.checkedAuthMenu.length == 0){
|
||||
alert('메뉴 권한 체크를 해주세요.');
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '메뉴 권한 체크를 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -294,15 +313,34 @@ export default {
|
||||
}
|
||||
|
||||
} else {
|
||||
alert("실패 하였습니다.");
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
} catch(err) {
|
||||
alert("처리 실패 하였습니다.");
|
||||
//alert("처리 실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
async authModifySave(){
|
||||
if(this.doValidate() && window.confirm('저장 하시겠습니까?')){
|
||||
authModifySave(){
|
||||
if(this.doValidate()){
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '권한 수정 저장하시겠습니까?';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.confirmModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
async authUpdate(){
|
||||
|
||||
var reqAuthMenuArr = this.checkedAuthMenu;
|
||||
var listArr = [];
|
||||
var dataMap = {};
|
||||
@@ -328,18 +366,40 @@ export default {
|
||||
let response = await sysMgtApi.updateAuth(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('저장 하였습니다.');
|
||||
//alert('저장 하였습니다.');
|
||||
// 권한리스트 페이지 이동
|
||||
this.$router.push({ name: 'authList'});
|
||||
} else {
|
||||
alert("실패 하였습니다.");
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '시스템관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.row.focusTaget = '0';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
checkFocus(){
|
||||
if(this.row.focusTaget === '1'){
|
||||
this.$refs._authNm.focus();
|
||||
} else if(this.row.focusTaget === '2'){
|
||||
this.$refs._authCd.focus();
|
||||
}
|
||||
},
|
||||
confirmCalbackFnc(props){
|
||||
if(props.result){
|
||||
this.authUpdate();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 체크박스 전체선택 기능
|
||||
|
||||
Reference in New Issue
Block a user