New file |
| | |
| | | <!doctype html>
|
| | | <html>
|
| | | <head>
|
| | | <meta charset="utf-8">
|
| | | <title></title>
|
| | | <meta name="viewport" content="width=device-width,initial-scale=1">
|
| | | <link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css"/>
|
| | | <link rel="stylesheet" href="css/breadcrumb.css">
|
| | | <link rel="stylesheet" type="text/css" href="css/defined.popup.css"/>
|
| | | <script type="text/javascript" src="mobilJs/jquery-1.8.2.js"></script>
|
| | | <script type="text/javascript" src="mobilJs/jquery.mobile-1.4.5.min.js"></script>
|
| | | <script type="text/javascript" src="mobilJs/base.js"></script>
|
| | | </head>
|
| | | <body>
|
| | | <div data-role="page" tabindex="0" id="page0">
|
| | | <div data-role="header" data-position="fixed">
|
| | | <a href="index.html" target="_top" style="padding-top:0.7em;padding-bottom:0.7em;">返回</a>
|
| | | <h1>已审批通过机房列表</h1>
|
| | | </div>
|
| | | |
| | | <div data-role="content">
|
| | | <ul class="breadcrumb"></ul>
|
| | | <div id="battList"></div>
|
| | | </div>
|
| | | <div data-role="popup" id="myPopup" class="defined-popup">
|
| | | <div class="popup-container">
|
| | | <div class="popup-title">查询数据失败</div>
|
| | | <div class="popup-content">
|
| | | <div class="set-option">
|
| | | <p>请设置包机组</p>
|
| | | </div>
|
| | | </div>
|
| | | <div class="popup-footer">
|
| | | <div class="footer-float footer-left">
|
| | | <button type="button" id="right" data-mini="true" style="visibility: hidden;">确定</button>
|
| | | </div>
|
| | | <div class="footer-float footer-right">
|
| | | <button type="button" id="hidePopup" data-mini="true">取消</button>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div data-role="footer" data-position="fixed">
|
| | | <!-- <h1>福光电子有限公司</h1> -->
|
| | | </div>
|
| | | </div>
|
| | | </body>
|
| | | <script type="text/javascript" src="js/battNav.js"></script>
|
| | | <script type="text/javascript">
|
| | | var stationlist = new Array();
|
| | | |
| | | // 初始化页面内容
|
| | | $(document).ready(function(){
|
| | | setCookie("station",null);
|
| | | setCookie("batt",null);
|
| | | searchBattLife();
|
| | |
|
| | | });
|
| | | |
| | | // 点击机房事件
|
| | | $(function () {
|
| | | var aLi = -1;
|
| | | $('#battList').on('click', 'ul li', function () {
|
| | | aLi = $(this).index();
|
| | | console.info(aLi);
|
| | | station = getbatt(stationlist,aLi);
|
| | | var arr=setarrbatt(arrdata,station);
|
| | | console.info(arr);
|
| | | window.location.href="batt-approved1.html";
|
| | | }); |
| | | });
|
| | | |
| | | var arrTd = new Array();
|
| | | var arrdata = new Array();
|
| | | |
| | | var Page = {
|
| | | pageSize:20, //每页的行数
|
| | | pageCurr:1, //当前页码数
|
| | | pageAll:0,
|
| | | };
|
| | | |
| | | function getcreatArr(){
|
| | | obj = {
|
| | | apply_en : 1,
|
| | | binf : {
|
| | | page:Page, |
| | | }
|
| | | }
|
| | | return obj;
|
| | | }
|
| | | |
| | | // 查询内容
|
| | | function searchBattLife(){
|
| | | var temp = JSON.stringify(getcreatArr());
|
| | | console.info(temp);
|
| | | arrTd = new Array();
|
| | | var index = 0;
|
| | | $.ajax({
|
| | | type: 'post',
|
| | | async: true,
|
| | | url: 'Battinf_applyAction!serchByInfo',
|
| | | data: "json="+temp,
|
| | | dataType: 'json',
|
| | | success:function(data) {
|
| | | data = JSON.parse(data.result);
|
| | | if(data.code!=0&&data.data.length>0){
|
| | | data=data.data
|
| | | var model = new Array();
|
| | | console.info(data);
|
| | | for(var i=0;i<data.length;i++){
|
| | | if(data[i].check_en!=1){
|
| | | arrdata.push(data[i]);//存储数据
|
| | | if(model.length==0){
|
| | | model.push(data[i].binf.StationName);
|
| | | }else{
|
| | | if(model[model.length-1]!=data[i].binf.StationName){//若不重复,则PUSH进去
|
| | | model.push(data[i].binf.StationName);
|
| | | }
|
| | | }
|
| | | console.info(model);
|
| | | stationlist=model;
|
| | | }
|
| | | }
|
| | | createUl($('#battList'),model);
|
| | | }
|
| | | }
|
| | | }); |
| | | } |
| | | |
| | | function setarrbatt(arrdata,station){
|
| | | console.info(arrdata);
|
| | | if(arrdata.length>0){ //存入的为所有已查出数据 |
| | | var arr= creatYanshouObj(arrdata,station);//申请验收方法。
|
| | | return arr;
|
| | | }else{
|
| | | alert("请等待几秒后再提交申请");
|
| | | }
|
| | | }
|
| | | function creatYanshouObj(arrdata,station){ //通过点击机房信息(stationid),获取该机房电池组
|
| | | //var StationId = arrdata[index].binf.StationId;
|
| | | //console.info(StationId);
|
| | | var arr = new Array(); //初始化传参数组
|
| | | console.info(station);
|
| | | console.info(arrdata);
|
| | | for(var i=0;i<arrdata.length;i++){//一次验收该机房下的所有电池组构建对象 。
|
| | | if(station == arrdata[i].binf.StationName){ |
| | | var obj = {
|
| | | num :arrdata[i].num,
|
| | | check_en:arrdata[i].check_en,
|
| | | binf:{
|
| | | StationId : arrdata[i].binf.StationId, // 机房编号
|
| | | StationName : (arrdata[i].binf.StationName1+"-"+ arrdata[i].binf.StationName2+"-"+arrdata[i].binf.StationName5+"-"+arrdata[i].binf.StationName3), // 拼接机房名称
|
| | | StationName1 :arrdata[i].binf.StationName1, // 省
|
| | | StationName2 : arrdata[i].binf.StationName2, // 市
|
| | | StationName5 : arrdata[i].binf.StationName5, // 区/县
|
| | | StationName3 : arrdata[i].binf.StationName3, // 机房名称
|
| | | StationName4 : arrdata[i].binf.StationName4, // 设备名称
|
| | | StationIp :arrdata[i].binf.StationIp, //机房ip
|
| | | FBSDeviceId : arrdata[i].binf.FBSDeviceId, //设备id
|
| | | FbsDeviceIp : arrdata[i].binf.FbsDeviceIp, //设备ip
|
| | | FbsDeviceIp_YM : arrdata[i].binf.FbsDeviceIp_YM, // 设备掩码
|
| | | FbsDeviceIp_WG : arrdata[i].binf.FbsDeviceIp_WG , // 网关
|
| | | FBSDeviceName : arrdata[i].binf.FBSDeviceName, //设备名称
|
| | | GroupIndexInFBSDevice : arrdata[i].binf.GroupIndexInFBSDevice, //fbs设备索引
|
| | | BattGroupId : arrdata[i].binf.BattGroupId, //电池组id
|
| | | BattGroupNum : arrdata[i].binf.BattGroupNum , //机房内电池组编号
|
| | | BattGroupName :arrdata[i].binf.BattGroupName, //电池组索引
|
| | | FloatVolLevel : arrdata[i].binf.FloatVolLevel, //浮充电压阀值
|
| | | OfflineVolLevel : arrdata[i].binf.OfflineVolLevel, //离线电压阀值
|
| | | BattFloatCurrent : arrdata[i].binf.BattFloatCurrent, //浮充电流阀值
|
| | | MonCount : arrdata[i].binf.MonCount, //单体数量
|
| | | MonCapStd : arrdata[i].binf.MonCapStd, //标称容量
|
| | | MonVolStd : arrdata[i].binf.MonVolStd, //标称电压
|
| | | MonResStd : arrdata[i].binf.MonResStd, //标称内阻
|
| | | MonSerStd : arrdata[i].binf.MonSerStd, //标称电导
|
| | | MonVolLowToAvg : arrdata[i].binf.MonVolLowToAvg, //单体电压次低偏移量
|
| | | |
| | | Load_curr : arrdata[i].binf.Load_curr, //负载电流
|
| | | DisCurrMax : arrdata[i].binf.DisCurrMax, //最大核容电流
|
| | | station_phone : arrdata[i].binf.station_phone, //基站号码
|
| | | |
| | | BattProducer : arrdata[i].binf.BattProducer, //电池品牌
|
| | | BattModel : arrdata[i].binf.BattModel, //电池型号
|
| | | BattProductDate : arrdata[i].binf.BattProductDate, //电池生产日期
|
| | | BattInUseDate : arrdata[i].binf.BattInUseDate, //电池使用日期
|
| | | install_user : arrdata[i].binf.install_user, //安装人员
|
| | | }
|
| | | |
| | | }
|
| | | arr.push(obj);
|
| | | }
|
| | | } |
| | | console.info(arr); |
| | | //applyendyanshou(arr);//申请验收方法。
|
| | | var json=window.JSON.stringify(arr);
|
| | | setCookie("eleparm1",json); //这里setcookie,若有上一条cookie则清空上一笔
|
| | | return arr;
|
| | | }
|
| | | |
| | | function createUl(ulCon, dataList) {
|
| | | //console.info(index);
|
| | | // 清理容器下的ul
|
| | | ulCon.find('ul').remove();
|
| | | |
| | | // 创建ul
|
| | | var _ul = $('<ul data-role="listview" data-inset="true"></ul>');
|
| | | |
| | | // 遍历dataList生成li和a
|
| | | for (var i = 0; i < dataList.length; i++){
|
| | | var _li = $('<li></li');
|
| | | |
| | | var _a = $('<a href="#page1" value="" data-transition="slide">'+dataList[i]+'</a>');
|
| | | |
| | | // 将_a添加到_li,将_li添加到_ul中
|
| | | _li.append(_a);
|
| | | _ul.append(_li);
|
| | | }
|
| | | |
| | | // 将_ul添加到容器中
|
| | | ulCon.append(_ul).trigger('create'); |
| | | loadclose();
|
| | | }
|
| | | |
| | | //获取当前选中的batt
|
| | | function getbatt(arr,index){
|
| | | if(arr.length>index){
|
| | | return arr[index];
|
| | | }
|
| | | return undefined;
|
| | | };
|
| | | </script>
|
| | | |
| | | </html> |