diff --git a/src/api/calculate.js b/src/api/calculate.js index fb1d872..d530512 100644 --- a/src/api/calculate.js +++ b/src/api/calculate.js @@ -63,6 +63,18 @@ async function getCalculateChannelDonationByCreator(startDate, endDate, page, si ) } +async function getCalculateChannelDonationByDate(startDate, endDate, page, size) { + return Vue.axios.get('/admin/calculate/channel-donation-by-date?startDateStr=' + + startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size + ) +} + +async function downloadCalculateChannelDonationByCreatorExcel(startDate, endDate) { + return Vue.axios.get('/admin/calculate/channel-donation-by-creator/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, { + responseType: 'blob' + }); +} + async function updateCreatorSettlementRatio(creatorSettlementRatio) { const request = { memberId: creatorSettlementRatio.creator_id, @@ -91,5 +103,7 @@ export { getCalculateLiveByCreator, getCalculateContentByCreator, getCalculateCommunityByCreator, - getCalculateChannelDonationByCreator + getCalculateChannelDonationByCreator, + getCalculateChannelDonationByDate, + downloadCalculateChannelDonationByCreatorExcel } diff --git a/src/router/index.js b/src/router/index.js index 66f2eea..307c7e3 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -215,6 +215,11 @@ const routes = [ name: 'CalculateChannelDonation', component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateChannelDonation.vue') }, + { + path: '/calculate/channel-donation-by-creator', + name: 'CalculateChannelDonationByCreator', + component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateChannelDonationByCreator.vue') + }, { path: '/notice', name: 'NoticeView', diff --git a/src/views/Calculate/CalculateChannelDonation.vue b/src/views/Calculate/CalculateChannelDonation.vue index bb6c9fc..ca7077a 100644 --- a/src/views/Calculate/CalculateChannelDonation.vue +++ b/src/views/Calculate/CalculateChannelDonation.vue @@ -38,7 +38,7 @@ color="#3bb9f1" dark depressed - @click="getCalculateChannelDonationByCreator" + @click="getCalculateChannelDonationByDate" > 조회 @@ -210,7 +210,7 @@ export default { this.start_date = this.formatDate(firstDate) this.end_date = this.formatDate(lastDate) - await this.getCalculateChannelDonationByCreator() + await this.getCalculateChannelDonationByDate() }, methods: { @@ -226,13 +226,13 @@ export default { }, async next() { - await this.getCalculateChannelDonationByCreator() + await this.getCalculateChannelDonationByDate() }, - async getCalculateChannelDonationByCreator() { + async getCalculateChannelDonationByDate() { this.is_loading = true try { - const res = await api.getCalculateChannelDonationByCreator( + const res = await api.getCalculateChannelDonationByDate( this.start_date.substring(0, 10), this.end_date.substring(0, 10), this.page, diff --git a/src/views/Calculate/CalculateChannelDonationByCreator.vue b/src/views/Calculate/CalculateChannelDonationByCreator.vue new file mode 100644 index 0000000..116b517 --- /dev/null +++ b/src/views/Calculate/CalculateChannelDonationByCreator.vue @@ -0,0 +1,262 @@ + + + + +