[代码完善](v2.5): v2.5 beta 修复角色管理中分配菜单后子菜单丢失的问题

问题:角色管理中的分配菜单由于是懒加载的,导致保存分配的菜单时只保存了选择的父节点
修复:在保存前先将部分菜单加载出来

2.5 Beta 详情:https://www.ydyno.com/archives/1225.html
This commit is contained in:
ZhengJie
2020-05-11 18:36:11 +08:00
parent 10b7a8c155
commit bd6e504f94
6 changed files with 20 additions and 13 deletions

View File

@@ -204,7 +204,7 @@
<script>
import crudUser from '@/api/system/user'
import { isvalidPhone } from '@/utils/validate'
import { getDepts, getSuperior } from '@/api/system/dept'
import { getDepts, getDeptSuperior } from '@/api/system/dept'
import { getAll, getLevel } from '@/api/system/role'
import { getAllJob } from '@/api/system/job'
import CRUD, { presenter, header, form, crud } from '@crud/crud'
@@ -415,7 +415,7 @@ export default {
})
},
getSupDepts(deptId) {
getSuperior(deptId).then(res => {
getDeptSuperior(deptId).then(res => {
this.depts = res.content.map(function(obj) {
if (obj.hasChildren && !obj.children) {
obj.children = null