You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
2.9 KiB
91 lines
2.9 KiB
1 month ago
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
|
<%
|
||
|
String path = request.getContextPath();
|
||
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||
|
BaseSessionUser su = (BaseSessionUser)session.getAttribute(WDKConstant.SESSION_USER);
|
||
|
String WDK_ROOT = WDKCore.inst.WDK_ROOT;
|
||
|
%>
|
||
|
<!DOCTYPE html>
|
||
|
<%@page import="org.wdk.WDKConstant"%>
|
||
|
<%@page import="org.wdk.WDKCore"%>
|
||
|
<%@page import="org.wdk.core.base.BaseSessionUser"%>
|
||
|
<html>
|
||
|
<head>
|
||
|
<base href="<%=basePath%>" target="_self">
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<title>用户树</title>
|
||
|
<jsp:include page='<%=WDKCore.inst.WDK_COMMON %>'></jsp:include>
|
||
|
<script type="text/javascript" src="<%=WDK_ROOT%>/core/js/wdk.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
<% if(null==su){%>
|
||
|
$.timeout();
|
||
|
//alert("登录超时,请重新登录!");
|
||
|
//$.getRoot().document.location.href = $.base()+"/console.jsp";
|
||
|
<%}%>
|
||
|
var _treeid = "layout_tree";
|
||
|
var strparam = $.urlparam_decode($.getURLParam('param'));
|
||
|
var jparam = $.str2json(strparam);
|
||
|
var _idField = jparam.idField?jparam.idField:'id';
|
||
|
var _textField = jparam.textField?jparam.textField:'text';
|
||
|
var _valueField = jparam.valueField?jparam.valueField:_idField;
|
||
|
var _queryParams = jparam.queryParams?jparam.queryParams:{};
|
||
|
|
||
|
var _dataurl = $.decode(jparam.dataurl);
|
||
|
|
||
|
var _checkbox = ('true'==jparam.checkbox)?true:false;
|
||
|
var _asyn = ('true'==jparam.asyn)?true:false;
|
||
|
window.onload = function(){
|
||
|
$.tree({
|
||
|
id:_treeid,
|
||
|
asyn:_asyn,
|
||
|
checkbox:_checkbox,
|
||
|
url:_dataurl,
|
||
|
queryParams:_queryParams,
|
||
|
method:"get",
|
||
|
onLoadSuccess:function(){
|
||
|
var value_id = jparam.value_id;
|
||
|
$.tree_setChecked({id:_treeid,ids:value_id});
|
||
|
}
|
||
|
});
|
||
|
};
|
||
|
|
||
|
function inputpop_getValue(){
|
||
|
var jres = jparam;
|
||
|
var nodes = $.tree_getCheckedNode({id:_treeid});
|
||
|
var idarr = [];
|
||
|
var valuearr = [];
|
||
|
var textarr = [];
|
||
|
for(var i=0;i<nodes.length;i++){
|
||
|
var node = nodes[i];
|
||
|
if("1"==node.attributes.ntype){
|
||
|
continue;
|
||
|
}
|
||
|
var _id = eval('node.'+_idField);
|
||
|
var _text = eval('node.'+_textField);
|
||
|
var _value = _id;
|
||
|
if(_valueField!=_idField){
|
||
|
_value = eval('node.attributes.'+_valueField);
|
||
|
}
|
||
|
idarr.push(_id+","+node.attributes.actortype+","+node.text);
|
||
|
textarr.push(_text);
|
||
|
valuearr.push(_value);
|
||
|
}
|
||
|
if(idarr.length<1){
|
||
|
alert('请选择人员');
|
||
|
return false;
|
||
|
}
|
||
|
jres.value_id = idarr.join(';');
|
||
|
jres.value_text = textarr.join(';');
|
||
|
jres.value_value = valuearr.join(';');
|
||
|
jres.value_rows = nodes;
|
||
|
return jres;
|
||
|
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body class="easyui-layout" style="padding:0px;margin:0px;background-color:#FFFFFF;">
|
||
|
<div id="layout_content" data-options="region:'center',border:false,collapsed:false" style="overflow:hidden;border:1px solid #ddd;float:left;" >
|
||
|
<div id="layout_tree" style="width:100%;height:100%;overflow:auto;float:left;border:1px solid #add;"></div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|