mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 05:12:34 +09:00
웹취약점, 모의해킹 조치
This commit is contained in:
@@ -33,7 +33,8 @@ export default {
|
||||
'addTableStyle', // 추가되는 그리드 style
|
||||
'addTbCls', // 추가되는 테이블 클래스
|
||||
'addCls', // 추가되는 클래스
|
||||
'totalItems' // 부모창에 표시할 총 컨텐츠 개수 변수 명 (더 좋은 방법 있으면 알려주세요.)
|
||||
'totalItems', // 부모창에 표시할 총 컨텐츠 개수 변수 명 (더 좋은 방법 있으면 알려주세요.)
|
||||
'pageRange', // next or pre 이동할 페이지 단위
|
||||
],
|
||||
components: {
|
||||
VRuntimeTemplate
|
||||
@@ -57,11 +58,13 @@ export default {
|
||||
colsData: '',
|
||||
headerData: '',
|
||||
bodyData: '',
|
||||
pagingData: ''
|
||||
pagingData: '',
|
||||
nextPageRange: 1
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.cleanData();
|
||||
this.cleanData();
|
||||
if (this.initialRequest == true) {
|
||||
this.readData();
|
||||
}
|
||||
@@ -105,6 +108,7 @@ export default {
|
||||
this.headerData = '';
|
||||
this.bodyData = '';
|
||||
this.pagingData = '';
|
||||
this.nextPageRange = 1;
|
||||
},
|
||||
readData(isKeep) {
|
||||
if (typeof this.url != undefined && this.url != null && this.url != '') {
|
||||
@@ -126,13 +130,11 @@ export default {
|
||||
let pageStr = '';
|
||||
|
||||
var vm = this;
|
||||
console.log("grid url >> " + this.url);
|
||||
httpClient
|
||||
//.get(this.url, { params: this.getParams, headers: { 'Show-Layer': 'Yes' }})
|
||||
.post(this.url, this.getParams, {headers: { 'Show-Layer': 'Yes' }})
|
||||
.then(response => {
|
||||
let resp = response.data;
|
||||
console.log(resp);
|
||||
//if (resp != null && resp.result == true) {
|
||||
if (resp != null && resp.retCode == '0000') {
|
||||
let data = resp.data;
|
||||
@@ -149,10 +151,13 @@ export default {
|
||||
vm.totalCount = data.pagination.totalCount;
|
||||
pageStr = vm.makePagingView();
|
||||
}*/
|
||||
if (vm.pagination == true) {
|
||||
if (vm.pagination == true) {
|
||||
vm.currentIndex = data.paging.page == 0 ? 1 : data.paging.page;
|
||||
vm.totalCount = data.paging.totalCnt;
|
||||
pageStr = vm.makePagingView();
|
||||
if(typeof this.pageRange != 'undefined'){
|
||||
vm.nextPageRange = this.pageRange;
|
||||
}
|
||||
}
|
||||
// 조회결과 없음.
|
||||
}else if(resp != null && resp.retCode == '1004'){
|
||||
@@ -536,55 +541,9 @@ export default {
|
||||
str = '';
|
||||
}
|
||||
return str;
|
||||
},
|
||||
/*
|
||||
},
|
||||
|
||||
makePagingView() {
|
||||
let pData = '<div class="paging">';
|
||||
|
||||
let totalPage = Math.ceil(this.totalCount / this.curPerPage);
|
||||
if (totalPage < 1) {
|
||||
totalPage = 1;
|
||||
}
|
||||
let pageGroup = Math.ceil(this.currentIndex / this.pageCount);
|
||||
|
||||
let last = pageGroup * this.pageCount;
|
||||
if (last > totalPage) {
|
||||
last = totalPage;
|
||||
}
|
||||
|
||||
let first = last - (this.pageCount - 1);
|
||||
if (first < 1) {
|
||||
first = 1;
|
||||
}
|
||||
let prev = first - 1;
|
||||
if (prev < 1) {
|
||||
prev = 1;
|
||||
}
|
||||
let next = last + 1;
|
||||
if (next > totalPage) {
|
||||
next = totalPage;
|
||||
}
|
||||
|
||||
pData += '<a href="javascript:void(0);" @click="movePage(1)" class="btn_arrow first">처음으로</a>';
|
||||
pData += '<a href="javascript:void(0);" @click="movePage(' + prev + ')" class="btn_arrow prev">이전으로</a>';
|
||||
|
||||
for (var i = first; i <= last; i++) {
|
||||
let actCls = '';
|
||||
if (i == this.currentIndex) {
|
||||
actCls = "class='active'";
|
||||
}
|
||||
pData += '<a href="javascript:void(0);" @click="movePage(' + i + ')" ' + actCls + '>' + i + '</a>';
|
||||
}
|
||||
|
||||
pData += '<a href="javascript:void(0);" @click="movePage(' + next + ')" class="btn_arrow next">다음으로</a>';
|
||||
pData +=
|
||||
'<a href="javascript:void(0);" @click="movePage(' + totalPage + ')" class="btn_arrow last">마지막으로</a>';
|
||||
|
||||
pData += '</div>';
|
||||
return pData;
|
||||
},
|
||||
*/
|
||||
makePagingView() {
|
||||
let pData = '<div class="pagination">';
|
||||
|
||||
let totalPage = Math.ceil(this.totalCount / this.curPerPage);
|
||||
@@ -592,21 +551,25 @@ export default {
|
||||
totalPage = 1;
|
||||
}
|
||||
let pageGroup = Math.ceil(this.currentIndex / this.pageCount);
|
||||
|
||||
let last = pageGroup * this.pageCount;
|
||||
// let last = 1;
|
||||
if (last > totalPage) {
|
||||
last = totalPage;
|
||||
}
|
||||
|
||||
|
||||
let first = last - (this.pageCount - 1);
|
||||
if (first < 1) {
|
||||
first = 1;
|
||||
}
|
||||
let prev = first - 1;
|
||||
// let prev = first - 1;
|
||||
let prev = parseInt(this.currentIndex) - this.nextPageRange;
|
||||
if (prev < 1) {
|
||||
prev = 1;
|
||||
}
|
||||
let next = last + 1;
|
||||
|
||||
// let next = last + 1;
|
||||
let next = parseInt(this.currentIndex) + this.nextPageRange;
|
||||
|
||||
if (next > totalPage) {
|
||||
next = totalPage;
|
||||
}
|
||||
|
||||
@@ -36,8 +36,6 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log(this.$store["login/isLogin"])
|
||||
// this.$store.getters.getCounter
|
||||
const loggedIn = !!tokenSvc.getToken();
|
||||
if(!loggedIn){
|
||||
window.top.location.href = '/login';
|
||||
|
||||
@@ -48,9 +48,7 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log('created Lnb');
|
||||
console.log('node[0]:', this.tree.nodes[0].label);
|
||||
console.log('role:', tokenSvc.getToken().principal.authorities[0].authority);
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -252,7 +252,6 @@ export default {
|
||||
methods: {
|
||||
//모달 켜기
|
||||
ModalOpen(target){
|
||||
console.log("ModalOpen");
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
var obj = document.getElementsByClassName(target);
|
||||
|
||||
@@ -82,16 +82,13 @@ export default {
|
||||
setMenuData() {
|
||||
api.menus().then(response => {
|
||||
const rootMenu = response.data.data;
|
||||
// console.log(rootMenu);
|
||||
if (rootMenu != null && rootMenu.children != null && rootMenu.children.length > 0) {
|
||||
this.tempList = rootMenu.children;
|
||||
|
||||
var nowUrl = this.$route.fullPath;
|
||||
// console.log('path : '+nowUrl);
|
||||
|
||||
for(var i=0; i<this.tempList.length; i++){
|
||||
var menuNo = this.tempList[i].menuNo;
|
||||
// console.log('menuNo : '+menuNo);
|
||||
var classNm = '';
|
||||
switch(menuNo){
|
||||
case 1001 : classNm = 'customer';
|
||||
@@ -148,19 +145,15 @@ export default {
|
||||
classNm += ' is-current';
|
||||
}
|
||||
|
||||
// console.log('classNm : '+classNm);
|
||||
this.tempList[i].classNm = classNm;
|
||||
//console.log(classNm);
|
||||
}
|
||||
this.menuList = rootMenu.children;
|
||||
|
||||
} else {
|
||||
window.top.location.href = '/';
|
||||
// this.isLogin = false;
|
||||
this.menuList = null;
|
||||
}
|
||||
}).catch(rsponse => {
|
||||
// this.isLogin = false;
|
||||
this.menuList = null;
|
||||
})
|
||||
|
||||
@@ -175,7 +168,6 @@ export default {
|
||||
},
|
||||
reload(){
|
||||
var location = this.$route.fullPath;
|
||||
// console.log('reload() >> ' + location)
|
||||
if (location == "/" || location == "") {
|
||||
// nothing
|
||||
} else {
|
||||
@@ -186,7 +178,6 @@ export default {
|
||||
|
||||
actionMenu(e){
|
||||
const menuList = document.querySelectorAll('.main_menu .is-current');
|
||||
console.log(menuList);
|
||||
if(e.target.classList.contains('menu_target') || e.target.classList.contains('menu_btn')){
|
||||
const menuListCheck = e.target.parentNode;
|
||||
if(menuListCheck.classList.contains('is-current')){
|
||||
|
||||
@@ -180,7 +180,7 @@ export default {
|
||||
}
|
||||
}
|
||||
} else if (statusCode == 401 || statusCode == 418) {
|
||||
alert('세션이 만료되었습니다.');
|
||||
// alert('세션이 만료되었습니다.');
|
||||
window.top.location.href = '/login';
|
||||
} else {
|
||||
window.top.location.href = '/view/error/' + statusCode;
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
},
|
||||
clicked: function(v) {
|
||||
var data = this.$refs.tuiGrid.invoke("getRow", v.rowKey);
|
||||
alert("브랜드 아이디(" + data.brId + ") 클릭");
|
||||
//alert("브랜드 아이디(" + data.brId + ") 클릭");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,8 +46,11 @@ export default {
|
||||
}
|
||||
loginApi.logout().then(response => {
|
||||
if(response.data.retCode == '0000'){
|
||||
this.$store.commit("login/isLogin", false);
|
||||
this.$store.commit("login/isAuthChk", false);
|
||||
this.$store.commit("login/isLogin", false);
|
||||
this.$store.commit("login/isAuthChk", false);
|
||||
//loginApi.setToken(null);
|
||||
this.$store.commit("login/getMenuUrls",[]);
|
||||
delete sessionStorage.authToken;
|
||||
this.$router.push({
|
||||
path: "/login"
|
||||
});
|
||||
|
||||
140
frontend/src/components/modal/calendar.vue
Normal file
140
frontend/src/components/modal/calendar.vue
Normal file
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<!-- <div class="dimmed" @click="calendarCancel();"></div>-->
|
||||
<div class="datepicker">
|
||||
<div class="datepicker-head">
|
||||
<div class="datepicker-btn">
|
||||
<a href="#" class="datepicker-prev" @click="calendarData(-1)"><span></span></a>
|
||||
<a href="#" class="datepicker-next" @click="calendarData(1)"><span></span></a></div>
|
||||
<div class="datepicker-title">
|
||||
<span>{{ year }}.</span>
|
||||
<span>{{ month }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<table class="datepicker-calender">
|
||||
<tbody>
|
||||
<tr v-for="(date, idx) in dates" :key="idx">
|
||||
<td v-for="(day, secondIdx) in date"
|
||||
:key="secondIdx"
|
||||
:class="{
|
||||
'disabled': idx === 0 && day >= lastMonthStart || dates.length - 1 === idx && nextMonthStart > day,
|
||||
'today': day === today && month === currentMonth && year === currentYear
|
||||
}"
|
||||
>
|
||||
<a href="#" @click="selectDay(day)">{{ day }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dates: [],
|
||||
currentYear: 0,
|
||||
currentMonth: 0,
|
||||
year: 0,
|
||||
month: 0,
|
||||
lastMonthStart: 0,
|
||||
nextMonthStart: 0,
|
||||
today: 0,
|
||||
};
|
||||
},
|
||||
created() { // 데이터에 접근이 가능한 첫 번째 라이프 사이클
|
||||
const date = new Date();
|
||||
this.currentYear = date.getFullYear(); // 이하 현재 년, 월 가지고 있기
|
||||
this.currentMonth = date.getMonth() + 1;
|
||||
this.year = this.currentYear;
|
||||
this.month = this.currentMonth;
|
||||
this.today = date.getDate(); // 오늘 날짜
|
||||
this.calendarData();
|
||||
},
|
||||
methods: {
|
||||
calendarData(arg) { // 인자를 추가
|
||||
if (arg < 0) { // -1이 들어오면 지난 달 달력으로 이동
|
||||
this.month -= 1;
|
||||
} else if (arg === 1) { // 1이 들어오면 다음 달 달력으로 이동
|
||||
this.month += 1;
|
||||
}
|
||||
if (this.month === 0) { // 작년 12월
|
||||
this.year -= 1;
|
||||
this.month = 12;
|
||||
} else if (this.month > 12) { // 내년 1월
|
||||
this.year += 1;
|
||||
this.month = 1;
|
||||
}
|
||||
const [
|
||||
monthFirstDay,
|
||||
monthLastDate,
|
||||
lastMonthLastDate,
|
||||
] = this.getFirstDayLastDate(this.year, this.month);
|
||||
this.dates = this.getMonthOfDays(
|
||||
monthFirstDay,
|
||||
monthLastDate,
|
||||
lastMonthLastDate,
|
||||
);
|
||||
},
|
||||
getFirstDayLastDate(year, month) {
|
||||
const firstDay = new Date(year, month - 1, 1).getDay(); // 이번 달 시작 요일
|
||||
const lastDate = new Date(year, month, 0).getDate(); // 이번 달 마지막 날짜
|
||||
let lastYear = year;
|
||||
let lastMonth = month - 1;
|
||||
if (month === 1) {
|
||||
lastMonth = 12;
|
||||
lastYear -= 1;
|
||||
}
|
||||
const prevLastDate = new Date(lastYear, lastMonth, 0).getDate(); // 지난 달 마지막 날짜
|
||||
return [firstDay, lastDate, prevLastDate];
|
||||
},
|
||||
getMonthOfDays(
|
||||
monthFirstDay,
|
||||
monthLastDate,
|
||||
prevMonthLastDate,
|
||||
) {
|
||||
let day = 1;
|
||||
let prevDay = (prevMonthLastDate - monthFirstDay) + 1;
|
||||
const dates = [];
|
||||
let weekOfDays = [];
|
||||
while (day <= monthLastDate) {
|
||||
if (day === 1) {
|
||||
// 1일이 어느 요일인지에 따라 테이블에 그리기 위한 지난 셀의 날짜들을 구할 필요가 있다.
|
||||
for (let j = 0; j < monthFirstDay; j += 1) {
|
||||
if (j === 0) this.lastMonthStart = prevDay; // 지난 달에서 제일 작은 날짜
|
||||
weekOfDays.push(prevDay);
|
||||
prevDay += 1;
|
||||
}
|
||||
}
|
||||
weekOfDays.push(day);
|
||||
if (weekOfDays.length === 7) {
|
||||
// 일주일 채우면
|
||||
dates.push(weekOfDays);
|
||||
weekOfDays = []; // 초기화
|
||||
}
|
||||
day += 1;
|
||||
}
|
||||
const len = weekOfDays.length;
|
||||
if (len > 0 && len < 7) {
|
||||
for (let k = 1; k <= 7 - len; k += 1) {
|
||||
weekOfDays.push(k);
|
||||
}
|
||||
}
|
||||
if (weekOfDays.length > 0) dates.push(weekOfDays); // 남은 날짜 추가
|
||||
this.nextMonthStart = weekOfDays[0]; // 이번 달 마지막 주에서 제일 작은 날짜
|
||||
return dates;
|
||||
},
|
||||
selectDay(day){
|
||||
const year = this.year
|
||||
const month = this.month.toString().length < 2 ? '0'+ this.month : this.month
|
||||
const dd = day.toString().length < 2 ? '0' + day : day;
|
||||
const getDate = year + '-' + month + '-' + dd
|
||||
this.$parent.calendarCalbackFnc(getDate);
|
||||
},
|
||||
calendarCancel(){
|
||||
this.$parent.openEndPicker= false
|
||||
this.$parent.openStartPicker= false
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -99,7 +99,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
alertModalOpen(props) {
|
||||
console.log(props)
|
||||
var dimmed = document.getElementsByClassName('alertCommon');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
|
||||
@@ -86,12 +86,9 @@ export default {
|
||||
try {
|
||||
const response = await api.subsDetail(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
console.log(result.data);
|
||||
}
|
||||
} catch (error) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
},
|
||||
// ID 검색 모달 오픈
|
||||
|
||||
Reference in New Issue
Block a user