reportManageDetailTqtd.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>报告详情</title>
  6. <script src="../../js/min-loader-next.js"></script>
  7. </head>
  8. <body class="content">
  9. <div class="shadow-content" style="margin:1.5rem; text-align: center;">
  10. <p id = "reportTitle" style="margin:15px; font-size : 20px"></p>
  11. <table id="reportTable" class="layui-table"></table>
  12. </div>
  13. <script>
  14. var pageId = getQueryString("pageId");
  15. var reportId = getQueryString("reportId"); //报告id
  16. var fileName = chineseUrlDecodeURI(getQueryString("fileName")); //报告名称
  17. var type = getQueryString("type"); //报告类型00:excel 01:word
  18. var typeId = getQueryString("typeId"); //报告类型id
  19. var cols = null;
  20. // excel
  21. if ("00" == type) {
  22. $("#reportTitle").html(fileName);
  23. $.request({
  24. action : 'ReportManageAction/reportInfDetail',
  25. data : {
  26. reportId : reportId
  27. },
  28. success : function(data) {
  29. var reportDataJsonStr = data.data.data;
  30. var excelList = eval('(' + reportDataJsonStr + ')');
  31. reportTable(excelList, typeId);
  32. },
  33. error : function(data2) {
  34. $.ErrorAlert(data2.MINErrorMessage);
  35. }
  36. });
  37. // word
  38. } else {
  39. }
  40. function reportTable(excelList, typeId, isEdit) {
  41. var html = '';
  42. for (var i = 0; i < excelList.length; i ++) {
  43. html += '<tr>';
  44. var excelChildList = excelList[i];
  45. for (var j = 0; j < excelChildList.length; j ++) {
  46. // 合计列增加穿透
  47. if ((j == excelChildList.length - 1)) {
  48. // 台区停电次数
  49. if (i == 2) {
  50. html += '<td style="cursor: pointer" onclick="tqtd0()">' + excelChildList[j] + '</td>';
  51. // 2个月停电3次及以上台区
  52. } else if (i == 5) {
  53. html += '<td style="cursor: pointer" onclick="tqtd1()">' + excelChildList[j] + '</td>';
  54. // 2个月停电3次及以上台区且昨日停电
  55. } else if (i == 6) {
  56. html += '<td style="cursor: pointer" onclick="tqtd2()">' + excelChildList[j] + '</td>';
  57. } else if (i == 7) {
  58. html += '<td style="cursor: pointer" onclick="tqtd3()">' + excelChildList[j] + '</td>';
  59. } else {
  60. html += '<td>' + excelChildList[j] + '</td>';
  61. }
  62. } else {
  63. html += '<td>' + excelChildList[j] + '</td>';
  64. }
  65. }
  66. html += '</tr>';
  67. }
  68. $("#reportTable").html(html);
  69. }
  70. // 台区次数穿透
  71. function tqtd0(){
  72. var openPageId = pageId + "-01";
  73. openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD01", '', pageId, null);
  74. }
  75. // 2个月停电3次及以上台区穿透
  76. function tqtd1(){
  77. var openPageId = pageId + "-02";
  78. openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD02", '', pageId, null);
  79. }
  80. // month个月停电count次及以上台区且昨日停电穿透
  81. function tqtd2(){
  82. var openPageId = pageId + "-03";
  83. openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD03", '', pageId, null);
  84. }
  85. // 2个月停电1次及以上台区且昨日停电穿透
  86. function tqtd3(){
  87. var openPageId = pageId + "-04";
  88. openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD04", '', pageId, null);
  89. }
  90. </script>
  91. </body>
  92. </html>