Browse Source

模块类型bug修改

feature/syp_points
songyunpeng 5 years ago
parent
commit
4c4e7ce9ee
  1. 7
      src/views/modules/news/notice-add-or-update.vue
  2. 6
      src/views/modules/news/notice.vue

7
src/views/modules/news/notice-add-or-update.vue

@ -36,7 +36,7 @@
</el-row>
<el-form-item label="所属模块" prop="noticeCategory">
<div class="block">
<el-cascader v-model="noticeCategoryList" placeholder="试试搜索:一键服务" :props="optionProps" :options="moduleCategoryList" filterable></el-cascader>
<el-cascader v-model="noticeCategoryList" placeholder="试试搜索:一键服务" :props="optionProps" :options="moduleCategoryList" filterable clearable></el-cascader>
</div>
</el-form-item>
<el-form-item label="通知标题"
@ -158,6 +158,8 @@ export default {
'noticeCategoryList': function (val) {
if (val.length !== 0) {
this.dataForm.noticeCategory = val[val.length - 1]
} else {
this.dataForm.noticeCategory = ''
}
}
},
@ -249,6 +251,7 @@ export default {
this.getInfo()
} else {
this.dataForm = {}
this.noticeCategoryList = []
}
})
},
@ -380,7 +383,7 @@ export default {
}).catch(() => {})
},
getModuleCategoryList () {
this.$http.get('/news/modulecategory/list').then(({ data: res }) => {
this.$http.get('/news/modulecategory/getListToShow').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}

6
src/views/modules/news/notice.vue

@ -12,7 +12,7 @@
</el-form-item>
<el-form-item label="所属模块:" prop="noticeCategory">
<div class="block">
<el-cascader v-model="noticeCategoryList" placeholder="试试搜索:一键服务" :props="optionProps" :options="moduleCategoryList" filterable></el-cascader>
<el-cascader v-model="noticeCategoryList" placeholder="试试搜索:一键服务" :props="optionProps" :options="moduleCategoryList" filterable clearable></el-cascader>
</div>
</el-form-item>
<el-form-item>
@ -135,6 +135,8 @@ export default {
'noticeCategoryList': function (val) {
if (val.length !== 0) {
this.dataForm.noticeCategory = val[val.length - 1]
} else {
this.dataForm.noticeCategory = ''
}
}
},
@ -194,7 +196,7 @@ export default {
}).catch(() => {})
},
getModuleCategoryList () {
this.$http.get('/news/modulecategory/list').then(({ data: res }) => {
this.$http.get('/news/modulecategory/getListToShow').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}

Loading…
Cancel
Save