123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>预警与响应统计</title>
- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/context.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/framework.js"></script>
- <link href="/nwyj/scripts/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
- <link rel="stylesheet" type="text/css" id="skin" prePath="/nwyj/scripts/qui/" scrollerY="false"/>
- <link rel="stylesheet" type="text/css" id="customSkin"/>
- <script src="/nwyj/scripts/qui/libs/js/table/quiGrid.js" type="text/javascript"></script>
- <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/util.js"></script>
- <!-- <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/webgis/js/gisgrid.css"> -->
- <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/cockpit_layout/icon.css">
- <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/util.js"></script>
- <!-- <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/webgis/js/jsc_grid.css"> -->
- <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/webgis/js/jsc_grid_main.css">
-
- </head>
-
- <body>
- <div id="i_page_hed" class="c_page_hed" >
- </div>
- <div id="i_page_grid_content" class="c_page_grid_content">
- <div id="i_page_grid" class="c_page_grid"></div>
- </div>
- <style>
- .c_page_hed{
- background-color: inherit;
- }
- .item_a{
- color: #ffffff;
- }
- .flag_span{
- width: 14px;
- height: 14px;
- display: inline-block;
- border-radius: 15px;
- }
- .flag_span1{
- width: 16px;
- height: 16px;
- display: inline-block;
- border-radius: 15px;
- background-image: url(/nwyj/scripts/qui/libs/icons/yujing_1.png);
- background-repeat: no-repeat;
- background-size: 18px;
- background-position: -1px;
- }
- .l-grid-body{overflow-x:hidden; }
-
-
- </style>
- <script type="text/javascript">
- var utils=new Util();
- var grid=null;
-
- var urlParams=utils.resolveUrl();
- var comp_id=urlParams["dept_id"];
- var columns=[{ display: "单位", name: "dept_name", align: "center", width: "20%",data:"",render:function(rowdata, rowindex, value, column){
- var str=value.replace(/供电局/g,"局");
- str=str.replace(/供电所/g,"所");
- return str;
- }},
- { display: "预警", name: "预警", align: "center",columns:[
- { display: "红", name: "red", align: "center",width: "10%",data:"0|35", render:showMsg },
- { display: "橙", name: "orange", align: "center",width: "10%",data:"0|36", render:showMsg },
- { display: "黄", name: "yellow", align: "center",width: "10%",data:"0|37" , render:showMsg },
- { display: "蓝", name: "blue", align: "center",width: "10%",data:"0|38", render:showMsg }
- ]},
- { display: "响应", name: "响应", align: "center",columns:[
- { display: "Ⅰ", name: "response1",iconclass:".yujing_1", align: "center",width: "10%",data:"1|29" , render:showMsg },
- { display: "Ⅱ", name: "response2",iconclass:".yujing_1", align: "center",width: "10%",data:"1|30" , render:showMsg },
- { display: "Ⅲ", name: "response3",iconclass:".yujing_1", align: "center",width: "10%",data:"1|31" , render:showMsg },
- { display: "Ⅳ", name: "response4",iconclass:".yujing_1", align: "center",width: "10%",data:"1|32" , render:showMsg }
- ]}
- ];
-
- var options={
- columns:columns,
- url:"/nwyj/ws/cockpit/CockpitService/getEmergencyResponseStatistics",
- params: [{name:"comp",value:comp_id}],
- pageSize:15,
- usePager:false,
- height:"100%",
- method: "post",
- width:"100%",
- /* usePager : true, */
- isScroll: true,
- percentWidthMode : false,
- alternatingRow: false,
- rowAttrRender: function(rowdata, rowindex, rowid){
- return rowdata["__index"] % 2 == 0 ? "style='background-color:rgb(44,51,79);'" : "style='background-color:rgb(34,40,62);'" ;
- }
- };
- $(function(){
-
- grid=$("#i_page_grid").quiGrid(options);
- //bindEvent();
- setTitle();
- close();
- });
-
- function getCColor(culum1){
- if(culum1 == "Ⅰ"||culum1 == "Ⅱ"||culum1 == "Ⅲ"||culum1 == "Ⅳ")
- return "#000";
- //culum1 == "Ⅰ"||culum1 == "Ⅱ"||culum1 == "Ⅲ"||culum1 == "Ⅳ"
- if(culum1 == "红"){
- return "red";
- }else
- if(culum1 == "黄"){
- return "yellow";
- }
- if(culum1 == "橙"){
- return "orange";
- }
- if(culum1 == "蓝"){
- return "blue";
- }
- }
-
- function showMsg(rowdata,rowindex,value,column){
- //alert(JSON.stringify(rowdata.dept_name));
- if(value=="0"){
- return "";
- }else{
- var ccolor = getCColor(column.display);
- if("#000"==ccolor){
- if(rowdata.dept_name=="总计"){
- return '<a class = "item_a" href="javascript:void(0)" '
- + 'onclick=showDetail("'
- + rowdata.dept_name + '","' //取这一行所属单位名字
- + rowdata.dept_id+ '","'
- + column.display+ '","'
- + column.data+ '","'
- + value+'")><span class = "flag_span">'+value+'</span></a>';
- }else{
- return '<a class = "item_a" href="javascript:void(0)" '
- + 'onclick=showDetail("'
- + rowdata.dept_name + '","' //取这一行所属单位名字
- + rowdata.dept_id+ '","'
- + column.display+ '","'
- + column.data+ '","'
- + value+'")><span class = "flag_span1"></span></a>';
- //+ value+'")><span class = "flag_span1"></span><span>'+value+'</span></a>';
- }
-
- }else{
- if(rowdata.dept_name=="总计"){
- return '<div style="text-align: center"><a class = "item_a" href="javascript:void(0)" '
- + 'onclick=showDetail("'
- + rowdata.dept_name + '","' //取这一行所属单位名字
- + rowdata.dept_id+ '","'
- + column.display+ '","'
- + column.data+ '","'
- //+ value+'")><span class = "flag_span" style = " background-color: '+ccolor+';"></span><span>'+value+'</span></a></div>';
- + value+'")><span class = "flag_span" >'+value+'</span></a></div>';
- }else{
- return '<div style="text-align: center"><a class = "item_a" href="javascript:void(0)" '
- + 'onclick=showDetail("'
- + rowdata.dept_name + '","' //取这一行所属单位名字
- + rowdata.dept_id+ '","'
- + column.display+ '","'
- + column.data+ '","'
- //+ value+'")><span class = "flag_span" style = " background-color: '+ccolor+';"></span><span>'+value+'</span></a></div>';
- + value+'")><span class = "flag_span" style = " background-color: '+ccolor+';"></span></a></div>';
- }
-
- }
- ccolor = null;
- }
- }
-
- function showDetail(dept_name,dept_id,name,data,value){
-
- var arr = null;
- var is_huizong = false;
- if(data!=""){
- arr = data.split("|");
- }
- if(dept_name == "总计"){
- dept_name = "本单位所有";
- is_huizong = true;
- }
- 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];
- utils.openIframe(pathStr);
- }
-
- function setTitle(){
- //$("#i_page_hed").text("预警与响应统计");
- $("#i_page_hed").text("当前预警/响应状态");
- }
-
- $(window).resize(function(){
- grid=$("#i_page_grid").quiGrid(options);
- });
- </script>
-
-
-
- </body>
- </html>
|