123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>报告详情</title>
- <script src="../../js/min-loader-next.js"></script>
- </head>
- <body class="content">
- <div class="shadow-content" style="margin:1.5rem; text-align: center;">
- <p id = "reportTitle" style="margin:15px; font-size : 20px"></p>
- <table id="reportTable" class="layui-table"></table>
- <div id = "reportDiv" style = "margin : 20px; text-align : left;"></div>
- <div id = "reportFujian" style = "margin : 20px; text-align : right;">
- <a style = "color : red;" onclick = "downLoadFujian()">附件下载</a>
- </div>
- </div>
- <script>
- var pageId = getQueryString("pageId");
- var reportId = getQueryString("reportId"); //报告id
- var fileName = chineseUrlDecodeURI(getQueryString("fileName")); //报告名称
-
- var type = getQueryString("type"); //报告类型00:excel 01:word
- var typeId = getQueryString("typeId"); //报告类型id
-
- var cols = null;
-
- // excel
- if ("00" == type) {
- $("#reportDiv").hide();
- $("#reportFujian").hide();
- $("#reportTitle").html(fileName);
- $.request({
- action : 'ReportManageAction/reportInfDetail',
- data : {
- reportId : reportId
- },
- success : function(data) {
- var reportDataJsonStr = data.data.data;
- var excelList = eval('(' + reportDataJsonStr + ')');
- reportTable(excelList, typeId);
- },
- error : function(data2) {
- $.ErrorAlert(data2.MINErrorMessage);
- }
- });
- // word
- } else {
- $("#reportTable").hide();
- $("#reportTitle").html(fileName);
- $.request({
- action : 'ReportManageAction/reportInfDetail',
- data : {
- reportId : reportId
- },
- success : function(data) {
- var reportDataJsonStr = data.data.data;
- var reportDataJson = eval('(' + reportDataJsonStr + ')');
- var reportDesc = "<p>(1)台区停电总体情况${month}月份,台区累计停电${benyueCount}台次,同比${tongbi},环比${huanbi},涉及${shejiNum}个台区,${shejiDesc}</p>"
- + "<p>(2)台区停电时长情况${totalCount}个台区累计停电时间${benyueTime}小时,平均停电时长${pingjunHour}小时,同比${tongbiPingjunHour},环比${huanbiPingjunHour}。台区平均停电时间为${areaPingjunDesc}从同比情况看,${tbAreaPingjunDesc}</p>"
- + "<p>台区停电时长在${fenduanDesc}停电时长最长的为${zuichangTaiQu},停电${zuichangTaiQuTime}小时,其次是${qiciTaiQu},停电时长${qiciTaiQuTime}小时。</p>"
- + "<p>(3)台区重复停电情况两个月内停电2次及以上的台变${totalCountTwice}个,其中${totalCountTwiceDesc}${totalCountTwice}个重复停电台变中,${countMapTwiceDesc}两个月内停电3次及以上的台变${totalCountthiple}个。</p>";
-
- for(var key in reportDataJson){
- var replaceStr = "${" + key + "}";
- if (key == "totalCountTwice") {
- reportDesc = reportDesc.replace(/\${totalCountTwice}/g, reportDataJson[key]);
- } else {
- reportDesc = reportDesc.replace(replaceStr, reportDataJson[key]);
- }
- }
- $("#reportDiv").html(reportDesc);
- },
- error : function(data2) {
- $.ErrorAlert(data2.MINErrorMessage);
- }
- });
- }
-
- function reportTable(excelList, typeId, isEdit) {
- var html = '';
- for (var i = 0; i < excelList.length; i ++) {
- html += '<tr>';
- var excelChildList = excelList[i];
- for (var j = 0; j < excelChildList.length; j ++) {
- // 合计列增加穿透
- if ((j == excelChildList.length - 1)) {
- // 台区停电次数
- if (i == 2) {
- html += '<td style="cursor: pointer" onclick="tqtd0()">' + excelChildList[j] + '</td>';
- // 2个月停电3次及以上台区
- } else if (i == 5) {
- html += '<td style="cursor: pointer" onclick="tqtd1()">' + excelChildList[j] + '</td>';
- // 2个月停电3次及以上台区且昨日停电
- } else if (i == 6) {
- html += '<td style="cursor: pointer" onclick="tqtd2()">' + excelChildList[j] + '</td>';
- } else if (i == 7) {
- html += '<td style="cursor: pointer" onclick="tqtd3()">' + excelChildList[j] + '</td>';
- } else {
- html += '<td>' + excelChildList[j] + '</td>';
- }
- } else {
- html += '<td>' + excelChildList[j] + '</td>';
- }
- }
- html += '</tr>';
- }
- $("#reportTable").html(html);
- }
-
- // 台区次数穿透
- function tqtd0(){
- var openPageId = pageId + "-01";
- openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD01", '', pageId, null);
- }
- // 2个月停电3次及以上台区穿透
- function tqtd1(){
- var openPageId = pageId + "-02";
- openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD02", '', pageId, null);
- }
- // month个月停电count次及以上台区且昨日停电穿透
- function tqtd2(){
- var openPageId = pageId + "-03";
- openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD03", '', pageId, null);
- }
- // 2个月停电1次及以上台区且昨日停电穿透
- function tqtd3(){
- var openPageId = pageId + "-04";
- openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD04", '', pageId, null);
- }
-
- function downLoadFujian() {
- var data = {reportId : reportId};
- exportExcel("../../TQTDReportAction/reportInfFujian",data);
- }
- </script>
- </body>
- </html>
|