Commit aed74a33 by fsn

解决个人资料页面部门的树形选择框偏移的问题

parent b291c2cd
...@@ -36,6 +36,12 @@ ...@@ -36,6 +36,12 @@
@if(isNotEmpty(hidden)){ @if(isNotEmpty(hidden)){
<input class="form-control" type="hidden" id="${hidden}" value="${hiddenValue!}"> <input class="form-control" type="hidden" id="${hidden}" value="${hiddenValue!}">
@} @}
@if(isNotEmpty(selectFlag)){
<div id="${selectId}" style="display: none; position: absolute; z-index: 200;">
<ul id="${selectTreeId}" class="ztree tree-box" style="${selectStyle!}"></ul>
</div>
@}
</div> </div>
</div> </div>
@if(isNotEmpty(underline) && underline == 'true'){ @if(isNotEmpty(underline) && underline == 'true'){
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<!-- 这是部门选择的下拉框 --> <!-- 这是部门选择的下拉框 -->
<div id="menuContent" class="menuContent" <div id="menuContent" class="menuContent"
style="display: none; position: absolute; z-index: 200;"> style="display: none; position: absolute; z-index: 200;">
<ul id="treeDemo" class="ztree tree-box" style="width: 214px !important;"></ul> <ul id="treeDemo" class="ztree tree-box" style="width: 249px !important;"></ul>
</div> </div>
<div class="row btn-group-m-t"> <div class="row btn-group-m-t">
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<!-- 这是部门选择的下拉框 --> <!-- 这是部门选择的下拉框 -->
<div id="menuContent" class="menuContent" <div id="menuContent" class="menuContent"
style="display: none; position: absolute; z-index: 200;"> style="display: none; position: absolute; z-index: 200;">
<ul id="treeDemo" class="ztree tree-box" style="width: 214px !important;"></ul> <ul id="treeDemo" class="ztree tree-box" style="width: 249px !important;"></ul>
</div> </div>
<div class="row btn-group-m-t"> <div class="row btn-group-m-t">
......
...@@ -37,20 +37,15 @@ ...@@ -37,20 +37,15 @@
<#input id="citySel" name="部门" underline="true" readonly="readonly" value="${deptName}" <#input id="citySel" name="部门" underline="true" readonly="readonly" value="${deptName}"
hidden="deptid" hiddenValue="${user.deptid}" hidden="deptid" hiddenValue="${user.deptid}"
clickFun="UserInfoDlg.showDeptSelectTree(); return false;" clickFun="UserInfoDlg.showInfoDeptSelectTree(); return false;"
style="background-color: #ffffff !important;"/> style="background-color: #ffffff !important;"
selectFlag="true" selectId="menuContent" selectTreeId="treeDemo" selectStyle="width:250px !important;"/>
<#input id="phone" name="电话" value="${user.phone}"/> <#input id="phone" name="电话" value="${user.phone}"/>
</div> </div>
</div> </div>
</div> </div>
<!-- 这是部门选择的下拉框 -->
<div id="menuContent" class="menuContent"
style="display: none; position: absolute; z-index: 200;">
<ul id="treeDemo" class="ztree tree-box" style=""></ul>
</div>
<div class="row btn-group-m-t"> <div class="row btn-group-m-t">
<div class="col-sm-10"> <div class="col-sm-10">
<#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="UserInfoDlg.editSubmit()"/> <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="UserInfoDlg.editSubmit()"/>
......
...@@ -70,6 +70,22 @@ UserInfoDlg.showDeptSelectTree = function() { ...@@ -70,6 +70,22 @@ UserInfoDlg.showDeptSelectTree = function() {
}; };
/** /**
* 显示用户详情部门选择的树
*
* @returns
*/
UserInfoDlg.showInfoDeptSelectTree = function() {
var cityObj = $("#citySel");
var cityPosition = $("#citySel").position();
$("#menuContent").css({
left : cityPosition.left + "px",
top : cityPosition.top + cityObj.outerHeight() + "px"
}).slideDown("fast");
$("body").bind("mousedown", onBodyDown);
};
/**
* 隐藏部门选择的树 * 隐藏部门选择的树
*/ */
UserInfoDlg.hideDeptSelectTree = function() { UserInfoDlg.hideDeptSelectTree = function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment