RuoYi
2020-03-13 02062f31e93c00d05a9f445183a45020b7585f06
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java
@@ -41,7 +41,7 @@
    public AjaxResult list(SysDept dept)
    {
        List<SysDept> depts = deptService.selectDeptList(dept);
        return AjaxResult.success(deptService.buildDeptTree(depts));
        return AjaxResult.success(depts);
    }
    /**
@@ -57,7 +57,6 @@
    /**
     * 获取部门下拉树列表
     */
    @PreAuthorize("@ss.hasPermi('system:dept:query')")
    @GetMapping("/treeselect")
    public AjaxResult treeselect(SysDept dept)
    {
@@ -68,11 +67,14 @@
    /**
     * 加载对应角色部门列表树
     */
    @PreAuthorize("@ss.hasPermi('system:dept:query')")
    @GetMapping(value = "/roleDeptTreeselect/{roleId}")
    public AjaxResult roleDeptTreeselect(@PathVariable("roleId") Long roleId)
    {
        return AjaxResult.success(deptService.selectDeptListByRoleId(roleId));
        List<SysDept> depts = deptService.selectDeptList(new SysDept());
        AjaxResult ajax = AjaxResult.success();
        ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
        ajax.put("depts", deptService.buildDeptTreeSelect(depts));
        return ajax;
    }
    /**