|
@@ -72,7 +72,7 @@ export default {
|
|
this.formData = [
|
|
this.formData = [
|
|
{ label: '标题', key: 'title' },
|
|
{ label: '标题', key: 'title' },
|
|
{ label: '链接', key: 'link' },
|
|
{ label: '链接', key: 'link' },
|
|
- { label: '分类', key: 'information_category', type: 'select', class: 'c-2', options: this.$dictData.information_category },
|
|
|
|
|
|
+ { label: '分类', key: 'information_category', type: 'select', class: 'c-2', options: this.$dictData.information_category, changeHandle: this.cateChange },
|
|
{ label: '作者', key: 'author', class: 'c-2' },
|
|
{ label: '作者', key: 'author', class: 'c-2' },
|
|
{ label: '状态', key: 'hide_status', type: 'select', class: 'c-2', options: this.$dictData.hide_status },
|
|
{ label: '状态', key: 'hide_status', type: 'select', class: 'c-2', options: this.$dictData.hide_status },
|
|
{ label: '发布时间', key: 'create_at', class: 'c-2', type: 'datePicker', type2: 'date'},
|
|
{ label: '发布时间', key: 'create_at', class: 'c-2', type: 'datePicker', type2: 'date'},
|
|
@@ -84,6 +84,17 @@ export default {
|
|
]
|
|
]
|
|
this.setDefaultValue(params)
|
|
this.setDefaultValue(params)
|
|
},
|
|
},
|
|
|
|
+ cateChange (val) {
|
|
|
|
+ let params = {...this.$refs.ruleForm.baseForm}
|
|
|
|
+ let imgURL= ''
|
|
|
|
+ if (val === 'hlzt') imgURL= 'http://img.honglounews.com/news_hlzt.jpg'
|
|
|
|
+ if (val === 'hljy') imgURL= 'http://img.honglounews.com/news_hljy.jpg'
|
|
|
|
+ if (val === 'bkfx') imgURL= 'http://img.honglounews.com/news_bkfx.jpg'
|
|
|
|
+ if (val === 'lppc') imgURL= 'http://img.honglounews.com/news_lppc.jpg'
|
|
|
|
+ if (val === 'lpwd') imgURL= 'http://img.honglounews.com/news_lpwd.jpg'
|
|
|
|
+ params.pri_image = imgURL
|
|
|
|
+ this.setDefaultValue(params)
|
|
|
|
+ },
|
|
close(str) {
|
|
close(str) {
|
|
if (str === 'confirm') {
|
|
if (str === 'confirm') {
|
|
this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
|
|
this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
|