父部门不能选择&选择树自适应

This commit is contained in:
RuoYi
2018-10-08 13:41:45 +08:00
parent 5b2664a87a
commit 16dc6ab57e
11 changed files with 39 additions and 24 deletions

View File

@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
@@ -79,7 +80,12 @@ public class DeptController extends BaseController
@GetMapping("/edit/{deptId}")
public String edit(@PathVariable("deptId") Long deptId, ModelMap mmap)
{
mmap.put("dept", deptService.selectDeptById(deptId));
SysDept dept = deptService.selectDeptById(deptId);
if (StringUtils.isNotNull(dept) && 100L == deptId)
{
dept.setParentName("");
}
mmap.put("dept", dept);
return prefix + "/edit";
}