| | |
| | | <title><s:text name="Battery_alarm_real-time_query"/></title> <!-- 电池告警实时查询 -->
|
| | | <link rel="stylesheet" type="text/css" href="css/basic.css">
|
| | | <link rel="stylesheet" type="text/css" href="css/elewarn.css">
|
| | | |
| | | <link href="src/css/layui.css" type="text/css" rel="stylesheet">
|
| | | </head>
|
| | | <body>
|
| | | <!--头部内容开始-->
|
| | |
| | | <tr class="fWeight">
|
| | | <td>省</td> <!-- 省 -->
|
| | | <td>市</td> <!-- 市 -->
|
| | | <td>区/县</td> <!-- 区/县 -->
|
| | | <td><s:text name="Computer_site"/></td> <!-- 机房站点(或机房设备) -->
|
| | | <td><s:text name="Battery"/></td> <!-- 蓄电池组 -->
|
| | | </tr>
|
| | | <tr>
|
| | | <td>
|
| | | <select id="station_name1" name="bmd.binf.StationName1">
|
| | | |
| | | </select>
|
| | | <select id="station_name1" name="bmd.binf.StationName1"></select>
|
| | | </td>
|
| | | <td>
|
| | | <select id="city" name="bmd.binf.StationName2">
|
| | | |
| | | </select>
|
| | | <select id="city" name="bmd.binf.StationName2"></select>
|
| | | </td>
|
| | | <td>
|
| | | <select id="station_name" name="bmd.binf.stationName">
|
| | | |
| | | </select>
|
| | | <select id="county" name="bmd.binf.StationName5"></select>
|
| | | </td>
|
| | | <td>
|
| | | <select id="battgroup_name" name="bmd.binf.BattGroupId">
|
| | | |
| | | </select>
|
| | | <select id="station_name" name="bmd.binf.stationName"></select>
|
| | | </td>
|
| | | <td>
|
| | | <select id="battgroup_name" name="bmd.binf.BattGroupId"></select>
|
| | | </td>
|
| | | </tr>
|
| | | </table>
|
| | |
| | |
|
| | | </body>
|
| | | <script type="text/javascript" src="js/createTab.js"></script>
|
| | | <script type="text/javascript" src="src/layui.all.js"></script>
|
| | | <script type="text/javascript">
|
| | | var permits;
|
| | | <% Object obj=session.getAttribute("permits");
|
| | |
| | | $.post("Battalarm_dataAction!serchByCondition",$('#search_form').serialize(),function(data){
|
| | | data=data.result;
|
| | | data=eval("("+data+")");
|
| | | //console.info(data);
|
| | | console.info(data);
|
| | | var pagecurr=parseInt($('#pageCurr').attr('value'));
|
| | | var pagesize=parseInt($('#pageSize').attr('value'));
|
| | | if(data.code==1 && data.data.length>0){
|
| | | data=data.data;
|
| | | var index=0;
|
| | | battalarmlist=new Array();
|
| | | console.info(data); |
| | | //console.info(data); |
| | | ArrWarnTb=new Array();
|
| | | for(var i=0;i<data.length;i++){
|
| | | if(i == (data.length-1)){
|
| | |
| | | }
|
| | |
|
| | | // 省-市-机房-电池组
|
| | | var filterLoad;
|
| | | $(document).ready(function(){
|
| | | filterLoad = layer.load();
|
| | | //页面加载时查询维护区中的枢纽类型
|
| | | $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
|
| | | data=data.result;
|
| | |
| | | });
|
| | |
|
| | | // 根据维护区的内容查询市
|
| | | function findCity() {
|
| | | function findCity(isLoad) {
|
| | | var data = {
|
| | | StationName1: $("#station_name1").val()
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 请求获取当前省下的市
|
| | | $.ajax({
|
| | | type: "post",
|
| | |
| | | }else {
|
| | | $select.text('').html('<option>暂无可测市</option>');
|
| | | }
|
| | | findCounty();
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | // 查询区/县
|
| | | function findCounty(isLoad) {
|
| | | var tmp = {
|
| | | StationName1:$("#station_name1").val(),
|
| | | StationName2:$("#city").val(),
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 查询区县
|
| | | $.ajax({
|
| | | type: 'post',
|
| | | async: true,
|
| | | url: "BattInfAction!serchStationName5",
|
| | | data: "json="+JSON.stringify(tmp),
|
| | | success:function(data) {
|
| | | var rs = JSON.parse(data.result);
|
| | | var $select = $("#county");
|
| | | if(rs.code==1){
|
| | | var _data = rs.data;
|
| | | // 根据数据构造生成下拉列表的数据
|
| | | var optsList = [];
|
| | | for(var i=0;i<_data.length;i++){
|
| | | var __data = _data[i];
|
| | | var _attr = {
|
| | | StationId: __data.StationId
|
| | | };
|
| | | var tmp = getOptionsData(__data.StationName5, __data.StationName5, __data, _attr);
|
| | | optsList.push(tmp);
|
| | | }
|
| | | |
| | | // 根据数据生成下拉列表
|
| | | createOptions($select, optsList, true);
|
| | | }else{
|
| | | $select.text('').html('<option>暂无可测机房站点</option>');
|
| | | }
|
| | | findStationNamebyStationname1();
|
| | | }
|
| | | });
|
| | |
| | |
|
| | | //当维护区的值变换时更新市
|
| | | $('#station_name1').change(function(){
|
| | | findCity();
|
| | | findCity(true);
|
| | | });
|
| | |
|
| | | //当维护区的值变换时更新机房站点
|
| | | $('#city').change(function(){
|
| | | findStationNamebyStationname1();
|
| | | findCounty(true);
|
| | | });
|
| | | |
| | | //当区/县的值变换时更新机房站点
|
| | | $('#county').change(function(){
|
| | | findStationNamebyStationname1(true);
|
| | | });
|
| | |
|
| | | //根据省,市查询站点
|
| | | function findStationNamebyStationname1(){
|
| | | function findStationNamebyStationname1(isLoad){
|
| | | var tmp = {
|
| | | StationName1:$("#station_name1").val(),
|
| | | StationName2:$("#city").val()
|
| | | StationName2:$("#city").val(),
|
| | | StationName5:$("#county").val()
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | //var selectvalue=$("#station_name1 option:selected").val();
|
| | | //alert(selectvalue);
|
| | | $.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(data){
|
| | |
| | |
|
| | | // 根据机房名称查询电池组
|
| | | $('#station_name').change(function(){
|
| | | findserchByBattGroupNamebystationname();
|
| | | findserchByBattGroupNamebystationname(true);
|
| | | });
|
| | |
|
| | | //根据省,市和机房查询蓄电池组
|
| | | function findserchByBattGroupNamebystationname(){
|
| | | function findserchByBattGroupNamebystationname(isLoad){
|
| | | var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):'';
|
| | | // 构造查询条件
|
| | | var tmp = {
|
| | | StationName1:$("#station_name1").val(),
|
| | | StationName2:$("#city").val(),
|
| | | StationName5:$("#county").val(),
|
| | | StationName: $("#station_name").val(),
|
| | | StationId: stationid
|
| | | };
|
| | | |
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | //var station_name1=$("#station_name1 option:selected").val();
|
| | | //var station_name=$("#station_name option:selected").val();
|
| | |
|
| | |
| | | }else{
|
| | | $("#battgroup_name").text('').html('<option>暂无可测蓄电池组</option>');
|
| | | }
|
| | | |
| | | layer.close(filterLoad);
|
| | | });
|
| | | }
|
| | |
|