部门选择设置默认值

master
RuoYi 7 years ago committed by Limy
parent 6b0e72a2a8
commit 579abefcb0

@ -134,7 +134,7 @@ public class DeptController extends BaseController
@GetMapping("/selectDeptTree/{deptId}")
public String selectDeptTree(@PathVariable("deptId") Long deptId, ModelMap mmap)
{
mmap.put("treeName", deptService.selectDeptById(deptId).getDeptName());
mmap.put("dept", deptService.selectDeptById(deptId));
return prefix + "/tree";
}

@ -100,8 +100,7 @@
/*部门管理-新增-选择父部门树*/
function selectDeptTree() {
var treeId = $("#treeId").val();
var deptId = treeId == null || treeId == "" ? "100" : treeId;
var deptId = $("#treeId").val();
var url = prefix + "/selectDeptTree/" + deptId;
$.modal.open("选择部门", url, '380', '380');
}

@ -103,8 +103,7 @@
/*部门管理-修改-选择部门树*/
function selectDeptTree() {
var treeId = $("#treeId").val();
var deptId = treeId == null || treeId == "" ? "100" : treeId;
var deptId = $("#treeId").val();
var url = prefix + "/selectDeptTree/" + deptId;
$.modal.open("选择部门", url, '380', '380');
}

@ -8,8 +8,8 @@ body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</style>
<body class="hold-transition box box-main">
<input id="treeId" name="treeId" type="hidden"/>
<input id="treeName" name="treeName" type="hidden" th:value="${treeName}"/>
<input id="treeId" name="treeId" type="hidden" th:value="${dept.deptId}"/>
<input id="treeName" name="treeName" type="hidden" th:value="${dept.deptName}"/>
<div class="wrapper"><div class="treeShowHideButton" onclick="search();">
<label id="btnShow" title="显示搜索" style="display:none;"></label>
<label id="btnHide" title="隐藏搜索"></label>

Loading…
Cancel
Save