|
@ -102,6 +102,18 @@ |
|
|
</el-tree> |
|
|
</el-tree> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
|
|
|
<el-col :span="7"> |
|
|
|
|
|
<el-form-item size="mini" |
|
|
|
|
|
:label="$t('role.moduleList')"> |
|
|
|
|
|
<el-tree :data="moduleList" |
|
|
|
|
|
:props="{ label: 'label', children: 'children' }" |
|
|
|
|
|
node-key="value" |
|
|
|
|
|
ref="moduleListTree" |
|
|
|
|
|
accordion |
|
|
|
|
|
show-checkbox> |
|
|
|
|
|
</el-tree> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<template slot="footer"> |
|
|
<template slot="footer"> |
|
@ -125,6 +137,7 @@ export default { |
|
|
categoryList: [], |
|
|
categoryList: [], |
|
|
roleTypeList: [], |
|
|
roleTypeList: [], |
|
|
analysisMenuList: [], |
|
|
analysisMenuList: [], |
|
|
|
|
|
moduleList: [], |
|
|
dataForm: { |
|
|
dataForm: { |
|
|
id: '', |
|
|
id: '', |
|
|
name: '', |
|
|
name: '', |
|
@ -134,6 +147,7 @@ export default { |
|
|
categoryIdList: [], |
|
|
categoryIdList: [], |
|
|
whistleDeptIdList: [], |
|
|
whistleDeptIdList: [], |
|
|
analysisMenuIdList: [], |
|
|
analysisMenuIdList: [], |
|
|
|
|
|
moduleMenuIdList: [], |
|
|
remark: '', |
|
|
remark: '', |
|
|
typeKey: '' |
|
|
typeKey: '' |
|
|
} |
|
|
} |
|
@ -162,10 +176,12 @@ export default { |
|
|
this.$refs.categoryListTree.setCheckedKeys([]) |
|
|
this.$refs.categoryListTree.setCheckedKeys([]) |
|
|
this.$refs.whistleDeptListTree.setCheckedKeys([]) |
|
|
this.$refs.whistleDeptListTree.setCheckedKeys([]) |
|
|
this.$refs.analysisMenuListTree.setCheckedKeys([]) |
|
|
this.$refs.analysisMenuListTree.setCheckedKeys([]) |
|
|
|
|
|
this.$refs.moduleListTree.setCheckedKeys([]) |
|
|
Promise.all([ |
|
|
Promise.all([ |
|
|
this.getMenuList(), |
|
|
this.getMenuList(), |
|
|
this.getDeptList(), |
|
|
this.getDeptList(), |
|
|
this.getAppMenuList(), |
|
|
this.getAppMenuList(), |
|
|
|
|
|
this.getModuleList(), |
|
|
this.getCategoryList() |
|
|
this.getCategoryList() |
|
|
// this.getWhistleDeptList() |
|
|
// this.getWhistleDeptList() |
|
|
// this.getAnalysisMenuList() |
|
|
// this.getAnalysisMenuList() |
|
@ -215,6 +231,15 @@ export default { |
|
|
this.analysisMenuList = res.data.analysisMenu |
|
|
this.analysisMenuList = res.data.analysisMenu |
|
|
}).catch(() => { }) |
|
|
}).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 () { |
|
|
getCategoryList () { |
|
|
return this.$http.get('/events/handlecategory/getCategoryList').then(({ data: res }) => { |
|
|
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.appMenuIdList.forEach(item => this.$refs.appMenuListTree.setChecked(item, true)) |
|
|
this.dataForm.categoryIdList.forEach(item => this.$refs.categoryListTree.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.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) |
|
|
this.$refs.whistleDeptListTree.setCheckedKeys(this.dataForm.whistleDeptIdList) |
|
|
}).catch(() => { }) |
|
|
}).catch(() => { }) |
|
|
}, |
|
|
}, |
|
@ -273,6 +300,10 @@ export default { |
|
|
...this.$refs.analysisMenuListTree.getCheckedKeys(), |
|
|
...this.$refs.analysisMenuListTree.getCheckedKeys(), |
|
|
...this.$refs.analysisMenuListTree.getHalfCheckedKeys() |
|
|
...this.$refs.analysisMenuListTree.getHalfCheckedKeys() |
|
|
] |
|
|
] |
|
|
|
|
|
this.dataForm.moduleMenuIdList = [ |
|
|
|
|
|
...this.$refs.moduleListTree.getCheckedKeys(), |
|
|
|
|
|
...this.$refs.moduleListTree.getHalfCheckedKeys() |
|
|
|
|
|
] |
|
|
this.dataForm.whistleDeptIdList = this.$refs.whistleDeptListTree.getCheckedKeys() |
|
|
this.dataForm.whistleDeptIdList = this.$refs.whistleDeptListTree.getCheckedKeys() |
|
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role/v2', this.dataForm).then(({ data: res }) => { |
|
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role/v2', this.dataForm).then(({ data: res }) => { |
|
|
if (res.code !== 0) { |
|
|
if (res.code !== 0) { |
|
|