|
@@ -402,36 +402,34 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm: function() {
|
|
|
- if (this.validate(this.form)) {
|
|
|
- if (this.form.id != undefined) {
|
|
|
- let data = {
|
|
|
- teachingVideoTypeId: this.form.teachingVideoTypeId,
|
|
|
- id: this.form.id,
|
|
|
- title: this.form.title,
|
|
|
- videoDescribe: this.form.videoDescribe,
|
|
|
- videoFileId: this.form.vodVideoFileId,
|
|
|
- coverFileId: this.form.coverFileId
|
|
|
- }
|
|
|
- updateUser(data).then(response => {
|
|
|
- this.msgSuccess('修改成功')
|
|
|
- this.open = false
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- } else {
|
|
|
- let data = {
|
|
|
- teachingVideoTypeId: this.teachingVideoTypeId,
|
|
|
- id: this.form.id,
|
|
|
- title: this.form.title,
|
|
|
- videoDescribe: this.form.videoDescribe,
|
|
|
- videoFileId: this.form.vodVideoFileId,
|
|
|
- coverFileId: this.form.coverFileId
|
|
|
- }
|
|
|
- addUser(data).then(response => {
|
|
|
- this.msgSuccess('新增成功')
|
|
|
- this.open = false
|
|
|
- this.getList()
|
|
|
- })
|
|
|
+ if (this.form.id != undefined) {
|
|
|
+ let data = {
|
|
|
+ teachingVideoTypeId: this.form.teachingVideoTypeId,
|
|
|
+ id: this.form.id,
|
|
|
+ title: this.form.title,
|
|
|
+ videoDescribe: this.form.videoDescribe,
|
|
|
+ videoFileId: this.form.vodVideoFileId,
|
|
|
+ coverFileId: this.form.coverFileId
|
|
|
}
|
|
|
+ updateUser(data).then(response => {
|
|
|
+ this.msgSuccess('修改成功')
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ let data = {
|
|
|
+ teachingVideoTypeId: this.teachingVideoTypeId,
|
|
|
+ id: this.form.id,
|
|
|
+ title: this.form.title,
|
|
|
+ videoDescribe: this.form.videoDescribe,
|
|
|
+ videoFileId: this.form.vodVideoFileId,
|
|
|
+ coverFileId: this.form.coverFileId
|
|
|
+ }
|
|
|
+ addUser(data).then(response => {
|
|
|
+ this.msgSuccess('新增成功')
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
/** 删除按钮操作 */
|