| | |
| | | <div class="fg-panel-header">筛选</div>
|
| | | <div class="fg-panel-content">
|
| | | <label for="privince"><strong>维护区:</strong></label>
|
| | | <select name="privince" id="privince" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | |
| | | </select>
|
| | | <label for="city"><strong>机房名称:</strong></label>
|
| | | <select name="city" id="city" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | |
| | | </select>
|
| | | <p>省</p>
|
| | | <select id="mainteArea" data-mini="true" name="bmd.binf.StationName1">
|
| | | <option value="">全部</option>
|
| | | </select>
|
| | | <p>市</p>
|
| | | <select id="city" data-mini="true" name="bmd.binf.StationName2">
|
| | | <option value="">全部</option>
|
| | | </select>
|
| | | <p>区/县</p>
|
| | | <select id="country" data-mini="true" name="bmd.binf.StationName5">
|
| | | <option value="">全部</option>
|
| | | </select>
|
| | | <p>机房站点</p>
|
| | | <select id="homeName" data-mini="true" name="bmd.binf.stationName">
|
| | | <option value="">全部</option>
|
| | | </select> |
| | | |
| | | <fieldset data-role="collapsible" data-collapsed="false" data-mini="true">
|
| | | <legend><strong>时间段选择:</strong></legend>
|
| | | <label for="startTime"><strong>开始时间:</strong></label>
|
| | |
| | | //console.info("开始查询");
|
| | | newArrTd = new Array();
|
| | | var json = JSON.stringify(createSearchForm());
|
| | | $.post("Batt_devalarm_dataAction!serchByCondition","json="+json,function(data){
|
| | | $.post("Batt_devalarm_data_historyAction!serchByCondition","json="+json,function(data){
|
| | | data=data.result;
|
| | | model=eval("("+data+")");
|
| | | //console.info(data);
|
| | | console.info(data);
|
| | | if(model.code==1){
|
| | | var dev_no = (Page.pageCurr-1)*Page.pageSize+1;
|
| | | for(var i=0;i<model.data.length;i++){
|
| | |
| | | newArrTd.push(model.data[i].dev_name); //设备名称
|
| | | newArrTd.push(model.data[i].dev_ip); //设备ip
|
| | | newArrTd.push(model.data[i].stationName); //机房名称
|
| | | newArrTd.push("通讯故障"); //通讯故障
|
| | | newArrTd.push(getAlarmTypeByAlmType(model.data[i].alm_type)); //通讯故障
|
| | | newArrTd.push(getAlarmLevel(model.data[i].alm_level)); //告警等级
|
| | | if(model.data[i].alm_is_confirmed == 1){
|
| | | newArrTd.push('是');
|
| | |
| | | function createSearchForm(){
|
| | | var temp={
|
| | | binf:{
|
| | | StationName1:$('#privince').val(),
|
| | | StationName:$('#city').val(),
|
| | | StationName:$('#homeName').val(), // 机房名
|
| | | StationName5:$('#country').val(), // 区/县
|
| | | StationName2:$('#city').val(), // 市
|
| | | StationName1:$('#mainteArea').val(), // 省
|
| | | BattProductDate:$("#startTime").val()+" 00:00:00",
|
| | | BattProductDate1:$("#endTime").val()+" 23:59:59",
|
| | | },
|
| | | page:{
|
| | | pageSize:Page.pageSize, //页面大小
|
| | | pageCurr:Page.pageCurr, //当前页
|
| | | pageSize:Page.pageSize, //页面大小
|
| | | pageCurr:Page.pageCurr, //当前页
|
| | | }
|
| | | };
|
| | | return temp;
|
| | | }
|
| | |
|
| | |
|
| | | //页面加载时查询省
|
| | | $.post("BattInfAction_serchByStation",null,function(data){
|
| | | data = data.result;
|
| | | data = eval("("+data+")");
|
| | | //console.info(data);
|
| | | //console.info(data.code);
|
| | | if(data.code==1&&data.data.length>0){
|
| | | var $Ostation_name1=$("#mainteArea");
|
| | | $Ostation_name1.text("");
|
| | | var arr = new Array();
|
| | | for(var i=0;i<=data.data.length;i++)
|
| | | {
|
| | | if(i == 0){
|
| | | arr.push({
|
| | | val:"",
|
| | | txt:"全部(共"+data.sum+"个)",
|
| | | });
|
| | | }else{
|
| | | arr.push({
|
| | | val:data.data[i-1].StationName1,
|
| | | txt:data.data[i-1].StationName1,
|
| | | });
|
| | | }
|
| | | }
|
| | | updataSel($Ostation_name1, arr);
|
| | | }
|
| | | findCity();
|
| | | });
|
| | |
|
| | | //页面加载时查询维护区中的枢纽类型 |
| | | $.post("BattInfAction_serchByStation",null,function(data){
|
| | | data = data.result;
|
| | | data = eval("("+data+")");
|
| | | //console.info(data);
|
| | | // console.info(data.code)
|
| | | |
| | | if(data.code==1&&data.data.length>0){
|
| | | var $Ostation_name1=$("#privince");
|
| | | $Ostation_name1.text("");
|
| | | //console.info("aa")
|
| | | for(var i=0;i<=data.data.length;i++)
|
| | | {
|
| | | //console.info(data.data[i-1].StationName1)
|
| | | $option=$("<option></option>");
|
| | | if (i==0){
|
| | | $option.html("全部(共"+data.sum+"节)"); |
| | | $option.attr("value", "");
|
| | | |
| | | }else{
|
| | | $option.text(data.data[i-1].StationName1);
|
| | | $option.attr("value",data.data[i-1].StationName1);
|
| | | |
| | | }
|
| | | // console.info($option)
|
| | | $Ostation_name1.append($option);
|
| | | };
|
| | | |
| | | }
|
| | | findStationNamebyStationname1();
|
| | | });
|
| | | |
| | | //当省改变时更新市
|
| | | function findCity(){
|
| | | var data = {
|
| | | StationName1: $("#mainteArea").val()
|
| | | };
|
| | | //console.info(data);
|
| | | // 请求获取当前省下的市
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "BattInfAction!serchStationName2", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json = "+JSON.stringify(data), |
| | | success: function(data){
|
| | | data = data.result;
|
| | | data = eval("("+data+")");
|
| | | //console.info(data);
|
| | | //console.info(data.code); |
| | | if(data.code==1&&data.data.length>0){
|
| | | var $Ostation_name1=$("#city");
|
| | | $Ostation_name1.text("");
|
| | | var arr = new Array();
|
| | | for(var i=0;i<=data.data.length;i++)
|
| | | {
|
| | | if(i == 0){
|
| | | arr.push({
|
| | | val:"",
|
| | | txt:"全部(共"+data.data.length+"个)",
|
| | | });
|
| | | }else{
|
| | | arr.push({
|
| | | val:data.data[i-1].StationName2,
|
| | | txt:data.data[i-1].StationName2,
|
| | | });
|
| | | }
|
| | | }
|
| | | updataSel($Ostation_name1, arr);
|
| | | }
|
| | | findCounty();
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | //当维护区改变时更新站点
|
| | | $('#mainteArea').change(function(){ |
| | | findStationNamebyStationname1();
|
| | | });
|
| | | |
| | | function findStationNamebyStationname1(){
|
| | | var selectvalue=$("#privince option:selected").val();
|
| | | |
| | | $.post("BattInfAction_serchByStationName","bif.StationName1="+selectvalue,function(data){
|
| | | |
| | | data=data.result;
|
| | | data=eval("("+data+")");
|
| | | //console.info(data);
|
| | | if(data.code==1 && data.data.length>0){
|
| | | var $select = $("#city");
|
| | | //console.info()
|
| | | $select.text("");
|
| | | for(var i=0;i<=data.data.length;i++){
|
| | | var $option=$("<option></option>");
|
| | | if(i==0){
|
| | | $option.html("全部(共"+data.sum+"种)"); |
| | | $option.attr("value", ""); |
| | | }else{
|
| | | $option.text(data.data[i-1].StationName);
|
| | | $option.attr("value",data.data[i-1].StationName); |
| | | } |
| | | $select.append($option);
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | //当市改变时更新区/县
|
| | | function findCounty(){
|
| | | var data = {
|
| | | StationName1: $("#mainteArea").val(),
|
| | | StationName2:$("#city").val(),
|
| | | };
|
| | | //console.info(data);
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "BattInfAction!serchStationName5", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json = "+JSON.stringify(data), |
| | | success: function(data){
|
| | | data = data.result;
|
| | | data = eval("("+data+")");
|
| | | //console.info(data);
|
| | | //console.info(data.code); |
| | | if(data.code==1&&data.data.length>0){
|
| | | var $Ostation_name1=$("#country");
|
| | | $Ostation_name1.text("");
|
| | | var arr = new Array();
|
| | | for(var i=0;i<=data.data.length;i++)
|
| | | {
|
| | | if(i == 0){
|
| | | arr.push({
|
| | | val:"",
|
| | | txt:"全部(共"+data.data.length+"个)",
|
| | | });
|
| | | }else{
|
| | | arr.push({
|
| | | val:data.data[i-1].StationName5,
|
| | | txt:data.data[i-1].StationName5,
|
| | | });
|
| | | }
|
| | | }
|
| | | updataSel($Ostation_name1, arr);
|
| | | }
|
| | | findStationNamebyStationname1(); |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | //当区县更新时更新机房 |
| | | function findStationNamebyStationname1(){
|
| | | var data = {
|
| | | StationName1: $("#mainteArea").val(),
|
| | | StationName2:$("#city").val(),
|
| | | StationName5:$("#country").val()
|
| | | };
|
| | | console.info(data);
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "BattInfAction!serchStationName3", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json = "+JSON.stringify(data), |
| | | success: function(data){
|
| | | data = data.result;
|
| | | data = eval("("+data+")");
|
| | | //console.info(data);
|
| | | //console.info(data.code); |
| | | if(data.code==1&&data.data.length>0){
|
| | | var $Ostation_name1=$("#homeName");
|
| | | $Ostation_name1.text("");
|
| | | var arr = new Array();
|
| | | for(var i=0;i<=data.data.length;i++)
|
| | | {
|
| | | if(i == 0){
|
| | | arr.push({
|
| | | val:"",
|
| | | stationid:"",
|
| | | txt:"全部(共"+data.data.length+"个)",
|
| | | });
|
| | | }else{
|
| | | arr.push({
|
| | | val:data.data[i-1].StationName,
|
| | | stationid:data.data[i-1].StationId,
|
| | | txt:data.data[i-1].StationName3,
|
| | | });
|
| | | }
|
| | | }
|
| | | //console.info(111111111111111);
|
| | | updataSelStation($Ostation_name1, arr);
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | //当省改变时更新市
|
| | | $('#mainteArea').change(function(){
|
| | | findCity(); |
| | | });
|
| | | //当市改变时改变区/县
|
| | | $('#city').change(function(){
|
| | | findCounty(); |
| | | });
|
| | | //当区/县改变时改变机房
|
| | | $('#country').change(function(){
|
| | | findStationNamebyStationname1(); |
| | | }); |
| | | |
| | | // 根据滚动条的状态显示和隐藏返回顶部
|
| | | $(function() {
|
| | | $(document).on('scrollstop', function() {
|
| | |
| | | }
|
| | | return "";
|
| | | }
|
| | | |
| | | //获取设备的告警类型
|
| | | function getAlarmTypeByAlmType(alm_type){
|
| | | if(alm_type>0){
|
| | | switch(alm_type){
|
| | | case 618501:return "继电器K1告警";
|
| | | case 618502:return "通讯告警";
|
| | | case 618503:return "设备过温告警";
|
| | | case 618504:return "二极管D1告警";
|
| | | case 119023:return "续航不足告警";
|
| | | case 119024:return "基站停电告警";
|
| | | case 119025:return "基站发电告警";
|
| | | case 119026:return "基站掉站告警";
|
| | | case 119027:return "基站开门告警";
|
| | | case 119028:return "设备高温告警";
|
| | | case 119032:return "设备SD卡故障";
|
| | | case 119033:return "采集线告警";
|
| | | }
|
| | | }
|
| | | return "通信故障";
|
| | | }
|
| | | </script>
|
| | | </div>
|
| | | </body>
|