----------------------jsp页面------------------------------------------
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>----------------------------js---------------------------------
var url = path + "/dataqc/dataQcgroup/listByDqcgid";
var dqcgid = '0';
$(document).ready(function(){
$('#dqc_group_tree').tree({
url:path+"/dataqc/loadQcGroup",
loadFilter: function(data){
if (data.returnData){
return new Array(data.returnData[0]);
} else {
//return data;
}
},
onClick:function(node){
dqcgid = node.id;
$('#qdc_group_datagrid').datagrid('load',{dqcgid:dqcgid});
},
onLoadSuccess:function(node, data){
var root = $('#dqc_group_tree').tree('getRoot');
var nodes = $('#dqc_group_tree').tree('getChildren', root.target);
dqcgid = nodes[0].dqcgid;
$('#qdc_group_datagrid').datagrid({
url:path+"/dataqc/listDataqcState",
fit:true,
singleSelect:true,
columns:[[
{field:'dqckey',title:'质控key',width:100,align:'center'},
{field:'dqcname',title:'质控名',width:100,align:'center'},
{field:'dqrecordnum',title:'已质控记录数',width:100,align:'center'},
{field:'lackrecordnum',title:'缺测记录数',width:100,align:'center'},
{field:'runtimeavg',title:'平均运行时间',width:100,align:'center'},
{field:'lastruntime',title:'最后一次运行时间',width:100,align:'center'},
{field:'runnum',title:'运行次数',width:100,align:'center'},
{field:'errnum',title:'出错次数',width:100,align:'center'},
{field:'lasterrtime',title:'最后出错时间',width:100,align:'center'},
{field:'errinfo',title:'最后出错信息',width:100,align:'center'},
{field:'xx',title:'字段详情',width:100,align:'center',formatter:function(value,row,index){
return '进入';
}}
]],
loadFilter: function(data){
var result = {};
result.rows = data.returnData;
return result;
},
queryParams:{dqcgid: dqcgid}
});
}
});
});