ResultShow = function() {
/** 定义变量* */
var _this = this;
_this.listGrid = null;// 数据列表
_this.listGrid1 = null;// 数据列表
function goback(){
$('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/evaluate/score/Score.jsp");
}
function initComplete(){
$(".cell_card").each(function(){
var tableStr="
";
$(this).tip({"arrowDirection":"left","auto":true,arrowDistanceY:12,content:tableStr});
$(this).hover(function(){
var url = $.pathname() + '/ws/scoreGrade/ScoreGradeService/getCompanyWeight';
var params = {companyId:$(this).attr('companyId'),gradeId:$(this).attr('gradeId'),trunkId:$(this).attr('trunkId')};
$.post(url,params,function(data){
if(data.isTrunk == 0){
var trData = "体系名 | 项目级别 | 项目名称 | 权重 |
";
for(var i = 0;i < data.rows.length;i++){
var rowdata = data.rows[i];
trData += ""+rowdata.TRUNK_NAME+" | "+rowdata.LEVEL+" | "+rowdata.POJECT_NAME+" | "+rowdata.WEIGHT+" |
";
}
$("#tempTableId").html(trData);
$(this).addClass("cell_card_over");
}else{
var trData = "项目级别 | 项目名称 | 得分 |
";
for(var i = 0;i < data.rows.length;i++){
var rowdata = data.rows[i];
trData += ""+rowdata.LEVEL+" | "+rowdata.POJECT_NAME+" | "+rowdata.SCORE+" |
";
}
$("#tempTableId").html(trData);
$(this).addClass("cell_card_over");
}
},'json');
},function(){
$(this).removeClass("cell_card_over");
})
})
}
return {
init : function() {
var gradeId = $("#gradeId").val();
var resultTrunk = $("#resultTrunk").val();
var cols = [{display : '得分率',name : 'LEVEL',showTitle:true,width : "20%"}];
resultTrunk = resultTrunk.split(',');
var len = resultTrunk.length;
for(var i = 0;i< len;i++){
var trunk = resultTrunk[i].split('$');
var trunk = {display : trunk[1],name :'a'+trunk[0]+'$',width : "13%"}
cols.push(trunk);
}
_this.loadParams = {
gradeId:gradeId
};
_this.listGrid = $("#dataGrid").quiGrid({
columns: cols,
title:'各局整体得分率比较',
url :$.pathname() + '/ws/scoreGrade/ScoreGradeService/getScoreGradeId',
params: _this.loadParams,
width:'100%',
height:'auto',
type:'post',
onAfterShowData:function(data){
// initComplete();
},
usePager: false
});
$('#backback').bind('click',function(){
goback();
});
}
};
}();
$(function() {
ResultShow.init();
/* $('#back').bind('click',function(){
goback();
});*/
});