aafcf9a8ea7f8fdf1ea1ad9b3ebe90cfd28cb08c.svn-base 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. $(function(){
  2. var ltsoVolLevelUrl = "/nwyj/ws/cockpit/CockpitService/queryVolLevel" ;
  3. $.post(ltsoVolLevelUrl,function(data){
  4. $("#ltsoVolLevel").data("data",data);
  5. $("#ltsoVolLevel").render();
  6. }, "json");
  7. var yjIncidentUrl = "/nwyj/ws/cockpit/CockpitService/queryYjIncident" ;
  8. $.post(yjIncidentUrl,function(data){
  9. $("#erewInci").data("data", data) ;
  10. $("#erewInci").render() ;
  11. }, "json") ;
  12. }) ;
  13. function ewErShow(){
  14. $("#ewer").show() ;
  15. } ;
  16. function ltSoShow(){
  17. $("#ltso").show() ;
  18. } ;
  19. function investmentShow(){
  20. $("#investment").show() ;
  21. } ;
  22. /**
  23. * 应急预警与响应查询面板
  24. */
  25. function searchEwer(){
  26. var unitId = $("#unitId").attr("relValue") ;
  27. alert(unitId) ;
  28. var incidentType = $("#incidentType").attr("relText") ;
  29. alert(incidentType) ;
  30. var incidentLevel = $("#incidentLevel").attr("relValue") ;
  31. alert(incidentLevel) ;
  32. var ewLevel = '';
  33. var erLevel = '';
  34. if(incidentLevel==1){
  35. ewLevel = '35' ;
  36. erLevel = '29' ;
  37. } else if (incidentLevel==2){
  38. ewLevel = '36' ;
  39. erLevel = '30' ;
  40. } else if (incidentLevel==3){
  41. ewLevel = '37' ;
  42. erLevel = '31' ;
  43. } else if (incidentLevel==4){
  44. ewLevel = '38' ;
  45. erLevel = '32' ;
  46. }
  47. var paramsEw = {
  48. RELEASE_UNIT : unitId,//单位
  49. BM_EMC_WarningName : incidentType,//事件类型
  50. CURRENT_EW_LEVEL : ewLevel//级别
  51. } ;
  52. var paramsEr = {
  53. RELEASE_UNIT : unitId,//单位
  54. BM_EMC_WarningName : incidentType,//事件类型
  55. CURRENT_EW_LEVEL : erLevel//级别
  56. } ;
  57. window.parent.window.searchEwer(paramsEw,paramsEr) ;
  58. } ;
  59. /**
  60. * 线路跳闸与变电站停运查询
  61. */
  62. function searchLtSo(){
  63. var lttParams = null ;
  64. var ltfParams = null ;
  65. var sotParams = null ;
  66. var sofParams = null ;
  67. var unitId = $("#ltsoUnitId").attr("relValue") ;
  68. var ltsoVolLevel = $("#ltsoVolLevel").attr("relText") ;
  69. var statT = "" ;
  70. var statF = "" ;
  71. $("input:checkbox[name=ltsoState]").each(function(){
  72. if($(this).attr("checked")){
  73. if($(this).val() == 1){ statT = "1"; }
  74. if($(this).val() == 0){ statF = "0"; }
  75. }
  76. }) ;
  77. $("input:checkbox[name=ltsoType]").each(function(){
  78. if($(this).attr("checked")){
  79. if($(this).val() == 1){
  80. if(statT != ""){
  81. lttParams = {voltageClass:ltsoVolLevel,company:unitId,status:"1"} ;
  82. }
  83. if(statF != ""){
  84. ltfParams = {voltageClass:ltsoVolLevel,company:unitId,status:"0"} ;
  85. }
  86. }
  87. if($(this).val() == 0){
  88. if(statT != ""){
  89. sotParams = {voltageClass:ltsoVolLevel,company:unitId,status:"1"} ;
  90. }
  91. if(statF != ""){
  92. sofParams = {voltageClass:ltsoVolLevel,company:unitId,status:"0"} ;
  93. }
  94. }
  95. }
  96. }) ;
  97. window.parent.window.searchLtSo(lttParams, ltfParams, sotParams, sofParams) ;
  98. } ;
  99. function searchErCount(){
  100. var startDate = $("#startDate").attr("value") ;
  101. var endDate = $("#endDate").attr("value") ;
  102. startDate = startDate.replace(/-/g,"/") ;
  103. endDate = endDate.replace(/-/g,"/") ;
  104. var sd = new Date(startDate) ;
  105. var ed = new Date(endDate) ;
  106. var nd = allGetServerTime() ;
  107. if(ed-sd <= 0){
  108. alert("结束时间不得在开始时间之前,请重新选择!") ;
  109. } else if(sd == null || ed == null || sd == "NaN" || ed == "NaN"){
  110. alert("请选择时间!") ;
  111. } else if(ed-nd > 0){
  112. alert("结束时间不得超过当前时间!") ;
  113. } else {
  114. var erUnitID = $("#erUnit").attr("relValue") ;
  115. var erTypeID = $("#erTypeID").val();
  116. if(erUnitID){
  117. var params = {classid : erTypeID, unitId : erUnitID, startDate : startDate, endDate : endDate} ;
  118. window.parent.window.searchErCount(params) ;
  119. } else {
  120. alert("请选择查询的单位") ;
  121. }
  122. } ;
  123. } ;