5fb4543122f283167c8884df1694d03f8d5ebde9.svn-base 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  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/scripts/cockpit/cockpitIndex/util.js"></script>
  14. <link rel="stylesheet" type="text/css" href=" /nwyj/css/cockpit/commom/ehcartPage.css" />
  15. <!--框架必需start 扁平风格-->
  16. <link href="/nwyj/scripts/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  17. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  18. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
  19. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/framework.js"></script>
  20. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
  21. <!--框架必需end-->
  22. <!--树组件start-->
  23. <link rel="stylesheet" type="text/css" href="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.css" />
  24. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
  25. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/selectTree.js"></script>
  26. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/listerTree.js"></script>
  27. <!--树组件end-->
  28. <!--打印开始 -->
  29. <script language="javascript" src="/nwyj/scripts/jquery/jqprint/jquery.jqprint-0.3.js"></script>
  30. <!--打印结束 -->
  31. <!--自动提示框start-->
  32. <script type='text/javascript' src='/nwyj/scripts/qui/libs/js/form/suggestion.js'></script>
  33. <!--自动提示框end-->
  34. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/datePicker/WdatePicker.js"></script>
  35. <!-- 日期选择框start -->
  36. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/datePicker/WdatePicker.js"></script>
  37. <!-- 日期选择框end -->
  38. <!-- 驾驶舱与首页显示的样式 star -->
  39. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/cockpitANDmainIndex.js"></script>
  40. <!-- 驾驶舱与首页显示的样式 end -->
  41. <!-- dwr 实现消息推送功能开始-->
  42. <script type='text/javascript' src='/nwyj/dwr/engine.js'></script>
  43. <script type='text/javascript' src='/nwyj/dwr/util.js'></script>
  44. <script type="text/javascript" src="/nwyj/scripts/cockpit/search/public_search_char.js"></script>
  45. <link rel="stylesheet" type="text/css" href="/nwyj/css/cockpit/search/char_search.css">
  46. <script type="text/javascript" src="/nwyj/scripts/cockpit/search/search_util.js"></script>
  47. </head>
  48. <body onload="dwr.engine.setActiveReverseAjax(true);dwr.engine.setNotifyServerOnPageUnload(true);">
  49. <div id="i_page_main" class="c_page_main">
  50. <div id="i_page_head" class="c_page_head">
  51. <div id="i_page_head_title">
  52. </div>
  53. <div id="i_page_head_subtitle"></div>
  54. </div>
  55. <div id="triangleOut" class="triangle"></div>
  56. <div id="searchByTime" class="sbt">
  57. <span>开始时间:</span><input type="text" id="beginTime" class="date dt" dateFmt="yyyy-MM-dd"/>
  58. <br>
  59. <span>结束时间:</span><input type="text" id="endTime" class="date dt" dateFmt="yyyy-MM-dd"/>
  60. <br>
  61. <div class="sb"><button id="search">查询</button></div>
  62. <div class="triangleIn"></div>
  63. </div>
  64. <div id="i_page_chart" class="c_page_chart">
  65. </div>
  66. </div>
  67. <script type="text/javascript">
  68. var pageParam={};
  69. var chart=null;
  70. var utils=new Util();
  71. var searchUtil = new SearchUtil();
  72. $(function(){
  73. pageParam.style=utils.resolveUrl()["style"]||"style1";
  74. pageParam.title=utils.resolveUrl()["title"]||"广东电网";
  75. pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
  76. pageParam.parentId=utils.resolveUrl()["dept_id"]||"11";
  77. pageParam.startTime=start;
  78. pageParam.endTime=end;
  79. pageParam.isalert=null;
  80. if(pageParam.number.split("|")[0]=="预警"){
  81. pageParam.isalert="0";
  82. }else{
  83. pageParam.isalert="1";
  84. }
  85. pageParam.number=pageParam.number.split("|")[1];
  86. init();
  87. });
  88. function init(){
  89. if(utils.resolveUrl().dataSourceState==0){
  90. loadChart(pageParam);
  91. }else{
  92. changeSysDataLoadChart1(pageParam);
  93. }
  94. }
  95. /* function printDom(){
  96. $("#i_page_chart").jqprint();
  97. } */
  98. function loadChart(jsonParam){
  99. setTitle();
  100. $.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){
  101. if(result.rows.length==0){
  102. zeroChartIntoParam("暂无填报数据");
  103. return;
  104. }
  105. veriColor();
  106. removeNoData();
  107. var sArr=[{type:"line",name:"主网",data:[],
  108. itemStyle: {
  109. normal: {
  110. color:pageStyle[jsonParam.style]["chartColor"][0],
  111. label:{show:true,
  112. position:"top"
  113. }
  114. }}},
  115. {type:"line",name:"配网",data:[],
  116. itemStyle: {
  117. normal: {
  118. color:pageStyle[jsonParam.style]["chartColor"][1],
  119. label:{show:true,
  120. position:"top"
  121. }
  122. }}
  123. }];
  124. var xAxis=[];
  125. var data=result.rows[0];
  126. for(var index=0,len=result.rows.length;index<len;index++){
  127. var item=result.rows[index];
  128. sArr[0].data.push(utils.changeQ(item["TRIP_OUT_ONE"])+utils.changeQ(item["TRIP_OUT_TWO"])+utils.changeQ(item["TRIP_OUT_THREE"])+utils.changeQ(item["TRIP_OUT_FOUR"]));
  129. sArr[1].data.push(utils.changeQ(item["TRIP_OUT_FIVE"]));
  130. xAxis.push(item["APPEAR_TIME"]);
  131. }
  132. jsonParam.opParams={
  133. title:"起始:"+item["SEND_TIME"]+":00"+" 截止:"+item["APPEAR_TIME"],//标题
  134. subtext:"当前停运数:"+item["sum"]+" (条)",
  135. saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
  136. unit:"条",//单位
  137. leArr:["主网","配网"],//图例
  138. xAxis:xAxis,//x轴
  139. sArr:sArr,//主数据
  140. trigger:"axis",
  141. value:"value",
  142. legendColor:legendC,
  143. xAxisColor:xAxisC,
  144. yAxisColor:yAxisC
  145. };
  146. chart=getEchart($("#i_page_chart"),getOption,jsonParam.opParams,null);
  147. $(window).resize(function(){
  148. chart.resize();
  149. });
  150. },"json");
  151. }
  152. function setTitle(){
  153. $("#i_page_head_title").find("h2").remove();
  154. if(pageParam.title=="广东电网有限责任公司"){
  155. pageParam.title="广东电网公司";
  156. }
  157. $("#i_page_head_title").append("<h2>"+pageParam.title+"主配网线路跳闸曲线</h2>");
  158. }
  159. /*dwr推送人工数据方法 */
  160. function dwrData(number){
  161. if(0!=top.dataSourceState) return;
  162. loadChart(pageParam);
  163. }
  164. /*dwr推送系统数据方法 */
  165. function dwrSysData(number){
  166. if(1!=top.dataSourceState) return;
  167. changeSysData(pageParam);
  168. }
  169. /********************************************************************************************************/
  170. function changeSysData(number){
  171. pageParam.number=number;
  172. changeSysDataLoadChart(pageParam)
  173. }
  174. function changeSysDataLoadChart(jsonParam){
  175. setTitle();
  176. $.post("/nwyj/ws/SystemDataSourceChartServiceImpl/SystemDataSourceChartServiceImpl/getLineTripStrendInfo",
  177. {compId:jsonParam.parentId,startTime:jsonParam.startTime,endTime:jsonParam.endTime},function(result){
  178. if("C984DC9C294A486096C25FAA78C99AED"!= jsonParam.parentId){
  179. zeroChartIntoParam("本单位未提供系统数据源");
  180. return;
  181. }
  182. if(result.rows.length==0){
  183. zeroChartIntoParam("目前尚无推送数据");
  184. return;
  185. }
  186. veriColor();
  187. removeNoData();
  188. var sArr=[{type:"line",name:"主网",data:[],
  189. itemStyle: {
  190. normal: {color:pageStyle[jsonParam.style]["chartColor"][0],
  191. label:{show:true,
  192. position:"top"
  193. }}}},
  194. {type:"line",name:"配网",data:[],
  195. itemStyle: {
  196. normal: {color:pageStyle[jsonParam.style]["chartColor"][1],
  197. label:{show:true,
  198. position:"top"
  199. }}}
  200. }];
  201. var xAxis=[[],[]];
  202. var data=result.rows[0];
  203. for(var index=0,len=result.rows.main.length;index<len;index++){
  204. var item=result.rows.main[index];
  205. sArr[0].data.push(utils.changeQ(item["mainT"]));
  206. xAxis[0].push(item["APPEAR_TIME"]);
  207. }
  208. for(var index=0,len=result.rows.help.length;index<len;index++){
  209. var item=result.rows.help[index];
  210. sArr[1].data.push(utils.changeQ(item["helpT"]));
  211. xAxis[1].push(item["APPEAR_TIME"]);
  212. }
  213. jsonParam.opParams={
  214. title:""/* "截止时间:"+subDate(item["APPEAR_TIME"]) */,//标题
  215. /* subtext:"当前停运数:"+item["sum"]+" (条)", */
  216. saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
  217. unit:"条",//单位
  218. leArr:["主网","配网"],//图例
  219. xAxis:xAxis[0],//x轴
  220. sArr:sArr,//主数据
  221. trigger:"axis",
  222. value:"value",
  223. legendColor:legendC,
  224. xAxisColor:xAxisC,
  225. yAxisColor:yAxisC,
  226. selectedMode:"single",
  227. selected:{
  228. "配网":false,
  229. "主网":true,
  230. }
  231. };
  232. chart=getEchart($("#i_page_chart"),getOption,jsonParam.opParams,null);
  233. chart.on("legendSelected", function(param){
  234. var option=chart.getOption();
  235. if(param.target=="配网"){
  236. option.xAxis[0].data=xAxis[1];
  237. option.legend.selected={
  238. "配网":true,
  239. "主网":false,
  240. }
  241. }
  242. if(param.target=="主网"){
  243. option.xAxis[0].data=xAxis[0];
  244. option.legend.selected={
  245. "配网":false,
  246. "主网":true,
  247. }
  248. }
  249. chart.hideLoading();
  250. chart.setOption(option);
  251. });
  252. $(window).resize(function(){
  253. chart.resize();
  254. });
  255. },"json");
  256. }
  257. function changeSysDataLoadChart1(jsonParam){
  258. setTitle();
  259. $.post("/nwyj/ws/SystemDataSourceChartServiceImpl/SystemDataSourceChartServiceImpl/getLineTripStrendInfo1",
  260. {compId:jsonParam.parentId},function(result){
  261. if("C984DC9C294A486096C25FAA78C99AED"!= jsonParam.parentId){
  262. zeroChartIntoParam("本单位未提供系统数据源");
  263. return;
  264. }
  265. if(result.rows.length==0){
  266. zeroChartIntoParam("目前尚无推送数据");
  267. return;
  268. }
  269. veriColor();
  270. removeNoData();
  271. var sArr=[{type:"line",name:"主网",data:[],
  272. itemStyle: {
  273. normal: {color:pageStyle[jsonParam.style]["chartColor"][0],
  274. label:{show:true,
  275. position:"top"
  276. }}}},
  277. {type:"line",name:"配网",data:[],
  278. itemStyle: {
  279. normal: {color:pageStyle[jsonParam.style]["chartColor"][1],
  280. label:{show:true,
  281. position:"top"
  282. }}}
  283. }];
  284. var xAxis=[[],[]];
  285. var data=result.rows[0];
  286. for(var index=0,len=result.rows.main.length;index<len;index++){
  287. var item=result.rows.main[index];
  288. sArr[0].data.push(utils.changeQ(item["mainT"]));
  289. xAxis[0].push(item["APPEAR_TIME"]);
  290. }
  291. for(var index=0,len=result.rows.help.length;index<len;index++){
  292. var item=result.rows.help[index];
  293. sArr[1].data.push(utils.changeQ(item["helpT"]));
  294. xAxis[1].push(item["APPEAR_TIME"]);
  295. }
  296. jsonParam.opParams={
  297. title:"截止时间:"+item["APPEAR_TIME"].split(".")[0] ,//标题
  298. /* subtext:"当前停运数:"+item["sum"]+" (条)", */
  299. saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
  300. unit:"条",//单位
  301. leArr:["主网","配网"],//图例
  302. xAxis:xAxis[0],//x轴
  303. sArr:sArr,//主数据
  304. trigger:"axis",
  305. value:"value",
  306. legendColor:legendC,
  307. xAxisColor:xAxisC,
  308. yAxisColor:yAxisC,
  309. selectedMode:"single",
  310. selected:{
  311. "配网":false,
  312. "主网":true,
  313. }
  314. };
  315. chart=getEchart($("#i_page_chart"),getOption,jsonParam.opParams,null);
  316. chart.on("legendSelected", function(param){
  317. var option=chart.getOption();
  318. if(param.target=="配网"){
  319. option.xAxis[0].data=xAxis[1];
  320. option.legend.selected={
  321. "配网":true,
  322. "主网":false,
  323. }
  324. }
  325. if(param.target=="主网"){
  326. option.xAxis[0].data=xAxis[0];
  327. option.legend.selected={
  328. "配网":false,
  329. "主网":true,
  330. }
  331. }
  332. chart.hideLoading();
  333. chart.setOption(option);
  334. });
  335. $(window).resize(function(){
  336. chart.resize();
  337. });
  338. },"json");
  339. }
  340. function subDateTime(dateStr){
  341. dateStr=dateStr.substring(dateStr.indexOf(":")+1,dateStr.indexOf("."));
  342. return dateStr;
  343. }
  344. function subDate(str){
  345. if(str==null || str==undefined) return "-";
  346. return str.substring(0,str.indexOf("."));
  347. }
  348. /*dwr推送方法 */
  349. /* function dwrData(number){
  350. loadChart(pageParam);
  351. }
  352. */
  353. </script>
  354. </body>
  355. </html>