mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 02:59:22 +09:00
로그인 관련 / 메뉴 링크 추가 / 홈페이지 로그인 적용
This commit is contained in:
@@ -7,7 +7,13 @@
|
||||
</div>
|
||||
|
||||
<div class="table table_form">
|
||||
<form autocomplete="off">
|
||||
<form action=""
|
||||
target="_blank"
|
||||
method="post"
|
||||
ref="form">
|
||||
<input type="hidden" name="svcUserId" id="svcUserId" v-model="svcUserId"/>
|
||||
<input type="hidden" name="ezSvcUserAuthKey" id="ezSvcUserAuthKey" v-model="ezSvcUserAuthKey"/>
|
||||
</form>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width:140px">
|
||||
@@ -32,7 +38,7 @@
|
||||
<th>ID</th>
|
||||
<td colspan="2">
|
||||
{{userId}}
|
||||
<button type="button" class="button grey btn-a">로그인</button>
|
||||
<button type="button" class="button grey btn-a" @click="homeLogin">로그인</button>
|
||||
</td>
|
||||
<th class="center">관리자명</th>
|
||||
<td colspan="2">{{adminId}} / {{adminNm}}</td>
|
||||
@@ -81,7 +87,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -149,7 +155,6 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -188,7 +193,8 @@ export default {
|
||||
email: '',
|
||||
userTotalCnt:0,
|
||||
selected: [],
|
||||
|
||||
svcUserId:'',
|
||||
ezSvcUserAuthKey:''
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -206,8 +212,6 @@ export default {
|
||||
},
|
||||
created(){
|
||||
this.memberDetail(this.$route.params.serviceId);
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
},
|
||||
destroyed() {
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
@@ -243,138 +247,145 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
valAlert(props){
|
||||
valAlert(props){
|
||||
//alert("호출됨!");
|
||||
this.$refs.commmonModal.alertModalOpen(props);
|
||||
},
|
||||
valConfirm(props){
|
||||
this.$refs.commmonModal.confirmModalOpen(props);
|
||||
},
|
||||
async memberDetail(serviceId){
|
||||
this.row.userId = serviceId;
|
||||
try {
|
||||
const response = await custMgtApi.memberAdminDetail(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.formReset();
|
||||
this.userNm = result.data.userNm;
|
||||
this.userId = result.data.userId;
|
||||
this.regDt = result.data.regDt;
|
||||
this.userType = result.data.userType;
|
||||
this.adminId = result.data.adminId;
|
||||
this.adminNm = result.data.adminNm;
|
||||
this.sendingLimit = result.data.sendingLimit;
|
||||
this.lineType = result.data.lineType;
|
||||
this.userStat = result.data.userStat;
|
||||
this.lastLoginDt = result.data.lastLoginDt;
|
||||
this.memo = result.data.memo;
|
||||
this.mdn = result.data.mdn;
|
||||
this.email = result.data.email;
|
||||
this.list = result.data.list;
|
||||
this.userTotalCnt = result.data.list.length;
|
||||
console.log('userTotalCnt:'+result.data.list.length);
|
||||
this.totalItems = result.data.paging.totalCnt;
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
|
||||
},
|
||||
async updateAdminInfoTotal(){
|
||||
|
||||
this.row.userId = this.adminId;
|
||||
this.row.sendingLimit = this.sendingLimit;
|
||||
this.row.lineType = this.lineType;
|
||||
this.row.userStat = this.userStat;
|
||||
this.row.memo = this.memo;
|
||||
|
||||
console.log(this.row);
|
||||
|
||||
try {
|
||||
const response = await custMgtApi.updateAdminInfoTotal(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '저장 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
|
||||
}else if(result != null && result.retCode == "4019"){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '발송한도금액이 정액한도금액보다 작습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}else {
|
||||
valConfirm(props){
|
||||
this.$refs.commmonModal.confirmModalOpen(props);
|
||||
},
|
||||
async memberDetail(serviceId){
|
||||
this.row.userId = serviceId;
|
||||
try {
|
||||
const response = await custMgtApi.memberAdminDetail(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.formReset();
|
||||
this.userNm = result.data.userNm;
|
||||
this.userId = result.data.userId;
|
||||
this.regDt = result.data.regDt;
|
||||
this.userType = result.data.userType;
|
||||
this.adminId = result.data.adminId;
|
||||
this.adminNm = result.data.adminNm;
|
||||
this.sendingLimit = result.data.sendingLimit.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
this.lineType = result.data.lineType;
|
||||
this.userStat = result.data.userStat;
|
||||
this.lastLoginDt = result.data.lastLoginDt;
|
||||
this.memo = result.data.memo;
|
||||
this.mdn = result.data.mdn;
|
||||
this.email = result.data.email;
|
||||
this.list = result.data.list;
|
||||
this.userTotalCnt = result.data.list.length;
|
||||
console.log('userTotalCnt:'+result.data.list.length);
|
||||
this.totalItems = result.data.paging.totalCnt;
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
// 저장 후 부모창 호출.
|
||||
toComplete(){
|
||||
this.$router.push({ name: 'memberList', params: this.row });
|
||||
},
|
||||
excelPopOpen() {
|
||||
console.log(this.adminId);
|
||||
this.$refs.memberBulkRegPop.excelPopOpen(this.adminId, this.totalItems);
|
||||
},
|
||||
memberUpdatePopOpen(target) {
|
||||
this.row.userId = target;
|
||||
this.row.adminId = this.adminId;
|
||||
this.$refs.memberModifyPop.memberUpdateModalOpen(this.row);
|
||||
},
|
||||
memberInsertPopOpen() {
|
||||
this.row.adminId = this.adminId;
|
||||
this.row.userTotalCnt = this.userTotalCnt;
|
||||
this.$refs.memberRegPop.memberInsertModalOpen(this.row);
|
||||
},
|
||||
memoTotalPopOpen(){
|
||||
this.row.adminId = this.adminId;
|
||||
this.$refs.memoTatalListPop.memoTotalModalOpen(this.row);
|
||||
},
|
||||
async memberDelete(){
|
||||
async updateAdminInfoTotal(){
|
||||
|
||||
this.row.userId = this.adminId;
|
||||
this.row.sendingLimit = this.sendingLimit;
|
||||
this.row.lineType = this.lineType;
|
||||
this.row.userStat = this.userStat;
|
||||
this.row.memo = this.memo;
|
||||
|
||||
console.log(this.row);
|
||||
|
||||
try {
|
||||
const response = await custMgtApi.updateAdminInfoTotal(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
var serviceId = this.adminId;
|
||||
this.row.list = this.selected.map((row)=>({userId:row}));
|
||||
this.row.adminId = this.adminId;
|
||||
console.log(this.row);
|
||||
try {
|
||||
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);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
}else if(result != null && result.retCode == "4019"){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '발송한도금액이 정액한도금액보다 작습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}else {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
formReset(){
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
// 저장 후 부모창 호출.
|
||||
toComplete(){
|
||||
this.$router.push({ name: 'memberList', params: this.row });
|
||||
},
|
||||
excelPopOpen() {
|
||||
console.log(this.adminId);
|
||||
this.$refs.memberBulkRegPop.excelPopOpen(this.adminId, this.totalItems);
|
||||
},
|
||||
memberUpdatePopOpen(target) {
|
||||
this.row.userId = target;
|
||||
this.row.adminId = this.adminId;
|
||||
this.$refs.memberModifyPop.memberUpdateModalOpen(this.row);
|
||||
},
|
||||
memberInsertPopOpen() {
|
||||
this.row.adminId = this.adminId;
|
||||
this.row.userTotalCnt = this.userTotalCnt;
|
||||
this.$refs.memberRegPop.memberInsertModalOpen(this.row);
|
||||
},
|
||||
memoTotalPopOpen(){
|
||||
this.row.adminId = this.adminId;
|
||||
this.$refs.memoTatalListPop.memoTotalModalOpen(this.row);
|
||||
},
|
||||
async memberDelete(){
|
||||
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
var serviceId = this.adminId;
|
||||
this.row.list = this.selected.map((row)=>({userId:row}));
|
||||
this.row.adminId = this.adminId;
|
||||
console.log(this.row);
|
||||
try {
|
||||
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);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
formReset(){
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
},
|
||||
homeLogin(){
|
||||
console.log(process.env.VUE_APP_HOME_PAGE_URL)
|
||||
console.log(process.env.VUE_APP_AUTHKEY)
|
||||
this.$refs.form.action = process.env.VUE_APP_HOME_PAGE_URL
|
||||
this.svcUserId = this.userId
|
||||
this.ezSvcUserAuthKey = process.env.VUE_APP_AUTHKEY
|
||||
this.$refs.form.submit()
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user