mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 05:39:35 +09:00
로그인 및 메인 화면 수정 변경
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
<div class="info">
|
||||
<div class="count">집계결과</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue download">엑셀 다운로드</button>
|
||||
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -199,9 +199,10 @@ export default {
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.endDate = new Date();
|
||||
this.startDate = moment(this.endDate)
|
||||
.subtract(day, 'day')
|
||||
.toDate();
|
||||
// this.startDate = moment(this.endDate)
|
||||
// .subtract(day, 'day')
|
||||
// .toDate();
|
||||
this.initSetStartDate();
|
||||
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
@@ -240,6 +241,37 @@ export default {
|
||||
} else {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
}
|
||||
},
|
||||
initSetStartDate(){
|
||||
let initStartDate = new Date();
|
||||
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -3);
|
||||
this.startDate = initStartDate;
|
||||
console.log(moment(this.startDate).format('YYYY-MM-DD'));
|
||||
},
|
||||
excelDown() {
|
||||
if (this.list.length <= 0) {
|
||||
this.row.title = '월별통계';
|
||||
this.row.msg1 = '조회된 데이터가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
let today = moment().format('YYYYMMDDHHmmss');
|
||||
const saveFileName = `월별통계_${today}.xlsx`;
|
||||
|
||||
let options = {
|
||||
header: this.excelHeader,
|
||||
dataOrder: 'header'
|
||||
};
|
||||
// console.log(data);
|
||||
xlsx.export(this.list, saveFileName, options).then(() => {});
|
||||
},
|
||||
getExcelHeader() {
|
||||
// 헤더를 mockup으로 관리한다.
|
||||
statsApi.getExcelHeader(this.pageType).then(res => {
|
||||
this.excelHeader = res;
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user