d495344e0e5de1138d2a060fbe792e3c93cddc7a.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  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/pie.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. <script type="text/javascript" src="/nwyj/scripts/cockpit/search/search_util.js"></script>
  16. <!-- dwr 实现消息推送功能开始-->
  17. <script type='text/javascript' src='/nwyj/dwr/engine.js'></script>
  18. <script type='text/javascript' src='/nwyj/dwr/util.js'></script>
  19. <link rel="stylesheet" type="text/css" href=" /nwyj/css/cockpit/commom/ehcartPage.css" />
  20. </head>
  21. <body onload="dwr.engine.setActiveReverseAjax(true);dwr.engine.setNotifyServerOnPageUnload(true);">
  22. <div id="i_page_main" class="c_page_main">
  23. <div id="i_page_head" class="c_page_head">
  24. <div id="i_page_head_title">
  25. </div>
  26. <div id="i_page_head_subtitle"></div>
  27. </div>
  28. <div id="i_page_chart" class="c_page_chart">
  29. </div>
  30. </div>
  31. <script type="text/javascript">
  32. var pageParam={};
  33. var chart=null;
  34. var utils=new Util();
  35. var searchUtil = new SearchUtil();
  36. $(function(){
  37. pageParam.style=utils.resolveUrl()["style"]||"style1";
  38. pageParam.title=utils.resolveUrl()["title"]||"广东电网";
  39. pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
  40. pageParam.compId=utils.resolveUrl()["dept_id"]||11;
  41. init();
  42. });
  43. /**
  44. *初始化方法
  45. */
  46. function init(){
  47. if(utils.resolveUrl().dataSourceState==0){
  48. loadChart(pageParam);
  49. }else{
  50. changeSysDataLoadChart(pageParam);
  51. }
  52. }
  53. function loadChart(jsonParam){
  54. pageParam.isalert=null;
  55. if(pageParam.number.split("|")[0]=="预警"){
  56. pageParam.isalert="0";
  57. }else{
  58. pageParam.isalert="1";
  59. }
  60. pageParam.number=pageParam.number.split("|")[1];
  61. $.post("/nwyj/ws/ChartServiceImpl/ChartServiceImpl/getChildDataOrSelfByWarnningNumber",{charType:"xianlutiaozha",name:"getRecodeSumData",number:jsonParam.number,isalert:pageParam.isalert,compId:jsonParam.compId,viewName:"ROUTE_OFLINE_RESTORE_VIEW"},function(result){
  62. if(result.rows.length==0){
  63. zeroChart();
  64. return;
  65. }
  66. removeNoData();
  67. var data=result.rows[0];
  68. var sum=utils.changeQ(data["sum"]);
  69. var un=utils.changeQ(data["unsum"]);
  70. var hfl=(sum==0?1:((sum-un)/sum));
  71. var sArr= [
  72. {
  73. name:"线路跳闸",
  74. type:"gauge",
  75. radius : "55%",
  76. center: ["50%", "60%"],
  77. detail: {
  78. formatter: "{value}%",
  79. textStyle: {
  80. fontSize: 32,
  81. fontStyle: "normal",
  82. fontWeight: "bold"
  83. },
  84. show: true,
  85. width: 100,
  86. height: 40,
  87. offsetCenter: [0, 0],
  88. borderColor: "#ccc",
  89. borderWidth: 0
  90. },
  91. splitNumber: 5,
  92. axisLine: {
  93. lineStyle: {
  94. color: [[hfl, "#0c8918"],[1, "#c00000"]],
  95. width: 30,
  96. shadowColor: "white",
  97. shadowBlur: 14,
  98. shadowOffsetX: 0,
  99. shadowOffsetY: 0
  100. }
  101. },
  102. axisTick: { // 坐标轴小标记
  103. splitNumber: 10, // 每份split细分多少段
  104. length :12, // 属性length控制线长
  105. lineStyle: { // 属性lineStyle控制线条样式
  106. color: "white"
  107. }
  108. },
  109. axisLabel: {
  110. show: true,
  111. textStyle: {
  112. fontSize: 10,
  113. fontWeight: "bold",
  114. fontStyle: "normal"
  115. }
  116. },
  117. splitLine: {
  118. show: true,
  119. length: 35,
  120. lineStyle: {
  121. width: 2,
  122. type: "solid"
  123. }
  124. },
  125. pointer: {
  126. length: "80%",
  127. width: 12
  128. },
  129. title : {
  130. show : true,
  131. offsetCenter: [0, "-40%"], // x, y,单位px
  132. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  133. fontWeight: 'bolder'
  134. }
  135. },
  136. tooltip: {
  137. trigger: "item"
  138. },
  139. detail : {
  140. formatter:'{value}%',
  141. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  142. color: 'auto',
  143. fontWeight: 'bolder'
  144. }
  145. },
  146. data:[],
  147. title:{show:false}
  148. }
  149. ];
  150. var xAxis=[];
  151. sArr[0].data.push({value:getFourData(hfl),name:"恢复率"});
  152. opParams={
  153. title:"起始:"+data["SEND_TIME"]+":00"+" 截止:"+data["APPEAR_TIME"],//标题
  154. subtext:"10kV及以上电压跳闸已恢复总数:"+(data["sum"]-data["unsum"])+"(条)\n10kV及以上电压跳闸总数:"+data["sum"]+" (条)",
  155. saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
  156. unit:"座",//单位
  157. leArr:[],//图例
  158. xAxis:xAxis,//x轴
  159. sArr:sArr//主数据
  160. };
  161. chart=getEchart($("#i_page_chart"),getOption11,opParams,null);
  162. setTitle();
  163. $(window).resize(function(){
  164. chart.resize();
  165. });
  166. },"json");
  167. }
  168. /**
  169. *设置标题
  170. */
  171. function setTitle(){
  172. $("#i_page_head_title").find("h2").remove();
  173. $("#i_page_head_title").append("<h2>"+pageParam.title+"线路跳闸恢复率</h2>");
  174. }
  175. /*dwr推送人工数据方法 */
  176. function dwrData(number){
  177. if(0!=top.dataSourceState) return;
  178. if(number== pageParam.number){
  179. loadChart(pageParam);
  180. }
  181. }
  182. /*dwr推送系统数据方法 */
  183. function dwrSysData(number){
  184. if(1!=top.dataSourceState) return;
  185. //如果需要关联通知单,放开注释即可
  186. // if(number== pageParam.number){
  187. changeSysData(pageParam);
  188. // }
  189. }
  190. /************************************************************************************************************************/
  191. function changeSysData(number){
  192. pageParam.number=number;
  193. changeSysDataLoadChart(pageParam)
  194. }
  195. function changeSysDataLoadChart(jsonParam){
  196. setTitle();
  197. $.post("/nwyj/ws/SystemDataSourceChartServiceImpl/SystemDataSourceChartServiceImpl/getLineTripByDept",
  198. {number:"防风防汛-F-2016-63"/* jsonParam.number */,compId:jsonParam.compId},function(result){
  199. if("C984DC9C294A486096C25FAA78C99AED"!=jsonParam.compId){
  200. if("C984DC9C294A486096C25FAA78C99AED"!= jsonParam.parentId){
  201. zeroChartIntoParam("本单位未提供系统数据源");
  202. return;
  203. }
  204. }
  205. if("FAILURE"==result.state){
  206. zeroChartIntoParam(result.rows);
  207. return;
  208. }
  209. if(result.rows.length==0){
  210. zeroChart();
  211. return;
  212. }
  213. removeNoData();
  214. var data=result.rows[0];
  215. //alert(JSON.stringify(data));
  216. var sum=utils.changeQ(data["mainT"])+utils.changeQ(data["helpT"]);
  217. var un=utils.changeQ(data["mainW"])+utils.changeQ(data["helpW"]);
  218. var hfl=(sum==0?1:((sum-un)/sum));
  219. var sArr= [
  220. {
  221. name:"线路跳闸",
  222. type:"gauge",
  223. radius : "55%",
  224. center: ["50%", "60%"],
  225. detail: {
  226. formatter: "{value}%",
  227. textStyle: {
  228. fontSize: 32,
  229. fontStyle: "normal",
  230. fontWeight: "bold"
  231. },
  232. show: true,
  233. width: 100,
  234. height: 40,
  235. offsetCenter: [0, 0],
  236. borderColor: "#ccc",
  237. borderWidth: 0
  238. },
  239. splitNumber: 5,
  240. axisLine: {
  241. lineStyle: {
  242. color: [[hfl, "#0c8918"],[1, "#c00000"]],
  243. width: 30,
  244. shadowColor: "white",
  245. shadowBlur: 14,
  246. shadowOffsetX: 0,
  247. shadowOffsetY: 0
  248. }
  249. },
  250. axisTick: { // 坐标轴小标记
  251. splitNumber: 10, // 每份split细分多少段
  252. length :12, // 属性length控制线长
  253. lineStyle: { // 属性lineStyle控制线条样式
  254. color: "white"
  255. }
  256. },
  257. axisLabel: {
  258. show: true,
  259. textStyle: {
  260. fontSize: 10,
  261. fontWeight: "bold",
  262. fontStyle: "normal"
  263. }
  264. },
  265. splitLine: {
  266. show: true,
  267. length: 35,
  268. lineStyle: {
  269. width: 2,
  270. type: "solid"
  271. }
  272. },
  273. pointer: {
  274. length: "80%",
  275. width: 12
  276. },
  277. title : {
  278. show : true,
  279. offsetCenter: [0, "-40%"], // x, y,单位px
  280. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  281. fontWeight: 'bolder'
  282. }
  283. },
  284. tooltip: {
  285. trigger: "item"
  286. },
  287. detail : {
  288. formatter:'{value}%',
  289. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  290. color: 'auto',
  291. fontWeight: 'bolder'
  292. }
  293. },
  294. data:[],
  295. title:{show:false}
  296. }
  297. ];
  298. var xAxis=[];
  299. sArr[0].data.push({value:getFourData(hfl),name:"恢复率"});
  300. /* var date = new Date();
  301. var appear_time = new SearchUtil().getNowFormatDateTime(date); */
  302. opParams={
  303. title:"截止:"+data["APPEAR_TIME"],//标题
  304. subtext:"220kV及以上电压跳闸已恢复总数:"+(data["mainT"]-data["mainW"])+"(条)\n220kV及以上电压跳闸总数:"+data["mainT"]+" (条)",
  305. saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
  306. unit:"座",//单位
  307. leArr:[],//图例
  308. xAxis:xAxis,//x轴
  309. sArr:sArr//主数据
  310. };
  311. chart=getEchart($("#i_page_chart"),getOption11,opParams,null);
  312. $(window).resize(function(){
  313. chart.resize();
  314. });
  315. },"json");
  316. }
  317. function subDate(str){
  318. if(str==null || str==undefined) return "-";
  319. return str.substring(0,str.indexOf("."));
  320. }
  321. </script>
  322. </body>
  323. </html>