ResultShow = function() { /** 定义变量* */ var _this = this; _this.listGrid = null;// 数据列表 _this.jiChuZhunBeiPingGuZhiBiao = []; _this.zhuanXiangYingJiZhunBeiPingZhiBiao = []; _this.yingJiShiJianZhengGaiQingKuangPingGuZhiBiao = []; _this.yingJiChuZhiHouPingGuZhiBiao = []; _this.listGridScore = null; /* _this.listGrid1 = null;// 数据列表 */ function goback(){ $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/evaluate/score/Score.jsp"); } function isShowPingGu(){ var params = { classid : '375', objectID : fd_id }; $.ajax({ url : $.pathname() + '/ws/crud/CRUDService/getDataById/', type : 'post', data : params, dataType : 'json', async :false, success : function(data){ var trunk_id = data.TRUNK_ID_375; $(".pingGuType").hide(); if(trunk_id != null && trunk_id != ""){ trunk_id = trunk_id.split(','); for(var i =0;i < trunk_id.length;i++){ $("#"+trunk_id[i]+"").show(); } } setHight(); }, error : function(e){ $.messager.alert('系统提示信息', '访问服务失败!', 'error'); } }); } function getColumnar($id,$twoId,title,data,gradeId,companyId){ $id.highcharts({ chart: { type: 'column' }, title: { text: title }, xAxis: { categories: [ 'S=0', '1≤s<2', '2≤S<3', 'S=3' ], crosshair: true }, yAxis: { min: 0, title: { text: '' } }, tooltip: { headerFormat: '{point.key}', pointFormat: '' + '', footerFormat: '
{series.name}: {point.y:.2f} %
', shared: true, useHTML: true }, plotOptions: { series : { point : { events : { click : function(e) { var color = e.point.series.color; var title = e.point.series.name; var level = title.substr(title.indexOf('=')+2,3); var categories = ['S=0','1≤s<2','2≤S<3','S=3']; var scoreGrade = e.point.x; $.ajax({ url :$.pathname() + '/ws/scoreGrade/ScoreGradeService/getScoreGradeTwoId', type : 'post', async : true, data :{ gradeId:gradeId, companyId:companyId, level:level, score:scoreGrade }, dataType : 'json', success : function(data) { getTwoColumnar($twoId,title,JSON.parse(data.name),JSON.parse(data.data),categories[scoreGrade],color); } }); } } } }, column: { pointPadding: 0.2, borderWidth: 0 } }, series: data }); setHight(); } function getTwoColumnar($id,title,categories,data,scoregrade,color){ $id.highcharts({ chart: { type: 'column' }, title: { text: title }, xAxis: { categories:categories, crosshair: true }, yAxis: { min: 0, title: { text: '' } }, tooltip: { headerFormat: '{point.key}', pointFormat: '' + '', footerFormat: '
{series.name}: {point.y:.2f} %
', shared: true, useHTML: true }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: [ { name : scoregrade, color : color, data : data } ] }); setHight(); }; function getRadarGraph($id,categories,series){ $id.highcharts({ chart: { polar: true, type: 'line' }, title: { text: '', x: -80 }, pane: { size: '80%' }, xAxis: { categories:categories, tickmarkPlacement: 'on', lineWidth: 0 }, yAxis: { gridLineInterpolation: 'polygon', lineWidth: 0, min: 0 }, tooltip: { shared: true, pointFormat: '{series.name}: {point.y:,.2f}%
' }, legend: { align: 'right', verticalAlign: 'top', y: 70, layout: 'vertical' }, series:series }); setHight(); }; function getLineGraph($id,series){ $id.highcharts({ title: { text: '', x: -20 //center }, subtitle: { text: '', x: -20 }, xAxis: { categories:[ 'S=0', '1≤s<2', '2≤S<3', 'S=3' ], }, yAxis: { title: { text: '' }, plotLines: [{ value: 0, width: 1, color: '#808080' }] }, tooltip: { shared: true, pointFormat: '{series.name}: {point.y:,.2f}%
' }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'middle', borderWidth: 0 }, series: series }); setHight(); } //各局得分比例和得分值 function getEachScoreValue($dataScore,$dataValue,gradeId,companys,trunkId){ var cols = [{display : '得分率',name : 'LEVEL',showTitle:true,width : "20%"}]; var cols1 = [{display : '得分值',name : 'LEVEL',showTitle:true,width : "20%"}]; companys = companys.split(','); var len = companys.length; var height = 580; for(var i = 0;i< len;i++){ var company = companys[i].split('$'); company = {display : company[1],name :'a'+company[0]+'$',width : "13%"} cols.push(company); cols1.push(company); height += 720; } $('.targetType').height(height+'px'); _this.loadParams = { gradeId:gradeId, trunkId:trunkId }; _this.listGrid = $dataScore.quiGrid({ columns: cols, url :$.pathname() + '/ws/scoreGrade/ScoreGradeService/getScoreGradeId', params: _this.loadParams, async:false, width:'1024', usePager: false }); _this.listGrid = $dataValue.quiGrid({ columns: cols1, url :$.pathname() + '/ws/scoreGrade/ScoreGradeService/getScoreGradeTotalId', params: _this.loadParams, async:false, width:'1024', usePager: false }); setHight(); } return { init : function() { //显示有评估的指标 isShowPingGu(); //////////////////////////各局整体得分率比较/////////////////////////////////////////// var gradeId = $("#gradeId").val(); var resultTrunk1 = $("#resultTrunk").val(); getEachScoreValue($("#dataGrid"),$("#dataGridScore"),gradeId,resultTrunk1,''); var resultTrunk = resultTrunk1.split(','); var len = resultTrunk.length; //////////////////////////各局整体得分率比较/////////////////////////////////////////// //////////////////////////应急基础准备评估指标//////////////////////////////////////// if($("#372144723048972500000106100000").css('display') == 'block'){ var fieldsetdata = "
各局应急基础准备评估指标得分情况:

" + "
" + "" + "
" $("#jiChuZhunBeiPingGuZhiBiaoDataDiv").append(fieldsetdata); getEachScoreValue($("#jiChuZhunBeiPingGuZhiBiaoScore"),$("#jiChuZhunBeiPingGuZhiBiaoValue"),gradeId,resultTrunk1,'372144723048972500000106100000'); var jiChuZhunBeiPingGuZhiBiaoColumns = [{display : '得分率',name : 'LEVEL',align : 'center',width : "20%"}, {display : '应急组织体系',name : 'zhuZhiTiXi',align : 'center',width : "18%"}, {display : '预案体系',name : 'yuAnTiXi',align : 'center',width : "18%"}, {display : '应急保障体系',name : 'baoZhengTiXi',align : 'center',width : "18%"}, {display : '运转机制',name : 'yunZhuanJiZhi',align : 'center',width : "18%"} ]; var radarData = []; var lineData = []; var categories = ''; ///动态加载公司对应的dataGrid for(var i = 0;i< len;i++){ var trunk = resultTrunk[i].split('$'); var fieldset = "
"+trunk[1]+"应急基础准备评估指标得分情况:
"+ ""+ "
" $("#jiChuZhunBeiPingGuZhiBiaoDataDiv").append(fieldset); _this.jiChuZhunBeiPingGuZhiBiaoloadParams = { gradeId:gradeId, companyId:trunk[0], trunkId:'372144723048972500000106100000' } var $id = $('#jiChuZhunBeiPingGuZhiBiao'+i+''); var $container = $('#jiChuZhunBeiPingGuZhiBiaoContainer'+i+''); var $twoContainer = $('#jiChuZhunBeiPingGuZhiBiaoTwoContainer'+i+''); var title = trunk[1]+"应急基础准备评估指标得分情况"; var dataJiChu = ""; $.ajax({ url :$.pathname() + '/ws/scoreGrade/ScoreGradeService/getScoreGradeLevelOneTotal', type : 'post', async : false, data :_this.jiChuZhunBeiPingGuZhiBiaoloadParams, dataType : 'json', success : function(data) { dataJiChu = data; } }); _this.jiChuZhunBeiPingGuZhiBiao[i] = $($id).quiGrid({ columns: jiChuZhunBeiPingGuZhiBiaoColumns, data:JSON.parse(dataJiChu.result), width:'1000', isScroll:true, usePager: false }); //获得雷达图数据 var radar = {name:trunk[1],data:dataJiChu.radarGraph, pointPlacement: 'on'}; radarData.push(radar); categories = dataJiChu.radarCategories; //获得线图数据 var line = {name:trunk[1],data:dataJiChu.radarGraph} lineData.push(line); getColumnar($container,$twoContainer,title,dataJiChu.returnListGraph,gradeId,trunk[0]); } //添加雷达图与线图 var $radarId = $('#radarGraphContainer1'); var $lineId = $('#lineGraphContainer1'); getRadarGraph($radarId,categories,radarData); getLineGraph($lineId,lineData); } //////////////////////////应急基础准备评估指标//////////////////////////////////////// //////////////////////////专项应急准备评估指标//////////////////////////////////////// if($("#372144723051042300000107100000").css('display') == 'block'){ var fieldsetdata = "
各局应急基础准备评估指标得分情况:

" + "
" + "" + "
" $("#zhuanXiangYingJiZhunBeiPingZhiBiaoDataDiv").append(fieldsetdata); getEachScoreValue($("#zhuanXiangYingJiZhunBeiPingZhiBiaoScore"),$("#zhuanXiangYingJiZhunBeiPingZhiBiaoValue"),gradeId,resultTrunk1,'372144723051042300000107100000'); var zhuanXiangYingJiZhunBeiPingZhiBiaoColumns = [{display : '得分率',name : 'LEVEL',align : 'center',width : "20%"}, {display : '防风防汛应急准备',name : 'FFFXYJZB',align : 'center',width : "25%"}, {display : '地震应急准备',name : 'DZYJZB',align : 'center',width : "25%"}, {display : '防冰应急准备',name : 'FBYJZB',align : 'center',width : "25%"} ]; var radarData = []; var lineData = []; var categories = ''; ///动态加载公司对应的dataGrid for(var i = 0;i< len;i++){ var trunk = resultTrunk[i].split('$'); var fieldset = "
"+trunk[1]+"专项应急准备评估指标得分情况:
"+ ""+ "
" $("#zhuanXiangYingJiZhunBeiPingZhiBiaoDataDiv").append(fieldset); //$("#zhuanXiangYingJiZhunBeiPingZhiBiaoDataDiv").append("
"+trunk[1]+"专项应急准备评估指标得分情况:
"); _this.zhuanXiangYingJiZhunBeiPingZhiBiaoloadParams = { gradeId:gradeId, companyId:trunk[0], trunkId:'372144723051042300000107100000' } var dataOne = ""; $.ajax({ url :$.pathname() + '/ws/scoreGrade/ScoreGradeService/getScoreGradeLevelOneTotal', type : 'post', async : false, data :_this.zhuanXiangYingJiZhunBeiPingZhiBiaoloadParams, dataType : 'json', success : function(data) { dataOne = data; } }); var $id = $('#zhuanXiangYingJiZhunBeiPingZhiBiao'+i+''); var $container = $('#zhuanXiangYingJiZhunBeiPingZhiBiaoContainer'+i+''); var $twoContainer = $('#zhuanXiangYingJiZhunBeiPingZhiBiaoTwoContainer'+i+''); var title = trunk[1]+"专项应急准备评估指标"; _this.zhuanXiangYingJiZhunBeiPingZhiBiao[i] = $($id).quiGrid({ columns: zhuanXiangYingJiZhunBeiPingZhiBiaoColumns, data:JSON.parse(dataOne.result), width:'1000', isScroll:true, usePager: false }); //获得雷达图数据 var radar = {name:trunk[1],data:dataOne.radarGraph, pointPlacement: 'on'}; radarData.push(radar); categories = dataOne.radarCategories; //获得线图数据 var line = {name:trunk[1],data:dataOne.radarGraph} lineData.push(line); getColumnar($container,$twoContainer,title,dataOne.returnListGraph,gradeId,trunk[0]); } //添加雷达图与线图 var $radarId = $('#radarGraphContainer2'); var $lineId = $('#lineGraphContainer2'); getRadarGraph($radarId,categories,radarData); getLineGraph($lineId,lineData); } //////////////////////////专项应急准备评估指标//////////////////////////////////////// //////////////////////////应急事件整改情况评估指标//////////////////////////////////////// if($("#372144723053579800000108100000").css('display') == 'block'){ var fieldsetdata = "
各局应急基础准备评估指标得分情况:

" + "
" + "" + "
" $("#yingJiShiJianZhengGaiQingKuangPingGuZhiBiaoDataDiv").append(fieldsetdata); getEachScoreValue($("#yingJiShiJianZhengGaiQingKuangPingGuZhiBiaoScore"),$("#yingJiShiJianZhengGaiQingKuangPingGuZhiBiaoValue"),gradeId,resultTrunk1,'372144723053579800000108100000'); var yingJiShiJianZhengGaiQingKuangPingGuZhiBiaoColumns = [{display : '得分率',name : 'LEVEL',align : 'center',width : "20%"}, {display : '总结评估工作的开展情况',name : 'ZJPGGZDKZQK',align : 'center',width : "25%"}, {display : '整改计划制定情况',name : 'ZGJHZDQK',align : 'center',width : "25%"}, {display : '整改计划执行情况',name : 'ZGJHZXQK',align : 'center',width : "25%"} ]; var radarData = []; var lineData = []; var categories = ''; ///动态加载公司对应的dataGrid for(var i = 0;i< len;i++){ var trunk = resultTrunk[i].split('$'); var fieldset = "
"+trunk[1]+"应急事件整改情况评估指标得分情况:
"+ ""+ "
" $("#yingJiShiJianZhengGaiQingKuangPingGuZhiBiaoDataDiv").append(fieldset); //$("#yingJiShiJianZhengGaiQingKuangPingGuZhiBiaoDataDiv").append("
"+trunk[1]+"应急事件整改情况评估指标得分情况:
"); _this.yingJiShiJianZhengGaiQingKuangPingGuZhiBiaoloadParams = { gradeId:gradeId, companyId:trunk[0], trunkId:'372144723053579800000108100000' } var dataOne = ""; $.ajax({ url :$.pathname() + '/ws/scoreGrade/ScoreGradeService/getScoreGradeLevelOneTotal', type : 'post', async : false, data :_this.yingJiShiJianZhengGaiQingKuangPingGuZhiBiaoloadParams, dataType : 'json', success : function(data) { dataOne = data; } }); var $id = $('#yingJiShiJianZhengGaiQingKuangPingGuZhiBiao'+i+''); var $container = $('#yingJiShiJianZhengGaiQingKuangPingGuZhiBiaoContainer'+i+''); var $twoContainer = $('#zhuanXiangYingJiZhunBeiPingZhiBiaoTwoContainer'+i+''); var title = trunk[1]+"应急事件整改情况评估指标"; _this.jiChuZhunBeiPingGuZhiBiao[i] = $($id).quiGrid({ columns: yingJiShiJianZhengGaiQingKuangPingGuZhiBiaoColumns, data:JSON.parse(dataOne.result), width:'1000', isScroll:true, usePager: false }); //获得雷达图数据 var radar = {name:trunk[1],data:dataOne.radarGraph, pointPlacement: 'on'}; radarData.push(radar); categories = dataOne.radarCategories; //获得线图数据 var line = {name:trunk[1],data:dataOne.radarGraph} lineData.push(line); getColumnar($container,$twoContainer,title,dataOne.returnListGraph,gradeId,trunk[0]); } //添加雷达图与线图 var $radarId = $('#radarGraphContainer3'); var $lineId = $('#lineGraphContainer3'); getRadarGraph($radarId,categories,radarData); // getLineGraph($lineId,lineData); $("#zhuanXiangYingJiZhunBeiPingZhiBiaoDataDiv").height(); } //////////////////////////应急事件整改情况评估指标//////////////////////////////////////// //////////////////////////应急处置后评估指标//////////////////////////////////////// if($("#372144723054636400000109100000").css('display') == 'block'){ var fieldsetdata = "
各局应急基础准备评估指标得分情况:

" + "
" + "" + "
" $("#yingJiChuZhiHouPingGuZhiBiaoDataDiv").append(fieldsetdata); getEachScoreValue($("#yingJiChuZhiHouPingGuZhiBiaoScore"),$("#yingJiChuZhiHouPingGuZhiBiaoValue"),gradeId,resultTrunk1,'372144723054636400000109100000'); var yingJiChuZhiHouPingGuZhiBiaoColumns = [{display : '得分率',name : 'LEVEL',align : 'center',width : "20%"}, {display : '事前准备阶段',name : 'SQZBJD',align : 'center',width : "25%"}, {display : '事中处置阶段',name : 'SZCZJD',align : 'center',width : "25%"}, {display : '事后恢复阶段',name : 'SHHHJD',align : 'center',width : "25%"} ]; var radarData = []; var lineData = []; var categories = ''; ///动态加载公司对应的dataGrid for(var i = 0;i< len;i++){ var trunk = resultTrunk[i].split('$'); //$("#yingJiChuZhiHouPingGuZhiBiaoDataDiv").append("
"+trunk[1]+"应急处置后评估指标得分情况:
"); var fieldset = "
"+trunk[1]+"应急处置后评估指标得分情况:
"+ ""+ "
" $("#yingJiChuZhiHouPingGuZhiBiaoDataDiv").append(fieldset); _this.yingJiChuZhiHouPingGuZhiBiaoloadParams = { gradeId:gradeId, companyId:trunk[0], trunkId:'372144723054636400000109100000' } var dataOne = ""; $.ajax({ url :$.pathname() + '/ws/scoreGrade/ScoreGradeService/getScoreGradeLevelOneTotal', type : 'post', async : false, data :_this.yingJiChuZhiHouPingGuZhiBiaoloadParams, dataType : 'json', success : function(data) { dataOne = data; } }); var $id = $('#yingJiChuZhiHouPingGuZhiBiao'+i+''); var $container = $('#yingJiChuZhiHouPingGuZhiBiaoContainer'+i+''); var $twoContainer = $('#yingJiChuZhiHouPingGuZhiBiaoTwoContainer'+i+''); var title = trunk[1]+"应急处置后评估指标"; _this.yingJiChuZhiHouPingGuZhiBiao[i] = $($id).quiGrid({ columns: yingJiChuZhiHouPingGuZhiBiaoColumns, data:JSON.parse(dataOne.result), width:'1000', isScroll:true, usePager: false }); //获得雷达图数据 var radar = {name:trunk[1],data:dataOne.radarGraph, pointPlacement: 'on'}; radarData.push(radar); categories = dataOne.radarCategories; //获得线图数据 var line = {name:trunk[1],data:dataOne.radarGraph} lineData.push(line); getColumnar($container,$twoContainer,title,dataOne.returnListGraph,gradeId,trunk[0]); } //添加雷达图与线图 var $radarId = $('#radarGraphContainer4'); var $lineId = $('#lineGraphContainer4'); getRadarGraph($radarId,categories,radarData); getLineGraph($lineId,lineData); } //////////////////////////应急处置后评估指标//////////////////////////////////////// //alert(len); //$(".targetType").height('1800px'); $('#backback').bind('click',function(){ goback(); }); setHight(); } }; }(); $(function() { ResultShow.init(); });