| | |
| | | <!-- <link rel="stylesheet" type="text/css" href="css/eleWarnPrm.css" /> -->
|
| | | <link rel="stylesheet" type="text/css" href="css/query.css" />
|
| | | <link rel="stylesheet" type="text/css" href="css/popup-tbl.css" />
|
| | | <link href="src/css/layui.css" type="text/css" rel="stylesheet">
|
| | | </head>
|
| | | <body>
|
| | | <!--头部内容开始-->
|
| | |
| | | <table>
|
| | | <thead>
|
| | | <tr>
|
| | | <th>省</th> <!-- 省 -->
|
| | | <th>市</th> <!-- 市 -->
|
| | | <th>区/县</th> <!-- 区/县 -->
|
| | | <th><s:text name="Equipment"/></th> <!-- 设备 -->
|
| | | <th><s:text name="Alarm_name"/></th> <!-- 告警名称 -->
|
| | | </tr>
|
| | | </thead>
|
| | | <tbody>
|
| | | <tr>
|
| | | <td>
|
| | | <select id="station_name1"></select>
|
| | | </td>
|
| | | <td>
|
| | | <select id="city"></select>
|
| | | </td>
|
| | | <td>
|
| | | <select id="county"></select>
|
| | | </td>
|
| | | <td>
|
| | | <select id="equipment-name">
|
| | | <option value="">全部</option> <!-- 设备 -->
|
| | |
| | | <script type="text/javascript" src="js/createTab.js"></script>
|
| | | <script type="text/javascript" src="js/popup.js"></script>
|
| | | <script type="text/javascript" src="js/rightmenu.js"></script>
|
| | | <script type="text/javascript" src="src/layui.all.js"></script>
|
| | | <script type="text/javascript">
|
| | | var permits;
|
| | | <% Object obj=session.getAttribute("permits");
|
| | |
| | |
|
| | | $('#serchid').click(function(){
|
| | | searchEquipmentName();
|
| | | }); |
| | | |
| | | |
| | | /* $.post("Dev_paramAction!serchAllDevId",null,function(data){
|
| | | //console.info("sfewf");
|
| | | data=data.result;
|
| | | data=eval("("+data+")");
|
| | | console.info(data);
|
| | | if(data.code==1 && data.data.length>0){
|
| | | |
| | | var $select = $("#equipment-name");
|
| | | $select.text('');
|
| | | for(i=0;i<data.data.length;i++){
|
| | | $option=$("<option></option>");
|
| | | $option.html(data.data[i].note);
|
| | | $option.attr("value", data.data[i].dev_id);
|
| | | $select.append($option);
|
| | | }
|
| | | |
| | | //console.info("sfwfaf");
|
| | | //console.info(arr);
|
| | | //$select.append(arr);
|
| | | }
|
| | | findWarmName();
|
| | | }); */
|
| | | });
|
| | |
|
| | | |
| | | findStationNamebyStationname1();
|
| | | var isNewload = true;
|
| | | //根据维护区查询站点
|
| | | function findStationNamebyStationname1(){
|
| | | var user = {
|
| | | UNote:""
|
| | | };
|
| | | var stationid = getQueryString("stationId");
|
| | | //var selectvalue=$("#station_name1 option:selected").val();
|
| | | //alert(selectvalue);
|
| | | $.post("User_battgroup_baojigroup_battgroupAction!serchStationByStationName1","json="+JSON.stringify(user),function(data){
|
| | | console.info(data);
|
| | | // 省-市-机房-电池组
|
| | | var filterLoad;
|
| | | $(document).ready(function(){
|
| | | filterLoad = layer.load();
|
| | | //页面加载时查询维护区中的枢纽类型
|
| | | $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
|
| | | data=data.result;
|
| | | data=eval("("+data+")");
|
| | | //console.info(data);
|
| | | if(data.code==1 && data.data.length>0){
|
| | | var $select = $("#equipment-name");
|
| | | var $select = $("#station_name1");
|
| | | $select.text('');
|
| | | for(var i=0;i<data.data.length;i++){
|
| | | var $option=$("<option></option>"); |
| | | $option.text(data.data[i].StationName);
|
| | | $option.attr("value",data.data[i].FBSDeviceId);
|
| | | if(stationid!=undefined && stationid == data.data[i].StationId && isNewload){
|
| | | $option.attr("selected",true);
|
| | | isNewload = false;
|
| | | } |
| | | |
| | | for(var i=0;i<=data.data.length;i++){
|
| | | $option=$("<option></option>");
|
| | | if(i==0){
|
| | | $option.html("<s:text name='All'/>(<s:text name='Common'/>"+data.data.length+"<s:text name='Species'/>)"); |
| | | $option.attr("value", ""); |
| | | }else{
|
| | | $option.text(data.data[i-1]);
|
| | | $option.attr("value",data.data[i-1]); |
| | | } |
| | | $select.append($option);
|
| | | }
|
| | | }else{
|
| | | $("#station_name").text('').html('<option>暂无管理的机房站点</option>');
|
| | | $("#station_name1").text('').html('<option>暂无管理的维护区</option>');
|
| | | }
|
| | | findCity(); |
| | | });
|
| | | });
|
| | | |
| | | // 根据维护区的内容查询市
|
| | | function findCity(isLoad) {
|
| | | var data = {
|
| | | StationName1: $("#station_name1").val()
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 请求获取当前省下的市
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "BattInfAction!serchStationName2", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json = "+JSON.stringify(data), |
| | | success: function(data){
|
| | | var rs = JSON.parse(data.result);
|
| | | var $select = $("#city");
|
| | | if(rs.code == 1) {
|
| | | var _data= rs.data;
|
| | | // 根据数据构造生成下拉列表的数据
|
| | | var optsList = [];
|
| | | for(var i=0;i<_data.length;i++){
|
| | | var __data = _data[i];
|
| | | var tmp = getOptionsData(__data.StationName2, __data.StationName2, __data);
|
| | | optsList.push(tmp);
|
| | | }
|
| | | // 根据数据生成下拉列表
|
| | | createOptions($select, optsList, true);
|
| | | }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(true);
|
| | | });
|
| | | |
| | | //当维护区的值变换时更新机房站点
|
| | | $('#city').change(function(){
|
| | | findCounty(true);
|
| | | });
|
| | | |
| | | //当区/县的值变换时更新机房站点
|
| | | $('#county').change(function(){
|
| | | findStationNamebyStationname1(true);
|
| | | });
|
| | | |
| | | // 根据机房名称查询电池组
|
| | | $('#equipment-name').change(function(){
|
| | | findWarmName(true);
|
| | | });
|
| | | |
| | | // 告警名称修改
|
| | | $('#alarm-name').change(function(){
|
| | | searchEquipmentName();
|
| | | });
|
| | | |
| | | //根据省,市查询站点
|
| | | function findStationNamebyStationname1(isLoad){
|
| | | var tmp = {
|
| | | StationName1:$("#station_name1").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){
|
| | | var rs = JSON.parse(data.result);
|
| | | if(rs.code==1){
|
| | | var _data = rs.data;
|
| | | var $select = $("#equipment-name");
|
| | | // 根据数据构造生成下拉列表的数据
|
| | | var optsList = [];
|
| | | for(var i=0;i<_data.length;i++){
|
| | | var __data = _data[i];
|
| | | var _attr = {
|
| | | StationId: __data.StationId,
|
| | | StationName: __data.StationName
|
| | | };
|
| | | var tmp = getOptionsData(__data.StationName3, __data.FBSDeviceId, __data, _attr);
|
| | | optsList.push(tmp);
|
| | | }
|
| | | |
| | | // 根据数据生成下拉列表
|
| | | createOptions($select, optsList);
|
| | | }else{
|
| | | $("#station_name").text('').html('<option>暂无可测机房站点</option>');
|
| | | }
|
| | | findWarmName();
|
| | | });
|
| | | }
|
| | |
|
| | | |
| | | function findWarmName(){ |
| | | // 获取告警参数
|
| | | function findWarmName(isLoad){ |
| | | var dev_id = $("#equipment-name option:selected").val();
|
| | | //console.info(dev_id);
|
| | | var warmId ={ "dev_id":dev_id
|
| | | var warmId ={ |
| | | "dev_id":dev_id
|
| | | };
|
| | | //console.info(warmId);
|
| | | //console.info("aa");
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | $.post("Dev_paramAction!serchByInfo","json="+JSON.stringify(warmId),function(data){
|
| | | data=data.result;
|
| | | data=eval("("+data+")");
|
| | | console.info(data); |
| | | //console.info(data); |
| | | if(data.code==1 && data.data.length>0){
|
| | | var $select = $("#alarm-name");
|
| | | $select.text('');
|
| | | for(i=0;i<data.data.length;i++){
|
| | | //console.info(data.data[i]);
|
| | | //console.info(getParmName(data.data[i]));
|
| | | $option =$("<option></option>");
|
| | | if(i==0){
|
| | | $option.html("<s:text name='All'/>(<s:text name='Common'/>"+data.data.length+"<s:text name='Species'/>)");
|
| | |
| | |
|
| | | }
|
| | | $select.append($option);
|
| | | //console.info($option); |
| | | }
|
| | | //console.info("123");
|
| | | //console.info($("#equipment-name option:selected").val());
|
| | | |
| | | layer.close(filterLoad);
|
| | | searchEquipmentName();
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | $(function(){
|
| | | |
| | | });
|
| | | |
| | | var all_almlist;
|
| | | function searchEquipmentName(){
|
| | | all_almlist = new Array();
|
| | | var dev_id = $("#equipment-name option:selected").val();
|
| | | var alm_id = $("#alarm-name option:selected").val();
|
| | | //console.info(dev_id);
|
| | | //console.info("1234");
|
| | | var warmId ={ "dev_id":dev_id,
|
| | | "alm_id":alm_id
|
| | | var warmId ={
|
| | | stationName1:$("#station_name1").val(),
|
| | | stationName2:$("#city").val(),
|
| | | stationName5:$("#county").val(),
|
| | | stationName: $("#equipment-name").find('option:selected').attr('stationname'), |
| | | "dev_id":dev_id,
|
| | | "alm_id":alm_id
|
| | | };
|
| | | console.info(warmId);
|
| | | var load = layer.load(1);
|
| | | //console.log(warmId);
|
| | | $.post("Dev_paramAction!serchByCondition","json="+JSON.stringify(warmId),function(data){
|
| | | //console.info(JSON.stringify(warmId));
|
| | | layer.close(load);
|
| | | var data=data.result;
|
| | | var data=eval("("+data+")");
|
| | | all_almlist = data.data;
|
| | | //console.info(data);
|
| | | if(data.code==1&&data.data.length>0){
|
| | | var arr = new Array();
|
| | | data=data.data;
|
| | | console.info(data);
|
| | | for(i=0;i<data.length;i++){
|
| | | arr.push(data[i].note); //设备
|
| | | arr.push(getParmName(data[i].alm_id)); //告警名称
|