123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- $(function(){
- var userInfo=top.conditionJson;
- var ltsoVolLevelUrl = "/nwyj/ws/cockpit/CockpitService/queryVolLevel" ;
-
- $.post(ltsoVolLevelUrl,function(data){
- $("#ltsoVolLevel").data("data",data);
- $("#ltsoVolLevel").render();
- }, "json");
-
- //添加额外属性主要用于最初的初始节点
- // $("#AcceptUserTree").attr('params','{"deptId":"'+ deptId +'"}');
- var deptUrl="/nwyj/ws/orgInDeptService/OrgInDeptService/getDeptRootById";
- $("#AcceptUserTree").attr('params','{"id":"' + userInfo["dept_id"] + '"}');
- //异步加载请求地址
- $("#AcceptUserTree").attr('url',deptUrl);
- $.post(deptUrl, {"deptId" : userInfo["dept_id"]}, function(data) {
- $("#AcceptUserTree").data("data", data);
- $("#AcceptUserTree").render();
- }, "json");
-
- // console.log("+==="+JSON.stringify(userInfo));
- // alert(JSON.stringify(userInfo)) ;
- }) ;
- /**
- * 线路跳闸与变电站停运查询
- */
- function searchLtSo(){
- var lttParams = null ;
- var ltfParams = null ;
- var sotParams = null ;
- var sofParams = null ;
-
- var unitId = $("#AcceptUserTree").attr("relValue") ;
- var ltsoVolLevel = $("#ltsoVolLevel").attr("relText") ;
- var beginTime = $("#beginTimeLtso").attr("value") ;
- var endTime = $("#endTimeLtso").attr("value") ;
-
- if(ltsoVolLevel == "请选择")
- ltsoVolLevel = "" ;
-
- if(beginTime != "" && endTime == "")
- endTime = getNowFormatDate() ;
- if(beginTime == "" && endTime != "")
- alert("请选择开始时间") ;
-
- 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"; }
- }
- }) ;
- var flg = "" ;
- $("input:checkbox[name=ltsoType]").each(function(){
- if($(this).attr("checked")){
- flg += $(this.val()) ;
- if($(this).val() == 1){
- if(statT != ""){
- lttParams = {"voltageClass":ltsoVolLevel,"company":unitId,"status":"1","beginTime":beginTime,"endTime":endTime} ;
- }
-
- if(statF != ""){
- ltfParams = {"voltageClass":ltsoVolLevel,"company":unitId,"status":"0","beginTime":beginTime,"endTime":endTime} ;
- }
- }
-
- if($(this).val() == 0){
- if(statT != ""){
- sotParams = {"voltageClass":ltsoVolLevel,"company":unitId,"status":"1","beginTime":beginTime,"endTime":endTime} ;
- }
-
- if(statF != ""){
- sofParams = {"voltageClass":ltsoVolLevel,"company":unitId,"status":"0","beginTime":beginTime,"endTime":endTime} ;
- }
- }
- }
- }) ;
-
- if(flg==""){
- if(statT != ""){
- lttParams = {"voltageClass":ltsoVolLevel,"company":unitId,"status":"1","beginTime":beginTime,"endTime":endTime} ;
- sotParams = {"voltageClass":ltsoVolLevel,"company":unitId,"status":"1","beginTime":beginTime,"endTime":endTime} ;
- }
-
- if(statF != ""){
- ltfParams = {"voltageClass":ltsoVolLevel,"company":unitId,"status":"0","beginTime":beginTime,"endTime":endTime} ;
- sofParams = {"voltageClass":ltsoVolLevel,"company":unitId,"status":"0","beginTime":beginTime,"endTime":endTime} ;
- }
- if(statT == "" && statF == ""){
- ltfParams = {"voltageClass":ltsoVolLevel,"company":unitId,"beginTime":beginTime,"endTime":endTime} ;
- sofParams = {"voltageClass":ltsoVolLevel,"company":unitId,"beginTime":beginTime,"endTime":endTime} ;
- lttParams = {"voltageClass":ltsoVolLevel,"company":unitId,"beginTime":beginTime,"endTime":endTime} ;
- sotParams = {"voltageClass":ltsoVolLevel,"company":unitId,"beginTime":beginTime,"endTime":endTime} ;
- }
- }
- var reclose = statT + statF + "";
- if(reclose=="10")
- reclose = "" ;
- var gridParams = {"listId":'411',"vollevel":ltsoVolLevel,"dept":unitId,"BEGINTIME":beginTime,"ENDTIME":endTime} ;
- var lostParams = {"listId":'411',"vollevel":ltsoVolLevel,"dept":unitId,"BEGINTIME":beginTime,"ENDTIME":endTime,"RECLOSE":reclose} ;
- window.parent.window.searchLtSo(lttParams, ltfParams, sotParams, sofParams,gridParams,lostParams) ;
-
-
- } ;
- var dateSkin="blue";
- function initComplete(){
- //获取当前主题风格,用于设置日期控件的皮肤
- try {
- dateSkin=themeColor;
- }catch(e){}
- //自定义点击触发日期控件
- document.getElementById('beginTimeLtso').onfocus=function(){
- var endtimeTf=$dp.$('endTimeLtso');
- WdatePicker({
- skin:dateSkin,onpicked:function(){endtimeTf.focus();},maxDate:'#F{$dp.$D(\'endTimeLtso\')}'
- });
- } ;
- document.getElementById('endTimeLtso').onfocus=function(){
- //这里设置了最大日期为当前日期,如果不需要则把maxDate:'%y-%M-%d'去掉
- WdatePicker({skin:dateSkin,minDate:'#F{$dp.$D(\'beginTimeLtso\')}'});
- };
-
- } ;
- /**
- * 时间格式化
- * @returns {String}
- */
- function getNowFormatDate(){
- var date = allGetServerTime() ;
-
- return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " +
- date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds() ;
- } ;
- /**
- *
- * @returns {___anonymous4966_4967}
- */
- function resolveUrl(){
- var encondeCondition=window.location.search;
- var condition= decodeURI(encondeCondition.substring(1,encondeCondition.length));
- var conditionArr=condition.split("&");
- var condJson={};
- for(var item in conditionArr){
- var temArr=conditionArr[item].split("=");
- condJson[temArr[0]]=temArr[1];
- }
- return condJson;
- } ;
|