|
@ -6,6 +6,7 @@ |
|
|
@close="visible= false"> |
|
|
@close="visible= false"> |
|
|
<el-form :model="dataForm" |
|
|
<el-form :model="dataForm" |
|
|
:rules="dataRule" |
|
|
:rules="dataRule" |
|
|
|
|
|
v-loading = "loading" |
|
|
ref="dataForm" |
|
|
ref="dataForm" |
|
|
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> |
|
|
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> |
|
|
<el-form-item label="新闻模块" |
|
|
<el-form-item label="新闻模块" |
|
@ -171,19 +172,28 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 获取信息 |
|
|
// 获取信息 |
|
|
getInfo () { |
|
|
getInfo () { |
|
|
|
|
|
this.loading = true |
|
|
this.dataForm.newsProperty = '' |
|
|
this.dataForm.newsProperty = '' |
|
|
this.dataForm.newsColumn = '' |
|
|
this.dataForm.newsColumn = '' |
|
|
|
|
|
this.quillEditor.root.innerHTML = '' |
|
|
this.$http.get(`/news/newshonest/${this.dataForm.id}`).then(({ data: res }) => { |
|
|
this.$http.get(`/news/newshonest/${this.dataForm.id}`).then(({ data: res }) => { |
|
|
if (res.code !== 0) { |
|
|
if (res.code !== 0) { |
|
|
return this.$message.error(res.msg) |
|
|
return this.$message.error(res.msg) |
|
|
} |
|
|
} |
|
|
this.dataForm = { ...this.dataForm, ...res.data } |
|
|
this.dataForm = { ...this.dataForm, ...res.data } |
|
|
|
|
|
console.log("this.quillEditor.root.innerHTML") |
|
|
|
|
|
console.log(this.quillEditor.root.innerHTML) |
|
|
|
|
|
console.log("res.data.newsContent") |
|
|
|
|
|
console.log(res.data.newsContent) |
|
|
this.quillEditor.root.innerHTML = res.data.newsContent |
|
|
this.quillEditor.root.innerHTML = res.data.newsContent |
|
|
let business = this.options.find(item=>{ |
|
|
let business = this.options.find(item=>{ |
|
|
return item.code === this.dataForm.businessId |
|
|
return item.code === this.dataForm.businessId |
|
|
}) |
|
|
}) |
|
|
this.dataForm.businessName = business.title |
|
|
this.dataForm.businessName = business.title |
|
|
}).catch(() => { }) |
|
|
this.loading = false |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.loading = false |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
reviewOk () { |
|
|
reviewOk () { |
|
|
this.dataForm.newsApprovalState = 2 |
|
|
this.dataForm.newsApprovalState = 2 |
|
@ -304,13 +314,6 @@ export default { |
|
|
beforeAvatarUpload (file) { |
|
|
beforeAvatarUpload (file) { |
|
|
this.loading = true |
|
|
this.loading = true |
|
|
}, |
|
|
}, |
|
|
setRegistTime () { |
|
|
|
|
|
this.dataForm.newsReleaseStartTime = this.time[0] |
|
|
|
|
|
this.dataForm.newsReleaseEndTime = this.time[1] |
|
|
|
|
|
}, |
|
|
|
|
|
resetRegistTime () { |
|
|
|
|
|
this.time = [this.dataForm.newsReleaseStartTime.substr(0, 10), this.dataForm.newsReleaseEndTime.substr(0, 10)] |
|
|
|
|
|
}, |
|
|
|
|
|
// 上传图片end |
|
|
// 上传图片end |
|
|
// 表单提交 |
|
|
// 表单提交 |
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
dataFormSubmitHandle: debounce(function () { |
|
|