f09816e4189f3ca76a457ecd6e3e0bd331778f04.svn-base 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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. <meta http-equiv="Content-Type" content="text/html; charset=utf-9" />
  8. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  9. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/context.js"></script>
  10. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/echarts.min.js"></script>
  11. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/echarts-all.min.js"></script>
  12. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/chart/line.js"></script>
  13. <script type="text/javascript" src=" /nwyj/page/cockpit/cockpit_echart.js"></script>
  14. <!-- <script type="text/javascript" src=" /nwyj/page/cockpit/webgis/util.js"></script> -->
  15. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/util.js"></script>
  16. <link rel="stylesheet" type="text/css" href=" /nwyj/css/cockpit/commom/ehcartPage.css" />
  17. <!--框架必需start 扁平风格-->
  18. <link href="/nwyj/scripts/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  19. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  20. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
  21. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/framework.js"></script>
  22. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
  23. <!--框架必需end-->
  24. <!--树组件start-->
  25. <link rel="stylesheet" type="text/css" href="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.css" />
  26. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
  27. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/selectTree.js"></script>
  28. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/listerTree.js"></script>
  29. <!--树组件end-->
  30. <!--自动提示框start-->
  31. <script type='text/javascript' src='/nwyj/scripts/qui/libs/js/form/suggestion.js'></script>
  32. <!--自动提示框end-->
  33. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/datePicker/WdatePicker.js"></script>
  34. <!-- 日期选择框start -->
  35. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/datePicker/WdatePicker.js"></script>
  36. <!-- 日期选择框end -->
  37. <!-- 驾驶舱与首页显示的样式 star -->
  38. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/cockpitANDmainIndex.js"></script>
  39. <!-- 驾驶舱与首页显示的样式 end -->
  40. <script type="text/javascript" src="/nwyj/scripts/cockpit/search/public_search_char.js"></script>
  41. <link rel="stylesheet" type="text/css" href="/nwyj/css/cockpit/search/char_search.css">
  42. <!-- dwr 实现消息推送功能 star-->
  43. <script type='text/javascript' src='/nwyj/dwr/engine.js'></script>
  44. <script type='text/javascript' src='/nwyj/dwr/util.js'></script>
  45. <!-- dwr 实现消息推送功能 end-->
  46. <!-- 驾驶舱与首页显示的样式 star -->
  47. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/cockpitANDmainIndex.js"></script>
  48. <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/system/right/ReSetIdxHeight.js"></script>
  49. <!-- 驾驶舱与首页显示的样式 end -->
  50. <script type="text/javascript" src="/nwyj/scripts/cockpit/search/search_util.js"></script>
  51. </head>
  52. <body onload="dwr.engine.setActiveReverseAjax(true);dwr.engine.setNotifyServerOnPageUnload(true);">
  53. <!-- <body > -->
  54. <div id="i_page_main" class="c_page_main" >
  55. <div id="i_page_head" class="c_page_head">
  56. <div id="i_page_head_title">
  57. </div>
  58. <div id="i_page_head_subtitle"></div>
  59. </div>
  60. <div id="triangleOut" class="triangle"></div>
  61. <div id="searchByTime" class="sbt">
  62. <span>开始时间:</span><input type="text" id="beginTime" class="date dt" dateFmt="yyyy-MM-dd"/>
  63. <br>
  64. <span>结束时间:</span><input type="text" id="endTime" class="date dt" dateFmt="yyyy-MM-dd"/>
  65. <br>
  66. <div class="sb"><button id="search">查询</button></div>
  67. <div class="triangleIn"></div>
  68. </div>
  69. <div id="i_page_chart" class="c_page_chart">
  70. </div>
  71. </div>
  72. <script type="text/javascript">
  73. var pageParam={};
  74. var chart=null;
  75. var utils=new Util();
  76. var searchUtil = new SearchUtil();
  77. $(function(){
  78. pageParam.style=utils.resolveUrl()["style"]||"style1";
  79. pageParam.title=utils.resolveUrl()["title"]||"广东电网";
  80. pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
  81. pageParam.parentId=utils.resolveUrl()["dept_id"]||"11";
  82. pageParam.startTime=start;
  83. pageParam.endTime=end;
  84. pageParam.isalert=null;
  85. if(pageParam.number.split("|")[0]=="预警"){
  86. pageParam.isalert="0";
  87. }else{
  88. pageParam.isalert="1";
  89. }
  90. pageParam.number=pageParam.number.split("|")[1];
  91. init();
  92. //首页里面加载Iframe展开方法
  93. setIframe(iframModuleID);
  94. });
  95. function init(){
  96. if(utils.resolveUrl().dataSourceState==0){
  97. loadChart(pageParam);
  98. }else{
  99. changeSysDataLoadChart(pageParam);
  100. }
  101. }
  102. function loadChart(jsonParam){
  103. setTitle();
  104. $.post("/nwyj/ws/ChartServiceImpl/ChartServiceImpl/getCompResentNRecodesInfo",{charType:"xianlutiaozha",sepratestr:"-",name:"getProiedRecodesAfterNumber",parentId:jsonParam.parentId,start:jsonParam.startTime,end:jsonParam.endTime,number:pageParam.number,isalert:pageParam.isalert,viewName:"ROUTE_OFLINE_RESTORE_VIEW-ROUTE_OFLINE_RESTORE_VIEW"},function(result){
  105. if(result.rows.length==0){
  106. zeroChartIntoParam("暂无填报数据");
  107. return;
  108. }
  109. veriColor();
  110. removeNoData();
  111. var sArr=[{type:"line",name:"跳闸数",data:[],
  112. itemStyle: {
  113. normal: {color:pageStyle[jsonParam.style]["chartColor"][0],
  114. label:{show:true,
  115. position:"top"
  116. }}}
  117. },
  118. {type:"line",name:"未恢复",data:[],
  119. itemStyle: {
  120. normal: {color:pageStyle[jsonParam.style]["chartColor"][1],
  121. label:{show:true,
  122. position:"top"
  123. }}}
  124. }
  125. ];
  126. var xAxis=[];
  127. var data=result.rows[0];
  128. for(var index=0,len=result.rows.length;index<len;index++){
  129. var item=result.rows[index];
  130. var sum=utils.changeQ(item["sum"]);
  131. var un=utils.changeQ(item["unsum"]);
  132. sArr[0].data.push(sum);
  133. sArr[1].data.push(un);
  134. xAxis.push(item["APPEAR_TIME"]);
  135. }
  136. pageParam.opParams={
  137. title:"起始时间:"+item["SEND_TIME"]+":00"+"\n截至时间:"+item["APPEAR_TIME"],//标题
  138. /* title:"截止时间:"+item["APPEAR_TIME"],//标题
  139. subtext:"当前停运数:"+item["sum"]+" (条)", */
  140. saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
  141. unit:"条",//单位
  142. leArr:["跳闸数","未恢复"],//图例
  143. xAxis:xAxis,//x轴
  144. sArr:sArr,//主数据
  145. trigger:"axis",
  146. legendColor:legendC,
  147. xAxisColor:xAxisC,
  148. yAxisColor:yAxisC
  149. };
  150. chart=getEchart($("#i_page_chart"),getOption,pageParam.opParams,null);
  151. bindEvent();
  152. },"json");
  153. }
  154. /**
  155. *设置标题
  156. */
  157. function setTitle(){
  158. $("#i_page_head_title").find("h2").remove();
  159. if(pageParam.title=="广东电网有限责任公司"){
  160. pageParam.title="广东电网公司";
  161. }
  162. $("#i_page_head_title").append("<h2>"+pageParam.title+"线路跳闸曲线</h2>");
  163. }
  164. function bindEvent(){
  165. $(window).resize(function(){
  166. chart.resize();
  167. });
  168. }
  169. /*dwr推送人工数据方法 */
  170. function dwrData(number){
  171. if(0!=top.dataSourceState) return;
  172. loadChart(pageParam);
  173. }
  174. /*dwr推送系统数据方法 */
  175. function dwrSysData(number){
  176. if(1!=top.dataSourceState) return;
  177. changeSysData(pageParam);
  178. }
  179. /**********************************************************************************************************************/
  180. function changeSysData(number){
  181. pageParam.number=number;
  182. changeSysDataLoadChart(pageParam)
  183. }
  184. function changeSysDataLoadChart(jsonParam){
  185. setTitle();
  186. if("C984DC9C294A486096C25FAA78C99AED"!= jsonParam.parentId){
  187. zeroChartIntoParam("本单位未提供系统数据源");
  188. return;
  189. }
  190. $.post("/nwyj/ws/SystemDataSourceChartServiceImpl/SystemDataSourceChartServiceImpl/getLineTripStrendInfo",
  191. {compId:jsonParam.parentId,startTime:jsonParam.startTime,endTime:jsonParam.endTime},function(result){
  192. if(result.rows.length==0){
  193. zeroChartIntoParam("目前尚无推送数据");
  194. return;
  195. }
  196. veriColor();
  197. removeNoData();
  198. var sArr=[{type:"line",name:"主网跳闸数",data:[],
  199. itemStyle: {
  200. normal: {color:pageStyle[jsonParam.style]["chartColor"][0],
  201. label:{show:true,
  202. position:"top"
  203. }}}
  204. },
  205. {type:"line",name:"主网未恢复",data:[],
  206. itemStyle: {
  207. normal: {color:pageStyle[jsonParam.style]["chartColor"][1],
  208. label:{show:true,
  209. position:"top"
  210. }}}
  211. }
  212. ];
  213. var xAxis=[];
  214. var data=result.rows[0];
  215. if(result.rows.main.length==0){
  216. sArr[0].data.push("0");
  217. sArr[1].data.push("0");
  218. xAxis.push("0");
  219. }
  220. for(var index=0,len=result.rows.main.length;index<len;index++){
  221. var item=result.rows.main[index];
  222. var sum=utils.changeQ(item["mainT"]);
  223. var un=utils.changeQ(item["mainW"]);
  224. sArr[0].data.push(sum);
  225. sArr[1].data.push(un);
  226. xAxis.push(subDateTime(item["APPEAR_TIME"]));
  227. }
  228. pageParam.opParams={
  229. title:"",/* "截止时间:"+subDate(item["APPEAR_TIME"]) *///标题
  230. /* subtext:"当前停运数:"+item["sum"]+" (条)", */
  231. saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
  232. unit:"条",//单位
  233. leArr:["主网跳闸数","主网未恢复"],//图例
  234. xAxis:xAxis,//x轴
  235. sArr:sArr,//主数据
  236. trigger:"axis",
  237. legendColor:legendC,
  238. xAxisColor:xAxisC,
  239. yAxisColor:yAxisC
  240. };
  241. chart=getEchart($("#i_page_chart"),getOption,pageParam.opParams,null);
  242. bindEvent();
  243. },"json");
  244. }
  245. function subDateTime(dateStr){
  246. /* dateStr=dateStr.substring(dateStr.indexOf(":")+1,dateStr.indexOf(".")); */
  247. return dateStr;
  248. }
  249. function subDate(str){
  250. if(str==null || str==undefined) return "-";
  251. return str.substring(0,str.indexOf("."));
  252. }
  253. </script>
  254. </body>
  255. </html>