Merge branch 'dev_lxw' of https://whychdw@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
| | |
| | | setCookie("pages","1");
|
| | | window.location.href="machineroomM.html";
|
| | | }
|
| | | function JumpcityPage(){
|
| | | setCookie("pages","3");
|
| | | window.location.href="selectcity.html";
|
| | | }
|
| | |
|
| | | //跳转到电池组层
|
| | | function JumpThirdPage(){
|
| | |
| | | for (var i = 0; i < dataList.length; i++){
|
| | | var _li = $('<li></li');
|
| | |
|
| | | var _a = $('<a href="#page1" value="" data-transition="slide">'+dataList[i].StationName+'</a>');
|
| | | var _a = $('<a href="#page1" value="" data-transition="slide">'+dataList[i].StationName1+'</a>');
|
| | |
|
| | | // 将_a添加到_li,将_li添加到_ul中
|
| | | _li.append(_a);
|
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="machineroomM.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 citylist = new Array();
|
| | | |
| | | // 初始化页面内容
|
| | | $(document).ready(function(){
|
| | | setCookie("city",null);
|
| | | setCookie("county",null);
|
| | | seachAllCity();
|
| | | });
|
| | | |
| | | // 点击城市事件
|
| | | $(function () {
|
| | | var aLi = -1;
|
| | | $('#battList').on('click', 'ul li', function () {
|
| | | aLi = $(this).index();
|
| | | city = getbatt(citylist,aLi);
|
| | | |
| | | var json=window.JSON.stringify(city);
|
| | | setCookie("city",json);
|
| | | window.location.href="selectcounty.html";
|
| | | });
|
| | | |
| | | });
|
| | | |
| | | // 定义面包屑导航条
|
| | | $(function(){
|
| | | var data = [
|
| | | {url: 'javascript:JumpHomePage();', txt: '首页'},
|
| | | {url: 'javascript:JumpFirstPage();', txt: '省'},
|
| | | {url: 'javascript:;', txt: '市'}
|
| | | ];
|
| | | addBreadCrumb($('.breadcrumb').eq(0),data);
|
| | | });
|
| | | |
| | | //查询所有机房
|
| | | function seachAllCity(){
|
| | | loadshow();
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "", |
| | | async:true, |
| | | dataType:'text',
|
| | | data:null, |
| | | success: function(data){ |
| | | data = eval('('+data+')');
|
| | | var model = eval('('+data.result+')');
|
| | | console.info(model);
|
| | | if(model.code == 1){
|
| | | citylist = model.data;
|
| | | createUl($('#battList'),model.data);
|
| | | }else {
|
| | | //alert(213);
|
| | | $('#myPopup').popup('open');
|
| | | }
|
| | | loadclose();
|
| | | },
|
| | | error:function(){
|
| | | loadclose();
|
| | | } |
| | | });
|
| | | }
|
| | | |
| | | /*
|
| | | 声明一个函数createUl,用于生成ul和li
|
| | | @param ulCon ul的容器
|
| | | @param dataList ul的数据内容
|
| | | */
|
| | | 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].StationName+'</a>');
|
| | | |
| | | // 将_a添加到_li,将_li添加到_ul中
|
| | | _li.append(_a);
|
| | | _ul.append(_li);
|
| | | }
|
| | | |
| | | // 将_ul添加到容器中
|
| | | ulCon.append(_ul).trigger('create'); |
| | | loadclose();
|
| | | }
|
| | | |
| | | //获取当前选中的city
|
| | | function getbatt(arr,index){
|
| | | if(arr.length>index){
|
| | | return arr[index];
|
| | | }
|
| | | return undefined;
|
| | | };
|
| | | </script>
|
| | | |
| | | </html> |
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="selectcity.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 countylist = new Array();
|
| | | |
| | | // 初始化页面内容
|
| | | $(document).ready(function(){
|
| | | setCookie("county",null);
|
| | | setCookie("batt",null);
|
| | | seachAllCounty();
|
| | | });
|
| | | |
| | | // 点击城市事件
|
| | | $(function () {
|
| | | var aLi = -1;
|
| | | $('#battList').on('click', 'ul li', function () {
|
| | | aLi = $(this).index();
|
| | | county = getbatt(countrylist,aLi);
|
| | | |
| | | var json=window.JSON.stringify(county);
|
| | | setCookie("county",json);
|
| | | window.location.href="battM.html";
|
| | | });
|
| | | |
| | | });
|
| | | |
| | | // 定义面包屑导航条
|
| | | $(function(){
|
| | | var data = [
|
| | | {url: 'javascript:JumpHomePage();', txt: '首页'},
|
| | | {url: 'javascript:JumpFirstPage();', txt: '省'},
|
| | | {url: 'javascript:JumpcityPage();', txt: '市'},
|
| | | {url: 'javascript:;', txt: '区/县'}
|
| | | ];
|
| | | addBreadCrumb($('.breadcrumb').eq(0),data);
|
| | | });
|
| | | |
| | | //查询所有机房
|
| | | function seachAllCounty(){
|
| | | loadshow();
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "", |
| | | async:true, |
| | | dataType:'text',
|
| | | data:null, |
| | | success: function(data){ |
| | | data = eval('('+data+')');
|
| | | var model = eval('('+data.result+')');
|
| | | console.info(model);
|
| | | if(model.code == 1){
|
| | | countylist = model.data;
|
| | | createUl($('#battList'),model.data);
|
| | | }else {
|
| | | //alert(213);
|
| | | $('#myPopup').popup('open');
|
| | | }
|
| | | loadclose();
|
| | | },
|
| | | error:function(){
|
| | | loadclose();
|
| | | } |
| | | });
|
| | | }
|
| | | |
| | | /*
|
| | | 声明一个函数createUl,用于生成ul和li
|
| | | @param ulCon ul的容器
|
| | | @param dataList ul的数据内容
|
| | | */
|
| | | 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].StationName+'</a>');
|
| | | |
| | | // 将_a添加到_li,将_li添加到_ul中
|
| | | _li.append(_a);
|
| | | _ul.append(_li);
|
| | | }
|
| | | |
| | | // 将_ul添加到容器中
|
| | | ulCon.append(_ul).trigger('create'); |
| | | loadclose();
|
| | | }
|
| | | |
| | | //获取当前选中的county
|
| | | function getbatt(arr,index){
|
| | | if(arr.length>index){
|
| | | return arr[index];
|
| | | }
|
| | | return undefined;
|
| | | };
|
| | | </script>
|
| | | |
| | | </html> |
| | |
| | | Page page=bmd.getPage();
|
| | | Connection conn= DBUtil.getConn();
|
| | | String numberSql=" SELECT FOUND_ROWS() number";
|
| | | String sql="select SQL_CALC_FOUND_ROWS distinct(StationId),StationId_ex,StationName1,StationName2,StationName3,StationName,FBSDeviceId " +
|
| | | String sql="select SQL_CALC_FOUND_ROWS distinct(StationId),StationId_ex,StationName1,StationName2,StationName3,StationName5,StationName,FBSDeviceId " +
|
| | | " From db_battinf.tb_battinf " +
|
| | | " limit ?,?";
|
| | | List<BattInf> list=DAOHelper.executeQueryLimit(sql,conn, new Object[]{(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()},new CallBack() {
|
| | |
| | | binf.setStationName1(rs.getString("stationName1"));
|
| | | binf.setStationName2(rs.getString("stationName2"));
|
| | | binf.setStationName3(rs.getString("stationName3"));
|
| | | binf.setStationName5(rs.getString("stationName5"));
|
| | | binf.setFBSDeviceId(rs.getInt("fBSDeviceId"));
|
| | | binf.setStationName(rs.getString("stationName"));
|
| | | binf.setStationId_ex(rs.getString("stationId_ex"));
|