Compare commits
No commits in common. "99d70cc8f7ab7f170faad94889d6f697feb1aed4" and "9f1675e82d20afa27621f28e0ded684a44a2867c" have entirely different histories.
99d70cc8f7
...
9f1675e82d
|
@ -77,7 +77,7 @@
|
|||
class="datepicker"
|
||||
format="YYYY-MM-DD H:i"
|
||||
/>
|
||||
<div> ~</div>
|
||||
<div> ~ </div>
|
||||
<datetime
|
||||
v-model="event.endDate"
|
||||
class="datepicker"
|
||||
|
@ -281,17 +281,16 @@ import datetime from 'vuejs-datetimepicker';
|
|||
|
||||
export default {
|
||||
name: "EventView",
|
||||
components: {datetime},
|
||||
components: { datetime },
|
||||
|
||||
data() {
|
||||
return {
|
||||
is_loading: false,
|
||||
is_modify: false,
|
||||
events: [],
|
||||
event: {isAdult: ''},
|
||||
event: { isAdult: '' },
|
||||
show_write_dialog: false,
|
||||
show_delete_confirm_dialog: false,
|
||||
selected_event: {},
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -362,7 +361,6 @@ export default {
|
|||
|
||||
clickEvent(item) {
|
||||
this.is_modify = true
|
||||
this.selected_event = item
|
||||
this.event.id = item.id
|
||||
this.event.thumbnailImageUrl = item.thumbnailImageUrl
|
||||
this.event.detailImageUrl = item.detailImageUrl
|
||||
|
@ -378,8 +376,7 @@ export default {
|
|||
|
||||
cancel() {
|
||||
this.is_modify = false
|
||||
this.event = {isAdult: ''}
|
||||
this.selected_event = {}
|
||||
this.event = { isAdult: '' }
|
||||
this.show_write_dialog = false
|
||||
},
|
||||
|
||||
|
@ -443,7 +440,7 @@ export default {
|
|||
this.notifySuccess('등록되었습니다.')
|
||||
this.page = 1
|
||||
await this.getEvents()
|
||||
this.event = {isAdult: ''}
|
||||
this.event = { isAdult: '' }
|
||||
}
|
||||
} catch (e) {
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
|
@ -460,11 +457,7 @@ export default {
|
|||
const formData = new FormData()
|
||||
formData.append("id", this.event.id)
|
||||
|
||||
if (
|
||||
this.event.title != null &&
|
||||
this.event.title.trim().length > 0 &&
|
||||
this.selected_event.title !== this.event.title
|
||||
) {
|
||||
if (this.event.title != null && this.event.title.trim().length > 0) {
|
||||
formData.append("title", this.event.title)
|
||||
}
|
||||
|
||||
|
@ -484,7 +477,7 @@ export default {
|
|||
formData.append("isPopup", this.event.isPopup)
|
||||
}
|
||||
|
||||
if (this.selected_event.link !== this.event.link) {
|
||||
if (this.event.link != null && this.event.link.trim().length > 0) {
|
||||
formData.append("link", this.event.link)
|
||||
}
|
||||
|
||||
|
@ -492,11 +485,11 @@ export default {
|
|||
formData.append("isAdult", JSON.parse(this.event.isAdult))
|
||||
}
|
||||
|
||||
if (this.event.startDate != null && this.event.startDate !== this.selected_event.startDate) {
|
||||
if (this.event.startDate != null) {
|
||||
formData.append("startDate", this.event.startDate)
|
||||
}
|
||||
|
||||
if (this.event.endDate != null && this.event.endDate !== this.selected_event.endDate) {
|
||||
if (this.event.endDate != null) {
|
||||
formData.append("endDate", this.event.endDate)
|
||||
}
|
||||
|
||||
|
@ -506,7 +499,7 @@ export default {
|
|||
this.notifySuccess('수정되었습니다.')
|
||||
this.page = 1
|
||||
await this.getEvents()
|
||||
this.event = {isAdult: ''}
|
||||
this.event = { isAdult: '' }
|
||||
this.is_modify = false
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
|
|
Loading…
Reference in New Issue