|
@@ -56,12 +56,12 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 设置权限 -->
|
|
<!-- 设置权限 -->
|
|
- <el-dialog title="设置权限" :visible.sync="roleFormVisible" :show-close="false" width="40%" :close-on-click-modal="false"
|
|
|
|
|
|
+ <el-dialog title="设置权限" :visible.sync="roleFormVisible" :show-close="false" width="1000" :close-on-click-modal="false"
|
|
custom-class="tree-dialog" top="50px">
|
|
custom-class="tree-dialog" top="50px">
|
|
<!-- :check-strictly="true" -->
|
|
<!-- :check-strictly="true" -->
|
|
- <el-tree :data="menuRoleList" show-checkbox :default-expand-all="true" node-key="moduleId" ref="tree"
|
|
|
|
|
|
+ <zj-tree :data="menuRoleList" show-checkbox :default-expand-all="true" node-key="moduleId" ref="tree"
|
|
highlight-current :props="defaultProps">
|
|
highlight-current :props="defaultProps">
|
|
- </el-tree>
|
|
|
|
|
|
+ </zj-tree>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click="roleFormVisible = false">{{ editId != 1 ? '取 消' : '关 闭' }}</el-button>
|
|
<el-button @click="roleFormVisible = false">{{ editId != 1 ? '取 消' : '关 闭' }}</el-button>
|
|
<el-button type="primary" @click="submitRoleForm" v-if="editId != 1">确 定</el-button>
|
|
<el-button type="primary" @click="submitRoleForm" v-if="editId != 1">确 定</el-button>
|
|
@@ -201,8 +201,22 @@ export default {
|
|
setMenuRole(id) {
|
|
setMenuRole(id) {
|
|
this.roleFormVisible = true;
|
|
this.roleFormVisible = true;
|
|
this.editId = id;
|
|
this.editId = id;
|
|
|
|
+
|
|
|
|
+ function aaa(list){
|
|
|
|
+ for(var item of list){
|
|
|
|
+ if(item.type==3){
|
|
|
|
+ item.tiling = true
|
|
|
|
+ item.labelWidthNum = 115
|
|
|
|
+ }
|
|
|
|
+ if(item.children && item.children.length){
|
|
|
|
+ aaa(item.children)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
getMenuList({ adminUserId: this.userid }).then(res => {
|
|
getMenuList({ adminUserId: this.userid }).then(res => {
|
|
- this.menuRoleList = res.data;
|
|
|
|
|
|
+ aaa(res.data);
|
|
|
|
+ this.menuRoleList = res.data
|
|
})
|
|
})
|
|
getMenuRoleIds({ adminRoleId: id }).then(res => {
|
|
getMenuRoleIds({ adminRoleId: id }).then(res => {
|
|
this.$refs.tree.setCheckedKeys(res.data);
|
|
this.$refs.tree.setCheckedKeys(res.data);
|