mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 20:24:30 +09:00
수정건 수정
This commit is contained in:
@@ -114,11 +114,11 @@ body{
|
||||
/*======================
|
||||
.popup
|
||||
======================*/
|
||||
.dimmed {width: 100vw; height: 100vh; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.4); display: none;}
|
||||
.dimmed {width: 100vw; height: 100vh; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.2); display: none;}
|
||||
.dimmed.open {display: block !important;}
|
||||
.popup-wrap {display: none;}
|
||||
.popup-wrap.open {display: block !important;}
|
||||
.popup {width: 390px; border-radius: 12px; background: #fff; padding: 0 30px; box-sizing: border-box; border: 1px solid rgba(197,197,197,0.36); box-shadow: 2px 2px 8px rgba(171,171,171,0.30); position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); -o-transform: translate(-50%,-50%); display: none;
|
||||
.popup {width: 390px; z-index: 998; border-radius: 12px; background: #fff; padding: 0 30px; box-sizing: border-box; border: 1px solid rgba(197,197,197,0.36); box-shadow: 2px 2px 8px rgba(171,171,171,0.30); position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); -o-transform: translate(-50%,-50%); display: none;
|
||||
max-height: 90vh; overflow: auto;}/*스크린 height 100%를 벗어나는 긴 팝업의 경우 추가 class*/
|
||||
|
||||
.popup.open {display: block !important;}
|
||||
|
||||
@@ -49,4 +49,4 @@ function userInfoToggle(){
|
||||
else{
|
||||
userBtn.classList.add(click);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import axios from 'axios';
|
||||
import { testProp } from './config';
|
||||
import tokenSvc from '@/common/token-service';
|
||||
import { consts } from './config';
|
||||
|
||||
const config = {
|
||||
//baseURL: 'http://localhost:7070',
|
||||
@@ -29,19 +26,12 @@ const authInterceptor = config => {
|
||||
};
|
||||
|
||||
const tokenInterceptor = config => {
|
||||
// var authToken = tokenSvc.getAuthToken();
|
||||
// console.log(this.$store);
|
||||
// alert('tokenInterceptor'+authToken);
|
||||
|
||||
// if(tokenSvc.getAuthorization(consts.tokenPart1) != null){
|
||||
// //config.headers.Authorization = tokenSvc.getAuthorization(consts.tokenPart1);
|
||||
// //console.log("getToken : "+config.headers.Authorization);
|
||||
// //config.headers.Authorization = tokenSvc.getToken();
|
||||
// }
|
||||
|
||||
|
||||
// console.log('http : ',sessionStorage.authToken);
|
||||
if(sessionStorage.authToken != null) {
|
||||
config.headers.Authorization = 'Bearer '+ sessionStorage.authToken;
|
||||
}else if(sessionStorage.authToken == null && sessionStorage.refreshToken != null){
|
||||
config.headers.Authorization = 'Bearer '+ sessionStorage.refreshToken;
|
||||
}
|
||||
|
||||
return config;
|
||||
@@ -59,22 +49,6 @@ const loadingLayer = (type, config) => {
|
||||
get: httpClient.get(url, { params: { ... }, headers: {"show-layer": "Yes"} }) // in 2nd property
|
||||
post: httpClient.post(url, params, { headers: {"show-layer": "Yes"} }) // 3rd property
|
||||
*/
|
||||
|
||||
// if (config.headers['Show-Layer'] == 'Yes') {
|
||||
// if (type) {
|
||||
// loadOverlap.push('add');
|
||||
// } else {
|
||||
// loadOverlap.pop();
|
||||
// }
|
||||
|
||||
// if (loadOverlap.length > 0) {
|
||||
// document.querySelector('html > body').style.overflow = 'hidden'; // 스크롤 block
|
||||
// document.getElementsByClassName('loading_layer')[0].style.display = 'block';
|
||||
// } else {
|
||||
// document.querySelector('html > body').style.removeProperty('overflow'); // 스크롤 allow
|
||||
// document.getElementsByClassName('loading_layer')[0].style.display = 'none';
|
||||
// }
|
||||
// }
|
||||
if(type){
|
||||
document.querySelector('html > body').style.overflow = 'hidden'; // 스크롤 block
|
||||
document.getElementsByClassName('loadingDimmed')[0].style.display = 'block';
|
||||
@@ -107,17 +81,27 @@ httpClient.interceptors.request.use(loadingLayerInterceptor);
|
||||
/** Adding the response interceptors */
|
||||
httpClient.interceptors.response.use(
|
||||
response => {
|
||||
loadingLayer(false, response.config);
|
||||
loadingLayer(false, response.config);
|
||||
console.log('response status:', response.status, 'data:', response.data);
|
||||
console.log('response config url :',response.config.url);
|
||||
if(response.config.url == '/api/v1/bo/comm/refreshToken'){
|
||||
if(response.data.data != null && typeof response.data.data != undefined){
|
||||
sessionStorage.setItem('authToken', response.data.data);
|
||||
window.location.reload();
|
||||
}else{
|
||||
delete sessionStorage.authToken;
|
||||
window.top.location.href = '/login';
|
||||
}
|
||||
}
|
||||
return response;
|
||||
},
|
||||
error => {
|
||||
console.log(error);
|
||||
//alert(error);
|
||||
delete sessionStorage.authToken;
|
||||
|
||||
if(error.message === 'Network Error'){
|
||||
alert('네트워크 오류가 발생했습니다. 잠시 후 다시 시도해주세요.');
|
||||
// tokenSvc.removeToken();
|
||||
alert('네트워크 오류가 발생했습니다. 잠시 후 다시 시도해주세요.');
|
||||
delete sessionStorage.authToken;
|
||||
window.top.location.href = '/login';
|
||||
}
|
||||
if (error.response != undefined && error.response != null) loadingLayer(false, error.response.config);
|
||||
@@ -126,33 +110,31 @@ httpClient.interceptors.response.use(
|
||||
if (error.code === 'ECONNABORTED') {
|
||||
alert('서비스가 지연되고 있습니다. 잠시 후 확인하시고 다시 시도해주세요.');
|
||||
return Promise.reject(error);
|
||||
}else if(error.response.status == 401){
|
||||
alert('세션이 만료되었습니다.');
|
||||
// tokenSvc.removeToken();
|
||||
}else if(error.response.status == 401){
|
||||
alert('세션이 만료되었습니다.');
|
||||
delete sessionStorage.authToken;
|
||||
window.top.location.href = '/login';
|
||||
} else if (error.response.status == 418) {
|
||||
// tokenSvc.removeToken();
|
||||
alert('세션이 만료되었습니다.');
|
||||
window.top.location.href = '/login';
|
||||
}else if (error.response.status == 500) {
|
||||
if (error.response.data != null && error.response.data.message == '511 NETWORK_AUTHENTICATION_REQUIRED') {
|
||||
alert('웹템플릿 IP가 브랜드포털에 등록이 필요합니다. 기술지원에 문의해주세요.');
|
||||
return Promise.reject(error);
|
||||
} else {
|
||||
// tokenSvc.removeToken();
|
||||
window.top.location.href = '/login';
|
||||
} else if (error.response.status == 418) {
|
||||
delete sessionStorage.authToken;
|
||||
if(error.config.url == '/api/v1/bo/comm/refreshToken'){
|
||||
alert('세션이 만료되었습니다.');
|
||||
delete sessionStorage.authToken;
|
||||
delete sessionStorage.refreshToken;
|
||||
return window.top.location.href = '/login';
|
||||
//return Promise.reject(error);
|
||||
}
|
||||
} else if (error.response.status == 511) {
|
||||
alert('웹템플릿 IP가 브랜드포털에 등록이 필요합니다. 기술지원에 문의해주세요.');
|
||||
return Promise.reject(error);
|
||||
}
|
||||
var params = {};
|
||||
httpClient.post('/api/v1/bo/comm/refreshToken',params);
|
||||
}else if (error.response.status == 500) {
|
||||
window.top.location.href = '/view/error/500';
|
||||
}
|
||||
// else if (error.message == 'Network Error') {
|
||||
// alert('네트워크 오류가 발생했습니다. 잠시 후 다시 시도해주세요.');
|
||||
// return Promise.reject(error);
|
||||
// }
|
||||
else {
|
||||
// alert("else");
|
||||
console.log('response error:', error);
|
||||
else {
|
||||
delete sessionStorage.authToken;
|
||||
console.log('response error:', error);
|
||||
return Promise.reject(error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,11 +179,16 @@ export default {
|
||||
this.$refs.madangId.focus();
|
||||
}
|
||||
},
|
||||
setAuthData() {
|
||||
async setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
try {
|
||||
const response = await api.commAuth();
|
||||
if(response.data.retCode == '0000'){
|
||||
this.authType = response.data.data.list;
|
||||
}
|
||||
}catch(err){
|
||||
|
||||
}
|
||||
},
|
||||
formReset(){
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
|
||||
@@ -158,11 +158,19 @@ export default {
|
||||
this.memberInsertModalClose();
|
||||
this.$parent.memberDetail(this.adminId);
|
||||
},
|
||||
setAuthData() {
|
||||
async setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
// api.commAuth().then(response => {
|
||||
// this.authType = response.data.data.list;
|
||||
// });
|
||||
try {
|
||||
const response = await api.commAuth();
|
||||
if(response.data.retCode == '0000'){
|
||||
this.authType = response.data.data.list;
|
||||
}
|
||||
}catch(err){
|
||||
|
||||
}
|
||||
},
|
||||
formReset() {
|
||||
var targetAdminId = this.adminId;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
|
||||
<div class="table table_form">
|
||||
<form action="" target="_blank" method="post" ref="form">
|
||||
<form action="" target="_blank" method="post" ref="form" onSubmit="return false;">
|
||||
<input type="hidden" name="svcUserId" id="svcUserId" v-model="svcUserId" />
|
||||
<input type="hidden" name="ezSvcUserAuthKey" id="ezSvcUserAuthKey" v-model="ezSvcUserAuthKey" />
|
||||
</form>
|
||||
@@ -236,6 +236,7 @@ export default {
|
||||
homePageUrl: '',
|
||||
isActive: true,
|
||||
//applyTbStyle: 'cursor: default;',
|
||||
oldMemo: '',
|
||||
};
|
||||
},
|
||||
props: {
|
||||
@@ -322,6 +323,7 @@ export default {
|
||||
}
|
||||
this.lastLoginDt = result.data.lastLoginDt;
|
||||
this.memo = result.data.memo;
|
||||
this.oldMemo = result.data.memo;
|
||||
this.mdn = result.data.mdn;
|
||||
this.email = result.data.email;
|
||||
this.list = result.data.list;
|
||||
@@ -336,14 +338,18 @@ export default {
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
/** 저장 */
|
||||
async updateAdminInfoTotal() {
|
||||
this.row = {};
|
||||
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;
|
||||
|
||||
if(this.memo != this.oldMemo){
|
||||
this.row.memo = this.memo;
|
||||
} else {
|
||||
this.row.memo = '';
|
||||
}
|
||||
try {
|
||||
const response = await custMgtApi.updateAdminInfoTotal(this.row);
|
||||
const result = response.data;
|
||||
@@ -371,6 +377,7 @@ export default {
|
||||
toComplete() {
|
||||
this.$router.push({ name: 'memberList', params: this.row });
|
||||
},
|
||||
|
||||
excelPopOpen() {
|
||||
if (this.userTotalCnt >= 100) {
|
||||
// 사용자등록제한_최대100개까지
|
||||
@@ -431,11 +438,19 @@ export default {
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
setAuthData() {
|
||||
async setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then((response) => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
// api.commAuth().then((response) => {
|
||||
// this.authType = response.data.data.list;
|
||||
// });
|
||||
try {
|
||||
const response = await api.commAuth();
|
||||
if(response.data.retCode == '0000'){
|
||||
this.authType = response.data.data.list;
|
||||
}
|
||||
}catch(err){
|
||||
|
||||
}
|
||||
},
|
||||
formReset() {
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
|
||||
@@ -270,7 +270,8 @@ export default {
|
||||
},
|
||||
async subsDetail(serviceId) {
|
||||
this.row.serviceId = serviceId;
|
||||
try {
|
||||
|
||||
try {
|
||||
const response = await custMgtApi.subsDetail(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
|
||||
@@ -327,6 +327,7 @@ export default {
|
||||
vm.$store.commit("login/saveAuthToken", rsp.data.authToken);
|
||||
//localStorage.authToken = rsp.data.authToken;
|
||||
sessionStorage.setItem('authToken', rsp.data.authToken);
|
||||
sessionStorage.setItem('refreshToken', rsp.data.refreshToken);
|
||||
//api.setToken(rsp.data.authToken);
|
||||
vm.$router.push({ path: rootUrl});
|
||||
}else if (rsp.retCode == '4008'){
|
||||
|
||||
@@ -257,11 +257,19 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
setAuthData() {
|
||||
async setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
// api.commAuth().then(response => {
|
||||
// this.authType = response.data.data.list;
|
||||
// });
|
||||
try {
|
||||
const response = await api.commAuth();
|
||||
if(response.data.retCode == '0000'){
|
||||
this.authType = response.data.data.list;
|
||||
}
|
||||
}catch(err){
|
||||
|
||||
}
|
||||
},
|
||||
formReset() {
|
||||
var type = this.insertType;
|
||||
|
||||
@@ -365,11 +365,19 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
setAuthData() {
|
||||
async setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
// api.commAuth().then(response => {
|
||||
// this.authType = response.data.data.list;
|
||||
// });
|
||||
try {
|
||||
const response = await api.commAuth();
|
||||
if(response.data.retCode == '0000'){
|
||||
this.authType = response.data.data.list;
|
||||
}
|
||||
}catch(err){
|
||||
|
||||
}
|
||||
},
|
||||
formReset() {
|
||||
var type = this.insertType;
|
||||
|
||||
@@ -223,15 +223,23 @@ export default {
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
},
|
||||
setCodeData() {
|
||||
async setCodeData() {
|
||||
|
||||
// 상태 옵션 셋팅.
|
||||
api.commCode({'grpCd': 'ADM_STTUS_CD'}).then(response => {
|
||||
this.statType = response.data.data.list;
|
||||
});
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
this.statType = response.data.dat.a.list;
|
||||
});
|
||||
// api.commAuth().then(response => {
|
||||
// this.authType = response.data.data.list;
|
||||
// });
|
||||
try {
|
||||
const response = await api.commAuth();
|
||||
if(response.data.retCode == '0000'){
|
||||
this.authType = response.data.datalist;
|
||||
}
|
||||
}catch(err){
|
||||
|
||||
}
|
||||
},
|
||||
rowDelete() {
|
||||
if (this.doValidate()) {
|
||||
|
||||
@@ -92,9 +92,9 @@ export default {
|
||||
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);
|
||||
}
|
||||
},
|
||||
insertAuth() {
|
||||
@@ -128,10 +128,10 @@ export default {
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (err) {
|
||||
this.row = {}
|
||||
this.row.title = '권한 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// this.row = {}
|
||||
// this.row.title = '권한 관리';
|
||||
// this.row.msg1 = '실패 하였습니다.';
|
||||
// this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
confirmCalbackFnc(props) {
|
||||
|
||||
@@ -67,7 +67,7 @@ const router = new Router({
|
||||
router.beforeEach((to, from, next) => {
|
||||
const isPublic = to.matched.some(record => record.meta.public);
|
||||
const loggedIn = !!tokenSvc.getToken();
|
||||
if (!isPublic && !loggedIn) {
|
||||
if (!isPublic && !loggedIn) {
|
||||
return next('/login');
|
||||
}else{
|
||||
var nextUrl = to.fullPath;
|
||||
|
||||
Reference in New Issue
Block a user