From 0537b6df7dcc1672fe714cb81ec72c97750a5c90 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Fri, 27 Dec 2024 01:40:31 +0900 Subject: [PATCH 1/7] =?UTF-8?q?=EC=98=A4=EB=94=94=EC=85=98=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=20-=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 45 +++ package.json | 2 + src/api/audition.js | 29 ++ src/router/index.js | 5 + src/views/Audition/AuditionView.vue | 571 ++++++++++++++++++++++++++++ 5 files changed, 652 insertions(+) create mode 100644 src/api/audition.js create mode 100644 src/views/Audition/AuditionView.vue diff --git a/package-lock.json b/package-lock.json index 3ddd1ad..1b68638 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,9 @@ "vue-excel-xlsx": "^1.2.2", "vue-router": "^3.2.0", "vue-show-more-text": "^2.0.2", + "vue2-datepicker": "^3.11.1", "vue2-editor": "^2.10.3", + "vue2-timepicker": "^1.1.6", "vuedraggable": "^2.24.3", "vuejs-datetimepicker": "^1.1.13", "vuetify": "2.6.10", @@ -5239,6 +5241,11 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" }, + "node_modules/date-format-parse": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/date-format-parse/-/date-format-parse-0.2.7.tgz", + "integrity": "sha512-/+lyMUKoRogMuTeOVii6lUwjbVlesN9YRYLzZT/g3TEZ3uD9QnpjResujeEqUW+OSNbT7T1+SYdyEkTcRv+KDQ==" + }, "node_modules/de-indent": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", @@ -14644,6 +14651,17 @@ "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "dev": true }, + "node_modules/vue2-datepicker": { + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/vue2-datepicker/-/vue2-datepicker-3.11.1.tgz", + "integrity": "sha512-6PU/+pnp2mgZAfnSXmbdwj9516XsEvTiw61Q5SNrvvdy8W/FCxk1GAe9UZn/m9YfS5A47yK6XkcjMHbp7aFApA==", + "dependencies": { + "date-format-parse": "^0.2.7" + }, + "peerDependencies": { + "vue": "^2.5.0" + } + }, "node_modules/vue2-editor": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/vue2-editor/-/vue2-editor-2.10.3.tgz", @@ -14652,6 +14670,14 @@ "quill": "^1.3.6" } }, + "node_modules/vue2-timepicker": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/vue2-timepicker/-/vue2-timepicker-1.1.6.tgz", + "integrity": "sha512-DhO2UH4CTer/lMWxg+jqxn/+h6g2vZrsM6vCe9u7/Ie+Pej9yA+8mQA3C3VPApZ+LauKc43WxCspOXb6SGBOTw==", + "peerDependencies": { + "vue": "^2.6.5" + } + }, "node_modules/vuedraggable": { "version": "2.24.3", "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz", @@ -19946,6 +19972,11 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" }, + "date-format-parse": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/date-format-parse/-/date-format-parse-0.2.7.tgz", + "integrity": "sha512-/+lyMUKoRogMuTeOVii6lUwjbVlesN9YRYLzZT/g3TEZ3uD9QnpjResujeEqUW+OSNbT7T1+SYdyEkTcRv+KDQ==" + }, "de-indent": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", @@ -27496,6 +27527,14 @@ "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "dev": true }, + "vue2-datepicker": { + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/vue2-datepicker/-/vue2-datepicker-3.11.1.tgz", + "integrity": "sha512-6PU/+pnp2mgZAfnSXmbdwj9516XsEvTiw61Q5SNrvvdy8W/FCxk1GAe9UZn/m9YfS5A47yK6XkcjMHbp7aFApA==", + "requires": { + "date-format-parse": "^0.2.7" + } + }, "vue2-editor": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/vue2-editor/-/vue2-editor-2.10.3.tgz", @@ -27504,6 +27543,12 @@ "quill": "^1.3.6" } }, + "vue2-timepicker": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/vue2-timepicker/-/vue2-timepicker-1.1.6.tgz", + "integrity": "sha512-DhO2UH4CTer/lMWxg+jqxn/+h6g2vZrsM6vCe9u7/Ie+Pej9yA+8mQA3C3VPApZ+LauKc43WxCspOXb6SGBOTw==", + "requires": {} + }, "vuedraggable": { "version": "2.24.3", "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz", diff --git a/package.json b/package.json index e59af1b..a4fb6b2 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,9 @@ "vue-excel-xlsx": "^1.2.2", "vue-router": "^3.2.0", "vue-show-more-text": "^2.0.2", + "vue2-datepicker": "^3.11.1", "vue2-editor": "^2.10.3", + "vue2-timepicker": "^1.1.6", "vuedraggable": "^2.24.3", "vuejs-datetimepicker": "^1.1.13", "vuetify": "2.6.10", diff --git a/src/api/audition.js b/src/api/audition.js new file mode 100644 index 0000000..9cc8b17 --- /dev/null +++ b/src/api/audition.js @@ -0,0 +1,29 @@ +import Vue from 'vue'; + +async function getAuditionList(page) { + return Vue.axios.get("/admin/audition?page=" + (page - 1) + "&size=20"); +} + +async function createAudition(formData) { + return Vue.axios.post("/admin/audition", formData, { + headers: { + "Content-Type": "multipart/form-data", + }, + }); +} + +async function updateAudition(formData) { + return Vue.axios.put("/admin/audition", formData, { + headers: { + "Content-Type": "multipart/form-data", + }, + }); +} + +async function getAuditionDetail(id) { + return Vue.axios.get("/admin/audition/" + id); +} + +export { + getAuditionList, createAudition, updateAudition, getAuditionDetail +} diff --git a/src/router/index.js b/src/router/index.js index 1912aa1..a9bee22 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -195,6 +195,11 @@ const routes = [ name: 'PrivacyView', component: () => import(/* webpackChunkName: "support" */ '../views/Support/PrivacyView.vue') }, + { + path: '/audition', + name: 'AuditionListView', + component: () => import(/* webpackChunkName: "audition" */ '../views/Audition/AuditionView.vue') + }, ] }, { diff --git a/src/views/Audition/AuditionView.vue b/src/views/Audition/AuditionView.vue new file mode 100644 index 0000000..45d70b7 --- /dev/null +++ b/src/views/Audition/AuditionView.vue @@ -0,0 +1,571 @@ + + + + + From fedecfed9914374a66686e45905a39db41a3c65d Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Fri, 27 Dec 2024 02:45:22 +0900 Subject: [PATCH 2/7] =?UTF-8?q?=EC=98=A4=EB=94=94=EC=85=98=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=20-=20=EB=AA=A8=EC=A7=91=EC=83=81=ED=83=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Audition/AuditionView.vue | 61 ++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/src/views/Audition/AuditionView.vue b/src/views/Audition/AuditionView.vue index 45d70b7..be02cad 100644 --- a/src/views/Audition/AuditionView.vue +++ b/src/views/Audition/AuditionView.vue @@ -40,6 +40,9 @@ {{ item.title }} + + 상태 : {{ getStatusStr(item.status) }} + + + + + 모집상태 + + + + + + + + + + + + + + + + + + + Date: Fri, 27 Dec 2024 23:43:42 +0900 Subject: [PATCH 3/7] =?UTF-8?q?=EC=98=A4=EB=94=94=EC=85=98=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 7 +- src/views/Audition/AuditionDetailView.vue | 219 ++++++++++++++++++++++ src/views/Audition/AuditionView.vue | 12 ++ 3 files changed, 237 insertions(+), 1 deletion(-) create mode 100644 src/views/Audition/AuditionDetailView.vue diff --git a/src/router/index.js b/src/router/index.js index a9bee22..7f82c10 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -197,9 +197,14 @@ const routes = [ }, { path: '/audition', - name: 'AuditionListView', + name: 'AuditionView', component: () => import(/* webpackChunkName: "audition" */ '../views/Audition/AuditionView.vue') }, + { + path: '/audition/detail', + name: 'AuditionDetailView', + component: () => import(/* webpackChunkName: "audition" */ '../views/Audition/AuditionDetailView.vue') + }, ] }, { diff --git a/src/views/Audition/AuditionDetailView.vue b/src/views/Audition/AuditionDetailView.vue new file mode 100644 index 0000000..2243ab2 --- /dev/null +++ b/src/views/Audition/AuditionDetailView.vue @@ -0,0 +1,219 @@ + + + + + diff --git a/src/views/Audition/AuditionView.vue b/src/views/Audition/AuditionView.vue index be02cad..c298b4f 100644 --- a/src/views/Audition/AuditionView.vue +++ b/src/views/Audition/AuditionView.vue @@ -34,6 +34,7 @@ @@ -467,6 +468,17 @@ export default { } }, + selectAudition(audition) { + this.$router.push( + { + name: 'AuditionDetailView', + params: { + audition_id: audition.id, audition_title: audition.title + } + } + ) + }, + async next() { await this.getAuditionList() }, From d5d365d0ad59492bd8119c614a801678bfd2a870 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Sat, 28 Dec 2024 02:32:44 +0900 Subject: [PATCH 4/7] =?UTF-8?q?=EC=98=A4=EB=94=94=EC=85=98=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=ED=8E=98=EC=9D=B4=EC=A7=80=20-=20=EB=B0=B0=EC=97=AD?= =?UTF-8?q?=20=EB=A6=AC=EC=8A=A4=ED=8A=B8/=EB=93=B1=EB=A1=9D/=EC=88=98?= =?UTF-8?q?=EC=A0=95/=EC=82=AD=EC=A0=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/audition.js | 29 +- src/views/Audition/AuditionDetailView.vue | 351 +++++++++++++++++++++- 2 files changed, 377 insertions(+), 3 deletions(-) diff --git a/src/api/audition.js b/src/api/audition.js index 9cc8b17..7df4cd2 100644 --- a/src/api/audition.js +++ b/src/api/audition.js @@ -24,6 +24,31 @@ async function getAuditionDetail(id) { return Vue.axios.get("/admin/audition/" + id); } -export { - getAuditionList, createAudition, updateAudition, getAuditionDetail +async function createAuditionRole(formData) { + return Vue.axios.post("/admin/audition/role", formData, { + headers: { + "Content-Type": "multipart/form-data", + }, + }); +} + +async function updateAuditionRole(formData) { + return Vue.axios.put("/admin/audition/role", formData, { + headers: { + "Content-Type": "multipart/form-data", + }, + }); +} + +async function getAuditionRoleDetail(id) { + return Vue.axios.get("/admin/audition/role/" + id); +} + +async function getAuditionApplicantList(id, page) { + return Vue.axios.get("/admin/audition/role/" + id + "/applicant?page=" + (page - 1) + "&size=20"); +} + +export { + getAuditionList, createAudition, updateAudition, getAuditionDetail, + createAuditionRole, updateAuditionRole, getAuditionRoleDetail, getAuditionApplicantList } diff --git a/src/views/Audition/AuditionDetailView.vue b/src/views/Audition/AuditionDetailView.vue index 2243ab2..43f65a2 100644 --- a/src/views/Audition/AuditionDetailView.vue +++ b/src/views/Audition/AuditionDetailView.vue @@ -50,6 +50,7 @@ color="#3bb9f1" dark depressed + @click="showWriteDialog" > 배역 등록 @@ -60,7 +61,7 @@ @@ -68,6 +69,7 @@ @@ -81,11 +83,13 @@ 수정 삭제 @@ -101,6 +105,152 @@ + + + + + 오디션 배역 등록 + + +
+ + +
+ + + + + 배역 이름* + + + + + + + + + + 오디션 대본 URL + + + + + + + + + + 모집상태 + + + + + + + + + + + + + + + + + + + 취소 + + + 수정 + + + 등록 + + +
+
+ + + + + + 삭제하시겠습니까? + + + + + 취소 + + + 확인 + + + + @@ -122,7 +272,11 @@ export default { audition_detail: {}, audition_role_list: [], + show_write_dialog: false, + show_delete_confirm_dialog: false, + audition_role: {}, + selected_role: null, } }, @@ -190,11 +344,206 @@ export default { this.is_loading = false } }, + + imageAdd(payload) { + const file = payload; + if (file) { + this.audition_role.image_url = URL.createObjectURL(file) + URL.revokeObjectURL(file) + } else { + this.audition_role.image_url = null + } + }, + + showWriteDialog() { + this.show_write_dialog = true + }, + + showModifyDialog(auditionRole) { + this.audition_role = { + name: auditionRole.name, + image_url: auditionRole.imageUrl, + audition_script_url: auditionRole.auditionScriptUrl, + status: auditionRole.status + } + + this.selected_role = auditionRole + this.show_write_dialog = true + }, + + cancel() { + this.audition_role = {} + this.selected_role = null + this.show_write_dialog = false + this.show_delete_confirm_dialog = false + }, + + deleteConfirm(auditionRole) { + this.selected_role = auditionRole + this.show_delete_confirm_dialog = true + }, + + validate() { + if (this.audition_role.image === undefined || this.audition_role.image === null) { + this.notifyError('배역 이미지를 선택하세요') + return + } + + if (this.audition_role.name.trim().length <= 0) { + this.notifyError('배역 이름을 입력하세요') + return + } + + if ( + this.audition_role.audition_script_url === undefined || + this.audition_role.audition_script_url === null || + this.audition_role.audition_script_url.trim().length <= 10 + ) { + this.notifyError('오디션 대본 URL을 입력하세요') + return + } + + this.submit() + }, + + async submit() { + if (this.is_loading) return; + this.is_loading = true + + try { + const request = { + auditionId: this.audition_id, + name: this.audition_role.name, + auditionScriptUrl: this.audition_role.audition_script_url + } + + const formData = new FormData() + formData.append("image", this.audition_role.image); + formData.append("request", JSON.stringify(request)) + + const res = await api.createAuditionRole(formData); + if (res.status === 200 && res.data.success === true) { + this.cancel(); + this.notifySuccess(res.data.message || '등록되었습니다.') + this.is_loading = false + + await this.getAuditionDetail() + } else { + this.is_loading = false + this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } + } catch (e) { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } finally { + this.is_loading = false + } + }, + + async modify() { + if (this.is_loading) return; + this.is_loading = true + + try { + const request = {id: this.selected_role.id} + if (this.audition_role.name !== this.selected_role.name) { + request.name = this.audition_role.name + } + + if (this.audition_role.audition_script_url !== this.selected_role.audition_script_url) { + request.auditionScriptUrl = this.audition_role.audition_script_url + } + + if (this.audition_role.status !== this.selected_role.status) { + request.status = this.audition_role.status + } + + const formData = new FormData() + formData.append("request", JSON.stringify(request)) + + if (this.audition_role.image !== undefined && this.audition_role.image !== null) { + formData.append("image", this.audition_role.image) + } + + const res = await api.updateAuditionRole(formData); + if (res.status === 200 && res.data.success === true) { + this.cancel(); + this.notifySuccess(res.data.message || '등록되었습니다.') + this.is_loading = false + + await this.getAuditionDetail() + } else { + this.is_loading = false + this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } + } catch (e) { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } finally { + this.is_loading = false + } + }, + + async deleteAuditionRole() { + if (this.is_loading) return; + this.is_loading = true + + try { + const request = {id: this.selected_role.id, isActive: false} + const formData = new FormData() + formData.append("request", JSON.stringify(request)) + + const res = await api.updateAuditionRole(formData) + if (res.status === 200 && res.data.success === true) { + this.cancel(); + this.notifySuccess('오디션 배역이 삭제되었습니다.') + this.is_loading = false + + await this.getAuditionDetail() + } else { + this.is_loading = false + this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + this.is_loading = false + } + } catch (e) { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } finally { + this.is_loading = false + } + }, + + selectAuditionRole(auditionRole) { + }, }, } From 67a17a44aa73f6bc8a27bc16b58842c6fd4e5e6d Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Sun, 5 Jan 2025 15:28:48 +0900 Subject: [PATCH 7/7] =?UTF-8?q?=EB=A7=88=EA=B0=90=EB=82=A0=EC=A7=9C=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Audition/AuditionView.vue | 49 ----------------------------- 1 file changed, 49 deletions(-) diff --git a/src/views/Audition/AuditionView.vue b/src/views/Audition/AuditionView.vue index c298b4f..90d9623 100644 --- a/src/views/Audition/AuditionView.vue +++ b/src/views/Audition/AuditionView.vue @@ -148,29 +148,6 @@ - - - - 마감날짜 - - - -    - - - - @@ -291,17 +268,10 @@