Compare commits

..

29 Commits

Author SHA1 Message Date
c49a304357 Merge pull request '콘텐츠 수정 - 태그 수정 추가' (#32) from test into main
Reviewed-on: #32
2025-06-02 13:59:01 +00:00
Yu Sung
54216198e1 콘텐츠 수정 - 태그 수정 추가 2025-06-02 21:44:07 +09:00
625c8a121f Merge pull request '콘텐츠 등록/수정 - 포인트 사용 가능 여부 추가' (#31) from test into main
Reviewed-on: #31
2025-04-24 10:28:17 +00:00
Yu Sung
3432af8e24 콘텐츠 등록/수정 - 포인트 사용 가능 여부 추가 2025-04-22 21:26:03 +09:00
efa1643359 Merge pull request '콘텐츠 등록 - 콘텐츠 설명 전체 오픈 여부 추가' (#30) from test into main
Reviewed-on: #30
2024-11-23 18:07:30 +00:00
Yu Sung
ccb3135d48 콘텐츠 등록 - 콘텐츠 설명 전체 오픈 여부 추가 2024-11-24 02:57:10 +09:00
3b294ba020 Merge pull request ''소다라이브' -> '보이스온' 으로 변경' (#29) from test into main
Reviewed-on: #29
2024-11-21 12:43:18 +00:00
Yu Sung
107a802dc9 '소다라이브' -> '보이스온' 으로 변경 2024-11-21 21:39:41 +09:00
8cdbea59de Merge pull request '소장만 기능 추가' (#28) from test into main
Reviewed-on: #28
2024-11-12 14:25:52 +00:00
Yu Sung
1c45a30f59 소장만 기능 추가 2024-11-12 23:11:43 +09:00
8ac488bf6f Merge pull request '콘텐츠 업로드 - 미리듣기 최소 시간 30초에서 15초로 변경' (#27) from test into main
Reviewed-on: #27
2024-09-25 11:17:15 +00:00
Yu Sung
21cfd00c92 콘텐츠 업로드 - 미리듣기 최소 시간 30초에서 15초로 변경 2024-09-25 20:10:11 +09:00
5664f1be9e Merge pull request '시리즈 관리 페이지에서만 html전체 scroll을 동작하지 않도록 수정' (#26) from test into main
Reviewed-on: #26
2024-08-16 13:28:47 +00:00
Yu Sung
c6ba77fde6 시리즈 관리 페이지에서만 html전체 scroll을 동작하지 않도록 수정 2024-08-16 22:26:02 +09:00
c5f707efb9 Merge pull request '시리즈 관리 - 시리즈 크기 한줄에 6개가 들어가도록 수정' (#25) from test into main
Reviewed-on: #25
2024-08-14 08:32:30 +00:00
Yu Sung
baa6253b71 시리즈 관리 - 시리즈 크기 한줄에 6개가 들어가도록 수정 2024-08-14 17:31:02 +09:00
27a827662e Merge pull request 'test' (#24) from test into main
Reviewed-on: #24
2024-08-14 07:44:43 +00:00
Yu Sung
3a0ee08ab0 시리즈 관리 - 드래그 앤 드롭으로 순서변경 기능 추가 2024-08-14 16:40:00 +09:00
Yu Sung
d459d42a60 시리즈 관리 - scroll infinite loading으로 paging 처리 2024-08-14 15:43:40 +09:00
b7c8bed727 Merge pull request '커뮤니티 정산 - 합계 추가' (#23) from test into main
Reviewed-on: #23
2024-06-20 06:03:29 +00:00
Yu Sung
65276f5281 커뮤니티 정산 - 합계 추가 2024-06-20 15:01:15 +09:00
f059dda7eb Merge pull request 'test' (#22) from test into main
Reviewed-on: #22
2024-06-03 22:26:57 +00:00
Yu Sung
75aa5beff7 커뮤니티 정산 - 날짜 조회 기능 추가 2024-06-02 20:58:26 +09:00
Yu Sung
a7a7d24052 커뮤니티 정산 - 게시물 1개 판매가격 추가 2024-05-30 13:09:38 +09:00
4cdcf1d0b6 Merge pull request '콘텐츠 가격 수정, 시그니처 정렬' (#21) from test into main
Reviewed-on: #21
2024-05-29 17:16:28 +00:00
Yu Sung
387c1c2abd 시그니처 리스트 정렬 버튼 - 상단 margin 40px 추가 2024-05-30 01:53:42 +09:00
Yu Sung
d2ab7c12f1 시그니처 리스트 정렬 추가 2024-05-30 01:34:16 +09:00
Yu Sung
91f803f7a8 콘텐츠 등록 - 미리보기 생성 기본값 false로 변경 2024-05-29 17:07:20 +09:00
Yu Sung
f4ae6888ac 콘텐츠 가격 수정기능 추가 2024-05-29 15:45:11 +09:00
9 changed files with 350 additions and 77 deletions

View File

@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <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://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"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
</head> </head>

View File

@@ -7,7 +7,7 @@
dark dark
> >
<v-spacer /> <v-spacer />
<v-toolbar-title>소다라이브 크리에이터</v-toolbar-title> <v-toolbar-title>보이스온 크리에이터 관리자</v-toolbar-title>
<v-spacer /> <v-spacer />
</v-app-bar> </v-app-bar>
@@ -38,4 +38,13 @@
} }
} }
} }
.noscroll {
overflow-y: hidden;
}
.noscroll::-webkit-scrollbar {
overflow-y: hidden;
display: none;
}
</style> </style>

View File

@@ -5,7 +5,7 @@ async function getGenreList() {
} }
async function getSeriesList(page) { 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) { 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 { export {
getGenreList, getGenreList,
getSeriesList, getSeriesList,
@@ -62,6 +69,7 @@ export {
modifySeries, modifySeries,
getSeriesDetail, getSeriesDetail,
getSeriesContent, getSeriesContent,
updateSeriesOrders,
addingContentToTheSeries, addingContentToTheSeries,
removeContentInTheSeries, removeContentInTheSeries,
searchContentNotInSeries searchContentNotInSeries

View File

@@ -1,7 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
async function getSignatureList(page) { async function getSignatureList(page, sort) {
return Vue.axios.get('/creator-admin/signature?page=' + (page - 1) + "&size=20"); return Vue.axios.get('/creator-admin/signature?page=' + (page - 1) + "&size=20" + "&sort-type=" + sort);
} }
async function createSignature(formData) { async function createSignature(formData) {

View File

@@ -82,6 +82,12 @@ const router = new VueRouter({
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if (to.path !== '/login') { 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'] const isAuthenticated = store.getters['accountStore/isAuthenticated']
if (isAuthenticated) { if (isAuthenticated) {
next(); next();

View File

@@ -38,13 +38,11 @@
color="#9970ff" color="#9970ff"
dark dark
depressed depressed
@click="getCalculateContentDonation" @click="getCalculateCommunityPost"
> >
조회 조회
</v-btn> </v-btn>
</v-col> </v-col>
<v-spacer /> <v-spacer />
</v-row> </v-row>
<v-row> <v-row>
@@ -57,6 +55,20 @@
class="elevation-1" class="elevation-1"
hide-default-footer 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 }"> <template v-slot:item.title="{ item }">
{{ item.title }}... {{ item.title }}...
</template> </template>
@@ -132,6 +144,12 @@ export default {
align: 'center', align: 'center',
width: "300px" width: "300px"
}, },
{
text: '판매금액(캔)',
align: 'center',
sortable: false,
value: 'can',
},
{ {
text: '구매유저수', text: '구매유저수',
align: 'center', align: 'center',
@@ -205,6 +223,10 @@ export default {
this.$dialog.notify.error(message) this.$dialog.notify.error(message)
}, },
sumField(key) {
return this.items.reduce((a, b) => a + (b[key] || 0), 0)
},
async next() { async next() {
await this.getCalculateCommunityPost() await this.getCalculateCommunityPost()
}, },

View File

@@ -14,7 +14,7 @@
<v-col> <v-col>
<v-btn <v-btn
block block
color="#9970ff" color="#3bb9f1"
dark dark
depressed depressed
@click="showWriteDialog" @click="showWriteDialog"
@@ -227,6 +227,34 @@
</v-col> </v-col>
</v-row> </v-row>
</v-card-text> </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">
가격
</v-col>
<v-col cols="8">
<v-text-field
v-model="audio_content.price"
label="가격"
required
/>
</v-col>
</v-row>
</v-card-text>
<v-card-text> <v-card-text>
<v-row> <v-row>
<v-col cols="4"> <v-col cols="4">
@@ -259,6 +287,22 @@
</v-col> </v-col>
</v-row> </v-row>
</v-card-text> </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-card-actions v-show="!is_loading">
<v-spacer /> <v-spacer />
<v-btn <v-btn
@@ -440,7 +484,7 @@
label="가격" label="가격"
required required
/> />
유료 콘텐츠 가격을 입력하면 해당 콘텐츠의 미리듣기 시간을 설정할 있습니다.<br>미리듣기 시간은 최소 30 이상 설정해야 합니다. 유료 콘텐츠 가격을 입력하면 해당 콘텐츠의 미리듣기 시간을 설정할 있습니다.<br>미리듣기 시간은 최소 15 이상 설정해야 합니다.
</v-col> </v-col>
</v-row> </v-row>
</v-card-text> </v-card-text>
@@ -520,18 +564,52 @@
</v-row> </v-row>
</v-card-text> </v-card-text>
<v-card-text v-show="audio_content.price > 0 && is_limited_edition === false"> <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 cols="4">
대여만 가능 소장 설정
</v-col> </v-col>
<v-col <v-col cols="8">
cols="8" <v-radio-group
align="left" v-model="audio_content.purchase_option"
> row
<input
v-model="audio_content.is_only_rental"
type="checkbox"
> >
<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-col>
</v-row> </v-row>
</v-card-text> </v-card-text>
@@ -567,6 +645,22 @@
</v-col> </v-col>
</v-row> </v-row>
</v-card-text> </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-card-actions v-show="!is_loading">
<v-spacer /> <v-spacer />
<v-btn <v-btn
@@ -652,15 +746,15 @@ export default {
audio_content: { audio_content: {
price: 0, price: 0,
is_adult: false, is_adult: false,
is_generate_preview: true, is_point_available: false,
is_generate_preview: false,
is_comment_available: true, is_comment_available: true,
is_full_detail_visible: true,
purchase_option: 'BOTH',
}, },
audio_contents: [], audio_contents: [],
themeList: [], themeList: [],
selected_audio_content: {}, selected_audio_content: {},
utm_source: '',
utm_medium: '',
utm_campaign: '',
} }
}, },
@@ -699,9 +793,12 @@ export default {
this.audio_content.id = item.audioContentId this.audio_content.id = item.audioContentId
this.audio_content.title = item.title this.audio_content.title = item.title
this.audio_content.detail = item.detail this.audio_content.detail = item.detail
this.audio_content.price = item.price
this.audio_content.is_adult = item.isAdult 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.is_comment_available = item.isCommentAvailable
this.audio_content.cover_image_url = item.coverImageUrl this.audio_content.cover_image_url = item.coverImageUrl
this.audio_content.tags = item.tags
this.show_modify_dialog = true this.show_modify_dialog = true
}, },
@@ -710,7 +807,10 @@ export default {
this.audio_content = { this.audio_content = {
price: 0, price: 0,
is_adult: false, is_adult: false,
is_point_available: false,
is_comment_available: true, is_comment_available: true,
is_full_detail_visible: true,
purchase_option: 'BOTH',
} }
this.reservation_time = '' this.reservation_time = ''
this.reservation_time = '' this.reservation_time = ''
@@ -818,12 +918,14 @@ export default {
themeId: this.audio_content.theme_id, themeId: this.audio_content.theme_id,
isAdult: this.audio_content.is_adult, isAdult: this.audio_content.is_adult,
isGeneratePreview: this.audio_content.price > 0 ? this.audio_content.is_generate_preview : false, isGeneratePreview: this.audio_content.price > 0 ? this.audio_content.is_generate_preview : false,
isOnlyRental: this.audio_content.is_only_rental, purchaseOption: this.audio_content.purchase_option,
isCommentAvailable: this.audio_content.is_comment_available 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) { if (this.audio_content.limited > 0) {
request.isOnlyRental = false request.purchaseOption = 'BUY_ONLY'
} }
if (this.audio_content.price > 0 && this.is_limited_edition === true) { if (this.audio_content.price > 0 && this.is_limited_edition === true) {
@@ -855,7 +957,7 @@ export default {
!this.isValidTimeFormat(previewStartTime) || !this.isValidTimeFormat(previewStartTime) ||
!this.isValidTimeFormat(previewEndTime) !this.isValidTimeFormat(previewEndTime)
) { ) {
this.notifyError("미리 듣기 시간 형식은 00:30:00 과 같아야 합니다") this.notifyError("미리 듣기 시간 형식은 00:00:15 과 같아야 합니다")
this.is_loading = false this.is_loading = false
return return
} }
@@ -867,8 +969,8 @@ export default {
const totalSeconds2 = h2 * 3600 + m2 * 60 + s2; const totalSeconds2 = h2 * 3600 + m2 * 60 + s2;
const timeDifference = totalSeconds2 - totalSeconds1; const timeDifference = totalSeconds2 - totalSeconds1;
if (timeDifference < 30) { if (timeDifference < 15) {
this.notifyError("미리 듣기의 최소 시간은 30초 입니다.") this.notifyError("미리 듣기의 최소 시간은 15초 입니다.")
this.is_loading = false this.is_loading = false
return return
} }
@@ -959,10 +1061,22 @@ export default {
request.isAdult = this.audio_content.is_adult 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) { if (this.selected_audio_content.isCommentAvailable !== this.audio_content.is_comment_available) {
request.isCommentAvailable = this.audio_content.is_comment_available request.isCommentAvailable = this.audio_content.is_comment_available
} }
if (this.audio_content.price !== this.selected_audio_content.price) {
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) { if (this.audio_content.cover_image !== null) {
formData.append("coverImage", this.audio_content.cover_image) formData.append("coverImage", this.audio_content.cover_image)
} }

View File

@@ -22,44 +22,54 @@
</v-btn> </v-btn>
</v-col> </v-col>
</v-row> </v-row>
<v-row> <div
<v-col ref="scroll_container"
v-for="(item, i) in series_list" class="scroll_container"
:key="i" @scroll="onScroll"
cols="3" >
<draggable
v-model="series_list"
class="row"
@end="onDropCallback(series_list)"
> >
<v-card> <v-col
<v-card-title> v-for="(item, i) in series_list"
<v-spacer /> :key="i"
<v-img cols="2"
:src="item.coverImageUrl" >
class="cover-image" <v-card>
@click="selectSeries(item)" <v-card-title>
/> <v-spacer />
<v-spacer /> <v-img
</v-card-title> :src="item.coverImageUrl"
<v-card-text class="series-title-container"> class="cover-image"
{{ item.title }} @click="selectSeries(item)"
</v-card-text> />
<v-card-actions> <v-spacer />
<v-spacer /> </v-card-title>
<v-btn <v-card-text class="series-title-container">
text {{ item.title }}
@click="showModifyDialog(item)" </v-card-text>
> <v-card-actions>
수정 <v-spacer />
</v-btn> <v-btn
<v-btn text
text @click="showModifyDialog(item)"
@click="deleteConfirm(item)" >
> 수정
삭제 </v-btn>
</v-btn> <v-btn
<v-spacer /> text
</v-card-actions> @click="deleteConfirm(item)"
</v-card> >
</v-col> 삭제
</v-row> </v-btn>
<v-spacer />
</v-card-actions>
</v-card>
</v-col>
</draggable>
</div>
</v-container> </v-container>
<v-dialog <v-dialog
@@ -345,10 +355,11 @@
<script> <script>
import * as api from '@/api/audio_content_series'; import * as api from '@/api/audio_content_series';
import Draggable from "vuedraggable";
export default { export default {
name: "ContentSeriesList", name: "ContentSeriesList",
components: {Draggable},
data() { data() {
return { return {
is_loading: false, is_loading: false,
@@ -378,6 +389,14 @@ export default {
}, },
methods: { 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) { imageAdd(payload) {
const file = payload; const file = payload;
if (file) { if (file) {
@@ -485,8 +504,18 @@ export default {
this.$router.push({name: 'ContentSeriesDetail', params: {seriesId: series.seriesId}}) 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() { async getSeriesGenreList() {
this.is_loading = true
try { try {
const res = await api.getGenreList() const res = await api.getGenreList()
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
@@ -496,23 +525,24 @@ export default {
} else { } else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
} }
this.is_loading = false
} catch (e) { } catch (e) {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false
} }
}, },
async getSeriesList() { async getSeriesList() {
if (this.is_loading) return;
this.is_loading = true this.is_loading = true
try { try {
const res = await api.getSeriesList(this.page) const res = await api.getSeriesList(this.page)
if (res.status === 200 && res.data.success === true) { 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)
const total_page = Math.ceil(data.totalCount / 20) if (this.page === 1) this.series_list.length = 0;
this.series_list = data.items this.page += 1;
this.series_list.push(...data.items);
if (total_page <= 0) if (total_page <= 0)
this.total_page = 1 this.total_page = 1
@@ -665,6 +695,16 @@ export default {
</script> </script>
<style scoped> <style scoped>
.scroll_container {
margin-top: 30px;
height: 100vh;
overflow-y: auto;
}
.scroll_container > .row {
padding-bottom: 280px;
}
.image-select label { .image-select label {
display: inline-block; display: inline-block;
padding: 10px 20px; padding: 10px 20px;
@@ -702,6 +742,6 @@ export default {
} }
.cover-image { .cover-image {
aspect-ratio: 1/1.4; aspect-ratio: 1/1.3;
} }
</style> </style>

View File

@@ -20,6 +20,57 @@
</v-btn> </v-btn>
</v-col> </v-col>
</v-row> </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-row>
<v-col> <v-col>
<v-data-table <v-data-table
@@ -346,6 +397,7 @@ export default {
image_url: null, image_url: null,
is_active: null, is_active: null,
selected_signature_can: {}, selected_signature_can: {},
sort_type: 'NEWEST',
headers: [ headers: [
{ {
@@ -449,11 +501,15 @@ export default {
this.show_modify_dialog = true this.show_modify_dialog = true
}, },
async changeSortType() {
await this.getSignatureList();
},
async getSignatureList() { async getSignatureList() {
this.isLoading = true this.is_loading = true
try { 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) { if (res.status === 200 && res.data.success === true) {
const data = res.data.data const data = res.data.data
@@ -469,7 +525,7 @@ export default {
} catch (e) { } catch (e) {
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
} finally { } finally {
this.isLoading = false this.is_loading = false
} }
}, },
@@ -639,4 +695,22 @@ export default {
display: block; display: block;
margin: 0 auto; 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> </style>