123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- $(function(){
- var ltsoVolLevelUrl = "/nwyj/ws/cockpit/CockpitService/queryVolLevel" ;
-
- $.post(ltsoVolLevelUrl,function(data){
- $("#ltsoVolLevel").data("data",data);
- $("#ltsoVolLevel").render();
- }, "json");
-
- var yjIncidentUrl = "/nwyj/ws/cockpit/CockpitService/queryYjIncident" ;
- $.post(yjIncidentUrl,function(data){
-
- $("#erewInci").data("data", data) ;
- $("#erewInci").render() ;
-
- }, "json") ;
- }) ;
- function ewErShow(){
- $("#ewer").show() ;
- } ;
- function ltSoShow(){
- $("#ltso").show() ;
- } ;
- function investmentShow(){
- $("#investment").show() ;
- } ;
- /**
- * 应急预警与响应查询面板
- */
- function searchEwer(){
- var unitId = $("#unitId").attr("relValue") ;
- alert(unitId) ;
-
- var incidentType = $("#incidentType").attr("relText") ;
- alert(incidentType) ;
-
- var incidentLevel = $("#incidentLevel").attr("relValue") ;
- alert(incidentLevel) ;
- var ewLevel = '';
- var erLevel = '';
- if(incidentLevel==1){
- ewLevel = '35' ;
- erLevel = '29' ;
- } else if (incidentLevel==2){
- ewLevel = '36' ;
- erLevel = '30' ;
- } else if (incidentLevel==3){
- ewLevel = '37' ;
- erLevel = '31' ;
- } else if (incidentLevel==4){
- ewLevel = '38' ;
- erLevel = '32' ;
- }
-
- var paramsEw = {
- RELEASE_UNIT : unitId,//单位
- BM_EMC_WarningName : incidentType,//事件类型
- CURRENT_EW_LEVEL : ewLevel//级别
- } ;
-
- var paramsEr = {
- RELEASE_UNIT : unitId,//单位
- BM_EMC_WarningName : incidentType,//事件类型
- CURRENT_EW_LEVEL : erLevel//级别
- } ;
-
-
- window.parent.window.searchEwer(paramsEw,paramsEr) ;
- } ;
- /**
- * 线路跳闸与变电站停运查询
- */
- function searchLtSo(){
- var lttParams = null ;
- var ltfParams = null ;
- var sotParams = null ;
- var sofParams = null ;
-
- var unitId = $("#ltsoUnitId").attr("relValue") ;
- var ltsoVolLevel = $("#ltsoVolLevel").attr("relText") ;
-
- var statT = "" ;
- var statF = "" ;
- $("input:checkbox[name=ltsoState]").each(function(){
- if($(this).attr("checked")){
- if($(this).val() == 1){ statT = "1"; }
- if($(this).val() == 0){ statF = "0"; }
- }
- }) ;
-
- $("input:checkbox[name=ltsoType]").each(function(){
- if($(this).attr("checked")){
- if($(this).val() == 1){
- if(statT != ""){
- lttParams = {voltageClass:ltsoVolLevel,company:unitId,status:"1"} ;
- }
-
- if(statF != ""){
- ltfParams = {voltageClass:ltsoVolLevel,company:unitId,status:"0"} ;
- }
- }
-
- if($(this).val() == 0){
- if(statT != ""){
- sotParams = {voltageClass:ltsoVolLevel,company:unitId,status:"1"} ;
- }
-
- if(statF != ""){
- sofParams = {voltageClass:ltsoVolLevel,company:unitId,status:"0"} ;
- }
- }
- }
- }) ;
-
- window.parent.window.searchLtSo(lttParams, ltfParams, sotParams, sofParams) ;
-
- } ;
- function searchErCount(){
- var startDate = $("#startDate").attr("value") ;
- var endDate = $("#endDate").attr("value") ;
-
- startDate = startDate.replace(/-/g,"/") ;
- endDate = endDate.replace(/-/g,"/") ;
-
- var sd = new Date(startDate) ;
- var ed = new Date(endDate) ;
- var nd = allGetServerTime() ;
- if(ed-sd <= 0){
- alert("结束时间不得在开始时间之前,请重新选择!") ;
- } else if(sd == null || ed == null || sd == "NaN" || ed == "NaN"){
- alert("请选择时间!") ;
- } else if(ed-nd > 0){
- alert("结束时间不得超过当前时间!") ;
- } else {
- var erUnitID = $("#erUnit").attr("relValue") ;
- var erTypeID = $("#erTypeID").val();
-
- if(erUnitID){
- var params = {classid : erTypeID, unitId : erUnitID, startDate : startDate, endDate : endDate} ;
- window.parent.window.searchErCount(params) ;
-
- } else {
- alert("请选择查询的单位") ;
- }
- } ;
- } ;
|