diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js
index f8e4c11..a7eae72 100644
--- a/src/i18n/zh-CN.js
+++ b/src/i18n/zh-CN.js
@@ -372,6 +372,7 @@ t.role.analysisMenuList = '数据端菜单授权'
t.role.appMenuList = '工作端菜单授权'
t.role.categoryList = '项目处理类型授权'
t.role.whistleDeptList = '吹哨部门授权'
+t.role.moduleList = '内容栏目授权'
t.user = {}
t.user.username = '用户名'
diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue
index fd9a5ce..2578ada 100644
--- a/src/views/modules/sys/role-add-or-update.vue
+++ b/src/views/modules/sys/role-add-or-update.vue
@@ -102,6 +102,18 @@
+
+
+
+
+
+
@@ -125,6 +137,7 @@ export default {
categoryList: [],
roleTypeList: [],
analysisMenuList: [],
+ moduleList: [],
dataForm: {
id: '',
name: '',
@@ -134,6 +147,7 @@ export default {
categoryIdList: [],
whistleDeptIdList: [],
analysisMenuIdList: [],
+ moduleMenuIdList: [],
remark: '',
typeKey: ''
}
@@ -162,10 +176,12 @@ export default {
this.$refs.categoryListTree.setCheckedKeys([])
this.$refs.whistleDeptListTree.setCheckedKeys([])
this.$refs.analysisMenuListTree.setCheckedKeys([])
+ this.$refs.moduleListTree.setCheckedKeys([])
Promise.all([
this.getMenuList(),
this.getDeptList(),
this.getAppMenuList(),
+ this.getModuleList(),
this.getCategoryList()
// this.getWhistleDeptList()
// this.getAnalysisMenuList()
@@ -215,6 +231,15 @@ export default {
this.analysisMenuList = res.data.analysisMenu
}).catch(() => { })
},
+ // 获取栏目菜单列表
+ getModuleList () {
+ return this.$http.get('/news/moduletype/getAllModuleList').then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.moduleList = res.data.moduleOptions
+ }).catch(() => { })
+ },
// 获取项目处理类型授权
getCategoryList () {
return this.$http.get('/events/handlecategory/getCategoryList').then(({ data: res }) => {
@@ -247,6 +272,8 @@ export default {
this.dataForm.appMenuIdList.forEach(item => this.$refs.appMenuListTree.setChecked(item, true))
this.dataForm.categoryIdList.forEach(item => this.$refs.categoryListTree.setChecked(item, true))
this.dataForm.analysisMenuIdList.forEach(item => this.$refs.analysisMenuListTree.setChecked(item, true))
+ this.dataForm.moduleMenuIdList.forEach(item => this.$refs.moduleListTree.setChecked(item, true))
+
this.$refs.whistleDeptListTree.setCheckedKeys(this.dataForm.whistleDeptIdList)
}).catch(() => { })
},
@@ -273,6 +300,10 @@ export default {
...this.$refs.analysisMenuListTree.getCheckedKeys(),
...this.$refs.analysisMenuListTree.getHalfCheckedKeys()
]
+ this.dataForm.moduleMenuIdList = [
+ ...this.$refs.moduleListTree.getCheckedKeys(),
+ ...this.$refs.moduleListTree.getHalfCheckedKeys()
+ ]
this.dataForm.whistleDeptIdList = this.$refs.whistleDeptListTree.getCheckedKeys()
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role/v2', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {