123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- 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="<table id='tempTableId' border='1' cellspacing='0' style='1px solid;width:100%'></table>";
-
- $(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 = "<tr align='center'><td>体系名</td><td>项目级别</td><td>项目名称</td><td>权重</td></tr>";
- for(var i = 0;i < data.rows.length;i++){
- var rowdata = data.rows[i];
- trData += "<tr><td>"+rowdata.TRUNK_NAME+"</td><td>"+rowdata.LEVEL+"</td><td>"+rowdata.POJECT_NAME+"</td><td>"+rowdata.WEIGHT+"</td></tr>";
- }
- $("#tempTableId").html(trData);
- $(this).addClass("cell_card_over");
- }else{
- var trData = "<tr align='center'><td>项目级别</td><td>项目名称</td><td>得分</td></tr>";
- for(var i = 0;i < data.rows.length;i++){
- var rowdata = data.rows[i];
- trData += "<tr><td>"+rowdata.LEVEL+"</td><td>"+rowdata.POJECT_NAME+"</td><td>"+rowdata.SCORE+"</td></tr>";
- }
- $("#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 : 'DEPT_NAME',showTitle:true,width : "20%"},
- {display : '权重得分',name : 'WEIGHT_SCORE',width : "14%",render:function(rowdata, rowindex, value, column){
- return "<div style='width:80px;float:left;padding:4px 0 0 2px;'>"+value+"</div><div style='float:left;'><span class='cell_card' trunkId='' gradeId='"+gradeId+"' companyId='"+rowdata.COMAPNY_ID+"'></span></div><div class='clear'></div>";
- }},
- {display : '总分',name : 'TOTAL_SCORE',showTitle:true,width : "14%"},
-
-
- ];
- 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%",render:function(rowdata, rowindex, value, column){
- var name = column.name;
- return "<div style='width:80px;float:left;padding:4px 0 0 2px;'>"+value+"</div><div style='float:left;'><span class='cell_card' trunkId='"+(name.split('a')[1]).split('$')[0]+"' gradeId='"+gradeId+"' companyId='"+rowdata.COMAPNY_ID+"'></span></div><div class='clear'></div>";
- }}
- cols.push(trunk);
- }
- _this.loadParams = {
- gradeId:gradeId
- };
- _this.listGrid = $("#dataGrid").quiGrid({
- columns: cols,
- url :$.pathname() + '/ws/scoreGrade/ScoreGradeService/getDetailScoreById',
- params: _this.loadParams,
- width:"100%",
- height:'auto',
- type:'post',
- onAfterShowData:function(data){
- initComplete();
- },
- usePager: false
-
- });
- _this.listGrid1 = $("#dataGrid1").quiGrid({
- columns: cols,
- url :$.pathname() + '/ws/scoreGrade/ScoreGradeService/getDetailScoreById',
- params: _this.loadParams,
- width:"100%",
- height:'auto',
- type:'post',
- onAfterShowData:function(data){
- initComplete();
- },
- usePager: false
-
- });
- $('#back').bind('click',function(){
- goback();
- });
- }
-
- };
- }();
- $(function() {
- ResultShow.init();
- });
|