1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- 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 : '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();
- });*/
- });
|