|
|
@ -626,6 +626,17 @@ export default { |
|
|
|
// 预览 |
|
|
|
// 预览 |
|
|
|
preview() { |
|
|
|
preview() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 更新附件的状态为发布 |
|
|
|
|
|
|
|
updateFile(form, quoteId) { |
|
|
|
|
|
|
|
this.fileId && this.$post(this.api.updateFile, { |
|
|
|
|
|
|
|
id: this.fileId, |
|
|
|
|
|
|
|
isRelease: 1, |
|
|
|
|
|
|
|
quote: form.columnName, |
|
|
|
|
|
|
|
quoteId |
|
|
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
|
|
this.fileId = '' |
|
|
|
|
|
|
|
}).catch(err => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 提交 |
|
|
|
// 提交 |
|
|
|
submit(next) { |
|
|
|
submit(next) { |
|
|
@ -649,19 +660,12 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (form.typeId !== 2 && !form.listStyleId) return Util.errorMsg('请选择列表样式') |
|
|
|
if (form.typeId !== 2 && !form.listStyleId) return Util.errorMsg('请选择列表样式') |
|
|
|
// 更新附件的状态为发布 |
|
|
|
|
|
|
|
this.fileId && this.$post(this.api.updateFile, { |
|
|
|
|
|
|
|
id: this.fileId, |
|
|
|
|
|
|
|
isRelease: 1, |
|
|
|
|
|
|
|
quote: this.form.columnName |
|
|
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
|
|
this.fileId = '' |
|
|
|
|
|
|
|
}).catch(err => {}) |
|
|
|
|
|
|
|
this.submiting = true |
|
|
|
this.submiting = true |
|
|
|
if (this.isEdit) { |
|
|
|
if (this.isEdit) { |
|
|
|
delete form.children |
|
|
|
delete form.children |
|
|
|
form.editorId = this.userId |
|
|
|
form.editorId = this.userId |
|
|
|
this.$post(this.api.updateColumn, form).then(res => { |
|
|
|
this.$post(this.api.updateColumn, form).then(res => { |
|
|
|
|
|
|
|
this.updateFile(form, form.id) |
|
|
|
// 编辑前不是长页栏目,则需要重新保存长页模板 |
|
|
|
// 编辑前不是长页栏目,则需要重新保存长页模板 |
|
|
|
// if (this.originTypeId !== 3 && form.typeId === 3) this.savePage(form.id) |
|
|
|
// if (this.originTypeId !== 3 && form.typeId === 3) this.savePage(form.id) |
|
|
|
Util.successMsg("修改成功") |
|
|
|
Util.successMsg("修改成功") |
|
|
@ -671,6 +675,7 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$post(this.api.saveColumn, form).then(({ data }) => { |
|
|
|
this.$post(this.api.saveColumn, form).then(({ data }) => { |
|
|
|
|
|
|
|
this.updateFile(form, data) |
|
|
|
// 栏目类型选择了长页栏目,才需要保存长页 |
|
|
|
// 栏目类型选择了长页栏目,才需要保存长页 |
|
|
|
form.typeId === 3 && this.savePage(data) |
|
|
|
form.typeId === 3 && this.savePage(data) |
|
|
|
Util.successMsg("创建成功") |
|
|
|
Util.successMsg("创建成功") |
|
|
|