a9523549427b0ad1064e1dc2180805d116beb098.svn-base 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>预警与响应统计</title>
  5. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/context.js"></script>
  8. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  9. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
  10. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
  11. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/framework.js"></script>
  12. <link href="/nwyj/scripts/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  13. <link rel="stylesheet" type="text/css" id="skin" prePath="/nwyj/scripts/qui/" scrollerY="false"/>
  14. <link rel="stylesheet" type="text/css" id="customSkin"/>
  15. <script src="/nwyj/scripts/qui/libs/js/table/quiGrid.js" type="text/javascript"></script>
  16. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/util.js"></script>
  17. <!-- <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/webgis/js/gisgrid.css"> -->
  18. <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/cockpit_layout/icon.css">
  19. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/util.js"></script>
  20. <!-- <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/webgis/js/jsc_grid.css"> -->
  21. <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/webgis/js/jsc_grid_main.css">
  22. </head>
  23. <body>
  24. <div id="i_page_hed" class="c_page_hed" >
  25. </div>
  26. <div id="i_page_grid_content" class="c_page_grid_content">
  27. <div id="i_page_grid" class="c_page_grid"></div>
  28. </div>
  29. <style>
  30. .c_page_hed{
  31. background-color: inherit;
  32. }
  33. .item_a{
  34. color: #ffffff;
  35. }
  36. .flag_span{
  37. width: 14px;
  38. height: 14px;
  39. display: inline-block;
  40. border-radius: 15px;
  41. }
  42. .flag_span1{
  43. width: 16px;
  44. height: 16px;
  45. display: inline-block;
  46. border-radius: 15px;
  47. background-image: url(/nwyj/scripts/qui/libs/icons/yujing_1.png);
  48. background-repeat: no-repeat;
  49. background-size: 18px;
  50. background-position: -1px;
  51. }
  52. .l-grid-body{overflow-x:hidden; }
  53. </style>
  54. <script type="text/javascript">
  55. var utils=new Util();
  56. var grid=null;
  57. var urlParams=utils.resolveUrl();
  58. var comp_id=urlParams["dept_id"];
  59. var columns=[{ display: "单位", name: "dept_name", align: "center", width: "20%",data:"",render:function(rowdata, rowindex, value, column){
  60. var str=value.replace(/供电局/g,"局");
  61. str=str.replace(/供电所/g,"所");
  62. return str;
  63. }},
  64. { display: "预警", name: "预警", align: "center",columns:[
  65. { display: "红", name: "red", align: "center",width: "10%",data:"0|35", render:showMsg },
  66. { display: "橙", name: "orange", align: "center",width: "10%",data:"0|36", render:showMsg },
  67. { display: "黄", name: "yellow", align: "center",width: "10%",data:"0|37" , render:showMsg },
  68. { display: "蓝", name: "blue", align: "center",width: "10%",data:"0|38", render:showMsg }
  69. ]},
  70. { display: "响应", name: "响应", align: "center",columns:[
  71. { display: "Ⅰ", name: "response1",iconclass:".yujing_1", align: "center",width: "10%",data:"1|29" , render:showMsg },
  72. { display: "Ⅱ", name: "response2",iconclass:".yujing_1", align: "center",width: "10%",data:"1|30" , render:showMsg },
  73. { display: "Ⅲ", name: "response3",iconclass:".yujing_1", align: "center",width: "10%",data:"1|31" , render:showMsg },
  74. { display: "Ⅳ", name: "response4",iconclass:".yujing_1", align: "center",width: "10%",data:"1|32" , render:showMsg }
  75. ]}
  76. ];
  77. var options={
  78. columns:columns,
  79. url:"/nwyj/ws/cockpit/CockpitService/getEmergencyResponseStatistics",
  80. params: [{name:"comp",value:comp_id}],
  81. pageSize:15,
  82. usePager:false,
  83. height:"100%",
  84. method: "post",
  85. width:"100%",
  86. /* usePager : true, */
  87. isScroll: true,
  88. percentWidthMode : false,
  89. alternatingRow: false,
  90. rowAttrRender: function(rowdata, rowindex, rowid){
  91. return rowdata["__index"] % 2 == 0 ? "style='background-color:rgb(44,51,79);'" : "style='background-color:rgb(34,40,62);'" ;
  92. }
  93. };
  94. $(function(){
  95. grid=$("#i_page_grid").quiGrid(options);
  96. //bindEvent();
  97. setTitle();
  98. close();
  99. });
  100. function getCColor(culum1){
  101. if(culum1 == "Ⅰ"||culum1 == "Ⅱ"||culum1 == "Ⅲ"||culum1 == "Ⅳ")
  102. return "#000";
  103. //culum1 == "Ⅰ"||culum1 == "Ⅱ"||culum1 == "Ⅲ"||culum1 == "Ⅳ"
  104. if(culum1 == "红"){
  105. return "red";
  106. }else
  107. if(culum1 == "黄"){
  108. return "yellow";
  109. }
  110. if(culum1 == "橙"){
  111. return "orange";
  112. }
  113. if(culum1 == "蓝"){
  114. return "blue";
  115. }
  116. }
  117. function showMsg(rowdata,rowindex,value,column){
  118. //alert(JSON.stringify(rowdata.dept_name));
  119. if(value=="0"){
  120. return "";
  121. }else{
  122. var ccolor = getCColor(column.display);
  123. if("#000"==ccolor){
  124. if(rowdata.dept_name=="总计"){
  125. return '<a class = "item_a" href="javascript:void(0)" '
  126. + 'onclick=showDetail("'
  127. + rowdata.dept_name + '","' //取这一行所属单位名字
  128. + rowdata.dept_id+ '","'
  129. + column.display+ '","'
  130. + column.data+ '","'
  131. + value+'")><span class = "flag_span">'+value+'</span></a>';
  132. }else{
  133. return '<a class = "item_a" href="javascript:void(0)" '
  134. + 'onclick=showDetail("'
  135. + rowdata.dept_name + '","' //取这一行所属单位名字
  136. + rowdata.dept_id+ '","'
  137. + column.display+ '","'
  138. + column.data+ '","'
  139. + value+'")><span class = "flag_span1"></span></a>';
  140. //+ value+'")><span class = "flag_span1"></span><span>'+value+'</span></a>';
  141. }
  142. }else{
  143. if(rowdata.dept_name=="总计"){
  144. return '<div style="text-align: center"><a class = "item_a" href="javascript:void(0)" '
  145. + 'onclick=showDetail("'
  146. + rowdata.dept_name + '","' //取这一行所属单位名字
  147. + rowdata.dept_id+ '","'
  148. + column.display+ '","'
  149. + column.data+ '","'
  150. //+ value+'")><span class = "flag_span" style = " background-color: '+ccolor+';"></span><span>'+value+'</span></a></div>';
  151. + value+'")><span class = "flag_span" >'+value+'</span></a></div>';
  152. }else{
  153. return '<div style="text-align: center"><a class = "item_a" href="javascript:void(0)" '
  154. + 'onclick=showDetail("'
  155. + rowdata.dept_name + '","' //取这一行所属单位名字
  156. + rowdata.dept_id+ '","'
  157. + column.display+ '","'
  158. + column.data+ '","'
  159. //+ value+'")><span class = "flag_span" style = " background-color: '+ccolor+';"></span><span>'+value+'</span></a></div>';
  160. + value+'")><span class = "flag_span" style = " background-color: '+ccolor+';"></span></a></div>';
  161. }
  162. }
  163. ccolor = null;
  164. }
  165. }
  166. function showDetail(dept_name,dept_id,name,data,value){
  167. var arr = null;
  168. var is_huizong = false;
  169. if(data!=""){
  170. arr = data.split("|");
  171. }
  172. if(dept_name == "总计"){
  173. dept_name = "本单位所有";
  174. is_huizong = true;
  175. }
  176. var pathStr="/nwyj/page/cockpit/echart_maticView/Emergency_response_statistics/details.html?dept_name="+dept_name+"&is_huizong="+is_huizong+"&dept_id="+dept_id+"&name="+name+"&is_alert="+arr[0]+"&level="+arr[1];
  177. utils.openIframe(pathStr);
  178. }
  179. function setTitle(){
  180. //$("#i_page_hed").text("预警与响应统计");
  181. $("#i_page_hed").text("当前预警/响应状态");
  182. }
  183. $(window).resize(function(){
  184. grid=$("#i_page_grid").quiGrid(options);
  185. });
  186. </script>
  187. </body>
  188. </html>