Compare commits
48 Commits
f4ae6888ac
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c49a304357 | |||
|
|
54216198e1 | ||
| 625c8a121f | |||
|
|
3432af8e24 | ||
| efa1643359 | |||
|
|
ccb3135d48 | ||
| 3b294ba020 | |||
|
|
107a802dc9 | ||
| 8cdbea59de | |||
|
|
1c45a30f59 | ||
| 8ac488bf6f | |||
|
|
21cfd00c92 | ||
| 5664f1be9e | |||
|
|
c6ba77fde6 | ||
| c5f707efb9 | |||
|
|
baa6253b71 | ||
| 27a827662e | |||
|
|
3a0ee08ab0 | ||
|
|
d459d42a60 | ||
| b7c8bed727 | |||
|
|
65276f5281 | ||
| f059dda7eb | |||
|
|
75aa5beff7 | ||
|
|
a7a7d24052 | ||
| 4cdcf1d0b6 | |||
|
|
387c1c2abd | ||
|
|
d2ab7c12f1 | ||
|
|
91f803f7a8 | ||
| 4497141061 | |||
| dfaac20b63 | |||
| 0d3bc1c16e | |||
| c88aa227fd | |||
| 3631919245 | |||
| 4a4783563e | |||
| 28d56ab59a | |||
| be97e0ab31 | |||
| 5e8ec80621 | |||
| 0efb3ea86d | |||
| c0b6a23782 | |||
| a838b3673c | |||
| f64f1f0fb7 | |||
| 3088f957e2 | |||
| 41f99a175c | |||
| 61b5d785a3 | |||
| 3fe7554e06 | |||
| 1def9ddd4a | |||
| a13d442924 | |||
| a1f206a3c0 |
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title>소다라이브</title>
|
||||
<title>보이스온 크리에이터 관리자</title>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
|
||||
</head>
|
||||
|
||||
11
src/App.vue
11
src/App.vue
@@ -7,7 +7,7 @@
|
||||
dark
|
||||
>
|
||||
<v-spacer />
|
||||
<v-toolbar-title>소다라이브 크리에이터</v-toolbar-title>
|
||||
<v-toolbar-title>보이스온 크리에이터 관리자</v-toolbar-title>
|
||||
<v-spacer />
|
||||
</v-app-bar>
|
||||
|
||||
@@ -38,4 +38,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.noscroll {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.noscroll::-webkit-scrollbar {
|
||||
overflow-y: hidden;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,7 +5,7 @@ async function getGenreList() {
|
||||
}
|
||||
|
||||
async function getSeriesList(page) {
|
||||
return Vue.axios.get("/creator-admin/audio-content/series?page=" + (page - 1) + "&size=10");
|
||||
return Vue.axios.get("/creator-admin/audio-content/series?page=" + (page - 1) + "&size=20");
|
||||
}
|
||||
|
||||
async function createSeries(formData) {
|
||||
@@ -55,6 +55,13 @@ async function removeContentInTheSeries(seriesId, contentId) {
|
||||
)
|
||||
}
|
||||
|
||||
async function updateSeriesOrders(ids) {
|
||||
return Vue.axios.put(
|
||||
"/creator-admin/audio-content/series/orders",
|
||||
{ids: ids}
|
||||
)
|
||||
}
|
||||
|
||||
export {
|
||||
getGenreList,
|
||||
getSeriesList,
|
||||
@@ -62,6 +69,7 @@ export {
|
||||
modifySeries,
|
||||
getSeriesDetail,
|
||||
getSeriesContent,
|
||||
updateSeriesOrders,
|
||||
addingContentToTheSeries,
|
||||
removeContentInTheSeries,
|
||||
searchContentNotInSeries
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
async function getSignatureList(page) {
|
||||
return Vue.axios.get('/creator-admin/signature?page=' + (page - 1) + "&size=20");
|
||||
async function getSignatureList(page, sort) {
|
||||
return Vue.axios.get('/creator-admin/signature?page=' + (page - 1) + "&size=20" + "&sort-type=" + sort);
|
||||
}
|
||||
|
||||
async function createSignature(formData) {
|
||||
|
||||
@@ -82,6 +82,12 @@ const router = new VueRouter({
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.path !== '/login') {
|
||||
if (to.path === '/content/series/list') {
|
||||
document.documentElement.classList.add('noscroll'); // html에 클래스 추가
|
||||
} else {
|
||||
document.documentElement.classList.remove('noscroll');
|
||||
}
|
||||
|
||||
const isAuthenticated = store.getters['accountStore/isAuthenticated']
|
||||
if (isAuthenticated) {
|
||||
next();
|
||||
|
||||
@@ -38,13 +38,11 @@
|
||||
color="#9970ff"
|
||||
dark
|
||||
depressed
|
||||
@click="getCalculateContentDonation"
|
||||
@click="getCalculateCommunityPost"
|
||||
>
|
||||
조회
|
||||
</v-btn>
|
||||
</v-col>
|
||||
|
||||
|
||||
<v-spacer />
|
||||
</v-row>
|
||||
<v-row>
|
||||
@@ -57,6 +55,20 @@
|
||||
class="elevation-1"
|
||||
hide-default-footer
|
||||
>
|
||||
<template slot="body.prepend">
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
합계
|
||||
</td>
|
||||
<td>{{ sumField('totalCan').toLocaleString() }} 캔</td>
|
||||
<td>{{ sumField('totalKrw').toLocaleString() }} 원</td>
|
||||
<td>{{ sumField('paymentFee').toLocaleString() }} 원</td>
|
||||
<td>{{ sumField('settlementAmount').toLocaleString() }} 원</td>
|
||||
<td>{{ sumField('tax').toLocaleString() }} 원</td>
|
||||
<td>{{ sumField('depositAmount').toLocaleString() }} 원</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:item.title="{ item }">
|
||||
{{ item.title }}...
|
||||
</template>
|
||||
@@ -132,6 +144,12 @@ export default {
|
||||
align: 'center',
|
||||
width: "300px"
|
||||
},
|
||||
{
|
||||
text: '판매금액(캔)',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'can',
|
||||
},
|
||||
{
|
||||
text: '구매유저수',
|
||||
align: 'center',
|
||||
@@ -205,6 +223,10 @@ export default {
|
||||
this.$dialog.notify.error(message)
|
||||
},
|
||||
|
||||
sumField(key) {
|
||||
return this.items.reduce((a, b) => a + (b[key] || 0), 0)
|
||||
},
|
||||
|
||||
async next() {
|
||||
await this.getCalculateCommunityPost()
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<v-col>
|
||||
<v-btn
|
||||
block
|
||||
color="#9970ff"
|
||||
color="#3bb9f1"
|
||||
dark
|
||||
depressed
|
||||
@click="showWriteDialog"
|
||||
@@ -227,6 +227,20 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
<v-row align="center">
|
||||
<v-col cols="4">
|
||||
태그
|
||||
</v-col>
|
||||
<v-col cols="8">
|
||||
<v-text-field
|
||||
v-model="audio_content.tags"
|
||||
label="예 : #연애 #커버곡 #태그"
|
||||
required
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
<v-row align="center">
|
||||
<v-col cols="4">
|
||||
@@ -273,6 +287,22 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col cols="4">
|
||||
포인트 사용 가능
|
||||
</v-col>
|
||||
<v-col
|
||||
cols="8"
|
||||
align="left"
|
||||
>
|
||||
<input
|
||||
v-model="audio_content.is_point_available"
|
||||
type="checkbox"
|
||||
>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-actions v-show="!is_loading">
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
@@ -454,7 +484,7 @@
|
||||
label="가격"
|
||||
required
|
||||
/>
|
||||
※ 유료 콘텐츠 가격을 입력하면 해당 콘텐츠의 미리듣기 시간을 설정할 수 있습니다.<br>미리듣기 시간은 최소 30초 이상 설정해야 합니다.
|
||||
※ 유료 콘텐츠 가격을 입력하면 해당 콘텐츠의 미리듣기 시간을 설정할 수 있습니다.<br>미리듣기 시간은 최소 15초 이상 설정해야 합니다.
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
@@ -534,18 +564,52 @@
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-text v-show="audio_content.price > 0 && is_limited_edition === false">
|
||||
<v-row>
|
||||
<v-row align="center">
|
||||
<v-col cols="4">
|
||||
대여만 가능
|
||||
소장 설정
|
||||
</v-col>
|
||||
<v-col
|
||||
cols="8"
|
||||
align="left"
|
||||
>
|
||||
<input
|
||||
v-model="audio_content.is_only_rental"
|
||||
type="checkbox"
|
||||
<v-col cols="8">
|
||||
<v-radio-group
|
||||
v-model="audio_content.purchase_option"
|
||||
row
|
||||
>
|
||||
<v-radio
|
||||
value="BOTH"
|
||||
label="소장/대여"
|
||||
/>
|
||||
<v-radio
|
||||
value="BUY_ONLY"
|
||||
label="소장만"
|
||||
/>
|
||||
<v-radio
|
||||
value="RENT_ONLY"
|
||||
label="대여만"
|
||||
/>
|
||||
<v-spacer />
|
||||
</v-radio-group>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-text v-show="audio_content.price >= 50">
|
||||
<v-row align="center">
|
||||
<v-col cols="4">
|
||||
콘텐츠 내용 전체 오픈 설정
|
||||
</v-col>
|
||||
<v-col cols="8">
|
||||
<v-radio-group
|
||||
v-model="audio_content.is_full_detail_visible"
|
||||
row
|
||||
>
|
||||
<v-radio
|
||||
:value="false"
|
||||
label="구매한 사람만"
|
||||
/>
|
||||
<v-radio
|
||||
:value="true"
|
||||
label="전체"
|
||||
/>
|
||||
<v-spacer />
|
||||
</v-radio-group>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
@@ -581,6 +645,22 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col cols="4">
|
||||
포인트 사용 가능
|
||||
</v-col>
|
||||
<v-col
|
||||
cols="8"
|
||||
align="left"
|
||||
>
|
||||
<input
|
||||
v-model="audio_content.is_point_available"
|
||||
type="checkbox"
|
||||
>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-actions v-show="!is_loading">
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
@@ -666,15 +746,15 @@ export default {
|
||||
audio_content: {
|
||||
price: 0,
|
||||
is_adult: false,
|
||||
is_generate_preview: true,
|
||||
is_point_available: false,
|
||||
is_generate_preview: false,
|
||||
is_comment_available: true,
|
||||
is_full_detail_visible: true,
|
||||
purchase_option: 'BOTH',
|
||||
},
|
||||
audio_contents: [],
|
||||
themeList: [],
|
||||
selected_audio_content: {},
|
||||
utm_source: '',
|
||||
utm_medium: '',
|
||||
utm_campaign: '',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -715,8 +795,10 @@ export default {
|
||||
this.audio_content.detail = item.detail
|
||||
this.audio_content.price = item.price
|
||||
this.audio_content.is_adult = item.isAdult
|
||||
this.audio_content.is_point_available = item.isPointAvailable
|
||||
this.audio_content.is_comment_available = item.isCommentAvailable
|
||||
this.audio_content.cover_image_url = item.coverImageUrl
|
||||
this.audio_content.tags = item.tags
|
||||
this.show_modify_dialog = true
|
||||
},
|
||||
|
||||
@@ -725,7 +807,10 @@ export default {
|
||||
this.audio_content = {
|
||||
price: 0,
|
||||
is_adult: false,
|
||||
is_point_available: false,
|
||||
is_comment_available: true,
|
||||
is_full_detail_visible: true,
|
||||
purchase_option: 'BOTH',
|
||||
}
|
||||
this.reservation_time = ''
|
||||
this.reservation_time = ''
|
||||
@@ -833,12 +918,14 @@ export default {
|
||||
themeId: this.audio_content.theme_id,
|
||||
isAdult: this.audio_content.is_adult,
|
||||
isGeneratePreview: this.audio_content.price > 0 ? this.audio_content.is_generate_preview : false,
|
||||
isOnlyRental: this.audio_content.is_only_rental,
|
||||
isCommentAvailable: this.audio_content.is_comment_available
|
||||
purchaseOption: this.audio_content.purchase_option,
|
||||
isPointAvailable: this.audio_content.is_point_available,
|
||||
isCommentAvailable: this.audio_content.is_comment_available,
|
||||
isFullDetailVisible: this.audio_content.is_full_detail_visible
|
||||
}
|
||||
|
||||
if (this.audio_content.limited > 0) {
|
||||
request.isOnlyRental = false
|
||||
request.purchaseOption = 'BUY_ONLY'
|
||||
}
|
||||
|
||||
if (this.audio_content.price > 0 && this.is_limited_edition === true) {
|
||||
@@ -870,7 +957,7 @@ export default {
|
||||
!this.isValidTimeFormat(previewStartTime) ||
|
||||
!this.isValidTimeFormat(previewEndTime)
|
||||
) {
|
||||
this.notifyError("미리 듣기 시간 형식은 00:30:00 과 같아야 합니다")
|
||||
this.notifyError("미리 듣기 시간 형식은 00:00:15 과 같아야 합니다")
|
||||
this.is_loading = false
|
||||
return
|
||||
}
|
||||
@@ -882,8 +969,8 @@ export default {
|
||||
const totalSeconds2 = h2 * 3600 + m2 * 60 + s2;
|
||||
const timeDifference = totalSeconds2 - totalSeconds1;
|
||||
|
||||
if (timeDifference < 30) {
|
||||
this.notifyError("미리 듣기의 최소 시간은 30초 입니다.")
|
||||
if (timeDifference < 15) {
|
||||
this.notifyError("미리 듣기의 최소 시간은 15초 입니다.")
|
||||
this.is_loading = false
|
||||
return
|
||||
}
|
||||
@@ -974,6 +1061,10 @@ export default {
|
||||
request.isAdult = this.audio_content.is_adult
|
||||
}
|
||||
|
||||
if (this.selected_audio_content.isPointAvailable !== this.audio_content.is_point_available) {
|
||||
request.isPointAvailable = this.audio_content.is_point_available
|
||||
}
|
||||
|
||||
if (this.selected_audio_content.isCommentAvailable !== this.audio_content.is_comment_available) {
|
||||
request.isCommentAvailable = this.audio_content.is_comment_available
|
||||
}
|
||||
@@ -982,6 +1073,10 @@ export default {
|
||||
request.price = this.audio_content.price
|
||||
}
|
||||
|
||||
if (this.audio_content.tags !== this.selected_audio_content.tags) {
|
||||
request.tags = this.audio_content.tags
|
||||
}
|
||||
|
||||
if (this.audio_content.cover_image !== null) {
|
||||
formData.append("coverImage", this.audio_content.cover_image)
|
||||
}
|
||||
|
||||
@@ -22,44 +22,54 @@
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col
|
||||
v-for="(item, i) in series_list"
|
||||
:key="i"
|
||||
cols="3"
|
||||
<div
|
||||
ref="scroll_container"
|
||||
class="scroll_container"
|
||||
@scroll="onScroll"
|
||||
>
|
||||
<draggable
|
||||
v-model="series_list"
|
||||
class="row"
|
||||
@end="onDropCallback(series_list)"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<v-spacer />
|
||||
<v-img
|
||||
:src="item.coverImageUrl"
|
||||
class="cover-image"
|
||||
@click="selectSeries(item)"
|
||||
/>
|
||||
<v-spacer />
|
||||
</v-card-title>
|
||||
<v-card-text class="series-title-container">
|
||||
{{ item.title }}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
text
|
||||
@click="showModifyDialog(item)"
|
||||
>
|
||||
수정
|
||||
</v-btn>
|
||||
<v-btn
|
||||
text
|
||||
@click="deleteConfirm(item)"
|
||||
>
|
||||
삭제
|
||||
</v-btn>
|
||||
<v-spacer />
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-col
|
||||
v-for="(item, i) in series_list"
|
||||
:key="i"
|
||||
cols="2"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<v-spacer />
|
||||
<v-img
|
||||
:src="item.coverImageUrl"
|
||||
class="cover-image"
|
||||
@click="selectSeries(item)"
|
||||
/>
|
||||
<v-spacer />
|
||||
</v-card-title>
|
||||
<v-card-text class="series-title-container">
|
||||
{{ item.title }}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
text
|
||||
@click="showModifyDialog(item)"
|
||||
>
|
||||
수정
|
||||
</v-btn>
|
||||
<v-btn
|
||||
text
|
||||
@click="deleteConfirm(item)"
|
||||
>
|
||||
삭제
|
||||
</v-btn>
|
||||
<v-spacer />
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</draggable>
|
||||
</div>
|
||||
</v-container>
|
||||
|
||||
<v-dialog
|
||||
@@ -345,10 +355,11 @@
|
||||
|
||||
<script>
|
||||
import * as api from '@/api/audio_content_series';
|
||||
import Draggable from "vuedraggable";
|
||||
|
||||
export default {
|
||||
name: "ContentSeriesList",
|
||||
|
||||
components: {Draggable},
|
||||
data() {
|
||||
return {
|
||||
is_loading: false,
|
||||
@@ -378,6 +389,14 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
async onScroll() {
|
||||
const scrollContainer = this.$refs.scroll_container;
|
||||
const threshold = scrollContainer.scrollHeight - scrollContainer.clientHeight;
|
||||
if (scrollContainer.scrollTop >= threshold - 10 && this.total_page >= this.page) {
|
||||
await this.getSeriesList();
|
||||
}
|
||||
},
|
||||
|
||||
imageAdd(payload) {
|
||||
const file = payload;
|
||||
if (file) {
|
||||
@@ -485,8 +504,18 @@ export default {
|
||||
this.$router.push({name: 'ContentSeriesDetail', params: {seriesId: series.seriesId}})
|
||||
},
|
||||
|
||||
async onDropCallback(items) {
|
||||
const ids = items.map((item) => {
|
||||
return item.seriesId
|
||||
})
|
||||
|
||||
const res = await api.updateSeriesOrders(ids)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.notifySuccess(res.data.message)
|
||||
}
|
||||
},
|
||||
|
||||
async getSeriesGenreList() {
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.getGenreList()
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
@@ -496,23 +525,24 @@ export default {
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
|
||||
this.is_loading = false
|
||||
} catch (e) {
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async getSeriesList() {
|
||||
if (this.is_loading) return;
|
||||
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.getSeriesList(this.page)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
const data = res.data.data
|
||||
const total_page = Math.ceil(data.totalCount / 10)
|
||||
|
||||
const total_page = Math.ceil(data.totalCount / 20)
|
||||
this.series_list = data.items
|
||||
if (this.page === 1) this.series_list.length = 0;
|
||||
this.page += 1;
|
||||
this.series_list.push(...data.items);
|
||||
|
||||
if (total_page <= 0)
|
||||
this.total_page = 1
|
||||
@@ -665,6 +695,16 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.scroll_container {
|
||||
margin-top: 30px;
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.scroll_container > .row {
|
||||
padding-bottom: 280px;
|
||||
}
|
||||
|
||||
.image-select label {
|
||||
display: inline-block;
|
||||
padding: 10px 20px;
|
||||
@@ -702,6 +742,6 @@ export default {
|
||||
}
|
||||
|
||||
.cover-image {
|
||||
aspect-ratio: 1/1.4;
|
||||
aspect-ratio: 1/1.3;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -20,6 +20,57 @@
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="row-sort">
|
||||
<v-col>
|
||||
<input
|
||||
id="sort-newest"
|
||||
v-model="sort_type"
|
||||
type="radio"
|
||||
value="NEWEST"
|
||||
class="radio-sort"
|
||||
@change="changeSortType"
|
||||
>
|
||||
<label
|
||||
for="sort-newest"
|
||||
class="radio-label-sort"
|
||||
>
|
||||
최신순
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<input
|
||||
id="sort-can-high"
|
||||
v-model="sort_type"
|
||||
type="radio"
|
||||
value="CAN_HIGH"
|
||||
class="radio-sort"
|
||||
@change="changeSortType"
|
||||
>
|
||||
<label
|
||||
for="sort-can-high"
|
||||
class="radio-label-sort"
|
||||
>
|
||||
높은캔순
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<input
|
||||
id="sort-can-low"
|
||||
v-model="sort_type"
|
||||
type="radio"
|
||||
value="CAN_LOW"
|
||||
class="radio-sort"
|
||||
@change="changeSortType"
|
||||
>
|
||||
<label
|
||||
for="sort-can-low"
|
||||
class="radio-label-sort"
|
||||
>
|
||||
낮은캔순
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col cols="10" />
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-data-table
|
||||
@@ -346,6 +397,7 @@ export default {
|
||||
image_url: null,
|
||||
is_active: null,
|
||||
selected_signature_can: {},
|
||||
sort_type: 'NEWEST',
|
||||
|
||||
headers: [
|
||||
{
|
||||
@@ -449,11 +501,15 @@ export default {
|
||||
this.show_modify_dialog = true
|
||||
},
|
||||
|
||||
async changeSortType() {
|
||||
await this.getSignatureList();
|
||||
},
|
||||
|
||||
async getSignatureList() {
|
||||
this.isLoading = true
|
||||
this.is_loading = true
|
||||
|
||||
try {
|
||||
let res = await api.getSignatureList(this.page);
|
||||
let res = await api.getSignatureList(this.page, this.sort_type);
|
||||
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
const data = res.data.data
|
||||
@@ -469,7 +525,7 @@ export default {
|
||||
} catch (e) {
|
||||
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
} finally {
|
||||
this.isLoading = false
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
@@ -639,4 +695,22 @@ export default {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.row-sort {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.radio-sort {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.radio-label-sort {
|
||||
font-weight: normal;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.radio-sort:checked + .radio-label-sort {
|
||||
font-weight: bold;
|
||||
color: #3bb9f1;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user