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.
 
 
 
 
 
 

84 lines
2.4 KiB

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/wdk/theme/je/module/public/common.jsp"%>
<title>SVN资源库</title>
<script type="text/javascript">
//获取url参数
var strparam = $.urlparam_decode($.getURLParam('param'));
var jparam = $.str2json(strparam);
var _gridcode = jparam.gridcode;
var _dataurl = $.decode(jparam.dataurl);
var _queryParams = jparam.queryParams?jparam.queryParams:{};
var _gridid = "layout_treegrid";
var _idField = jparam.idField?jparam.idField:'id';
var _textField = jparam.textField?jparam.textField:'text';
var _valueField = jparam.valueField?jparam.valueField:'value';
var _checkbox = (('true'==jparam.checkbox) || (true==jparam.checkbox))?true:false;
var _asyn = (('true'==jparam.asyn) || (true==jparam.asyn))?true:false;
var _singleSelect = (('false'==jparam.singleSelect) || (false==jparam.singleSelect))?false:true;
window.onload = function(){
$.treegrid({
id:_gridid,
gridcode:_gridcode,
idField:_idField,
textField:_textField,
valueField:_valueField,
url:_dataurl,
singleSelect:_singleSelect,
queryParams:_queryParams,
asyn:_asyn,
onLoadSuccess:function(row,data){
var _iph_id = jparam.value_id;
var arr = _iph_id.split(',');
for(var i=0;i<arr.length;i++){
$.treegrid_setSelect({
id:_gridid,
ids:arr[i]
});
}
}
});
};
function inputpop_getValue(){
var jres = jparam;
var rows = $.treegrid_getSelections({id:_gridid});
var idarr = [];
var valuearr = [];
var textarr = [];
for(var i=0;i<rows.length;i++){
var row = rows[i];
var _id = eval('row.'+_idField);
var _text = eval('row.'+_textField);
var _value = eval('row.'+_valueField);
idarr.push(_id);
textarr.push(_text);
valuearr.push(_value);
}
jres.value_id = idarr.join(',');
jres.value_text = textarr.join(',');
jres.value_value = valuearr.join(',');
jres.value_rows = rows;
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:auto;height:100%;border:1px solid #ddd;" >
<div id="layout_treegrid" style="width:100%;height:100%;overflow:auto;float:left;border:1px solid #add;"></div>
</div>
</body>
</html>