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.

82 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>表格设置对齐方式</title>
<script type="text/javascript">
//获取url参数
var _gridid = $.getUUID();
// var strparam = $.getURLParam('param');
// var jparam = $.str2json(strparam);
var strparam = $.urlparam_decode($.getURLParam('param'));
var jparam = $.str2json(strparam);
var _idField = jparam.idField?jparam.idField:'id';
var _valueField = jparam.valueField?jparam.valueField:_idField;
var _textField = jparam.textField?jparam.textField:'text';
var _gridcode = jparam.gridcode;
var _dataurl = $.decode(jparam.dataurl);
var _queryParams = jparam.queryParams?jparam.queryParams:{};
var _singleSelect = (('false'==jparam.singleSelect) || (false==jparam.singleSelect))?false:true;
var _pagination = (('true'==jparam.pagination) || jparam.pagination)?true:false;
window.onload = function(){
$.grid({
id:_gridid,
containerid:'layout_grid',
gridcode:_gridcode,
url:_dataurl,
queryParams:_queryParams,
singleSelect:_singleSelect,
pagination:_pagination,
idField:_idField,
onDblClickRow:function(rowIndex, rowData){
$.inputpop_event_submit();
return true;
},
onLoadSuccess:function(){
var _iph_id = jparam.value_id;
var arr = _iph_id.split(',');
//alert('_gridid='+_gridid+' value_id='+_iph_id+' len='+_iph_id.length);
for(var i=0;i<arr.length;i++){
$.grid_setSelect({
id:_gridid,
idField:_idField,
ids:arr[i]
});
}
}
});
};
function inputpop_getValue(){
var jres = jparam;
var rows = $.grid_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_grid" data-options="region:'center'" style="padding:0px;overflow:hidden;">
</div>
</body>
</html>