7dbd31664e8a06b2694f54edd395120977d6f71c.svn-base 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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/qui/libs/js/jquery.js"></script>
  8. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/context.js"></script>
  9. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/echarts.min.js"></script>
  10. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/echarts-all.min.js"></script>
  11. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/chart/line.js"></script>
  12. <script type="text/javascript" src=" /nwyj/page/cockpit/cockpit_echart.js"></script>
  13. <!-- <script type="text/javascript" src=" /nwyj/page/cockpit/webgis/util.js"></script> -->
  14. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/util.js"></script>
  15. <link rel="stylesheet" type="text/css" href=" /nwyj/css/cockpit/commom/ehcartPage.css" />
  16. <!--框架必需start 扁平风格-->
  17. <link href="/nwyj/scripts/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  18. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  19. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
  20. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/framework.js"></script>
  21. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
  22. <!--框架必需end-->
  23. <!--树组件start-->
  24. <link rel="stylesheet" type="text/css" href="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.css" />
  25. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
  26. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/selectTree.js"></script>
  27. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/listerTree.js"></script>
  28. <!--树组件end-->
  29. <!--自动提示框start-->
  30. <script type='text/javascript' src='/nwyj/scripts/qui/libs/js/form/suggestion.js'></script>
  31. <!--自动提示框end-->
  32. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/datePicker/WdatePicker.js"></script>
  33. <!-- 日期选择框start -->
  34. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/datePicker/WdatePicker.js"></script>
  35. <!-- 日期选择框end -->
  36. <!-- 驾驶舱与首页显示的样式 star -->
  37. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/cockpitANDmainIndex.js"></script>
  38. <!-- 驾驶舱与首页显示的样式 end -->
  39. <script type="text/javascript" src="/nwyj/scripts/cockpit/search/public_search_char.js"></script>
  40. <link rel="stylesheet" type="text/css" href="/nwyj/css/cockpit/search/char_search.css">
  41. <script type='text/javascript' src='/nwyj/dwr/engine.js'></script>
  42. <script type='text/javascript' src='/nwyj/dwr/util.js'></script>
  43. <script type="text/javascript" src="/nwyj/scripts/cockpit/search/search_util.js"></script>
  44. </head>
  45. <body onload="dwr.engine.setActiveReverseAjax(true);dwr.engine.setNotifyServerOnPageUnload(true);">
  46. <div id="i_page_main" class="c_page_main">
  47. <div id="i_page_head" class="c_page_head">
  48. <div id="i_page_head_title">
  49. </div>
  50. <div id="i_page_head_subtitle"></div>
  51. </div>
  52. <div id="triangleOut" class="triangle"></div>
  53. <div id="searchByTime" class="sbt">
  54. <span>开始时间:</span><input type="text" id="beginTime" class="date dt" dateFmt="yyyy-MM-dd"/>
  55. <!-- <span>开始时间:</span><input type="text" id="beginTime" class="date dt" style="width:185px;" dateFmt="yyyy-MM-dd HH:mm:ss"/> -->
  56. <br>
  57. <span>截止时间:</span><input type="text" id="endTime" class="date dt" dateFmt="yyyy-MM-dd"/>
  58. <!-- <span>截止时间:</span><input type="text" id="endTime" class="date dt" style="width:185px;" dateFmt="yyyy-MM-dd HH:mm:ss"/> -->
  59. <br>
  60. <div class="sb"><button id="search">查询</button></div>
  61. <div class="triangleIn"></div>
  62. </div>
  63. <div id="i_page_chart" class="c_page_chart">
  64. </div>
  65. </div>
  66. <script type="text/javascript">
  67. var pageParam={};
  68. var chart=null;
  69. var utils=new Util();
  70. var searchUtil = new SearchUtil();
  71. $(function(){
  72. pageParam.style=utils.resolveUrl()["style"]||"style1";
  73. pageParam.title=utils.resolveUrl()["title"]||"广东电网";
  74. pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
  75. pageParam.parentId=utils.resolveUrl()["dept_id"]||"11";
  76. pageParam.startTime=start;
  77. pageParam.endTime=end;
  78. pageParam.isalert=null;
  79. if(pageParam.number.split("|")[0]=="预警"){
  80. pageParam.isalert="0";
  81. }else{
  82. pageParam.isalert="1";
  83. }
  84. pageParam.number=pageParam.number.split("|")[1];
  85. init();
  86. });
  87. function init(){
  88. if(utils.resolveUrl().dataSourceState==0){
  89. loadChart(pageParam);
  90. }else{
  91. changeSysDataLoadChart(pageParam);
  92. }
  93. }
  94. function loadChart(jsonParam){
  95. setTitle();
  96. $.post("/nwyj/ws/ChartServiceImpl/ChartServiceImpl/getCompResentNRecodesInfo",{charType:"shebeisousun",sepratestr:"-",name:"getProiedRecodesAfterNumber",parentId:jsonParam.parentId,start:jsonParam.startTime,end:jsonParam.endTime,isalert:pageParam.isalert,number:pageParam.number,viewName:"REPORT_LINE_DAOGAN_VIEW-REPORT_LINE_DAOGAN_VIEW"},function(result){
  97. if(result.rows.length==0){
  98. zeroChartIntoParam("暂无填报数据");
  99. return;
  100. }
  101. veriColor();
  102. removeNoData();
  103. var sArr=[{type:"line",name:"主网",data:[],
  104. itemStyle: {
  105. normal: {
  106. color:pageStyle[jsonParam.style]["chartColor"][0],
  107. label:{show:true,
  108. position:"top",
  109. textStyle:{color: "rgb(255, 255, 255)",fontSize: 14,fontStyle: "normal",fontWeight: "bold"}
  110. }
  111. }
  112. }
  113. },
  114. {type:"line",name:"配网",data:[],
  115. itemStyle: {
  116. normal: {
  117. color:pageStyle[jsonParam.style]["chartColor"][1],
  118. label:{show:true,
  119. position:"top",
  120. textStyle:{color: "rgb(255, 255, 255)",fontSize: 14,fontStyle: "normal",fontWeight: "bold"}
  121. }
  122. }
  123. }
  124. }];
  125. var xAxis=[];
  126. /* var tempArr= result.rows.sort(sortFn); */
  127. var data=result.rows[0];
  128. //alert(JSON.stringify(data));
  129. for(var index=0,len=result.rows.length;index<len;index++){
  130. var item=result.rows[index];
  131. var main=utils.changeQ(item["main"])/* +utils.changeQ(item["PLON_BIANXING_500"])+utils.changeQ(item["PLON_DAOTA_200"])+utils.changeQ(item["PLON_BIANXING_200"])+utils.changeQ(item["PLON_DAOTA_110"])+
  132. utils.changeQ(item["PLON_BIANXING_110"])+utils.changeQ(item["DUANGAN_110"])+utils.changeQ(item["DIANGAN_QIGNXIE_110"])+utils.changeQ(item["PLON_DAOTA_35"])+utils.changeQ(item["PLON_BIANXING_35"])+
  133. utils.changeQ(item["DUANGAN_35"])+utils.changeQ(item["DAOGAN_35"])+utils.changeQ(item["DIANGAN_QIGNXIE_35"]); */
  134. var help=utils.changeQ(item["help"])/* +utils.changeQ(item["PLON_BIANXING_10"])+utils.changeQ(item["DUANGAN_10"])+utils.changeQ(item["DIANGAN_QIGNXIE_10"])+utils.changeQ(item["DAUNGAN_DIYA"])+
  135. utils.changeQ(item["DAOGAN_DIYA"])+utils.changeQ(item["DAOGAN_DIYA"])+utils.changeQ(item["QINGGAN_DIYA"]); */
  136. //sArr[0].data.push(main);
  137. //sArr[1].data.push(help);
  138. //alert(item["APPEAR_TIME"]);
  139. //xAxis.push(item["APPEAR_TIME"]);
  140. sArr[0].data.push(main);
  141. sArr[1].data.push(help);
  142. var time = item["APPEAR_TIME"];
  143. var dt = new Date(time.replace(/-/,"/"));
  144. //alert(dt.getFullYear()+"-"+(dt.getMonth()+1)+"-"+dt.getDate() +" "+dt.getHours()+":"+dt.getMinutes());
  145. //xAxis.push(dt.getFullYear()+"-"+(dt.getMonth()+1)+"-"+dt.getDate() +" "+dt.getHours()+":"+dt.getMinutes());
  146. xAxis.push(dt.getFullYear()+"-"+(dt.getMonth()+1)+"-"+dt.getDate() +" "+dt.getHours()+"时");
  147. }
  148. /* var tempArr= result.rows.sort(sortFn); */
  149. pageParam.opParams={
  150. //title:""/* "停运最多时间:"+tempArr[0]["sum"] */,//标题
  151. title:"起始时间:"+item["SEND_TIME"]+":00"+"\n截至时间:"+item["APPEAR_TIME"],//标题
  152. subtext:""/* (result["max"]["DEPT_NAME"] || "广东")+(result["max"]["sum"] || "100") */,
  153. saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
  154. unit:"座",//单位
  155. leArr:["主网","配网"],//图例
  156. xAxis:xAxis,//x轴
  157. sArr:sArr,//主数据
  158. trigger:"axis",
  159. value:"value",
  160. legendColor:legendC,
  161. xAxisColor:xAxisC,
  162. yAxisColor:yAxisC
  163. };
  164. chart=getEchart($("#i_page_chart"),getOption,pageParam.opParams,null);
  165. bindEvent();
  166. },"json");
  167. }
  168. /**
  169. *设置标题
  170. */
  171. function setTitle(){
  172. $("#i_page_head_title").find("h2").remove();
  173. if(pageParam.title=="广东电网有限责任公司"){
  174. pageParam.title="广东电网公司";
  175. }
  176. $("#i_page_head_title").append("<h2>"+pageParam.title+"主配网设备受损曲线</h2>");
  177. }
  178. function bindEvent(){
  179. $(window).resize(function(){
  180. chart.resize();
  181. });
  182. }
  183. /*dwr推送人工数据方法 */
  184. function dwrData(number){
  185. if(0!=top.dataSourceState) return;
  186. // if(number== pageParam.number){
  187. loadChart(pageParam);
  188. // }
  189. }
  190. /*dwr推送系统数据方法 */
  191. function dwrSysData(number){
  192. if(1!=top.dataSourceState) return;
  193. //如果需要关联通知单,放开注释即可
  194. // if(number== pageParam.number){
  195. changeSysData(pageParam);
  196. // }
  197. }
  198. /**********************************************************************************************/
  199. function changeSysData(number){
  200. pageParam.number=number;
  201. changeSysDataLoadChart(pageParam)
  202. }
  203. function changeSysDataLoadChart(jsonParam){
  204. setTitle();
  205. if("8F6F2D6B24494CB6B1F1E0931E7AF87D"!= jsonParam.parentId){
  206. zeroChartIntoParam("本单位未提供系统数据源");
  207. return;
  208. }
  209. $.post("/nwyj/ws/SystemDataSourceChartServiceImpl/SystemDataSourceChartServiceImpl/getDaoGanReportDeptByPeroidInfo",
  210. {compId:jsonParam.parentId,startTime:jsonParam.startTime,endTime:jsonParam.endTime},function(result){
  211. if(result.rows.length==0){
  212. zeroChartIntoParam("目前此时间段内尚无推送关联数据");
  213. return;
  214. }
  215. veriColor();
  216. removeNoData();
  217. var sArr=[{type:"line",name:"主网",data:[],
  218. itemStyle: {
  219. normal: {color:pageStyle[jsonParam.style]["chartColor"][0]}}
  220. },
  221. {type:"line",name:"配网",data:[],
  222. itemStyle: {
  223. normal: {color:pageStyle[jsonParam.style]["chartColor"][1]}}
  224. }];
  225. var xAxis=[];
  226. /* var tempArr= result.rows.sort(sortFn); */
  227. var data=result.rows[0];
  228. for(var index=0,len=result.rows.length;index<len;index++){
  229. var item=result.rows[index];
  230. var main=utils.changeQ(item["main"])/* +utils.changeQ(item["PLON_BIANXING_500"])+utils.changeQ(item["PLON_DAOTA_200"])+utils.changeQ(item["PLON_BIANXING_200"])+utils.changeQ(item["PLON_DAOTA_110"])+
  231. utils.changeQ(item["PLON_BIANXING_110"])+utils.changeQ(item["DUANGAN_110"])+utils.changeQ(item["DIANGAN_QIGNXIE_110"])+utils.changeQ(item["PLON_DAOTA_35"])+utils.changeQ(item["PLON_BIANXING_35"])+
  232. utils.changeQ(item["DUANGAN_35"])+utils.changeQ(item["DAOGAN_35"])+utils.changeQ(item["DIANGAN_QIGNXIE_35"]); */
  233. var help=utils.changeQ(item["help"])/* +utils.changeQ(item["PLON_BIANXING_10"])+utils.changeQ(item["DUANGAN_10"])+utils.changeQ(item["DIANGAN_QIGNXIE_10"])+utils.changeQ(item["DAUNGAN_DIYA"])+
  234. utils.changeQ(item["DAOGAN_DIYA"])+utils.changeQ(item["DAOGAN_DIYA"])+utils.changeQ(item["QINGGAN_DIYA"]); */
  235. sArr[0].data.push(main);
  236. sArr[1].data.push(help);
  237. var time = item["APPEAR_TIME"];
  238. var dt = new Date(time.replace(/-/,"/"));
  239. //alert(dt.getFullYear()+"-"+(dt.getMonth()+1)+"-"+dt.getDate() +" "+dt.getHours()+":"+dt.getMinutes());
  240. xAxis.push(dt.getFullYear()+"-"+(dt.getMonth()+1)+"-"+dt.getDate() +" "+dt.getHours()+":"+dt.getMinutes());
  241. }
  242. /* var tempArr= result.rows.sort(sortFn); */
  243. pageParam.opParams={
  244. title:"截止时间:"+subDate(data["APPEAR_TIME"]),//标题
  245. subtext:""/* (result["max"]["DEPT_NAME"] || "广东")+(result["max"]["sum"] || "100") */,
  246. saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
  247. unit:"座",//单位
  248. leArr:["主网","配网"],//图例
  249. xAxis:xAxis,//x轴
  250. sArr:sArr,//主数据
  251. trigger:"axis",
  252. value:"value",
  253. legendColor:legendC,
  254. xAxisColor:xAxisC,
  255. yAxisColor:yAxisC
  256. };
  257. chart=getEchart($("#i_page_chart"),getOption,pageParam.opParams,null);
  258. setTitle();
  259. bindEvent();
  260. },"json");
  261. }
  262. function subStrDate(strDate){
  263. strDate=strDate.substring(strDate.indexOf(":")+1,strDate.indexOf("."));
  264. return strDate;
  265. }
  266. function subDate(str){
  267. if(str==null || str==undefined) return "-";
  268. return str.substring(0,str.indexOf("."));
  269. }
  270. </script>
  271. </body>
  272. </html>