mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 00:30:57 +09:00
소스검증을 위한 수정 변경
This commit is contained in:
@@ -4,11 +4,13 @@
|
||||
<!-- 선택한 메뉴 li.is-current -->
|
||||
<li v-for="child in menuList" :key="child.menuNo" :class="child.classNm">
|
||||
<div class="menu_btn" ></div>
|
||||
<a class="menu_target" @click="actionMenu" :data-menu-no="child.menuNo">{{child.menuNm}}</a>
|
||||
<a href="javascript:void(0);" class="menu_target" @click="actionMenu" :data-menu-no="child.menuNo">{{child.menuNm}}</a>
|
||||
<!-- <router-link :to="`${child.menuNo}`">{{child.menuNm}}</router-link>-->
|
||||
<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">
|
||||
<a href="javascript:void(0);" @click="clickMenu(child2.menuUrl)" :data-menu-no="child2.menuNo">{{child2.menuNm}}</a>
|
||||
<!-- <a href="javascript:void(0);" @click="clickMenu(child2.menuUrl)" :data-menu-no="child2.menuNo">{{child2.menuNm}}</a>-->
|
||||
<router-link :to="`${child2.menuUrl}`">{{child2.menuNm}}</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -20,8 +22,6 @@
|
||||
<script>
|
||||
//import "../assets/js/script.js";
|
||||
import api from '@/service/api.js';
|
||||
// import api from "@/service/api";
|
||||
// import loginApi from "@/modules/login/service/api"
|
||||
import tokenSvc from '@/common/token-service';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
@@ -37,7 +37,8 @@ export default {
|
||||
isErrPage: false,
|
||||
navActive: false,
|
||||
menuList: [],
|
||||
tempList: []
|
||||
tempList: [],
|
||||
nowPath:'',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -76,12 +77,57 @@ export default {
|
||||
this.isErrPage = false;
|
||||
}
|
||||
},
|
||||
$route(to, from) {
|
||||
if (to.path != from.path) {
|
||||
/* router path가 변경될 때마다 서버로 접근로그를 저장한다. */
|
||||
const menuList = document.querySelectorAll('.main_menu .is-current');
|
||||
for(const other of menuList){
|
||||
other.classList.remove('is-current');
|
||||
}
|
||||
// const path = to.path;
|
||||
var toPathUrl = to.path;
|
||||
if(toPathUrl.indexOf('custMgt') > -1){
|
||||
const div = document.querySelector('.customer');
|
||||
div.classList.add('is-current')
|
||||
}else if(toPathUrl.indexOf('attractMgt') > -1){
|
||||
const div = document.querySelector('.attract');
|
||||
div.classList.add('is-current')
|
||||
}else if(toPathUrl.indexOf('servMgt') > -1){
|
||||
const div = document.querySelector('.service');
|
||||
div.classList.add('is-current')
|
||||
}else if(toPathUrl.indexOf('calculate') > -1){
|
||||
const div = document.querySelector('.calculate');
|
||||
div.classList.add('is-current')
|
||||
}else if(toPathUrl.indexOf('channelMgt') > -1){
|
||||
const div = document.querySelector('.channel');
|
||||
div.classList.add('is-current')
|
||||
}else if(toPathUrl.indexOf('sendNumMgt') > -1){
|
||||
const div = document.querySelector('.key');
|
||||
div.classList.add('is-current')
|
||||
}else if(toPathUrl.indexOf('mntrng') > -1){
|
||||
const div = document.querySelector('.moniter');
|
||||
div.classList.add('is-current')
|
||||
}else if(toPathUrl.indexOf('riskMgt') > -1){
|
||||
const div = document.querySelector('.risk');
|
||||
div.classList.add('is-current')
|
||||
}else if(toPathUrl.indexOf('stats') > -1){
|
||||
const div = document.querySelector('.stats');
|
||||
div.classList.add('is-current')
|
||||
}else if(toPathUrl.indexOf('sysMgt') > -1){
|
||||
const div = document.querySelector('.system');
|
||||
div.classList.add('is-current')
|
||||
}else{
|
||||
const div = document.querySelector('.customer');
|
||||
div.classList.add('is-current')
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setMenuData() {
|
||||
api.menus().then(response => {
|
||||
const rootMenu = response.data.data;
|
||||
console.log(rootMenu);
|
||||
// console.log(rootMenu);
|
||||
if (rootMenu != null && rootMenu.children != null && rootMenu.children.length > 0) {
|
||||
this.tempList = rootMenu.children;
|
||||
for(var i=0; i<this.tempList.length; i++){
|
||||
@@ -103,16 +149,8 @@ export default {
|
||||
this.tempList[i].classNm = classNm;
|
||||
//console.log(classNm);
|
||||
}
|
||||
|
||||
//this.menuList = rootMenu.children;
|
||||
this.menuList = this.tempList;
|
||||
var location = this.$route.fullPath;
|
||||
console.log(location)
|
||||
if(location.contains(classNm)){
|
||||
|
||||
}
|
||||
//this.$store.commit("login/isLogin", true);
|
||||
//this.$store.commit("login/isAuthChk", true);
|
||||
} else {
|
||||
window.top.location.href = '/';
|
||||
// this.isLogin = false;
|
||||
@@ -133,6 +171,7 @@ export default {
|
||||
},
|
||||
reload(){
|
||||
var location = this.$route.fullPath;
|
||||
// console.log('reload() >> ' + location)
|
||||
if (location == "/" || location == "") {
|
||||
// nothing
|
||||
} else {
|
||||
|
||||
@@ -199,7 +199,7 @@ export default {
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 처리
|
||||
async memberUpdate(){
|
||||
async memberUpdate(){
|
||||
this.row.userId = this.userId;
|
||||
this.row.userPw = this.userPwd1;
|
||||
this.row.userNm = this.userNm;
|
||||
@@ -210,29 +210,31 @@ export default {
|
||||
const response = await custMgtApi.updateUser(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
this.row = {}
|
||||
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.memberUpdateModalClose();
|
||||
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
|
||||
memberUpdateModalClose(){
|
||||
var dimmed = document.getElementsByClassName('memberUpdate');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
toComplete(){
|
||||
this.row.serviceId = this.adminId;
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
<button class="btn-default" @click="memoTotalModalClose();">닫기</button>
|
||||
</div>
|
||||
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<common-modal ref="commmonMemoModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
import customGrid from "@/components/CustomGrid";
|
||||
import api from '@/service/api';
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
@@ -81,6 +81,8 @@ export default {
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 10,
|
||||
userId: '',
|
||||
seqNo:'',
|
||||
|
||||
grid: {
|
||||
url: '/api/v1/bo/custMgt/allMemoList',
|
||||
pagePerRows: 10,
|
||||
@@ -94,13 +96,13 @@ export default {
|
||||
{ name: 'register', header: '작성자', align: 'center'},
|
||||
{ name: 'regDt', header: '작성일', align: 'center'},
|
||||
{ name: 'delete', header: '삭제', align: 'center', renderer: {
|
||||
type: CustomATagRenderer
|
||||
,options: {
|
||||
callback: this.deleteMemo,
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'seqNo', header: '내용일련번호', align: 'center', hidden: true},
|
||||
type: CustomATagRenderer
|
||||
,options: {
|
||||
callback: this.deleteMemo,
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'seqNo', header: '내용일련번호', align: 'center', hidden: true},
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
@@ -145,7 +147,7 @@ export default {
|
||||
const getP_memo = this.$refs.table.getPagination();
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP_memo._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
perPage: this.perPageCnt,
|
||||
params: {
|
||||
userId : this.userId,
|
||||
}
|
||||
@@ -163,8 +165,8 @@ export default {
|
||||
|
||||
// 메모 모달팝업 오픈
|
||||
var dimmed = document.getElementsByClassName('memoTotal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
// 리스트 그리드 오픈
|
||||
@@ -185,63 +187,71 @@ export default {
|
||||
|
||||
},
|
||||
//메모전체 모달 Close
|
||||
memoTotalModalClose(){
|
||||
var dimmed = document.getElementsByClassName('memoTotal');
|
||||
memoTotalModalClose(){
|
||||
var dimmed = document.getElementsByClassName('memoTotal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.memberDetail(this.userId);
|
||||
//this.formReset();
|
||||
},
|
||||
toComplete(){
|
||||
this.row.serviceId = this.adminId;
|
||||
this.memoTotalModalClose();
|
||||
this.$parent.memberDetail(this.adminId);
|
||||
},
|
||||
deleteMemo: function(props) {
|
||||
console.log(props);
|
||||
var param = {};
|
||||
param.seqNo = props.seqNo;
|
||||
param.userId = this.userId;
|
||||
this.deleteMemoConfirm(param);
|
||||
},
|
||||
async deleteMemoConfirm(target){
|
||||
},
|
||||
toComplete(){
|
||||
this.row.serviceId = this.adminId;
|
||||
this.memoTotalModalClose();
|
||||
this.$parent.memberDetail(this.adminId);
|
||||
},
|
||||
deleteMemo: function(props) {
|
||||
console.log(props);
|
||||
this.seqNo=props.seqNo;
|
||||
this.memorow = {}
|
||||
this.memorow.title = '메모';
|
||||
this.memorow.msg1 = '삭제 하시겠습니까?';
|
||||
this.$refs.commmonMemoModal.confirmModalOpenMemo(this.memorow);
|
||||
},
|
||||
async deleteMemoConfirm(target){
|
||||
try {
|
||||
const response = await custMgtApi.deleteMemo(target);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
// alert('삭제 성공');
|
||||
// 그리드 reload
|
||||
// 리스트 그리드 오픈
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition : '+getCondition);
|
||||
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
try {
|
||||
const response = await custMgtApi.deleteMemo(target);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
// alert('삭제 성공');
|
||||
// 그리드 reload
|
||||
// 리스트 그리드 오픈
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition : '+getCondition);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
if (getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
this.search(isKeep);
|
||||
} else {
|
||||
this.memorow.title = '청약고객관리';
|
||||
this.memorow.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.memorow);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.memorow.title = '청약고객관리';
|
||||
this.memorow.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.memorow);
|
||||
}
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
if (getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
this.search(isKeep);
|
||||
} else {
|
||||
this.memorow.title = '메모 삭제';
|
||||
this.memorow.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonMemoModal.alertModalOpen(this.memorow);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.memorow.title = '메모 삭제';
|
||||
this.memorow.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonMemoModal.alertModalOpen(this.memorow);
|
||||
}
|
||||
},
|
||||
confirmCalbackFnc(props){
|
||||
console.log(props)
|
||||
if(props.result){
|
||||
this.memorow = {}
|
||||
this.memorow.seqNo = this.seqNo;
|
||||
this.memorow.userId = this.userId;
|
||||
this.deleteMemoConfirm(this.memorow);
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,58 +3,56 @@
|
||||
<div>
|
||||
<div class="dimmed" @click="ModalClose();"></div>
|
||||
<div class="popup-wrap">
|
||||
<!-- 테스트 ID 생성 -->
|
||||
<div class="popup modal29 popup_form">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">테스트 ID 생성</h3>
|
||||
</div>
|
||||
<form autocomplete="off">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td><input type="text" placeholder="아이디 입력" v-model.trim="userId" ref="_userId" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd1" v-model.trim="userPwd1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호 확인</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd2" v-model.trim="userPwd2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이름</th>
|
||||
<td><input type="text" @keypress="onlyName" @input="onlyName" v-model.trim="userNm" ref="_userNm" required maxlength="40"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>휴대폰번호</th>
|
||||
<td><input type="number" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" v-on:keyup="onlyNum" @input="onlyNum" minlength="10" maxlength="11" ref="_phone"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td><input type="email" v-model.trim="email" @keypress="onlyEmail" @input="onlyEmail" maxlength="20" ref="_email"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="center">상태</th>
|
||||
<td>
|
||||
<input type="radio" name="state" value="01" id="popup_radio1" v-model="userStat">
|
||||
<label for="popup_radio1">사용</label>
|
||||
<input type="radio" name="state" value="02" id="popup_radio2" v-model="userStat">
|
||||
<label for="popup_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
<button class="btn-pcolor" @click="doInsert">저장</button>
|
||||
</div>
|
||||
|
||||
<!-- 테스트 ID 생성 -->
|
||||
<div class="popup modal29 popup_form">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">테스트 ID 생성</h3>
|
||||
</div>
|
||||
<form autocomplete="off">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td><input type="text" placeholder="아이디 입력" v-model.trim="userId" ref="_userId" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd1" v-model.trim="userPwd1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호 확인</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd2" v-model.trim="userPwd2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이름</th>
|
||||
<td><input type="text" @keypress="onlyName" @input="onlyName" v-model.trim="userNm" ref="_userNm" required maxlength="40"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>휴대폰번호</th>
|
||||
<td><input type="number" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" v-on:keyup="onlyNum" @input="onlyNum" minlength="10" maxlength="11" ref="_phone"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td><input type="email" v-model.trim="email" @keypress="onlyEmail" @input="onlyEmail" maxlength="20" ref="_email"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="center">상태</th>
|
||||
<td>
|
||||
<input type="radio" name="state" value="01" id="popup_radio1" v-model="userStat">
|
||||
<label for="popup_radio1">사용</label>
|
||||
<input type="radio" name="state" value="02" id="popup_radio2" v-model="userStat">
|
||||
<label for="popup_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="doInsert">저장</button>
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -64,7 +62,7 @@ import api from '@/service/api';
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import lodash from "lodash";
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import commonModal from "../components/commonModal";
|
||||
import ValidationConfirmPop from "@/modules/custMgt/components/ValidationConfirmPop";
|
||||
|
||||
export default {
|
||||
@@ -99,7 +97,7 @@ export default {
|
||||
},
|
||||
created(){
|
||||
this.formReset();
|
||||
},
|
||||
},
|
||||
methods :{
|
||||
doPwdValidate(){
|
||||
if(this.isNull(this.userPwd1)){
|
||||
@@ -200,9 +198,9 @@ export default {
|
||||
return false;
|
||||
}
|
||||
this.row.userId=this.userId;
|
||||
this.row.name=this.userNm;
|
||||
this.row.userNm=this.userNm;
|
||||
this.row.mdn=hp;
|
||||
this.row.email=email;
|
||||
this.row.userEmail=email;
|
||||
this.row.userStat=this.userStat;
|
||||
return true;
|
||||
},
|
||||
@@ -214,6 +212,7 @@ export default {
|
||||
wrap[0].style.display = 'block';
|
||||
var obj = document.getElementsByClassName('modal29');
|
||||
obj[0].style.display = 'block';
|
||||
this.formReset();
|
||||
},
|
||||
// 모달 끄기
|
||||
ModalClose(){
|
||||
@@ -228,18 +227,20 @@ export default {
|
||||
},
|
||||
// 저장 후 부모창 호출.
|
||||
toComplete(){
|
||||
this.getParent('custList').$refs.table.reloadData();
|
||||
this.getParent('memberList').$refs.table.reloadData();
|
||||
this.ModalClose();
|
||||
},
|
||||
},
|
||||
async doInsert(){
|
||||
if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
|
||||
if(this.doValidate()){
|
||||
console.log(this.row)
|
||||
|
||||
try {
|
||||
const response = await custMgtApi.insertTestId(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '저장 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// this.row.title = '청약고객관리';
|
||||
// this.row.msg1 = '저장 하였습니다.';
|
||||
// this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.toComplete();
|
||||
}
|
||||
} catch(err) {
|
||||
@@ -249,15 +250,11 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
formReset(){
|
||||
//this.$refs.adminRegForm.reset();
|
||||
},
|
||||
formReset(){
|
||||
// this.$refs.adminRegForm.reset();
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</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>
|
||||
</script>
|
||||
@@ -18,24 +18,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용자 등록 - 최초 등록 -->
|
||||
<!-- 사용자 등록 - 최초 등록 -->
|
||||
<div class="dimmed confirm-insert" @click="confirmInsertClose();"></div>
|
||||
<div class="popup-wrap confirm-insert">
|
||||
<div class="popup confirm-insert">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 등록</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>해당 사용자를 등록하고 인증 메일을</p>
|
||||
<p>발송하시겠습니까?</p>
|
||||
<p>사용을 위해서는 등록된 이메일 인증 후</p>
|
||||
<p>서비스 이용이 가능합니다.</p>
|
||||
</div>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-pcolor" @click="confirmInsert();">확인</button>
|
||||
<button class="btn-default" @click="confirmInsertClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup confirm-insert">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 등록</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>해당 사용자를 등록하고 인증 메일을</p>
|
||||
<p>발송하시겠습니까?</p>
|
||||
<p>사용을 위해서는 등록된 이메일 인증 후</p>
|
||||
<p>서비스 이용이 가능합니다.</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmInsert();">확인</button>
|
||||
<button class="btn-default" @click="confirmInsertClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용자 등록 - 이메일 형식 체크 -->
|
||||
@@ -124,18 +124,18 @@
|
||||
<!-- 사용자 수정 확인 -->
|
||||
<div class="dimmed confirm-update" @click="confirmUpdateClose();"></div>
|
||||
<div class="popup-wrap confirm-update">
|
||||
<div class="popup confirm-update">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 수정 확인</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>변경된 내용을 저장하시겠습니까?</p>
|
||||
</div>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-pcolor" @click="confirmUpdate();">확인</button>
|
||||
<button class="btn-default" @click="confirmUpdateClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup confirm-update">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 수정 확인</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>변경된 내용을 저장하시겠습니까?</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmUpdate();">확인</button>
|
||||
<button class="btn-default" @click="confirmUpdateClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용자 수정(청약고객:sub) 확인 -->
|
||||
|
||||
@@ -60,6 +60,27 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dimmed confirmMemo" @click="confirmModalCancelMemo();"></div>
|
||||
<div class="popup-wrap confirmMemo">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup confirmMemo">
|
||||
<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="confirmModalCloseMemo();">확인</button>
|
||||
<button class="btn-default" @click="confirmModalCancelMemo();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -80,14 +101,13 @@ export default {
|
||||
},
|
||||
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;
|
||||
|
||||
console.log(props)
|
||||
var dimmed = document.getElementsByClassName('alertModal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
@@ -110,6 +130,7 @@ export default {
|
||||
},
|
||||
// 모달 오픈
|
||||
confirmModalOpen(props){
|
||||
console.log(props)
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
@@ -127,6 +148,18 @@ export default {
|
||||
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;
|
||||
},
|
||||
confirmModalOpenMemo(props){
|
||||
var dimmed = document.getElementsByClassName('confirmMemo');
|
||||
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;
|
||||
@@ -151,6 +184,17 @@ export default {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(ok)
|
||||
confirmModalCloseMemo(){
|
||||
var dimmed = document.getElementsByClassName('confirmMemo');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
@@ -177,6 +221,18 @@ export default {
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(취소)
|
||||
confirmModalCancelMemo(){
|
||||
var dimmed = document.getElementsByClassName('confirmMemo');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = false;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.memberDeleteConfirmCalbackFnc(this.row);
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -68,6 +68,11 @@ const updateAdminInfoTotal = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/updateAdminInfoTotal', params);
|
||||
}
|
||||
|
||||
//insertTestId
|
||||
const insertTestId = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/insertTestId', params);
|
||||
}
|
||||
|
||||
// 메모삭제
|
||||
const deleteMemo = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/deleteMemo', params);
|
||||
@@ -111,4 +116,5 @@ export default {
|
||||
deleteUser,
|
||||
updateAdminInfoTotal,
|
||||
deleteMemo,
|
||||
insertTestId,
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue add" @click="memberInsertPopOpen();">사용자 ID 생성</button>
|
||||
<button type="button" class="button blue add" @click="excelPopOpen();">사용자 ID 대량생성</button>
|
||||
<button type="button" class="button white del" @click="memberDelete();">삭제</button>
|
||||
<button type="button" class="button white del" @click="deleteMember();">삭제</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -348,9 +348,19 @@ export default {
|
||||
this.row.adminId = this.adminId;
|
||||
this.$refs.memoTatalListPop.memoTotalModalOpen(this.row);
|
||||
},
|
||||
async memberDelete(){
|
||||
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
deleteMember() {
|
||||
console.log('delete count:'+this.selected.length);
|
||||
if(this.selected.length === 0){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '삭제대상을 체크해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
this.row.title ='청약고객관리';
|
||||
this.row.msg1 ='삭제 하시겠습니까?'
|
||||
this.$refs.commmonModal.confirmModalOpen2(this.row);
|
||||
},
|
||||
async memberDelete(){
|
||||
var serviceId = this.adminId;
|
||||
this.row.list = this.selected.map((row)=>({userId:row}));
|
||||
this.row.adminId = this.adminId;
|
||||
@@ -359,18 +369,20 @@ export default {
|
||||
let response = await custMgtApi.deleteUser(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '저장 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.memberDetail(serviceId);
|
||||
}
|
||||
}else{
|
||||
this.row={}
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.row={}
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
setAuthData() {
|
||||
// 권한 옵션.
|
||||
@@ -388,6 +400,12 @@ export default {
|
||||
this.svcUserId = this.userId
|
||||
this.ezSvcUserAuthKey = process.env.VUE_APP_AUTHKEY
|
||||
this.$refs.form.submit()
|
||||
},
|
||||
confirmCalbackFnc(props){
|
||||
console.log(props)
|
||||
if(props.result){
|
||||
this.memberDelete();
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -308,7 +308,7 @@ export default {
|
||||
},
|
||||
setCodeData() {
|
||||
// 상태 옵션 셋팅.
|
||||
api.commCode({'grpCd' : 'SVCUSER_STTUS_CD'}).then(response => {
|
||||
api.commCode({'grpCd' : 'SUBS_STTUS_CD'}).then(response => {
|
||||
this.statType = response.data.data.list;
|
||||
});
|
||||
//
|
||||
|
||||
@@ -180,9 +180,3 @@ 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>
|
||||
@@ -48,7 +48,7 @@ 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";
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
export default {
|
||||
name: 'Params',
|
||||
@@ -137,16 +137,26 @@ export default {
|
||||
async authNum(){
|
||||
var vm = this;
|
||||
let userId = vm.$route.params.userId;
|
||||
this.row = {}
|
||||
|
||||
if(!this.isLogin){
|
||||
vm.$store.commit("login/isLogin", false);
|
||||
vm.$store.commit("login/isAuthChk", false);
|
||||
vm.$router.push({ path: '/'});
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
const hp = this.mdn;
|
||||
|
||||
if(this.isNull(hp)){
|
||||
this.row.title = '로그인';
|
||||
this.row.msg1 = '휴대폰번호를 입력하세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!this.isNull(hp) && !this.isMobile(hp)){
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.title = '로그인';
|
||||
this.row.msg1 = '휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._phone.focus();
|
||||
@@ -162,13 +172,26 @@ export default {
|
||||
const response = await api.authNum(params)
|
||||
console.log(response);
|
||||
var rsp = response.data;
|
||||
if(rsp.retCode == '0000'){
|
||||
if(rsp.retCode == '0000') {
|
||||
this.timerStop(this.timer);
|
||||
this.timer = this.timerStart();
|
||||
this.row.title = '인증번호 발송';
|
||||
this.row.msg1 = '인증번호를 발송하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.isAuthNum = true;
|
||||
}else if(rsp.retCode == '4008'){
|
||||
this.row.title = '휴대폰번호 확인';
|
||||
this.row.msg1 = '휴대폰번호를 확인해주세요.';
|
||||
this.row.msg2 = '아이디에 등록된 휴대폰번호로만 인증이 가능합니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}else if(rsp.retCode == '4011'){
|
||||
this.row.title = '인증실패';
|
||||
this.row.msg1 = '잘못된 인증번호입니다.';
|
||||
this.row.msg2 = '5회 실패 시 로그아웃됩니다.';
|
||||
this.row.callFnc = 'login'
|
||||
vm.$store.commit("login/isLogin", false);
|
||||
vm.$store.commit("login/isAuthChk", false);
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}else if (!this.timer) {
|
||||
this.timerStop(this.timer);
|
||||
this.timer = null;
|
||||
@@ -187,7 +210,7 @@ export default {
|
||||
async ajaxAuth(){
|
||||
var vm = this;
|
||||
let userId = vm.$route.params.userId;
|
||||
|
||||
this.row = {}
|
||||
if(!this.mdn){
|
||||
this.row.title = '휴대폰번호 확인';
|
||||
this.row.msg1 = '휴대폰번호를 확인해 주세요.';
|
||||
@@ -209,7 +232,11 @@ export default {
|
||||
}
|
||||
|
||||
if(this.timeCounter == 0){
|
||||
this.ModalOpen('modal10');
|
||||
// this.ModalOpen('modal10');
|
||||
this.row.title = '인증실패';
|
||||
this.row.msg1 = '인증시간 초과되었습니다.';
|
||||
this.row.msg2 = '다시 휴대폰번호를 입력해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
var params = {
|
||||
@@ -324,7 +351,12 @@ export default {
|
||||
+ secondes.toString().padStart(2, "0")
|
||||
);
|
||||
},
|
||||
|
||||
alertCalbackFnc(callFnc){
|
||||
console.log(callFnc)
|
||||
if(callFnc === 'login'){
|
||||
this.$router.push({ path: '/'});
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="login-box adm-login">
|
||||
<div class="wbox">
|
||||
<div class="logo"></div>
|
||||
@@ -22,9 +24,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<login-popup ref="LoginPopup"> </login-popup>
|
||||
<common-modal ref="commonModal"></common-modal>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -67,7 +71,7 @@ export default {
|
||||
cont.classList.remove("login-wrap");
|
||||
},
|
||||
components: {
|
||||
LoginPopup : LoginPopup,
|
||||
// LoginPopup : LoginPopup,
|
||||
commonModal,
|
||||
},
|
||||
methods: {
|
||||
@@ -85,6 +89,7 @@ export default {
|
||||
|
||||
var vm = this;
|
||||
vm.errmsg = null;
|
||||
this.row = {}
|
||||
// if (!vm.formCheck()) return false;
|
||||
console.log(this.userId)
|
||||
if (!this.userId){
|
||||
@@ -145,7 +150,7 @@ export default {
|
||||
this.row.msg1 = '비밀번호를 변경하지 않은지 90일이';
|
||||
this.row.msg2 = '지났습니다. 비밀번호를 변경하여';
|
||||
this.row.msg3 = '이용 부탁드립니다.';
|
||||
vm.$router.push({ name: 'updatePassword',params: {userId : oprtrId}});
|
||||
this.row.callFnc = 'updatePassword'
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
} else if(rsp.retCode == '4007') {
|
||||
this.row.title = '로그인 실패';
|
||||
@@ -173,11 +178,18 @@ export default {
|
||||
});
|
||||
},
|
||||
ModalOpen: function(target){
|
||||
this.$refs.LoginPopup.ModalOpen(target);
|
||||
// this.$refs.LoginPopup.ModalOpen(target);
|
||||
},
|
||||
alertCalbackFnc(callFnc){
|
||||
console.log(callFnc)
|
||||
if(callFnc === 'resetPassword'){
|
||||
this.$router.push({ name: 'resetPassword',params: {}});
|
||||
}else if(callFnc === 'updatePassword'){
|
||||
// this.$router.push({ name: 'updatePassword', params: {}}).catch(()=>{});
|
||||
// this.$router.push({ name: 'updatePassword', params: {userId : this.userId} });
|
||||
// this.$router.push({ path: '/view/login/updatePassword', params: {userId : this.userId}});
|
||||
|
||||
this.$router.push({ name: 'updatePassword',params: {userId : this.userId}});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -49,28 +49,17 @@ export default {
|
||||
commonModal,
|
||||
},
|
||||
methods: {
|
||||
formCheck: function()
|
||||
{
|
||||
this.errors = [];
|
||||
if (!this.userId) {
|
||||
this.row.title = '아이디 오류';
|
||||
this.row.msg1 = '아이디를 입력해 주세요.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
// this.errors.push('아이디를 입력해 주세요.');
|
||||
}
|
||||
|
||||
return this.errors.length == 0;
|
||||
},
|
||||
|
||||
async ajaxReset(){
|
||||
var vm = this;
|
||||
//vm.errmsg = null;
|
||||
if (!vm.formCheck()) return false;
|
||||
|
||||
if (!this.userId) {
|
||||
this.row.title = '아이디 오류';
|
||||
this.row.msg1 = '아이디를 입력해 주세요.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
var params =
|
||||
{
|
||||
"userId": this.userId,
|
||||
//"userPwd": this.userPwd,
|
||||
"userId": this.userId
|
||||
}
|
||||
try {
|
||||
const response = await api.resetPassword(params)
|
||||
@@ -94,7 +83,6 @@ export default {
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch(err) {
|
||||
//alert("실패 하였습니다.");
|
||||
console.log(err)
|
||||
this.row.title = '비밀번호 초기화';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
|
||||
@@ -1,243 +1,219 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="login-box pw-change">
|
||||
<div class="logo"></div>
|
||||
<div class="wbox">
|
||||
<h3 class="title">비밀번호 변경</h3>
|
||||
<p class="desc">임시비밀번호로 로그인할 경우 비밀번호를 변경 후<br>서비스 이용이 가능합니다.</p>
|
||||
<div>
|
||||
<div class="login-box pw-change">
|
||||
<div class="logo"></div>
|
||||
<div class="wbox">
|
||||
<h3 class="title">비밀번호 변경</h3>
|
||||
<p class="desc">임시비밀번호로 로그인할 경우 비밀번호를 변경 후<br>서비스 이용이 가능합니다.</p>
|
||||
<ul class="pw-form">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commonModal"></common-modal>
|
||||
</div>
|
||||
<common-modal ref="commonModal"></common-modal>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import lodash from "lodash";
|
||||
import api from '../service/api';
|
||||
import { mapGetters } from 'vuex';
|
||||
import tokenSvc from '@/common/token-service';
|
||||
import { commonPwdView, validation } from '../service/mixins';
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
export default {
|
||||
mixins: [commonPwdView, validation],
|
||||
name: 'updatePassword',
|
||||
data: function() {
|
||||
return {
|
||||
userId: '',
|
||||
oldPw: '',
|
||||
newPw: '',
|
||||
newPw2: '',
|
||||
passwordValidFlag: true,
|
||||
row: {},
|
||||
};
|
||||
return {
|
||||
userId: '',
|
||||
oldPw: '',
|
||||
newPw: '',
|
||||
newPw2: '',
|
||||
passwordValidFlag: true,
|
||||
row: {},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", false);
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
mounted() {
|
||||
// this.$refs.chkSaveId.checked = true;
|
||||
|
||||
if (localStorage.hubwebUserId) {
|
||||
this.userId = localStorage.hubwebUserId;
|
||||
}
|
||||
this.isLogin = this.getLogin;
|
||||
this.oldPw = this.getPwd;
|
||||
},
|
||||
methods: {
|
||||
verifyNewPw: function() {
|
||||
this.message.newPw = '';
|
||||
},
|
||||
|
||||
created: function() {
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", false);
|
||||
},
|
||||
mounted() {
|
||||
// this.$refs.chkSaveId.checked = true;
|
||||
formCheck: function() {
|
||||
this.errors = [];
|
||||
|
||||
if (localStorage.hubwebUserId) {
|
||||
this.userId = localStorage.hubwebUserId;
|
||||
}
|
||||
this.isLogin = this.getLogin;
|
||||
this.oldPw = this.getPwd;
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters({
|
||||
getLogin: 'login/isLogin',
|
||||
getPwd: 'login/getPwd'
|
||||
}),
|
||||
},
|
||||
if (!this.oldPw) this.errors.push('기존비밀번호');
|
||||
if (!this.newPw) this.errors.push('새로운비밀번호');
|
||||
|
||||
watch: {
|
||||
getLogin(data) {
|
||||
if (data != null && data != '' && data == true) {
|
||||
this.isLogin = true;
|
||||
} else {
|
||||
this.isLogin = false;
|
||||
}
|
||||
},
|
||||
getPwd(data) {
|
||||
if(data != null && data != ''){
|
||||
this.pwd = data;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
commonModal,
|
||||
return this.errors.length == 0;
|
||||
},
|
||||
|
||||
methods: {
|
||||
verifyNewPw: function() {
|
||||
this.message.newPw = '';
|
||||
},
|
||||
doPwdValidate(){
|
||||
console.log(this.userId)
|
||||
//debugger;
|
||||
if(lodash.isNull(this.newPw)){
|
||||
this.row.title = '비밀번호 변경';
|
||||
this.row.msg1 = '비밀번호 확인을 입력해 주세요.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
this.$refs._newPw2.focus();
|
||||
return false;
|
||||
}
|
||||
if(!lodash.isEqual(this.newPw, this.newPw2)){
|
||||
this.row.title = '비밀번호 변경';
|
||||
this.row.msg1 = '비밀번호가 일치하지 않습니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
this.$refs._newPw2.focus();
|
||||
return false;
|
||||
}
|
||||
const pwdLen = this.bytes(this.newPw);
|
||||
if(!(pwdLen >= 8 && pwdLen <= 16)){
|
||||
this.row.title = '비밀번호 변경';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
this.$refs._newPw2.focus();
|
||||
return false;
|
||||
}
|
||||
const pEng = /[A-Za-z]/g; // 영문자
|
||||
const pNum = /[0-9]/g; // 숫자
|
||||
const pSpc = /[!@$%^&*]/g; // 특수문자
|
||||
if(!(pEng.test(this.newPw) && pNum.test(this.newPw) && pSpc.test(this.newPw))) {
|
||||
this.row.title = '비밀번호 변경';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
this.$refs._newPw2.focus();
|
||||
return;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
formCheck: function() {
|
||||
this.errors = [];
|
||||
|
||||
//비밀번호 유효성 체크
|
||||
async changedPwd() {
|
||||
|
||||
if (!this.oldPw) this.errors.push('기존비밀번호');
|
||||
if (!this.newPw) this.errors.push('새로운비밀번호');
|
||||
if(this.doPwdValidate()){
|
||||
var vm = this;
|
||||
|
||||
return this.errors.length == 0;
|
||||
},
|
||||
var params = {
|
||||
|
||||
doPwdValidate(){
|
||||
//debugger;
|
||||
if(lodash.isNil(this.newPw)){
|
||||
this.row.title = '비밀번호 변경';
|
||||
this.row.msg1 = '비밀번호 확인을 입력해 주세요.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
this.$refs._newPw2.focus();
|
||||
return false;
|
||||
"userId": this.userId,
|
||||
"oldPw": this.oldPw,
|
||||
"newPw": this.newPw
|
||||
}
|
||||
if(!lodash.isEqual(this.newPw, this.newPw2)){
|
||||
this.row.title = '비밀번호 변경';
|
||||
this.row.msg1 = '비밀번호가 일치하지 않습니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
this.$refs._newPw2.focus();
|
||||
return false;
|
||||
}
|
||||
const pwdLen = this.bytes(this.newPw);
|
||||
if(!(pwdLen >= 8 && pwdLen <= 16)){
|
||||
this.row.title = '비밀번호 변경';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
this.$refs._newPw2.focus();
|
||||
return false;
|
||||
}
|
||||
const pEng = /[A-Za-z]/g; // 영문자
|
||||
const pNum = /[0-9]/g; // 숫자
|
||||
const pSpc = /[!@$%^&*]/g; // 특수문자
|
||||
if(!(pEng.test(this.newPw) && pNum.test(this.newPw) && pSpc.test(this.newPw))) {
|
||||
this.row.title = '비밀번호 변경';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
this.$refs._newPw2.focus();
|
||||
return;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
//비밀번호 유효성 체크
|
||||
async changedPwd() {
|
||||
|
||||
if(this.doPwdValidate()){
|
||||
var vm = this;
|
||||
|
||||
var params = {
|
||||
|
||||
"userId": this.userId,
|
||||
"oldPw": this.oldPw,
|
||||
"newPw": this.newPw
|
||||
}
|
||||
try {
|
||||
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 = '비밀번호 변경';
|
||||
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.$refs.commonModal.alertModalOpen(this.row);
|
||||
|
||||
}
|
||||
} catch(err) {
|
||||
//alert("실패 하였습니다.");
|
||||
console.log(err)
|
||||
this.row.title = '비밀번호 초기화';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
if(rsp.retCode == '0000') {
|
||||
// vm.chgChkUserId();
|
||||
this.row.title = '비밀번호 변경';
|
||||
this.row.msg1 = '비밀번호가 정상적으로 변경되었습니다.';
|
||||
this.row.msg2 = '변경된 비밀번호로 다시 로그인 해주세요.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
// if(vm.ModalOpen('modal16')){
|
||||
|
||||
// }
|
||||
} 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.$refs.commonModal.alertModalOpen(this.row);
|
||||
|
||||
}
|
||||
// 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);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
} catch(err) {
|
||||
//alert("실패 하였습니다.");
|
||||
console.log(err)
|
||||
this.row.title = '비밀번호 초기화';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
bytes: function (str) {
|
||||
var length = ((s,b,i,c) => {
|
||||
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;
|
||||
},
|
||||
ModalOpen: function(target){
|
||||
// this.$refs.LoginPopup.ModalOpen(target);
|
||||
// this.$refs.oldPw.focus(target);
|
||||
}
|
||||
}
|
||||
// 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);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
},
|
||||
bytes: function (str) {
|
||||
var length = ((s,b,i,c) => {
|
||||
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;
|
||||
},
|
||||
ModalOpen: function(target){
|
||||
this.$refs.LoginPopup.ModalOpen(target);
|
||||
this.$refs.oldPw.focus(target);
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,188 +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;}
|
||||
<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> -->
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
grid: {
|
||||
url: '/api/v1/bo/riskMgt/sendNum/intrcpList',
|
||||
pagePerRows: 50,
|
||||
perPage: 50,
|
||||
//perPage: 50,
|
||||
pagination: true,
|
||||
isCheckbox: false,
|
||||
initialRequest: false,
|
||||
@@ -187,6 +187,8 @@ export default {
|
||||
commonModal,
|
||||
},
|
||||
destroyed() {
|
||||
this.grid.params.blckSndrno = '';
|
||||
this.grid.params.regId = '';
|
||||
|
||||
},
|
||||
created(){
|
||||
@@ -212,7 +214,7 @@ export default {
|
||||
this.grid.params.blckRsnCd = this.blckRsnCd
|
||||
this.grid.params.blckYn = this.blckYn
|
||||
this.grid.params.sndblckTpCd = this.sndblckTpCd
|
||||
this.grid.pagePerRows = this.perPageCnt
|
||||
//this.grid.pagePerRows = this.perPageCnt
|
||||
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<template>
|
||||
|
||||
<div class="contents">
|
||||
<div class="contents">
|
||||
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">080 수신번호 차단</h3>
|
||||
<p class="breadcrumb">리스크관리 > 080 수신번호 차단</p>
|
||||
</div>
|
||||
<!-- <form autocomplete="off" class="search_form"> -->
|
||||
<div class="search_form">
|
||||
<div class="search_wrap">
|
||||
<div class="input_box">
|
||||
@@ -25,14 +24,13 @@
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
<div class="info">
|
||||
<div class="count">총 <span> {{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }} </span>건
|
||||
<div class="select_box NumberSe">
|
||||
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
|
||||
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
@@ -60,7 +58,7 @@
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
|
||||
//import api from '../service/api';
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
@@ -77,16 +75,14 @@ class CustomATagRenderer {
|
||||
|
||||
addEvent(selEl) {
|
||||
selEl.addEventListener("click", () => {
|
||||
console.log(this.props)
|
||||
const { callback } = this.props["cgrido" + this.props.colName].options;
|
||||
callback(this.props);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class customBRegNo {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
//this.props = props;
|
||||
const el = document.createElement('td');
|
||||
var bregNo = String(props.colValue);
|
||||
el.innerText= bregNo;
|
||||
@@ -136,31 +132,35 @@ export default {
|
||||
]
|
||||
],
|
||||
|
||||
columns: [
|
||||
columns: [
|
||||
{ name: 'no', header: 'NO', align: 'center', width: '5%' },
|
||||
{ name: 'custNm', header: '고객사', align: 'center', width: '15%', renderer: {
|
||||
type: CustomATagRenderer
|
||||
, options: {
|
||||
callback: this.memberDetail,
|
||||
}
|
||||
type: CustomATagRenderer
|
||||
, options: {
|
||||
callback: this.memberDetail,
|
||||
}
|
||||
} },
|
||||
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '15%',
|
||||
formatter: props => {
|
||||
let result = props.bizrno.substring(0,3)+'-'+ props.bizrno.substring(3,5)+'-'+ props.bizrno.substring(5,10)
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '15%', renderer: {type: customBRegNo}},
|
||||
{ name: 'authcd080', header: '인증코드', align: 'center', width: '15%'},
|
||||
{ name: 'rcvblckno', header: '수신번호', align: 'center', width: '15%'},
|
||||
{ name: 'regDt', header: '등록일', align: 'center', width: '20%'},
|
||||
{ name: 'regTpCd', header: '등록구분', width: '15%', cls: 'td_line' }
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
regTpCd: '',
|
||||
authcd080: '',
|
||||
rcvblckno: ''
|
||||
},
|
||||
excelHeader: []
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid,
|
||||
commonModal,
|
||||
@@ -169,7 +169,7 @@ export default {
|
||||
|
||||
},
|
||||
created(){
|
||||
// const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
},
|
||||
mounted() {
|
||||
let page = 1;
|
||||
@@ -187,7 +187,7 @@ export default {
|
||||
methods: {
|
||||
search: function(isKeep) {
|
||||
console.log('this.perPageCnt'+this.perPageCnt);
|
||||
//console.log(this.grid.params);
|
||||
//console.log(this.grid.params);
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
@@ -215,15 +215,15 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -119,13 +119,14 @@ export default {
|
||||
},
|
||||
props: ['sendData'],
|
||||
created(){
|
||||
this.formReset();
|
||||
// this.formReset();
|
||||
},
|
||||
methods :{
|
||||
// 모달 띄우기
|
||||
numberDetailPopOpen(props){
|
||||
|
||||
// this.formReset();
|
||||
console.log(props)
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
dimmed[0].style.display = 'block';
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
|
||||
@@ -208,12 +208,12 @@ export default {
|
||||
commonModal,
|
||||
},
|
||||
created(){
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
// const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
},
|
||||
destroyed() {
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: 1,
|
||||
perPage: 20,
|
||||
perPage: 50,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
@@ -257,15 +257,7 @@ export default {
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchType3: '',
|
||||
searchType4: '',
|
||||
searchText1: '',
|
||||
pagePerRows: '',
|
||||
page: ''
|
||||
}
|
||||
params: this.grid.params
|
||||
});
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
|
||||
@@ -361,7 +361,7 @@ export default {
|
||||
this.ModalClose();
|
||||
},
|
||||
async doInsert(){
|
||||
if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
|
||||
if(this.doValidate()){
|
||||
try {
|
||||
const response = await sysMgtApi.insertAdmin(this.row);
|
||||
const result = response.data;
|
||||
|
||||
@@ -22,27 +22,25 @@
|
||||
|
||||
<div class="dimmed modal18" @click="searchIdModalCancelClose();"></div>
|
||||
<div class="popup-wrap modal18">
|
||||
<!-- 관리자 ID 조회 -->
|
||||
<div class="popup modal18">
|
||||
<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>이름 : {{name}}</li>
|
||||
<li>휴대폰번호 : {{mdn}}</li>
|
||||
<li>이메일 : {{email}}</li>
|
||||
</ul>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" @click="searchIdModalCancelClose();">취소</button>
|
||||
<button class="btn-pcolor" @click="searchIdModalOkClose();">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="popup modal18">
|
||||
<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>이름 : {{name}}</li>
|
||||
<li>휴대폰번호 : {{mdn}}</li>
|
||||
<li>이메일 : {{email}}</li>
|
||||
</ul>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="searchIdModalOkClose();">확인</button>
|
||||
<button class="btn-default" @click="searchIdModalCancelClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 시스템관리 팝업 끝-->
|
||||
</div>
|
||||
<!-- e: 팝업 -->
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue admin add" @click="adminRegPopOpen();">관리자 등록</button>
|
||||
<button type="button" class="button blue channel add" @click="adminReg2PopOpen();">유치채널 등록</button>
|
||||
<button type="button" class="button white delete del" @click="deleteRow();">삭제</button>
|
||||
<button type="button" class="button white delete del" @click="rowDelete();">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
@@ -120,18 +120,18 @@ export default {
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
columns: [
|
||||
{ name: 'no', header: 'No', align: 'center', width: 60},
|
||||
{ name: 'auth', header: '권한', align: 'center', width: 160 },
|
||||
{ name: 'name', header: '이름(대리점명)', align: 'center', width: 130},
|
||||
{ name: 'adminId', header: 'ID', align: 'center', width: 130, renderer: {
|
||||
{ name: 'no', header: 'NO', align: 'center', width: '15%'},
|
||||
{ name: 'auth', header: '권한', align: 'center', width: '15%' },
|
||||
{ name: 'name', header: '이름(대리점명)', align: 'center', width: '20%'},
|
||||
{ name: 'adminId', header: 'ID', align: 'center', width: '20%', renderer: {
|
||||
type: CustomATagRenderer
|
||||
, options: {
|
||||
callback: this.detailPop,
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'adminStat', header: '상태', align: 'center', width: 130, cls: 'td_line'},
|
||||
{ name: 'regDt', header: '등록일', align: 'center', width: 130}
|
||||
{ name: 'adminStat', header: '상태', align: 'center', width: '5%', cls: 'td_line'},
|
||||
{ name: 'regDt', header: '등록일', align: 'center', width: '20%'}
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
@@ -212,7 +212,7 @@ export default {
|
||||
var chkList = this.$refs.table.checkedElementDatas();
|
||||
if(chkList.length == 0){
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '삭제대상을 체크를 해주세요.';
|
||||
this.row.msg1 = '삭제대상을 체크 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
@@ -230,7 +230,7 @@ export default {
|
||||
console.log("==========getP : " + getP);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
|
||||
@@ -247,15 +247,18 @@ export default {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
async deleteRow(){
|
||||
if(this.doValidate() && window.confirm('삭제 하시겠습니까?')){
|
||||
rowDelete(){
|
||||
if(this.doValidate()){
|
||||
this.row.title ='관리자/유치채널 관리';
|
||||
this.row.msg1 ='삭제 하시겠습니까?'
|
||||
this.$refs.commmonModal.confirmModalOpen2(this.row);
|
||||
}
|
||||
},
|
||||
async deleteRow(){
|
||||
try {
|
||||
let response = await sysMgtApi.deleteAdmin(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '삭제 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs.table.reloadData();
|
||||
return;
|
||||
}
|
||||
@@ -266,8 +269,13 @@ export default {
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
confirmCalbackFnc(props){
|
||||
console.log(props)
|
||||
if(props.result){
|
||||
this.deleteRow();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</td>
|
||||
<td v-else class="two_btn_group">
|
||||
<button type="button" class="button grey" @click="updateAuth(option.authCd)">수정</button>
|
||||
<button type="button" class="button white delete" @click="deleteAuth(option.authCd)">삭제</button>
|
||||
<button type="button" class="button white delete" @click="authDelete(option.authCd)">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
<!--
|
||||
@@ -65,12 +65,14 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import sysMgtApi from "../service/sysMgtApi.js";
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
|
||||
export default {
|
||||
name: 'authList',
|
||||
@@ -81,7 +83,8 @@ export default {
|
||||
totalCnt: '',
|
||||
};
|
||||
},
|
||||
components: {
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
created(){
|
||||
this.getAuthList();
|
||||
@@ -104,10 +107,14 @@ export default {
|
||||
this.list = result.data.list;
|
||||
this.totalCnt = result.data.list.length;
|
||||
} else {
|
||||
alert("조회정보가 없습니다.");
|
||||
this.row.title ='권한 관리';
|
||||
this.row.msg1 ='조회정보가 없습니다.'
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
this.row.title ='권한 관리';
|
||||
this.row.msg1 ='실패 하였습니다.'
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
insertAuth(){
|
||||
@@ -118,25 +125,40 @@ export default {
|
||||
//console.log("수정페이지로 이동:"+target);
|
||||
this.$router.push({ name: 'authModify', params: { targetAuthCd: target }});
|
||||
},
|
||||
async deleteAuth(target){
|
||||
//console.log("삭제처리:"+target);
|
||||
authDelete(target){
|
||||
this.row.authCd = target;
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
try {
|
||||
this.row.title ='권한 관리';
|
||||
this.row.msg1 ='삭제 하시겠습니까?'
|
||||
this.$refs.commmonModal.confirmModalOpen2(this.row);
|
||||
},
|
||||
async deleteAuth(){
|
||||
//console.log("삭제처리:"+target);
|
||||
//this.row.authCd = target;
|
||||
try {
|
||||
let response = await sysMgtApi.deleteAuth(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('삭제 하였습니다.');
|
||||
this.getAuthList();
|
||||
return;
|
||||
} else {
|
||||
alert("실패 하였습니다.");
|
||||
this.row={}
|
||||
this.row.title = '권한 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
this.row={}
|
||||
this.row.title = '권한 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
confirmCalbackFnc(props){
|
||||
console.log(props)
|
||||
if(props.result){
|
||||
this.deleteAuth();
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user