123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <!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>
- <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>
- <div class="layui-form-item box-button display" style="justify-content: flex-end;-webkit-justify-content: flex-end;">
- <div class="layui-input-block" id="goBack" onclick="goBack()">
- <button class="layui-btn">返回</button>
- </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 reportType = getQueryString("reportType"); //报告类型
-
- var cols = null;
-
- $("#reportTable").hide();
- $("#reportTitle").html(fileName);
- $.request({
- action : 'ReportManageAction/reportInfDetail',
- data : {
- reportId : reportId
- },
- success : function(data) {
- var resJSON = eval('(' + data.data.data + ')');
- var reportDataJson = resJSON.dataMap;
- var reportDesc = resJSON.descStr;
-
- for(var key in reportDataJson){
- var replaceStr = "${" + key + "}";
- if (key == "totalCountTwice") {
- reportDesc = reportDesc.replace(/\${totalCountTwice}/g, reportDataJson[key]);
- }else if (key == "shejiNum") {
- reportDesc = reportDesc.replace(/\${shejiNum}/g, reportDataJson[key]);
- } else {
- reportDesc = reportDesc.replace(replaceStr, reportDataJson[key]);
- }
- }
- $("#reportDiv").html(reportDesc);
-
- var excelList = resJSON.excelList;
- // 周报
- if (reportType == "TQTDZB") {
- var tableHtml = '<table class="layui-table">';
- for (var i = 0; i < excelList.length; i ++) {
- tableHtml += '<tr>';
- var childList = excelList[i];
- for (var j = 0; j < childList.length; j ++) {
- tableHtml += '<td>' + childList[j] + '</td>';
- }
- tableHtml += '</tr>';
- }
- tableHtml += '</table>';
- $("#reportDiv").append(tableHtml);
- }
- // 日报
- if (reportType == "TQTDRB") {
- reportTable(excelList, typeId);
- }
- // 不是月报
- if (reportType != "TQTDYB") {
- $("#reportFujian").hide();
- }
- },
- error : function(data2) {
- $.ErrorAlert(data2.MINErrorMessage);
- }
- });
-
- function reportTable(excelList, typeId, isEdit) {
- var html = '<table class="layui-table" id = "tableId">';
- 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;background-color: #f8d61a;" onclick="tqtd0()" title = "查看详情">' + excelChildList[j] + '</td>';
- } else if (i == 3) {
- html += '<td style="cursor: pointer;background-color: #f8d61a;" onclick="tqtd4()" title = "查看详情">' + excelChildList[j] + '</td>';
- // 2个月停电3次及以上台区
- } else if (i == 6) {
- html += '<td style="cursor: pointer;background-color: #f8d61a;" onclick="tqtd1()" title = "查看详情">' + excelChildList[j] + '</td>';
- // 2个月停电3次及以上台区且昨日停电
- } else if (i == 7) {
- html += '<td style="cursor: pointer;background-color: #f8d61a;" onclick="tqtd2()" title = "查看详情">' + excelChildList[j] + '</td>';
- } else if (i == 8) {
- html += '<td style="cursor: pointer;background-color: #f8d61a;" onclick="tqtd3()" title = "查看详情">' + excelChildList[j] + '</td>';
- } else if (i == 9) {
- html += '<td style="cursor: pointer;background-color: #f8d61a;" onclick="tqtd5()" title = "查看详情">' + excelChildList[j] + '</td>';
- } else {
- html += '<td>' + excelChildList[j] + '</td>';
- }
- } else {
- html += '<td>' + excelChildList[j] + '</td>';
- }
- }
- html += '</tr>';
- }
- html += '</table>';
- $("#reportDiv").append(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个月停电2次台区且昨日停电穿透
- function tqtd3(){
- var openPageId = pageId + "-04";
- openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD04", '', pageId, null);
- }
- function tqtd4(){
- var openPageId = pageId + "-05";
- openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD05", '', pageId, null);
- }
- // 2个月停电1次台区且昨日停电穿透
- function tqtd5(){
- var openPageId = pageId + "-06";
- openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD06", '', pageId, null);
- }
- function downLoadFujian() {
- var data = {reportId : reportId};
- exportExcel("../../TQTDReportAction/reportInfFujian",data);
- }
- function goBack() {
- deleteTabPageParent(pageId);
- }
- </script>
- </body>
- </html>
|