新增课程报名

dev
lion 1 year ago
parent afeb9e10f6
commit a8a02464d4

@ -215,12 +215,12 @@
form: { form: {
step: '', // step: '', //
name: '', name: '',
type: 1, type: '',
dateRange: '', dateRange: '',
total: '', total: '',
status: 0, status: '',
is_arrange: 1, is_arrange: '',
is_fee: 1, is_fee: '',
image_id: '', image_id: '',
publicize_ids: [], publicize_ids: [],
content: '', content: '',
@ -243,10 +243,6 @@
required: true, required: true,
message: '请输入课程简介' message: '请输入课程简介'
}], }],
// image_id: [{
// required: true,
// message: ''
// }],
dateRange: [{ dateRange: [{
required: true, required: true,
message: '请选择开课日期' message: '请选择开课日期'
@ -280,7 +276,6 @@
if (e) { if (e) {
this.form.start_date = e[0] this.form.start_date = e[0]
this.form.end_date = e[1] this.form.end_date = e[1]
console.log(e, this.form)
} else { } else {
this.form.start_date = '' this.form.start_date = ''
this.form.end_date = '' this.form.end_date = ''
@ -299,7 +294,6 @@
return isImage && isLt2M; return isImage && isLt2M;
}, },
onExceed(file, fileList) { onExceed(file, fileList) {
console.log("file", file, fileList)
this.$Message.warning("课程封面只需上传一张") this.$Message.warning("课程封面只需上传一张")
}, },
uploadSuccess(response, file, fileList) { uploadSuccess(response, file, fileList) {
@ -342,7 +336,6 @@
}) })
} }
this.form.publicize_ids = pubFiles this.form.publicize_ids = pubFiles
console.log("form", this.form)
save({ save({
...this.form ...this.form
}).then(res => { }).then(res => {
@ -363,7 +356,6 @@
getDetail() { getDetail() {
show({ show({
id: this.id, id: this.id,
// show_relation:['image','publicize']
}).then(res => { }).then(res => {
this.form = this.base.requestToForm(res, this.form) this.form = this.base.requestToForm(res, this.form)
if (res.image) { if (res.image) {
@ -372,7 +364,8 @@
this.form.dateRange = [res.start_date, res.end_date] this.form.dateRange = [res.start_date, res.end_date]
this.showTinymce = true this.showTinymce = true
}) })
}, },
//
next() { next() {
if (this.id) { if (this.id) {
this.active = 1 this.active = 1
@ -420,12 +413,12 @@
this.form = { this.form = {
step: '', // step: '', //
name: '', name: '',
type: 1, type: '',
dateRange: '', dateRange: '',
total: '', total: '',
status: 0, status: '',
is_arrange: 1, is_arrange: '',
is_fee: 1, is_fee: '',
image_id: '', image_id: '',
publicize_ids: [], publicize_ids: [],
content: '', content: '',

Loading…
Cancel
Save