Browse Source

修复 菜单渲染

魏熙美 6 years ago
parent
commit
4ad1df991f
1 changed files with 1 additions and 10 deletions
  1. 1
    10
      src/views/sysuser/role/edi/edi.vue

+ 1
- 10
src/views/sysuser/role/edi/edi.vue View File

69
         'updateRole'
69
         'updateRole'
70
     ]),
70
     ]),
71
     onSubmit() {
71
     onSubmit() {
72
-      // this.form.menuIds = this.$refs.tree.getCheckedKeys().join(',')
73
-        const treeKeys = new Set()
74
-        this.$refs.tree.getCheckedNodes().map((item,index) => {
75
-            treeKeys.add(item.menuId)
76
-            if (item.menuPid !== '-1') {
77
-                treeKeys.add(item.menuPid)
78
-            }
79
-
80
-        })
81
-      this.form.menuIds = Array.from(treeKeys)
72
+      this.form.menuIds = this.$refs.tree.getCheckedKeys().concat(this.$refs.tree.getHalfCheckedKeys())
82
       this.updateRole(this.form)
73
       this.updateRole(this.form)
83
       this.$router.go(-1)
74
       this.$router.go(-1)
84
     },
75
     },