| | |
| | |
|
| | | $(document).ready(function(){
|
| | | setCookie('batt', '');
|
| | | init();
|
| | | //init();
|
| | | searchkBattByStationid();
|
| | | });
|
| | |
|
| | | function init(){
|
| | | var temp = getCookie("station");
|
| | | /* function init(){
|
| | | var temp = getCookie("county");
|
| | | if(temp != '' || temp != undefined) {
|
| | | temp = eval('('+temp+')');
|
| | |
|
| | | var data = [
|
| | | {url: 'javascript:JumpHomePage();', txt: '首页'},
|
| | | {url: 'machineroomM.html', txt: temp.StationName },
|
| | | {url: 'machineroomM.html', txt: temp.StationName5 },
|
| | | {url: 'javascript:;', txt: '蓄电池组'}
|
| | | ];
|
| | | addBreadCrumb($('.breadcrumb').eq(0),data);
|
| | |
| | | }else {
|
| | | window.location.href="machineroomM.html";
|
| | | }
|
| | | }
|
| | | }*/
|
| | |
|
| | | var temp = getCookie("county");
|
| | | temp = JSON.parse(temp);
|
| | | console.info(temp);
|
| | | //根据机房id查询电池组
|
| | | function searchkBattByStationid(stationid){
|
| | | function searchkBattByStationid(){
|
| | | loadshow();
|
| | | var data = {
|
| | | StationName1: temp.StationName1,
|
| | | StationName2: temp.StationName2,
|
| | | StationName5: temp.StationName5
|
| | | };
|
| | | $.ajax({
|
| | | type: "post",
|
| | | url: "BattInfAction!serchBattByStation", |
| | | url: "BattInfAction!serchStationName3", |
| | | async:true,
|
| | | dataType:'text',
|
| | | data:"json = "+JSON.stringify({
|
| | | StationId:stationid
|
| | | }), |
| | | data:"json = "+JSON.stringify(data),
|
| | | success: function(data){
|
| | | data = eval('('+data+')');
|
| | | var model = eval('('+data.result+')');
|
| | | //console.info(model);
|
| | | console.info(model);
|
| | | if(model.code == 1){
|
| | | battinlist = model.data;
|
| | | createUl($('#battList2'), model.data);
|
| | |
| | | for (var i = 0; i < dataList.length; i++){
|
| | | var _li = $('<li></li');
|
| | |
|
| | | var _a = $('<a href="javascript:void(0);" target="_top" data-ajax="false" value="" data-transition="slide">'+dataList[i].BattGroupName+'</a>');
|
| | | var _a = $('<a href="javascript:void(0);" target="_top" data-ajax="false" value="" data-transition="slide">'+dataList[i].StationName3+'</a>');
|
| | | // 将_a添加到_li,将_li添加到_ul中
|
| | | _li.append(_a);
|
| | | _ul.append(_li);
|
| | |
| | | $(function(){
|
| | | $('.breadcrumb').on('tap', 'a[href="#page0"]', function() {
|
| | | list=getList(battinlist,0,batt);
|
| | | init();
|
| | | //init();
|
| | | });
|
| | | });
|
| | | </script>
|