Compare commits
84 Commits
test
...
70298b8f8f
| Author | SHA1 | Date | |
|---|---|---|---|
| 70298b8f8f | |||
| 9fa9f3e699 | |||
| d82531583c | |||
| 6240a285c2 | |||
| f577ab575e | |||
| 0c3e3fc3fd | |||
| 6886c372aa | |||
| 8dd3dcb770 | |||
| 1a435b6074 | |||
| 492859dae3 | |||
| 18b59b5598 | |||
| 5fcdd7f06d | |||
| 1e149f7e41 | |||
| aca3767a24 | |||
| d51655f15e | |||
| 47dd32939f | |||
| 2e1891ab08 | |||
| 99d70cc8f7 | |||
| 9f1675e82d | |||
| c2838be2ed | |||
| b5c2941c0d | |||
| d5c01d8d23 | |||
| 7118b0649a | |||
| 8f5346581e | |||
| e43f2e30be | |||
| 397fd267e0 | |||
| fe4b88350b | |||
| 537474e162 | |||
| b5abdf3cf5 | |||
| a2e457b5e8 | |||
| 05ddd417cd | |||
| e70426af68 | |||
| 81b33e1322 | |||
| 588fcfbe90 | |||
| ff2c126382 | |||
| 702daca29f | |||
| 8e9008a3c1 | |||
| 5c0c00aad4 | |||
| e0949c6d73 | |||
| 0449bac8d5 | |||
| d412c15c9d | |||
| ed16a6ddad | |||
| f06e2d41e0 | |||
| 7505269db3 | |||
| 15eeb6943d | |||
| 7e7ed46cea | |||
| fd01786649 | |||
| c48c1c2f09 | |||
| 9bcf3a3cdb | |||
| 4c5b987d98 | |||
| f168403048 | |||
| 82ee1584e7 | |||
| 65cb918389 | |||
| 784baf9a2f | |||
| 7a85ac41cc | |||
| 9d4c9437cf | |||
| 68845aeae1 | |||
| bbdca29337 | |||
| c14c041daa | |||
| a515a144eb | |||
| 54a6773905 | |||
| d97087b4e9 | |||
| ddb2449053 | |||
| 8aca07cdf7 | |||
| 0ba845d95a | |||
| 64b1fd5395 | |||
| 639bea70fa | |||
| 6a89ba059b | |||
| ff83041585 | |||
| e660be0bf4 | |||
| 62cdd57069 | |||
| f8346ed5ef | |||
| 9656b9a9d1 | |||
| 97a58266bb | |||
| 8fc0cfa345 | |||
| 22f9c2287d | |||
| 9284f7d5c3 | |||
| e6f27a4529 | |||
| 6a33d1c024 | |||
| 3b83789c15 | |||
| 55f0ab9af3 | |||
| 9b168a6112 | |||
| c47937933e | |||
| 4744fe7d9a |
11
package-lock.json
generated
11
package-lock.json
generated
@@ -9,7 +9,6 @@
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"core-js": "^3.6.5",
|
||||
"cropperjs": "^1.5.13",
|
||||
"file-saver": "^2.0.5",
|
||||
"lodash": "^4.17.21",
|
||||
"vue": "^2.6.11",
|
||||
@@ -4908,11 +4907,6 @@
|
||||
"sha.js": "^2.4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/cropperjs": {
|
||||
"version": "1.5.13",
|
||||
"resolved": "https://registry.npmjs.org/cropperjs/-/cropperjs-1.5.13.tgz",
|
||||
"integrity": "sha512-by7jKAo73y5/Do0K6sxdTKHgndY0NMjG2bEdgeJxycbcmHuCiMXqw8sxy5C5Y5WTOTcDGmbT7Sr5CgKOXR06OA=="
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
@@ -19714,11 +19708,6 @@
|
||||
"sha.js": "^2.4.8"
|
||||
}
|
||||
},
|
||||
"cropperjs": {
|
||||
"version": "1.5.13",
|
||||
"resolved": "https://registry.npmjs.org/cropperjs/-/cropperjs-1.5.13.tgz",
|
||||
"integrity": "sha512-by7jKAo73y5/Do0K6sxdTKHgndY0NMjG2bEdgeJxycbcmHuCiMXqw8sxy5C5Y5WTOTcDGmbT7Sr5CgKOXR06OA=="
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.6.5",
|
||||
"cropperjs": "^1.5.13",
|
||||
"file-saver": "^2.0.5",
|
||||
"lodash": "^4.17.21",
|
||||
"vue": "^2.6.11",
|
||||
|
||||
@@ -15,12 +15,8 @@ async function searchAudioContent(searchWord, page) {
|
||||
)
|
||||
}
|
||||
|
||||
async function modifyAudioContent(formData) {
|
||||
return Vue.axios.put("/admin/audio-content", formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data"
|
||||
}
|
||||
})
|
||||
async function modifyAudioContent(request) {
|
||||
return Vue.axios.put("/admin/audio-content", request)
|
||||
}
|
||||
|
||||
async function getBannerList(tabId) {
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function getCalculateLive(startDate, endDate, page, size) {
|
||||
return Vue.axios.get('/admin/calculate/live?startDateStr=' + startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size);
|
||||
async function getCalculateLive(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/live?startDateStr=' + startDate + '&endDateStr=' + endDate);
|
||||
}
|
||||
|
||||
async function getCalculateContent(startDate, endDate, page, size) {
|
||||
return Vue.axios.get('/admin/calculate/content-list?startDateStr=' + startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size);
|
||||
async function getCalculateContent(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/content-list?startDateStr=' + startDate + '&endDateStr=' + endDate);
|
||||
}
|
||||
|
||||
async function getCumulativeSalesByContent(page, size) {
|
||||
return Vue.axios.get('/admin/calculate/cumulative-sales-by-content?page=' + (page - 1) + "&size=" + size);
|
||||
}
|
||||
|
||||
async function getCalculateContentDonation(startDate, endDate, page, size) {
|
||||
return Vue.axios.get('/admin/calculate/content-donation-list?startDateStr=' + startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size);
|
||||
async function getCalculateContentDonation(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/content-donation-list?startDateStr=' + startDate + '&endDateStr=' + endDate);
|
||||
}
|
||||
|
||||
async function getCalculateCommunityPost(startDate, endDate, page, size) {
|
||||
@@ -57,72 +57,6 @@ async function getCalculateCommunityByCreator(startDate, endDate, page, size) {
|
||||
)
|
||||
}
|
||||
|
||||
async function getCalculateChannelDonationByCreator(startDate, endDate, page, size) {
|
||||
return Vue.axios.get('/admin/calculate/channel-donation-by-creator?startDateStr=' +
|
||||
startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size
|
||||
)
|
||||
}
|
||||
|
||||
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 downloadCalculateLiveExcel(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/live/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
async function downloadCalculateContentExcel(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/content-list/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
async function downloadCalculateContentDonationExcel(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/content-donation-list/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
async function downloadCalculateCommunityPostExcel(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/community-post/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
async function downloadCalculateLiveByCreatorExcel(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/live-by-creator/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
async function downloadCalculateContentByCreatorExcel(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/content-by-creator/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
async function downloadCalculateCommunityByCreatorExcel(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/community-by-creator/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
async function downloadCalculateChannelDonationByDateExcel(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/channel-donation-by-date/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
async function updateCreatorSettlementRatio(creatorSettlementRatio) {
|
||||
const request = {
|
||||
memberId: creatorSettlementRatio.creator_id,
|
||||
@@ -138,15 +72,6 @@ async function deleteCreatorSettlementRatio(memberId) {
|
||||
return Vue.axios.post('/admin/calculate/ratio/delete/' + memberId);
|
||||
}
|
||||
|
||||
async function refundLive(roomId, canUsageStr) {
|
||||
const request = {
|
||||
roomId: roomId,
|
||||
canUsageStr: canUsageStr
|
||||
};
|
||||
|
||||
return Vue.axios.post('/admin/calculate/live/refund', request);
|
||||
}
|
||||
|
||||
export {
|
||||
getCalculateLive,
|
||||
getCalculateContent,
|
||||
@@ -157,19 +82,7 @@ export {
|
||||
createCreatorSettlementRatio,
|
||||
updateCreatorSettlementRatio,
|
||||
deleteCreatorSettlementRatio,
|
||||
refundLive,
|
||||
getCalculateLiveByCreator,
|
||||
getCalculateContentByCreator,
|
||||
getCalculateCommunityByCreator,
|
||||
getCalculateChannelDonationByCreator,
|
||||
getCalculateChannelDonationByDate,
|
||||
downloadCalculateChannelDonationByCreatorExcel,
|
||||
downloadCalculateLiveExcel,
|
||||
downloadCalculateContentExcel,
|
||||
downloadCalculateContentDonationExcel,
|
||||
downloadCalculateCommunityPostExcel,
|
||||
downloadCalculateLiveByCreatorExcel,
|
||||
downloadCalculateContentByCreatorExcel,
|
||||
downloadCalculateCommunityByCreatorExcel,
|
||||
downloadCalculateChannelDonationByDateExcel
|
||||
getCalculateCommunityByCreator
|
||||
}
|
||||
|
||||
@@ -49,12 +49,11 @@ async function createCharacter(characterData) {
|
||||
age: toNullIfBlank(characterData.age),
|
||||
gender: toNullIfBlank(characterData.gender),
|
||||
mbti: toNullIfBlank(characterData.mbti),
|
||||
characterType: toNullIfBlank(characterData.characterType),
|
||||
characterType: toNullIfBlank(characterData.type),
|
||||
originalWorkId: characterData.originalWorkId || null,
|
||||
speechPattern: toNullIfBlank(characterData.speechPattern),
|
||||
speechStyle: toNullIfBlank(characterData.speechStyle),
|
||||
appearance: toNullIfBlank(characterData.appearance),
|
||||
region: characterData.region || null,
|
||||
tags: characterData.tags || [],
|
||||
hobbies: characterData.hobbies || [],
|
||||
values: characterData.values || [],
|
||||
|
||||
@@ -11,8 +11,4 @@ async function getChargeStatusDetail(startDate, paymentGateway, currency) {
|
||||
);
|
||||
}
|
||||
|
||||
async function refundCharge(chargeId) {
|
||||
return Vue.axios.post('/admin/charge/refund', { chargeId });
|
||||
}
|
||||
|
||||
export { getChargeStatus, getChargeStatusDetail, refundCharge }
|
||||
export { getChargeStatus, getChargeStatusDetail }
|
||||
|
||||
@@ -52,11 +52,6 @@ async function resetPassword(id) {
|
||||
return Vue.axios.post("/admin/member/password/reset", request)
|
||||
}
|
||||
|
||||
async function blockMember(memberId, reason) {
|
||||
const request = {memberId, reason}
|
||||
return Vue.axios.post("/admin/member/block", request)
|
||||
}
|
||||
|
||||
/**
|
||||
* 닉네임으로 회원 검색 API
|
||||
* - 서버 구현 차이를 흡수하기 위해 nickname, search_word 두 파라미터 모두 전송
|
||||
@@ -89,9 +84,8 @@ export {
|
||||
searchMember,
|
||||
getCreatorList,
|
||||
searchCreator,
|
||||
updateMember,
|
||||
getCreatorAllList,
|
||||
resetPassword,
|
||||
blockMember,
|
||||
searchMembersByNickname
|
||||
updateMember,
|
||||
getCreatorAllList,
|
||||
resetPassword,
|
||||
searchMembersByNickname
|
||||
}
|
||||
|
||||
@@ -149,26 +149,6 @@ export default {
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
// 정산 관리 메뉴에 '채널 후원 정산' 추가
|
||||
try {
|
||||
const calculateMenu = this.items.find(m => m && m.title === '정산 관리')
|
||||
if (calculateMenu) {
|
||||
if (!Array.isArray(calculateMenu.items)) {
|
||||
calculateMenu.items = calculateMenu.items ? [].concat(calculateMenu.items) : []
|
||||
}
|
||||
const exists = calculateMenu.items.some(ci => ci && ci.route === '/calculate/channel-donation')
|
||||
if (!exists) {
|
||||
calculateMenu.items.push({
|
||||
title: '채널 후원 정산',
|
||||
route: '/calculate/channel-donation',
|
||||
items: null
|
||||
})
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
} else {
|
||||
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 로그인 해주세요!")
|
||||
this.logout();
|
||||
|
||||
@@ -210,16 +210,6 @@ const routes = [
|
||||
name: 'CalculateCommunityByCreator',
|
||||
component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateCommunityByCreator.vue')
|
||||
},
|
||||
{
|
||||
path: '/calculate/channel-donation',
|
||||
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',
|
||||
|
||||
@@ -1,267 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-toolbar dark>
|
||||
<v-spacer />
|
||||
<v-toolbar-title>채널 후원 정산</v-toolbar-title>
|
||||
<v-spacer />
|
||||
</v-toolbar>
|
||||
|
||||
<br>
|
||||
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col cols="2">
|
||||
<datetime
|
||||
v-model="start_date"
|
||||
class="datepicker"
|
||||
format="YYYY-MM-DD"
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="1">
|
||||
~
|
||||
</v-col>
|
||||
|
||||
<v-col cols="2">
|
||||
<datetime
|
||||
v-model="end_date"
|
||||
class="datepicker"
|
||||
format="YYYY-MM-DD"
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="1" />
|
||||
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="getCalculateChannelDonationByDate"
|
||||
>
|
||||
조회
|
||||
</v-btn>
|
||||
</v-col>
|
||||
|
||||
<v-spacer />
|
||||
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="downloadExcel"
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="items"
|
||||
:loading="is_loading"
|
||||
:items-per-page="-1"
|
||||
class="elevation-1"
|
||||
hide-default-footer
|
||||
>
|
||||
<template slot="body.prepend">
|
||||
<tr v-if="total">
|
||||
<td colspan="2">
|
||||
합계
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.count.toLocaleString() }} 건
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.totalCan.toLocaleString() }} 캔
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.krw.toLocaleString() }} 원
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.fee.toLocaleString() }} 원
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.settlementAmount.toLocaleString() }} 원
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.withholdingTax.toLocaleString() }} 원
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.depositAmount.toLocaleString() }} 원
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:item.date="{ item }">
|
||||
{{ item.date }}
|
||||
</template>
|
||||
|
||||
<template v-slot:item.creator="{ item }">
|
||||
{{ item.creator }}
|
||||
</template>
|
||||
|
||||
<template v-slot:item.count="{ item }">
|
||||
{{ item.count.toLocaleString() }} 건
|
||||
</template>
|
||||
|
||||
<template v-slot:item.totalCan="{ item }">
|
||||
{{ item.totalCan.toLocaleString() }} 캔
|
||||
</template>
|
||||
|
||||
<template v-slot:item.krw="{ item }">
|
||||
{{ item.krw.toLocaleString() }} 원
|
||||
</template>
|
||||
|
||||
<template v-slot:item.fee="{ item }">
|
||||
{{ item.fee.toLocaleString() }} 원
|
||||
</template>
|
||||
|
||||
<template v-slot:item.settlementAmount="{ item }">
|
||||
{{ item.settlementAmount.toLocaleString() }} 원
|
||||
</template>
|
||||
|
||||
<template v-slot:item.withholdingTax="{ item }">
|
||||
{{ item.withholdingTax.toLocaleString() }} 원
|
||||
</template>
|
||||
|
||||
<template v-slot:item.depositAmount="{ item }">
|
||||
{{ item.depositAmount.toLocaleString() }} 원
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-pagination
|
||||
v-model="page"
|
||||
:length="total_page"
|
||||
:total-visible="7"
|
||||
@input="next"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api/calculate'
|
||||
import datetime from 'vuejs-datetimepicker'
|
||||
|
||||
export default {
|
||||
name: 'CalculateChannelDonation',
|
||||
components: {
|
||||
datetime
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
start_date: '',
|
||||
end_date: '',
|
||||
is_loading: false,
|
||||
items: [],
|
||||
total: null,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
total_page: 1,
|
||||
headers: [
|
||||
{ text: '날짜', align: 'center', sortable: false, value: 'date' },
|
||||
{ text: '크리에이터', align: 'center', sortable: false, value: 'creator' },
|
||||
{ text: '건수', align: 'center', sortable: false, value: 'count' },
|
||||
{ text: '캔', align: 'center', sortable: false, value: 'totalCan' },
|
||||
{ text: '원화', align: 'center', sortable: false, value: 'krw' },
|
||||
{ text: '수수료(6.6%)', align: 'center', sortable: false, value: 'fee' },
|
||||
{ text: '정산금액', align: 'center', sortable: false, value: 'settlementAmount' },
|
||||
{ text: '원천세(3.3%)', align: 'center', sortable: false, value: 'withholdingTax' },
|
||||
{ text: '입금액', align: 'center', sortable: false, value: 'depositAmount' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
const date = new Date()
|
||||
const firstDate = new Date(date.getFullYear(), date.getMonth(), 1)
|
||||
const lastDate = new Date(date.getFullYear(), date.getMonth() + 1, 0)
|
||||
|
||||
this.start_date = this.formatDate(firstDate)
|
||||
this.end_date = this.formatDate(lastDate)
|
||||
|
||||
await this.getCalculateChannelDonationByDate()
|
||||
},
|
||||
|
||||
methods: {
|
||||
formatDate(date) {
|
||||
const year = date.getFullYear()
|
||||
const month = ('0' + (date.getMonth() + 1)).slice(-2)
|
||||
const day = ('0' + date.getDate()).slice(-2)
|
||||
return `${year}-${month}-${day}`
|
||||
},
|
||||
|
||||
notifyError(message) {
|
||||
this.$dialog.notify.error(message)
|
||||
},
|
||||
|
||||
async next() {
|
||||
await this.getCalculateChannelDonationByDate()
|
||||
},
|
||||
|
||||
async getCalculateChannelDonationByDate() {
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.getCalculateChannelDonationByDate(
|
||||
this.start_date.substring(0, 10),
|
||||
this.end_date.substring(0, 10),
|
||||
this.page,
|
||||
this.page_size
|
||||
)
|
||||
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
const data = res.data.data
|
||||
this.items = data.items
|
||||
this.total = data.total
|
||||
this.total_page = Math.ceil(data.totalCount / this.page_size) || 1
|
||||
} else {
|
||||
this.notifyError(res.data.message || '데이터를 불러오는 중 오류가 발생했습니다.')
|
||||
}
|
||||
} catch (e) {
|
||||
this.notifyError('서버와의 통신 중 오류가 발생했습니다.')
|
||||
} finally {
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async downloadExcel() {
|
||||
try {
|
||||
const res = await api.downloadCalculateChannelDonationByDateExcel(
|
||||
this.start_date.substring(0, 10),
|
||||
this.end_date.substring(0, 10)
|
||||
)
|
||||
const url = window.URL.createObjectURL(new Blob([res.data]))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', '채널후원정산.xlsx')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
} catch (e) {
|
||||
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.datepicker {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,262 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-toolbar dark>
|
||||
<v-spacer />
|
||||
<v-toolbar-title>크리에이터별 채널 후원 정산</v-toolbar-title>
|
||||
<v-spacer />
|
||||
</v-toolbar>
|
||||
|
||||
<br>
|
||||
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col cols="2">
|
||||
<datetime
|
||||
v-model="start_date"
|
||||
class="datepicker"
|
||||
format="YYYY-MM-DD"
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="1">
|
||||
~
|
||||
</v-col>
|
||||
|
||||
<v-col cols="2">
|
||||
<datetime
|
||||
v-model="end_date"
|
||||
class="datepicker"
|
||||
format="YYYY-MM-DD"
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="1" />
|
||||
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="getCalculateChannelDonationByCreator"
|
||||
>
|
||||
조회
|
||||
</v-btn>
|
||||
</v-col>
|
||||
|
||||
<v-spacer />
|
||||
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="downloadExcel"
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="items"
|
||||
:loading="is_loading"
|
||||
:items-per-page="-1"
|
||||
class="elevation-1"
|
||||
hide-default-footer
|
||||
>
|
||||
<template slot="body.prepend">
|
||||
<tr v-if="total">
|
||||
<td>
|
||||
합계
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.count.toLocaleString() }} 건
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.totalCan.toLocaleString() }} 캔
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.krw.toLocaleString() }} 원
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.fee.toLocaleString() }} 원
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.settlementAmount.toLocaleString() }} 원
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.withholdingTax.toLocaleString() }} 원
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ total.depositAmount.toLocaleString() }} 원
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:item.creator="{ item }">
|
||||
{{ item.creator }}
|
||||
</template>
|
||||
|
||||
<template v-slot:item.count="{ item }">
|
||||
{{ item.count.toLocaleString() }} 건
|
||||
</template>
|
||||
|
||||
<template v-slot:item.totalCan="{ item }">
|
||||
{{ item.totalCan.toLocaleString() }} 캔
|
||||
</template>
|
||||
|
||||
<template v-slot:item.krw="{ item }">
|
||||
{{ item.krw.toLocaleString() }} 원
|
||||
</template>
|
||||
|
||||
<template v-slot:item.fee="{ item }">
|
||||
{{ item.fee.toLocaleString() }} 원
|
||||
</template>
|
||||
|
||||
<template v-slot:item.settlementAmount="{ item }">
|
||||
{{ item.settlementAmount.toLocaleString() }} 원
|
||||
</template>
|
||||
|
||||
<template v-slot:item.withholdingTax="{ item }">
|
||||
{{ item.withholdingTax.toLocaleString() }} 원
|
||||
</template>
|
||||
|
||||
<template v-slot:item.depositAmount="{ item }">
|
||||
{{ item.depositAmount.toLocaleString() }} 원
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-pagination
|
||||
v-model="page"
|
||||
:length="total_page"
|
||||
:total-visible="7"
|
||||
@input="next"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api/calculate'
|
||||
import datetime from 'vuejs-datetimepicker'
|
||||
|
||||
export default {
|
||||
name: 'CalculateChannelDonationByCreator',
|
||||
components: {
|
||||
datetime
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
start_date: '',
|
||||
end_date: '',
|
||||
is_loading: false,
|
||||
items: [],
|
||||
total: null,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
total_page: 1,
|
||||
headers: [
|
||||
{ text: '크리에이터', align: 'center', sortable: false, value: 'creator' },
|
||||
{ text: '건수', align: 'center', sortable: false, value: 'count' },
|
||||
{ text: '캔', align: 'center', sortable: false, value: 'totalCan' },
|
||||
{ text: '원화', align: 'center', sortable: false, value: 'krw' },
|
||||
{ text: '수수료(6.6%)', align: 'center', sortable: false, value: 'fee' },
|
||||
{ text: '정산금액', align: 'center', sortable: false, value: 'settlementAmount' },
|
||||
{ text: '원천세(3.3%)', align: 'center', sortable: false, value: 'withholdingTax' },
|
||||
{ text: '입금액', align: 'center', sortable: false, value: 'depositAmount' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
const date = new Date()
|
||||
const firstDate = new Date(date.getFullYear(), date.getMonth(), 1)
|
||||
const lastDate = new Date(date.getFullYear(), date.getMonth() + 1, 0)
|
||||
|
||||
this.start_date = this.formatDate(firstDate)
|
||||
this.end_date = this.formatDate(lastDate)
|
||||
|
||||
await this.getCalculateChannelDonationByCreator()
|
||||
},
|
||||
|
||||
methods: {
|
||||
formatDate(date) {
|
||||
const year = date.getFullYear()
|
||||
const month = ('0' + (date.getMonth() + 1)).slice(-2)
|
||||
const day = ('0' + date.getDate()).slice(-2)
|
||||
return `${year}-${month}-${day}`
|
||||
},
|
||||
|
||||
notifyError(message) {
|
||||
this.$dialog.notify.error(message)
|
||||
},
|
||||
|
||||
async next() {
|
||||
await this.getCalculateChannelDonationByCreator()
|
||||
},
|
||||
|
||||
async getCalculateChannelDonationByCreator() {
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.getCalculateChannelDonationByCreator(
|
||||
this.start_date.substring(0, 10),
|
||||
this.end_date.substring(0, 10),
|
||||
this.page,
|
||||
this.page_size
|
||||
)
|
||||
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
const data = res.data.data
|
||||
this.items = data.items
|
||||
this.total = data.total
|
||||
this.total_page = Math.ceil(data.totalCount / this.page_size) || 1
|
||||
} else {
|
||||
this.notifyError(res.data.message || '데이터를 불러오는 중 오류가 발생했습니다.')
|
||||
}
|
||||
} catch (e) {
|
||||
this.notifyError('서버와의 통신 중 오류가 발생했습니다.')
|
||||
} finally {
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async downloadExcel() {
|
||||
try {
|
||||
const res = await api.downloadCalculateChannelDonationByCreatorExcel(
|
||||
this.start_date.substring(0, 10),
|
||||
this.end_date.substring(0, 10)
|
||||
)
|
||||
const url = window.URL.createObjectURL(new Blob([res.data]))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', '크리에이터별_채널후원정산.xlsx')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
} catch (e) {
|
||||
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.datepicker {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -47,15 +47,22 @@
|
||||
<v-spacer />
|
||||
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="downloadExcel"
|
||||
<vue-excel-xlsx
|
||||
:data="items"
|
||||
:columns="columns"
|
||||
:file-name="'정산'"
|
||||
:file-type="'xlsx'"
|
||||
:sheet-name="'정산'"
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
</vue-excel-xlsx>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -149,6 +156,40 @@ export default {
|
||||
page_size: 20,
|
||||
total_page: 0,
|
||||
items: [],
|
||||
columns: [
|
||||
{
|
||||
label: "이메일",
|
||||
field: "email",
|
||||
},
|
||||
{
|
||||
label: "크리에이터",
|
||||
field: "nickname",
|
||||
},
|
||||
{
|
||||
label: "합계(캔)",
|
||||
field: "totalCan",
|
||||
},
|
||||
{
|
||||
label: "원화",
|
||||
field: "totalKrw",
|
||||
},
|
||||
{
|
||||
label: "결제수수료(6.6%)",
|
||||
field: "paymentFee",
|
||||
},
|
||||
{
|
||||
label: "정산금액",
|
||||
field: "settlementAmount",
|
||||
},
|
||||
{
|
||||
label: "원천세(3.3%)",
|
||||
field: "tax",
|
||||
},
|
||||
{
|
||||
label: "입금액",
|
||||
field: "depositAmount",
|
||||
},
|
||||
],
|
||||
headers: [
|
||||
{
|
||||
text: '이메일',
|
||||
@@ -268,21 +309,6 @@ export default {
|
||||
} finally {
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async downloadExcel() {
|
||||
try {
|
||||
const res = await api.downloadCalculateCommunityByCreatorExcel(this.start_date, this.end_date)
|
||||
const url = window.URL.createObjectURL(new Blob([res.data]))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', '크리에이터별_커뮤니티정산.xlsx')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
} catch (e) {
|
||||
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
color="#9970ff"
|
||||
dark
|
||||
depressed
|
||||
@click="getCalculateCommunityPost"
|
||||
@@ -47,15 +47,22 @@
|
||||
<v-spacer />
|
||||
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="downloadExcel"
|
||||
<vue-excel-xlsx
|
||||
:data="items"
|
||||
:columns="columns"
|
||||
:file-name="'커뮤니티-정산'"
|
||||
:file-type="'xlsx'"
|
||||
:sheet-name="'커뮤니티-정산'"
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
<v-btn
|
||||
block
|
||||
color="#9970ff"
|
||||
dark
|
||||
depressed
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
</vue-excel-xlsx>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
@@ -129,6 +136,52 @@ export default {
|
||||
page_size: 20,
|
||||
total_page: 0,
|
||||
items: [],
|
||||
columns: [
|
||||
{
|
||||
label: '날짜',
|
||||
field: 'date',
|
||||
},
|
||||
{
|
||||
label: '크리에이터',
|
||||
field: 'nickname',
|
||||
},
|
||||
{
|
||||
label: '내용(앞 10글자)',
|
||||
field: 'title'
|
||||
},
|
||||
{
|
||||
label: '판매금액(캔)',
|
||||
field: 'can',
|
||||
},
|
||||
{
|
||||
label: '구매유저수',
|
||||
field: 'numberOfPurchase',
|
||||
},
|
||||
{
|
||||
label: '합계(캔)',
|
||||
field: 'totalCan',
|
||||
},
|
||||
{
|
||||
label: '원화',
|
||||
field: 'totalKrw',
|
||||
},
|
||||
{
|
||||
label: '수수료\n(6.6%)',
|
||||
field: 'paymentFee',
|
||||
},
|
||||
{
|
||||
label: '정산금액',
|
||||
field: 'settlementAmount',
|
||||
},
|
||||
{
|
||||
label: '원천세\n(3.3%)',
|
||||
field: 'tax',
|
||||
},
|
||||
{
|
||||
label: '입금액',
|
||||
field: 'depositAmount',
|
||||
}
|
||||
],
|
||||
headers: [
|
||||
{
|
||||
text: '날짜',
|
||||
@@ -256,21 +309,6 @@ export default {
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async downloadExcel() {
|
||||
try {
|
||||
const res = await api.downloadCalculateCommunityPostExcel(this.start_date, this.end_date)
|
||||
const url = window.URL.createObjectURL(new Blob([res.data]))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', '커뮤니티-정산.xlsx')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
} catch (e) {
|
||||
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
color="#9970ff"
|
||||
dark
|
||||
depressed
|
||||
@click="getCalculateContent"
|
||||
@@ -48,15 +48,22 @@
|
||||
<v-spacer />
|
||||
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="downloadExcel"
|
||||
<vue-excel-xlsx
|
||||
:data="items"
|
||||
:columns="columns"
|
||||
:file-name="'정산'"
|
||||
:file-type="'xlsx'"
|
||||
:sheet-name="'정산'"
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
<v-btn
|
||||
block
|
||||
color="#9970ff"
|
||||
dark
|
||||
depressed
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
</vue-excel-xlsx>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
@@ -119,16 +126,6 @@
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="text-center">
|
||||
<v-col>
|
||||
<v-pagination
|
||||
v-model="page"
|
||||
:length="total_page"
|
||||
circle
|
||||
@input="next"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
@@ -146,10 +143,61 @@ export default {
|
||||
is_loading: false,
|
||||
start_date: null,
|
||||
end_date: null,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
total_page: 0,
|
||||
items: [],
|
||||
columns: [
|
||||
{
|
||||
label: '판매일',
|
||||
field: 'saleDate',
|
||||
},
|
||||
{
|
||||
label: '크리에이터',
|
||||
field: 'nickname',
|
||||
},
|
||||
{
|
||||
label: '제목',
|
||||
field: 'title',
|
||||
},
|
||||
{
|
||||
label: '구분',
|
||||
field: 'orderType',
|
||||
},
|
||||
{
|
||||
label: '판매금액(캔)',
|
||||
field: 'orderPrice',
|
||||
},
|
||||
{
|
||||
label: '판매수',
|
||||
field: 'numberOfPeople',
|
||||
},
|
||||
{
|
||||
label: '합계(캔)',
|
||||
field: 'totalCan',
|
||||
},
|
||||
{
|
||||
label: '원화',
|
||||
field: 'totalKrw',
|
||||
},
|
||||
{
|
||||
label: '수수료\n(6.6%)',
|
||||
field: 'paymentFee',
|
||||
},
|
||||
{
|
||||
label: '정산금액',
|
||||
field: 'settlementAmount',
|
||||
},
|
||||
{
|
||||
label: '원천세\n(3.3%)',
|
||||
field: 'tax',
|
||||
},
|
||||
{
|
||||
label: '입금액',
|
||||
field: 'depositAmount',
|
||||
},
|
||||
{
|
||||
label: '등록일',
|
||||
field: 'registrationDate',
|
||||
},
|
||||
],
|
||||
headers: [
|
||||
{
|
||||
text: '판매일',
|
||||
@@ -273,10 +321,9 @@ export default {
|
||||
this.is_loading = true
|
||||
|
||||
try {
|
||||
const res = await api.getCalculateContent(this.start_date, this.end_date, this.page, this.page_size)
|
||||
const res = await api.getCalculateContent(this.start_date, this.end_date)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.items = res.data.data.items
|
||||
this.total_page = Math.ceil(res.data.data.totalCount / this.page_size)
|
||||
this.items = res.data.data
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
@@ -286,25 +333,6 @@ export default {
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
next() {
|
||||
this.getCalculateContent()
|
||||
},
|
||||
|
||||
async downloadExcel() {
|
||||
try {
|
||||
const res = await api.downloadCalculateContentExcel(this.start_date, this.end_date)
|
||||
const url = window.URL.createObjectURL(new Blob([res.data]))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', '콘텐츠정산.xlsx')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
} catch (e) {
|
||||
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,15 +47,22 @@
|
||||
<v-spacer />
|
||||
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="downloadExcel"
|
||||
<vue-excel-xlsx
|
||||
:data="items"
|
||||
:columns="columns"
|
||||
:file-name="'정산'"
|
||||
:file-type="'xlsx'"
|
||||
:sheet-name="'정산'"
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
</vue-excel-xlsx>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -149,6 +156,40 @@ export default {
|
||||
page_size: 20,
|
||||
total_page: 0,
|
||||
items: [],
|
||||
columns: [
|
||||
{
|
||||
label: "이메일",
|
||||
field: "email",
|
||||
},
|
||||
{
|
||||
label: "크리에이터",
|
||||
field: "nickname",
|
||||
},
|
||||
{
|
||||
label: "합계(캔)",
|
||||
field: "totalCan",
|
||||
},
|
||||
{
|
||||
label: "원화",
|
||||
field: "totalKrw",
|
||||
},
|
||||
{
|
||||
label: "결제수수료(6.6%)",
|
||||
field: "paymentFee",
|
||||
},
|
||||
{
|
||||
label: "정산금액",
|
||||
field: "settlementAmount",
|
||||
},
|
||||
{
|
||||
label: "원천세(3.3%)",
|
||||
field: "tax",
|
||||
},
|
||||
{
|
||||
label: "입금액",
|
||||
field: "depositAmount",
|
||||
},
|
||||
],
|
||||
headers: [
|
||||
{
|
||||
text: '이메일',
|
||||
@@ -268,21 +309,6 @@ export default {
|
||||
} finally {
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async downloadExcel() {
|
||||
try {
|
||||
const res = await api.downloadCalculateContentByCreatorExcel(this.start_date, this.end_date)
|
||||
const url = window.URL.createObjectURL(new Blob([res.data]))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', '크리에이터별_콘텐츠정산.xlsx')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
} catch (e) {
|
||||
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
color="#9970ff"
|
||||
dark
|
||||
depressed
|
||||
@click="getCalculateContentDonation"
|
||||
@@ -48,15 +48,22 @@
|
||||
<v-spacer />
|
||||
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="downloadExcel"
|
||||
<vue-excel-xlsx
|
||||
:data="items"
|
||||
:columns="columns"
|
||||
:file-name="'정산'"
|
||||
:file-type="'xlsx'"
|
||||
:sheet-name="'정산'"
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
<v-btn
|
||||
block
|
||||
color="#9970ff"
|
||||
dark
|
||||
depressed
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
</vue-excel-xlsx>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
@@ -111,16 +118,6 @@
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="text-center">
|
||||
<v-col>
|
||||
<v-pagination
|
||||
v-model="page"
|
||||
:length="total_page"
|
||||
circle
|
||||
@input="next"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
@@ -138,10 +135,57 @@ export default {
|
||||
is_loading: false,
|
||||
start_date: null,
|
||||
end_date: null,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
total_page: 0,
|
||||
items: [],
|
||||
columns: [
|
||||
{
|
||||
label: '후원날짜',
|
||||
field: 'donationDate',
|
||||
},
|
||||
{
|
||||
label: '크리에이터',
|
||||
field: 'nickname',
|
||||
},
|
||||
{
|
||||
label: '콘텐츠 제목',
|
||||
field: 'title',
|
||||
},
|
||||
{
|
||||
label: '구분',
|
||||
field: 'paidOrFree',
|
||||
},
|
||||
{
|
||||
label: '후원수',
|
||||
field: 'numberOfDonation',
|
||||
},
|
||||
{
|
||||
label: '합계(캔)',
|
||||
field: 'totalCan',
|
||||
},
|
||||
{
|
||||
label: '원화',
|
||||
field: 'totalKrw',
|
||||
},
|
||||
{
|
||||
label: '수수료\n(6.6%)',
|
||||
field: 'paymentFee',
|
||||
},
|
||||
{
|
||||
label: '정산금액',
|
||||
field: 'settlementAmount',
|
||||
},
|
||||
{
|
||||
label: '원천세\n(3.3%)',
|
||||
field: 'tax',
|
||||
},
|
||||
{
|
||||
label: '입금액',
|
||||
field: 'depositAmount',
|
||||
},
|
||||
{
|
||||
label: '콘텐츠 등록일',
|
||||
field: 'registrationDate',
|
||||
},
|
||||
],
|
||||
headers: [
|
||||
{
|
||||
text: '후원날짜',
|
||||
@@ -259,10 +303,9 @@ export default {
|
||||
this.is_loading = true
|
||||
|
||||
try {
|
||||
const res = await api.getCalculateContentDonation(this.start_date, this.end_date, this.page, this.page_size)
|
||||
const res = await api.getCalculateContentDonation(this.start_date, this.end_date)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.items = res.data.data.items
|
||||
this.total_page = Math.ceil(res.data.data.totalCount / this.page_size)
|
||||
this.items = res.data.data
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
@@ -272,25 +315,6 @@ export default {
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
next() {
|
||||
this.getCalculateContentDonation()
|
||||
},
|
||||
|
||||
async downloadExcel() {
|
||||
try {
|
||||
const res = await api.downloadCalculateContentDonationExcel(this.start_date, this.end_date)
|
||||
const url = window.URL.createObjectURL(new Blob([res.data]))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', '콘텐츠후원정산.xlsx')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
} catch (e) {
|
||||
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
color="#9970ff"
|
||||
dark
|
||||
depressed
|
||||
@click="getCalculateLive"
|
||||
@@ -47,15 +47,22 @@
|
||||
<v-spacer />
|
||||
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="downloadExcel"
|
||||
<vue-excel-xlsx
|
||||
:data="items"
|
||||
:columns="columns"
|
||||
:file-name="'정산'"
|
||||
:file-type="'xlsx'"
|
||||
:sheet-name="'정산'"
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
<v-btn
|
||||
block
|
||||
color="#9970ff"
|
||||
dark
|
||||
depressed
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
</vue-excel-xlsx>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -69,6 +76,10 @@
|
||||
class="elevation-1"
|
||||
hide-default-footer
|
||||
>
|
||||
<template v-slot:item.email="{ item }">
|
||||
{{ item.email }}
|
||||
</template>
|
||||
|
||||
<template v-slot:item.nickname="{ item }">
|
||||
{{ item.nickname }}
|
||||
</template>
|
||||
@@ -112,29 +123,9 @@
|
||||
<template v-slot:item.depositAmount="{ item }">
|
||||
{{ item.depositAmount.toLocaleString() }} 원
|
||||
</template>
|
||||
|
||||
<template v-slot:item.actions="{ item }">
|
||||
<v-btn
|
||||
small
|
||||
color="error"
|
||||
@click="refund(item)"
|
||||
>
|
||||
환불
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="text-center">
|
||||
<v-col>
|
||||
<v-pagination
|
||||
v-model="page"
|
||||
:length="total_page"
|
||||
circle
|
||||
@input="next"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
@@ -152,11 +143,68 @@ export default {
|
||||
is_loading: false,
|
||||
start_date: null,
|
||||
end_date: null,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
total_page: 0,
|
||||
items: [],
|
||||
columns: [
|
||||
{
|
||||
label: "이메일",
|
||||
field: "email",
|
||||
},
|
||||
{
|
||||
label: "크리에이터",
|
||||
field: "nickname",
|
||||
},
|
||||
{
|
||||
label: "날짜",
|
||||
field: "date",
|
||||
},
|
||||
{
|
||||
label: "제목",
|
||||
field: "title",
|
||||
},
|
||||
{
|
||||
label: "구분",
|
||||
field: "canUsageStr",
|
||||
},
|
||||
{
|
||||
label: "입장캔",
|
||||
field: "entranceFee",
|
||||
},
|
||||
{
|
||||
label: "인원",
|
||||
field: "numberOfPeople",
|
||||
},
|
||||
{
|
||||
label: "합계(캔)",
|
||||
field: "totalAmount",
|
||||
},
|
||||
{
|
||||
label: "원화",
|
||||
field: "totalKrw",
|
||||
},
|
||||
{
|
||||
label: "결제수수료(6.6%)",
|
||||
field: "paymentFee",
|
||||
},
|
||||
{
|
||||
label: "정산금액",
|
||||
field: "settlementAmount",
|
||||
},
|
||||
{
|
||||
label: "원천세(3.3%)",
|
||||
field: "tax",
|
||||
},
|
||||
{
|
||||
label: "입금액",
|
||||
field: "depositAmount",
|
||||
},
|
||||
],
|
||||
headers: [
|
||||
{
|
||||
text: '이메일',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'email',
|
||||
},
|
||||
{
|
||||
text: '크리에이터',
|
||||
align: 'center',
|
||||
@@ -227,12 +275,6 @@ export default {
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'depositAmount',
|
||||
},
|
||||
{
|
||||
text: '관리',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'actions',
|
||||
}
|
||||
],
|
||||
}
|
||||
@@ -273,10 +315,9 @@ export default {
|
||||
this.is_loading = true
|
||||
|
||||
try {
|
||||
const res = await api.getCalculateLive(this.start_date, this.end_date, this.page, this.page_size)
|
||||
const res = await api.getCalculateLive(this.start_date, this.end_date)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.items = res.data.data.items
|
||||
this.total_page = Math.ceil(res.data.data.totalCount / this.page_size)
|
||||
this.items = res.data.data
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
@@ -286,41 +327,6 @@ export default {
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
next() {
|
||||
this.getCalculateLive()
|
||||
},
|
||||
|
||||
async refund(item) {
|
||||
if (confirm('정말로 환불하시겠습니까?')) {
|
||||
try {
|
||||
const res = await api.refundLive(item.roomId, item.canUsageStr)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.notifySuccess('환불 처리가 완료되었습니다.')
|
||||
await this.getCalculateLive()
|
||||
} else {
|
||||
this.notifyError(res.data.message || '환불 처리 중 오류가 발생했습니다.')
|
||||
}
|
||||
} catch (e) {
|
||||
this.notifyError('환불 처리 중 오류가 발생했습니다.')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
async downloadExcel() {
|
||||
try {
|
||||
const res = await api.downloadCalculateLiveExcel(this.start_date, this.end_date)
|
||||
const url = window.URL.createObjectURL(new Blob([res.data]))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', '라이브정산.xlsx')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
} catch (e) {
|
||||
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,15 +47,22 @@
|
||||
<v-spacer />
|
||||
|
||||
<v-col cols="2">
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="downloadExcel"
|
||||
<vue-excel-xlsx
|
||||
:data="items"
|
||||
:columns="columns"
|
||||
:file-name="'정산'"
|
||||
:file-type="'xlsx'"
|
||||
:sheet-name="'정산'"
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
<v-btn
|
||||
block
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
>
|
||||
엑셀 다운로드
|
||||
</v-btn>
|
||||
</vue-excel-xlsx>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -149,6 +156,40 @@ export default {
|
||||
page_size: 20,
|
||||
total_page: 0,
|
||||
items: [],
|
||||
columns: [
|
||||
{
|
||||
label: "이메일",
|
||||
field: "email",
|
||||
},
|
||||
{
|
||||
label: "크리에이터",
|
||||
field: "nickname",
|
||||
},
|
||||
{
|
||||
label: "합계(캔)",
|
||||
field: "totalCan",
|
||||
},
|
||||
{
|
||||
label: "원화",
|
||||
field: "totalKrw",
|
||||
},
|
||||
{
|
||||
label: "결제수수료(6.6%)",
|
||||
field: "paymentFee",
|
||||
},
|
||||
{
|
||||
label: "정산금액",
|
||||
field: "settlementAmount",
|
||||
},
|
||||
{
|
||||
label: "원천세(3.3%)",
|
||||
field: "tax",
|
||||
},
|
||||
{
|
||||
label: "입금액",
|
||||
field: "depositAmount",
|
||||
},
|
||||
],
|
||||
headers: [
|
||||
{
|
||||
text: '이메일',
|
||||
@@ -268,21 +309,6 @@ export default {
|
||||
} finally {
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async downloadExcel() {
|
||||
try {
|
||||
const res = await api.downloadCalculateLiveByCreatorExcel(this.start_date, this.end_date)
|
||||
const url = window.URL.createObjectURL(new Blob([res.data]))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', '크리에이터별_라이브정산.xlsx')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
} catch (e) {
|
||||
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="cans"
|
||||
:items-per-page="-1"
|
||||
class="elevation-1"
|
||||
hide-default-footer
|
||||
>
|
||||
|
||||
@@ -94,6 +94,10 @@
|
||||
class="elevation-1"
|
||||
hide-default-footer
|
||||
>
|
||||
<template v-slot:item.accountId="{ item }">
|
||||
{{ item.accountId }}
|
||||
</template>
|
||||
|
||||
<template v-slot:item.nickname="{ item }">
|
||||
{{ item.nickname }}
|
||||
</template>
|
||||
@@ -109,16 +113,6 @@
|
||||
<template v-slot:item.datetime="{ item }">
|
||||
{{ item.datetime }}
|
||||
</template>
|
||||
|
||||
<template v-slot:item.refund="{ item }">
|
||||
<v-btn
|
||||
color="error"
|
||||
small
|
||||
@click="confirmRefund(item)"
|
||||
>
|
||||
환불
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-card-actions v-show="!is_loading">
|
||||
<v-spacer />
|
||||
@@ -152,9 +146,14 @@ export default {
|
||||
end_date: null,
|
||||
items: [],
|
||||
detail_items: null,
|
||||
selected_date_item: null,
|
||||
show_popup_dialog: false,
|
||||
detail_headers: [
|
||||
{
|
||||
text: 'no',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'accountId',
|
||||
},
|
||||
{
|
||||
text: '닉네임',
|
||||
align: 'center',
|
||||
@@ -185,12 +184,6 @@ export default {
|
||||
sortable: false,
|
||||
value: 'datetime',
|
||||
},
|
||||
{
|
||||
text: '환불',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'refund',
|
||||
},
|
||||
],
|
||||
headers: [
|
||||
{
|
||||
@@ -291,7 +284,6 @@ export default {
|
||||
async getChargeStatusDetail(value) {
|
||||
if (value.date !== '합계') {
|
||||
this.is_loading = true
|
||||
this.selected_date_item = value
|
||||
|
||||
try {
|
||||
const res = await api.getChargeStatusDetail(value.date, value.pg, value.currency)
|
||||
@@ -308,45 +300,6 @@ export default {
|
||||
this.is_loading = false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
async confirmRefund(item) {
|
||||
let canText = `${item.chargeCan}캔`
|
||||
if (item.rewardCan > 0) {
|
||||
canText += ` + ${item.rewardCan}캔`
|
||||
}
|
||||
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '환불 확인',
|
||||
text: `${item.nickname}님의 ${canText}을 환불하시겠습니까?`,
|
||||
actions: {
|
||||
false: '취소',
|
||||
true: '환불'
|
||||
}
|
||||
})
|
||||
|
||||
if (confirm) {
|
||||
await this.refundCharge(item.chargeId)
|
||||
}
|
||||
},
|
||||
|
||||
async refundCharge(chargeId) {
|
||||
this.is_loading = true
|
||||
|
||||
try {
|
||||
const res = await api.refundCharge(chargeId)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.notifySuccess('환불이 완료되었습니다.')
|
||||
await this.getChargeStatusDetail(this.selected_date_item)
|
||||
await this.getChargeStatus()
|
||||
} else {
|
||||
this.notifyError(res.data.message || '환불 처리 중 오류가 발생했습니다.')
|
||||
}
|
||||
} catch (e) {
|
||||
this.notifyError('환불 처리 중 오류가 발생했습니다.')
|
||||
} finally {
|
||||
this.is_loading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,11 +109,11 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<!-- 성별 & 리전 -->
|
||||
<!-- 성별 -->
|
||||
<v-row>
|
||||
<v-col
|
||||
cols="12"
|
||||
md="4"
|
||||
md="6"
|
||||
>
|
||||
<v-select
|
||||
v-model="character.gender"
|
||||
@@ -124,35 +124,10 @@
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
cols="12"
|
||||
md="4"
|
||||
>
|
||||
<v-select
|
||||
v-if="!isEdit"
|
||||
v-model="character.region"
|
||||
:items="regionOptions"
|
||||
item-text="text"
|
||||
item-value="value"
|
||||
label="리전"
|
||||
outlined
|
||||
dense
|
||||
/>
|
||||
<v-text-field
|
||||
v-else
|
||||
:value="regionDisplayText"
|
||||
label="리전"
|
||||
readonly
|
||||
outlined
|
||||
dense
|
||||
background-color="grey lighten-4"
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
<!-- 나이 -->
|
||||
<v-col
|
||||
cols="12"
|
||||
md="4"
|
||||
md="6"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="character.age"
|
||||
@@ -353,11 +328,10 @@
|
||||
<v-col cols="12">
|
||||
<v-textarea
|
||||
v-model="character.systemPrompt"
|
||||
label="시스템 프롬프트 (최대 2000자)"
|
||||
label="시스템 프롬프트"
|
||||
outlined
|
||||
auto-grow
|
||||
rows="4"
|
||||
counter="2000"
|
||||
:class="{ 'required-asterisk': !isEdit }"
|
||||
:rules="systemPromptRules"
|
||||
/>
|
||||
@@ -1142,7 +1116,6 @@ export default {
|
||||
speechStyle: '',
|
||||
appearance: '',
|
||||
systemPrompt: '',
|
||||
region: 'KR',
|
||||
tags: [],
|
||||
memories: [],
|
||||
relationships: [],
|
||||
@@ -1177,14 +1150,9 @@ export default {
|
||||
'ISTJ', 'ISFJ', 'ESTJ', 'ESFJ',
|
||||
'ISTP', 'ISFP', 'ESTP', 'ESFP'
|
||||
],
|
||||
regionOptions: [
|
||||
{ text: '한국', value: 'KR' },
|
||||
{ text: '일본', value: 'JP' }
|
||||
],
|
||||
typeOptions: ['Clone', 'Character'],
|
||||
systemPromptRules: [
|
||||
v => (this.isEdit ? true : (!!v && v.trim().length > 0) || '시스템 프롬프트를 입력하세요'),
|
||||
v => (!!v && v.length <= 2000) || '최대 2000자까지 입력 가능합니다'
|
||||
v => (this.isEdit ? true : (!!v && v.trim().length > 0) || '시스템 프롬프트를 입력하세요')
|
||||
],
|
||||
// 인물 관계 옵션 및 검증 규칙
|
||||
relationshipTypeOptions: ['가족', '친구', '동료', '연인', '기타'],
|
||||
@@ -1229,10 +1197,6 @@ export default {
|
||||
const hasNonIdField = Object.keys(changed || {}).some(k => k !== 'id');
|
||||
const imageChanged = !!this.character.image; // 새 이미지 선택 여부
|
||||
return !(hasNonIdField || imageChanged);
|
||||
},
|
||||
regionDisplayText() {
|
||||
const option = this.regionOptions.find(opt => opt.value === this.character.region);
|
||||
return option ? option.text : this.character.region;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1605,12 +1569,9 @@ export default {
|
||||
const result = { ...data };
|
||||
// 기본값 보정
|
||||
if (result.originalWorkId == null) result.originalWorkId = null;
|
||||
// 리전 정보가 없는 경우 기본값 KR 설정
|
||||
if (!result.region) result.region = 'KR';
|
||||
|
||||
const simpleFields = [
|
||||
'name', 'systemPrompt', 'description', 'age', 'gender', 'mbti',
|
||||
'characterType', 'speechPattern', 'speechStyle', 'appearance', 'imageUrl', 'region'
|
||||
'characterType', 'speechPattern', 'speechStyle', 'appearance', 'imageUrl'
|
||||
];
|
||||
simpleFields.forEach(f => {
|
||||
if (result[f] == null) result[f] = '';
|
||||
@@ -1634,7 +1595,6 @@ export default {
|
||||
speechPattern: this.character.speechPattern,
|
||||
speechStyle: this.character.speechStyle,
|
||||
appearance: this.character.appearance,
|
||||
region: this.character.region,
|
||||
tags: this.character.tags || [],
|
||||
hobbies: this.character.hobbies || [],
|
||||
values: this.character.values || [],
|
||||
@@ -1655,7 +1615,7 @@ export default {
|
||||
// 기본 필드 비교
|
||||
const simpleFields = [
|
||||
'name', 'description', 'age', 'gender', 'mbti', 'characterType', 'originalWorkId',
|
||||
'speechPattern', 'speechStyle', 'isActive', 'region'
|
||||
'speechPattern', 'speechStyle', 'isActive'
|
||||
];
|
||||
|
||||
simpleFields.forEach(field => {
|
||||
|
||||
@@ -79,9 +79,6 @@
|
||||
<th class="text-center">
|
||||
태그
|
||||
</th>
|
||||
<th class="text-center">
|
||||
리전
|
||||
</th>
|
||||
<th class="text-center">
|
||||
등록일
|
||||
</th>
|
||||
@@ -153,7 +150,6 @@
|
||||
</div>
|
||||
<span v-else>-</span>
|
||||
</td>
|
||||
<td>{{ getRegionText(item.region) }}</td>
|
||||
<td>{{ item.createdAt }}</td>
|
||||
<td>{{ item.updatedAt || '-' }}</td>
|
||||
<td>
|
||||
@@ -288,11 +284,7 @@ export default {
|
||||
total_page: 0,
|
||||
characters: [],
|
||||
selected_character: {},
|
||||
searchTerm: '',
|
||||
regionOptions: [
|
||||
{ text: '한국', value: 'KR' },
|
||||
{ text: '일본', value: 'JP' }
|
||||
]
|
||||
searchTerm: ''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -309,11 +301,6 @@ export default {
|
||||
this.$dialog.notify.success(message)
|
||||
},
|
||||
|
||||
getRegionText(region) {
|
||||
if (!region) return '-';
|
||||
const option = this.regionOptions.find(opt => opt.value === region);
|
||||
return option ? option.text : region;
|
||||
},
|
||||
|
||||
showDetailDialog(item, type) {
|
||||
this.selected_character = item;
|
||||
|
||||
@@ -125,13 +125,7 @@
|
||||
:lines="3"
|
||||
/>
|
||||
</td>
|
||||
<td
|
||||
style="
|
||||
max-width: 200px !important;
|
||||
word-break: break-all;
|
||||
height: auto;
|
||||
"
|
||||
>
|
||||
<td style="max-width: 200px !important; word-break:break-all; height: auto;">
|
||||
<vue-show-more-text
|
||||
:text="item.detail"
|
||||
:lines="3"
|
||||
@@ -139,13 +133,7 @@
|
||||
</td>
|
||||
<td>{{ item.creatorNickname }}</td>
|
||||
<td>{{ item.theme }}</td>
|
||||
<td
|
||||
style="
|
||||
max-width: 100px !important;
|
||||
word-break: break-all;
|
||||
height: auto;
|
||||
"
|
||||
>
|
||||
<td style="max-width: 100px !important; word-break:break-all; height: auto;">
|
||||
<vue-show-more-text
|
||||
:text="item.tags"
|
||||
:lines="3"
|
||||
@@ -158,29 +146,14 @@
|
||||
무료
|
||||
</td>
|
||||
<td
|
||||
v-if="
|
||||
item.totalContentCount > 0 &&
|
||||
item.remainingContentCount > 0
|
||||
"
|
||||
style="
|
||||
min-width: 100px !important;
|
||||
word-break: break-all;
|
||||
height: auto;
|
||||
"
|
||||
v-if="item.totalContentCount > 0 && item.remainingContentCount > 0"
|
||||
style="min-width: 100px !important; word-break:break-all; height: auto;"
|
||||
>
|
||||
{{ item.totalContentCount - item.remainingContentCount }} /
|
||||
{{ item.totalContentCount }}
|
||||
{{ item.totalContentCount - item.remainingContentCount }} / {{ item.totalContentCount }}
|
||||
</td>
|
||||
<td
|
||||
v-else-if="
|
||||
item.totalContentCount > 0 &&
|
||||
item.remainingContentCount <= 0
|
||||
"
|
||||
style="
|
||||
min-width: 100px !important;
|
||||
word-break: break-all;
|
||||
height: auto;
|
||||
"
|
||||
v-else-if="item.totalContentCount > 0 && item.remainingContentCount <= 0"
|
||||
style="min-width: 100px !important; word-break:break-all; height: auto;"
|
||||
>
|
||||
Sold Out
|
||||
</td>
|
||||
@@ -260,60 +233,9 @@
|
||||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title> 콘텐츠 수정 </v-card-title>
|
||||
<v-card-text>
|
||||
<v-row align="center">
|
||||
<v-col cols="4">
|
||||
커버 이미지
|
||||
</v-col>
|
||||
<v-col cols="8">
|
||||
<v-img
|
||||
v-if="image_preview"
|
||||
:src="image_preview"
|
||||
max-width="200"
|
||||
aspect-ratio="1"
|
||||
contain
|
||||
class="mb-2"
|
||||
/>
|
||||
<v-file-input
|
||||
v-model="cover_image_file"
|
||||
label="커버 이미지 선택"
|
||||
accept="image/*"
|
||||
prepend-icon="mdi-camera"
|
||||
outlined
|
||||
dense
|
||||
@change="onFileChange"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-text v-if="show_cropper">
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<div style="max-height: 400px">
|
||||
<img
|
||||
ref="cropper_image"
|
||||
:src="cropper_src"
|
||||
style="max-width: 100%"
|
||||
>
|
||||
</div>
|
||||
<v-btn
|
||||
color="primary"
|
||||
class="mt-2"
|
||||
@click="cropImage"
|
||||
>
|
||||
크롭 적용
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="grey"
|
||||
class="mt-2 ml-2"
|
||||
@click="cancelCrop"
|
||||
>
|
||||
취소
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-title>
|
||||
콘텐츠 수정
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-row align="center">
|
||||
<v-col cols="4">
|
||||
@@ -451,18 +373,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from "@/api/audio_content";
|
||||
import * as api from '@/api/audio_content'
|
||||
import * as dynamicLink from "@/api/firebase_dynamic_link";
|
||||
|
||||
import Cropper from "cropperjs";
|
||||
import "cropperjs/dist/cropper.css";
|
||||
import VuetifyAudio from "vuetify-audio";
|
||||
import VueShowMoreText from "vue-show-more-text";
|
||||
import VuetifyAudio from 'vuetify-audio'
|
||||
import VueShowMoreText from 'vue-show-more-text'
|
||||
|
||||
export default {
|
||||
name: "AudioContentList",
|
||||
|
||||
components: { VuetifyAudio, VueShowMoreText },
|
||||
components: {VuetifyAudio, VueShowMoreText},
|
||||
|
||||
data() {
|
||||
return {
|
||||
@@ -471,135 +391,60 @@ export default {
|
||||
show_delete_confirm_dialog: false,
|
||||
page: 1,
|
||||
total_page: 0,
|
||||
status: "OPEN",
|
||||
search_word: "",
|
||||
status: 'OPEN',
|
||||
search_word: '',
|
||||
audio_content: {},
|
||||
audio_contents: [],
|
||||
themeList: [],
|
||||
selected_audio_content: {},
|
||||
utm_source: "",
|
||||
utm_medium: "",
|
||||
utm_campaign: "",
|
||||
cover_image_file: null,
|
||||
image_preview: null,
|
||||
cropper: null,
|
||||
show_cropper: false,
|
||||
cropper_src: null,
|
||||
};
|
||||
utm_source: '',
|
||||
utm_medium: '',
|
||||
utm_campaign: '',
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
this.audio_content = {
|
||||
id: null,
|
||||
title: "",
|
||||
detail: "",
|
||||
theme_id: null,
|
||||
is_adult: false,
|
||||
is_comment_available: false,
|
||||
is_default_cover_image: false,
|
||||
};
|
||||
await this.getAudioContentThemeList();
|
||||
await this.getAudioContent();
|
||||
await this.getAudioContent()
|
||||
},
|
||||
|
||||
methods: {
|
||||
notifyError(message) {
|
||||
this.$dialog.notify.error(message);
|
||||
this.$dialog.notify.error(message)
|
||||
},
|
||||
|
||||
notifySuccess(message) {
|
||||
this.$dialog.notify.success(message);
|
||||
this.$dialog.notify.success(message)
|
||||
},
|
||||
|
||||
deleteConfirm(item) {
|
||||
this.selected_audio_content = item;
|
||||
this.show_delete_confirm_dialog = true;
|
||||
this.selected_audio_content = item
|
||||
this.show_delete_confirm_dialog = true
|
||||
},
|
||||
|
||||
deleteCancel() {
|
||||
this.selected_audio_content = {};
|
||||
this.show_delete_confirm_dialog = false;
|
||||
this.selected_audio_content = {}
|
||||
this.show_delete_confirm_dialog = false
|
||||
},
|
||||
|
||||
showModifyDialog(item) {
|
||||
this.selected_audio_content = item;
|
||||
this.selected_audio_content = item
|
||||
|
||||
this.audio_content.id = item.audioContentId;
|
||||
this.audio_content.title = item.title;
|
||||
this.audio_content.detail = item.detail;
|
||||
this.audio_content.theme_id = item.themeId;
|
||||
this.audio_content.is_adult = item.isAdult;
|
||||
this.audio_content.is_comment_available = item.isCommentAvailable;
|
||||
this.audio_content.is_default_cover_image = false;
|
||||
|
||||
this.image_preview = item.coverImageUrl;
|
||||
this.cover_image_file = null;
|
||||
this.show_modify_dialog = true;
|
||||
},
|
||||
|
||||
onFileChange(file) {
|
||||
if (!file) {
|
||||
this.image_preview = this.selected_audio_content.coverImageUrl;
|
||||
this.show_cropper = false;
|
||||
return;
|
||||
}
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e) => {
|
||||
this.cropper_src = e.target.result;
|
||||
this.show_cropper = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.cropper) {
|
||||
this.cropper.destroy();
|
||||
}
|
||||
this.cropper = new Cropper(this.$refs.cropper_image, {
|
||||
aspectRatio: 1,
|
||||
viewMode: 1,
|
||||
});
|
||||
});
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
},
|
||||
|
||||
cropImage() {
|
||||
const canvas = this.cropper.getCroppedCanvas({
|
||||
width: 500,
|
||||
height: 500,
|
||||
});
|
||||
this.image_preview = canvas.toDataURL();
|
||||
canvas.toBlob((blob) => {
|
||||
this.cover_image_file = new File([blob], "cover_image.png", {
|
||||
type: "image/png",
|
||||
});
|
||||
});
|
||||
this.show_cropper = false;
|
||||
},
|
||||
|
||||
cancelCrop() {
|
||||
this.show_cropper = false;
|
||||
this.cover_image_file = null;
|
||||
this.image_preview = this.selected_audio_content.coverImageUrl;
|
||||
this.audio_content.id = item.audioContentId
|
||||
this.audio_content.title = item.title
|
||||
this.audio_content.detail = item.detail
|
||||
this.audio_content.theme_id = item.themeId
|
||||
this.audio_content.is_adult = item.isAdult
|
||||
this.audio_content.is_comment_available = item.isCommentAvailable
|
||||
this.audio_content.is_default_cover_image = false
|
||||
this.show_modify_dialog = true
|
||||
},
|
||||
|
||||
cancel() {
|
||||
this.selected_audio_content = {};
|
||||
this.audio_content = {
|
||||
id: null,
|
||||
title: "",
|
||||
detail: "",
|
||||
theme_id: null,
|
||||
is_adult: false,
|
||||
is_comment_available: false,
|
||||
is_default_cover_image: false,
|
||||
};
|
||||
this.image_preview = null;
|
||||
this.cover_image_file = null;
|
||||
this.show_cropper = false;
|
||||
if (this.cropper) {
|
||||
this.cropper.destroy();
|
||||
this.cropper = null;
|
||||
}
|
||||
this.show_modify_dialog = false;
|
||||
this.show_delete_confirm_dialog = false;
|
||||
this.selected_audio_content = {}
|
||||
this.audio_content = {}
|
||||
this.show_modify_dialog = false
|
||||
this.show_delete_confirm_dialog = false
|
||||
},
|
||||
|
||||
async modify() {
|
||||
@@ -608,8 +453,8 @@ export default {
|
||||
this.audio_content.title === undefined ||
|
||||
this.audio_content.title.trim().length <= 0
|
||||
) {
|
||||
this.notifyError("제목을 입력하세요");
|
||||
return;
|
||||
this.notifyError("제목을 입력하세요")
|
||||
return
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -617,223 +462,194 @@ export default {
|
||||
this.audio_content.detail === undefined ||
|
||||
this.audio_content.detail.trim().length <= 0
|
||||
) {
|
||||
this.notifyError("내용을 입력하세요");
|
||||
return;
|
||||
this.notifyError("내용을 입력하세요")
|
||||
return
|
||||
}
|
||||
|
||||
if (this.is_loading) return;
|
||||
|
||||
this.is_loading = true;
|
||||
this.isLoading = true
|
||||
|
||||
try {
|
||||
const request = {
|
||||
id: this.audio_content.id,
|
||||
isDefaultCoverImage: this.audio_content.is_default_cover_image,
|
||||
};
|
||||
isDefaultCoverImage: this.audio_content.is_default_cover_image
|
||||
}
|
||||
|
||||
if (
|
||||
this.audio_content.title !== this.selected_audio_content.title &&
|
||||
this.selected_audio_content.title !== this.audio_content.title &&
|
||||
this.audio_content.title.trim().length > 0
|
||||
) {
|
||||
request.title = this.audio_content.title;
|
||||
}
|
||||
if (this.audio_content.detail !== this.selected_audio_content.detail) {
|
||||
request.detail = this.audio_content.detail;
|
||||
}
|
||||
if (
|
||||
this.audio_content.theme_id !== this.selected_audio_content.themeId
|
||||
) {
|
||||
request.themeId = this.audio_content.theme_id;
|
||||
}
|
||||
if (
|
||||
this.audio_content.is_adult !== this.selected_audio_content.isAdult
|
||||
) {
|
||||
request.isAdult = this.audio_content.is_adult;
|
||||
}
|
||||
if (
|
||||
this.audio_content.is_comment_available !==
|
||||
this.selected_audio_content.isCommentAvailable
|
||||
) {
|
||||
request.isCommentAvailable = this.audio_content.is_comment_available;
|
||||
request.title = this.audio_content.title
|
||||
}
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("request", JSON.stringify(request));
|
||||
|
||||
if (this.cover_image_file) {
|
||||
formData.append("coverImage", this.cover_image_file);
|
||||
if (
|
||||
this.selected_audio_content.detail !== this.audio_content.detail &&
|
||||
this.audio_content.detail.trim().length > 0
|
||||
) {
|
||||
request.detail = this.audio_content.detail
|
||||
}
|
||||
|
||||
const res = await api.modifyAudioContent(formData);
|
||||
if (this.selected_audio_content.themeId !== this.audio_content.theme_id) {
|
||||
request.themeId = this.audio_content.theme_id
|
||||
}
|
||||
|
||||
if (this.selected_audio_content.isAdult !== this.audio_content.is_adult) {
|
||||
request.isAdult = this.audio_content.is_adult
|
||||
}
|
||||
|
||||
if (this.selected_audio_content.isCommentAvailable !== this.audio_content.is_comment_available) {
|
||||
request.isCommentAvailable = this.audio_content.is_comment_available
|
||||
}
|
||||
|
||||
const res = await api.modifyAudioContent(request)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.cancel();
|
||||
this.notifySuccess("수정되었습니다.");
|
||||
this.cancel()
|
||||
this.notifySuccess('수정되었습니다.')
|
||||
|
||||
this.audio_contents = [];
|
||||
await this.getAudioContent();
|
||||
this.audio_contents = []
|
||||
await this.getAudioContent()
|
||||
} else {
|
||||
this.notifyError(
|
||||
res.data.message ||
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
);
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
} catch (e) {
|
||||
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.");
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
} finally {
|
||||
this.is_loading = false;
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async deleteAudioContent() {
|
||||
if (this.is_loading) return;
|
||||
this.is_loading = true;
|
||||
this.is_loading = true
|
||||
|
||||
try {
|
||||
let request = {
|
||||
id: this.selected_audio_content.audioContentId,
|
||||
isActive: false,
|
||||
};
|
||||
let request = {id: this.selected_audio_content.audioContentId, isActive: false}
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("request", JSON.stringify(request));
|
||||
|
||||
const res = await api.modifyAudioContent(formData);
|
||||
const res = await api.modifyAudioContent(request)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.cancel();
|
||||
this.notifySuccess("삭제되었습니다.");
|
||||
this.cancel()
|
||||
this.notifySuccess('삭제되었습니다.')
|
||||
|
||||
this.audio_contents = [];
|
||||
await this.getAudioContent();
|
||||
this.audio_contents = []
|
||||
await this.getAudioContent()
|
||||
} else {
|
||||
this.notifyError(
|
||||
res.data.message ||
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
);
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
} catch (e) {
|
||||
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.");
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
} finally {
|
||||
this.is_loading = false;
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async next() {
|
||||
if (this.search_word.length < 2) {
|
||||
this.search_word = "";
|
||||
await this.getAudioContent();
|
||||
this.search_word = ''
|
||||
await this.getAudioContent()
|
||||
} else {
|
||||
await this.searchAudioContent();
|
||||
await this.searchAudioContent()
|
||||
}
|
||||
},
|
||||
|
||||
async getAudioContentThemeList() {
|
||||
this.is_loading = true;
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.getAudioContentThemeList();
|
||||
const res = await api.getAudioContentThemeList()
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.themeList = res.data.data.map((item) => {
|
||||
return { title: item.theme, value: item.id };
|
||||
});
|
||||
return {title: item.theme, value: item.id}
|
||||
})
|
||||
} else {
|
||||
this.notifyError(
|
||||
res.data.message ||
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
);
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
|
||||
this.is_loading = false;
|
||||
this.is_loading = false
|
||||
} catch (e) {
|
||||
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.");
|
||||
this.is_loading = false;
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async getAudioContent() {
|
||||
this.is_loading = true;
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.getAudioContentList(this.status, this.page);
|
||||
const res = await api.getAudioContentList(this.status, this.page)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
const data = res.data.data;
|
||||
const data = res.data.data
|
||||
|
||||
const total_page = Math.ceil(data.totalCount / 10);
|
||||
this.audio_contents = data.items;
|
||||
const total_page = Math.ceil(data.totalCount / 10)
|
||||
this.audio_contents = data.items
|
||||
|
||||
if (total_page <= 0) this.total_page = 1;
|
||||
else this.total_page = total_page;
|
||||
if (total_page <= 0)
|
||||
this.total_page = 1
|
||||
else
|
||||
this.total_page = total_page
|
||||
} else {
|
||||
this.notifyError(
|
||||
res.data.message ||
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
);
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
|
||||
this.is_loading = false;
|
||||
this.is_loading = false
|
||||
} catch (e) {
|
||||
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.");
|
||||
this.is_loading = false;
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async search() {
|
||||
this.page = 1;
|
||||
await this.searchAudioContent();
|
||||
this.page = 1
|
||||
await this.searchAudioContent()
|
||||
},
|
||||
|
||||
async searchAudioContent() {
|
||||
if (this.search_word.length === 0) {
|
||||
await this.getAudioContent();
|
||||
await this.getAudioContent()
|
||||
} else if (this.search_word.length < 2) {
|
||||
this.notifyError("검색어를 2글자 이상 입력하세요.");
|
||||
this.notifyError('검색어를 2글자 이상 입력하세요.')
|
||||
} else {
|
||||
this.is_loading = true;
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.searchAudioContent(this.search_word, this.page);
|
||||
const res = await api.searchAudioContent(this.search_word, this.page)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
const data = res.data.data;
|
||||
const data = res.data.data
|
||||
|
||||
const total_page = Math.ceil(data.totalCount / 10);
|
||||
this.audio_contents = data.items;
|
||||
const total_page = Math.ceil(data.totalCount / 10)
|
||||
this.audio_contents = data.items
|
||||
|
||||
if (total_page <= 0) this.total_page = 1;
|
||||
else this.total_page = total_page;
|
||||
if (total_page <= 0)
|
||||
this.total_page = 1
|
||||
else
|
||||
this.total_page = total_page
|
||||
} else {
|
||||
this.notifyError(
|
||||
res.data.message ||
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
);
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
|
||||
this.is_loading = false;
|
||||
this.is_loading = false
|
||||
} catch (e) {
|
||||
this.notifyError(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
);
|
||||
this.is_loading = false;
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
async shareAudioContent(item) {
|
||||
this.is_loading = true;
|
||||
this.is_loading = true
|
||||
try {
|
||||
const linkData = await dynamicLink.shareAudioContent(
|
||||
item,
|
||||
this.utm_source,
|
||||
this.utm_medium,
|
||||
this.utm_campaign
|
||||
);
|
||||
const linkData = await dynamicLink.shareAudioContent(item, this.utm_source, this.utm_medium, this.utm_campaign);
|
||||
if (linkData.status === 200) {
|
||||
await navigator.clipboard.writeText(linkData.data.shortLink);
|
||||
this.notifySuccess("링크가 복사되었습니다.");
|
||||
await navigator.clipboard.writeText(linkData.data.shortLink)
|
||||
this.notifySuccess("링크가 복사되었습니다.")
|
||||
} else {
|
||||
this.notifyError("링크를 생성하지 못했습니다.");
|
||||
this.notifyError("링크를 생성하지 못했습니다.")
|
||||
}
|
||||
} finally {
|
||||
this.is_loading = false;
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -193,14 +193,6 @@
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-actions v-show="!is_loading">
|
||||
<v-btn
|
||||
color="error"
|
||||
text
|
||||
@click="showBlockReasonDialog"
|
||||
>
|
||||
차단
|
||||
</v-btn>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="blue darken-1"
|
||||
text
|
||||
@@ -208,6 +200,7 @@
|
||||
>
|
||||
비밀번호 재설정
|
||||
</v-btn>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="blue darken-1"
|
||||
text
|
||||
@@ -259,74 +252,6 @@
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-dialog
|
||||
v-model="show_block_reason_dialog"
|
||||
max-width="500px"
|
||||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title>차단(탈퇴) 사유 입력</v-card-title>
|
||||
<v-card-text>
|
||||
<v-textarea
|
||||
v-model="block_reason"
|
||||
label="사유를 입력해주세요"
|
||||
outlined
|
||||
hide-details
|
||||
/>
|
||||
</v-card-text>
|
||||
<v-card-actions v-show="!is_loading">
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="error"
|
||||
text
|
||||
@click="confirmBlock"
|
||||
>
|
||||
차단
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="blue darken-1"
|
||||
text
|
||||
@click="cancelBlock"
|
||||
>
|
||||
취소
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-dialog
|
||||
v-model="show_confirm_block_dialog"
|
||||
max-width="500px"
|
||||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="text-h6">
|
||||
'{{ nickname }}' 계정과 본인인증 정보, 같은 본인인증 정보를 사용하는 모든 계정을 차단합니다.
|
||||
</v-card-title>
|
||||
<v-card-actions v-show="!is_loading">
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="error"
|
||||
text
|
||||
@click="blockMember"
|
||||
>
|
||||
차단
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="blue darken-1"
|
||||
text
|
||||
@click="cancelBlock"
|
||||
>
|
||||
취소
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -349,9 +274,6 @@ export default {
|
||||
user_type: null,
|
||||
show_popup_dialog: false,
|
||||
show_confirm_reset_password_dialog: false,
|
||||
show_block_reason_dialog: false,
|
||||
show_confirm_block_dialog: false,
|
||||
block_reason: '',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -460,51 +382,6 @@ export default {
|
||||
this.user_type = null
|
||||
this.show_popup_dialog = false
|
||||
this.show_confirm_reset_password_dialog = false
|
||||
this.show_block_reason_dialog = false
|
||||
this.show_confirm_block_dialog = false
|
||||
this.block_reason = ''
|
||||
},
|
||||
|
||||
showBlockReasonDialog() {
|
||||
this.show_popup_dialog = false
|
||||
this.show_block_reason_dialog = true
|
||||
},
|
||||
|
||||
cancelBlock() {
|
||||
this.show_block_reason_dialog = false
|
||||
this.show_confirm_block_dialog = false
|
||||
this.block_reason = ''
|
||||
this.show_popup_dialog = true
|
||||
},
|
||||
|
||||
confirmBlock() {
|
||||
if (this.block_reason.length === 0) {
|
||||
this.notifyError('차단 사유를 입력해주세요.')
|
||||
return
|
||||
}
|
||||
this.show_block_reason_dialog = false
|
||||
this.show_confirm_block_dialog = true
|
||||
},
|
||||
|
||||
async blockMember() {
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.blockMember(this.member.id, this.block_reason)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.notifySuccess('차단되었습니다.')
|
||||
this.cancel()
|
||||
|
||||
this.page = 1
|
||||
await this.getMemberList()
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
|
||||
this.is_loading = false
|
||||
} catch (e) {
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async modify() {
|
||||
|
||||
@@ -73,12 +73,6 @@
|
||||
<td>
|
||||
{{ total_sign_up_google_count }}
|
||||
</td>
|
||||
<td>
|
||||
{{ total_sign_up_apple_count }}
|
||||
</td>
|
||||
<td>
|
||||
{{ total_sign_up_line_count }}
|
||||
</td>
|
||||
<td>
|
||||
{{ total_auth_count }}
|
||||
</td>
|
||||
@@ -111,14 +105,6 @@
|
||||
{{ item.signUpGoogleCount.toLocaleString() }}
|
||||
</template>
|
||||
|
||||
<template v-slot:item.signUpAppleCount="{ item }">
|
||||
{{ item.signUpAppleCount.toLocaleString() }}
|
||||
</template>
|
||||
|
||||
<template v-slot:item.signUpLineCount="{ item }">
|
||||
{{ item.signUpLineCount.toLocaleString() }}
|
||||
</template>
|
||||
|
||||
<template v-slot:item.authCount="{ item }">
|
||||
{{ item.authCount.toLocaleString() }}
|
||||
</template>
|
||||
@@ -165,8 +151,6 @@ export default {
|
||||
total_sign_up_email_count: 0,
|
||||
total_sign_up_kakao_count: 0,
|
||||
total_sign_up_google_count: 0,
|
||||
total_sign_up_apple_count: 0,
|
||||
total_sign_up_line_count: 0,
|
||||
total_sign_out_count: 0,
|
||||
total_payment_member_count: 0,
|
||||
page: 1,
|
||||
@@ -203,18 +187,6 @@ export default {
|
||||
sortable: false,
|
||||
value: 'signUpGoogleCount',
|
||||
},
|
||||
{
|
||||
text: '애플 가입 수',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'signUpAppleCount',
|
||||
},
|
||||
{
|
||||
text: '라인 가입 수',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'signUpLineCount',
|
||||
},
|
||||
{
|
||||
text: '본인인증 수',
|
||||
align: 'center',
|
||||
@@ -281,8 +253,6 @@ export default {
|
||||
this.total_sign_up_email_count = data.totalSignUpEmailCount
|
||||
this.total_sign_up_kakao_count = data.totalSignUpKakaoCount
|
||||
this.total_sign_up_google_count = data.totalSignUpGoogleCount
|
||||
this.total_sign_up_apple_count = data.totalSignUpAppleCount
|
||||
this.total_sign_up_line_count = data.totalSignUpLineCount
|
||||
this.total_sign_out_count = data.totalSignOutCount
|
||||
this.total_payment_member_count = data.totalPaymentMemberCount
|
||||
this.items = data.items
|
||||
|
||||
Reference in New Issue
Block a user