From 866a6facb439b93b7d693bb84730714200c7f85a Mon Sep 17 00:00:00 2001 From: CJJ <Administrator@USER-20180117QL> Date: 星期四, 20 十二月 2018 16:22:22 +0800 Subject: [PATCH] 申请添加 --- gx_tieta/WebRoot/mobil/ele-param2.html | 543 +++++++++++++++++++++++++++++++++++++++++ gx_tieta/WebRoot/mobil/testControl.html | 2 gx_tieta/WebRoot/mobil/iframe/searchBatt.html | 147 +++++++++++ gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html | 31 + 4 files changed, 711 insertions(+), 12 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html index da1ff02..415fbda 100644 --- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html +++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html @@ -57,6 +57,7 @@ console.info(temp); console.info(temp[30]); console.info(temp[33]); + console.info(temp[34]); var suoyin = temp[33]; $(function(){creatAllView(suoyin)}); @@ -99,7 +100,7 @@ <!-- 澶撮儴鍐呭 --> <div data-role="header" data-position="fixed"> - <a href="ele-param1.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">杩斿洖</a> + <a href="ele-param2.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">杩斿洖</a> <h1>鐢垫睜缁勭敵璇峰畨瑁�</h1> </div> @@ -350,7 +351,13 @@ $(function () { //setTimes($("#startTestrecord"),'2000-01-01'); //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd')); - creatgroupid();//濡傛灉妫�娴嬩负NEW ,鍒欐墽琛屾坊鍔營D锛屽鏋滀负淇敼锛屽垯鎵ц涓烘嬁鍒癐D + console.info() + if(temp[34]!="edit") + { + console.warn("sssss") + creatgroupid();//濡傛灉妫�娴嬩负NEW ,鍒欐墽琛屾坊鍔營D锛屽鏋滀负淇敼锛屽垯鎵ц涓烘嬁鍒癐D + }else{ + } installstartdata(temp); }); @@ -421,7 +428,7 @@ //瀵煎叆琛ㄦ牸榛樿鏁版嵁 function installstartdata(temp){ - creatgroupid(); + var data = { StationId: '4011100' ,StationName1: '骞胯タ鐪�' @@ -458,7 +465,8 @@ ,install_user: '鍛靛懙' }; console.info(data.StationId); - if(temp.length>0){ + if(temp[34]!="edit"){ + creatgroupid(); document.getElementById("StationId").value = data.StationId; // document.getElementById("station_name1").value = data.StationName1; // document.getElementById("city").value = data.StationName2; //甯� @@ -502,7 +510,7 @@ document.getElementById("StationName3").value = temp[4]; //鏈烘埧鍚嶇О document.getElementById("StationName4").value = temp[5]; //璁惧鍚嶇О document.getElementById("StationIp").value = temp[6]; //璁惧IP - //document.getElementById("FBSDeviceId").value = dev_id; + document.getElementById("FBSDeviceId").value = temp[7]; document.getElementById("FbsDeviceIp").value = temp[8]; document.getElementById("FbsDeviceIp_YM").value = temp[9]; document.getElementById("FbsDeviceIp_WG").value = temp[10]; @@ -594,18 +602,19 @@ $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck"); $("#sure").click(function(){ if(nullOrn()){ - //if(tem[35]=="new"){ - creatgroupid();//鎻愪氦涔嬪墠鍐嶆楠岃瘉锛屽垱寤篒D - addBattnew(); //鎻愪氦 - //}else{editBatt(); - //} + if(temp[34]=="edit"){ + creatgroupid();//鎻愪氦涔嬪墠鍐嶆楠岃瘉锛屽垱寤篒D + addBattnew(); //鎻愪氦 + }else{ + editBatt(); + } }else{ } //楠岃瘉閲嶈椤规槸鍚︿负绌猴紝涓虹┖鍒欐彁绀猴紱 //function backpage(){window.location.href="ele-param1.html";} // setTimeout(backpage,500); }); $("#cancel").click(function(){ - window.location.href="ele-param1.html"; + window.location.href="ele-param2.html"; }); }); diff --git a/gx_tieta/WebRoot/mobil/ele-param2.html b/gx_tieta/WebRoot/mobil/ele-param2.html new file mode 100644 index 0000000..31cc91e --- /dev/null +++ b/gx_tieta/WebRoot/mobil/ele-param2.html @@ -0,0 +1,543 @@ +<!DOCTYPE html> +<html lang="en" class="full-height"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1, user-scalable=no"> + <meta http-equiv="X-UA-Compatible" content="ie=edge"> + <title>鐢宠鐢垫睜缁勫畨瑁�</title> + <link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css"/> + <link rel="stylesheet" href="css/basic.css"> + <link rel="stylesheet" href="src/css/layui.css"> + <link rel="stylesheet" href="app/css/common.css"> + <link rel="stylesheet" href="app/css/map.css"> + <link rel="stylesheet" type="text/css" href="css/tbl.css"> + <link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.css"> + <script src="js/jquery-1.8.3.js"></script> + <script src="mobilJs/jquery.mobile-1.4.5.min.js"></script> + <style type="text/css"> + + + .checkdata{ + display:inline-block;width:48%;margin:0 0 0 0;float:left; + } + + .next-page, .pre-page { + position: fixed; + width: 40px; + height: 40px; + top: 50%; + margin-top: -15px; + } + .next-page { + right: 0; + } + .pre-page { + left: 0; + } + table { + margin-top:.5em; + border-collapse:separate; + border-spacing:0 .5em; + } + + tbody tr td{ + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; + } + .ui-table-reflow td .ui-table-cell-label,.ui-table-reflow th .ui-table-cell-label { + padding: .4em; + min-width: 35%; + display: inline-block; + margin: -.4em 1em -.4em -.4em; + } + .ui-select .ui-btn select{ + width:100%; + } + .mt6{ + margin:6em 0 0 0; + } + .pl5{ + padding-left:5.9em; + } + .operat-but{ + margin:0 0 0 8em; + padding: 0.1em 2em; + + background-color: #dddddd4d!important; + } + .abs{ + position: fixed; + width:100%; + height:4.5em; + overflow: hidden; + z-index:999; + } + .rel-full{ + overflow-y: hidden; + + } + .mt7{ + margin-top:7em; + } + </style> +</head> +<body > + + <div class="abs"> + <div class="rel-full"> + <div class="page-header bg-gay3"> + <div class="layui-row h40"> + <div class="layui-col-xs3 layui-col-md1 full-height"> + <a href="index.html" class="layui-btn layui-btn-primary layui-btn-sm mrt5 mrl8"><i class="fa fa-reply mrr4"></i>杩斿洖</a> + </div> + <div class="layui-col-xs6 layui-col-md10 full-height line-height40">鐢宠鐢垫睜缁勫畨瑁�</div> + <div class="layui-col-xs3 layui-col-md1 full-height line-height40 t-align-right t-align-right"> + <!-- <button class="layui-btn layui-btn-primary layui-btn-sm mrr8" id="homeInfo"><i class="fa fa fa-bars mrr4"></i>鍔熻兘</button> --> + </div> + </div> + </div> + <div class="page-content abs abs-top40"> + <div class="rel-full"> + <div id="map" class="full-height"></div> + <div id="mapSearch" class="map-search-container"> + <div class="layui-form layui-form-pane" action=""> + <div class="layui-form-item"> + <label class="layui-form-label"><i class="fa fa-search"></i></label> + <div class="layui-input-block"> + <input type="text" name="title" id="searchInput" autocomplete="off" placeholder="鏈烘埧鎼滅储" class="layui-input"> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + <!-- 涓讳綋鍐呭 --> + <div data-role="main" class="mt7"> + <div class="pre-page"><a href="#" class="ui-btn ui-corner-all ui-icon-carat-l ui-btn-icon-notext">鍥炬爣</a></div> + <div class="next-page"><a href="#" class="ui-btn ui-corner-all ui-icon-carat-r ui-btn-icon-notext">鍥炬爣</a></div> + <!-- 琛ㄦ牸瀹瑰櫒 --> + <div class="tbl-container"></div> + <table data-role="table" class="ui-responsive ui-shadow" id="tab" > + + </table> + </div> + <div data-role="footer" data-position="fixed" data-theme="a"> + <div data-role="navbar"> + <ul> + <li><a href="index.html" id="cancel" class="ui-btn ui-btn-inline ui-corner-all ui-btn-icon-delete" data-position-to="window" data-icon="delete" data-role="button">棣栭〉</a></li> + <li><a href="#yourPopup" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all ui-btn-icon-check" data-position-to="window" data-icon="check" data-role="button">鏂板缓</a></li> + </ul> + </div> + </div> + <div data-role="popup" id="yourPopup" class="ui-content" data-overlay-theme="b"> + <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-right">鍏抽棴</a> + <h1>閫夋嫨鏂板缓鐢垫睜缁勪釜鏁�</h1> + <fieldset data-role="controlgroup" > + + + <select id="newbattnum" data-mini="true"> + <option value="1">鏂板缓1涓數姹犵粍</option> + <option value="2">鏂板缓2涓數姹犵粍</option> + <option value="3">鏂板缓3涓數姹犵粍</option> + <option value="4">鏂板缓4涓數姹犵粍</option> + </select> + + + </fieldset> + + <div data-role="controlgroup" data-type="horizontal" class="mt6"> + <a href="" id="sure" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-check pl5" >纭畾</a> + <a href="" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-delete pl5" >鍙栨秷</a> + </div> + </div> + + <!-- 瀛樺偍鏈烘埧淇℃伅鍒楄〃 --> + <div id="searchHomeIframe"></div> + <!-- 鏈烘埧鏌ヨ瀛樺偍鏁版嵁--> + <div id="homeLocation"></div> + <!-- 瀛樺湪鏈烘埧淇℃伅 --> + <div id="homeInfoIframe"></div> + <script src="src/layui.all.js"></script> + <script type="text/javascript" src="js/tbl.js"></script> + <script type="text/javascript" src="mobilJs/base.js"></script> + <script> + + function getEditButIndex(t){ + console.warn($(t).attr("but-index")+' 淇敼'); + var index = $(t).attr("but-index"); + setcookieedit(index); + //window.location.href="batt-infor-unapproved-edit.html"; + return ; + } + + + $(document).ready(function(){ + +聽 ($('a[data-rel="back"]')).on('click',function(event) { +聽 聽 event.preventDefault(); +聽 聽 event.stopImmediatePropagation(); + window.location.href="ele-param2.html"; +聽 }); + +}); + + + + // 鎼滅储鏈烘埧鑾峰彇鐒︾偣 + $('#searchInput').on('focus', function() { + $(this).blur(); + iframePopup = layer.open({ + type: 2 + ,closeBtn: 0 + ,title: false + ,area: ['100%', '100%'] + ,full: true + ,anim: 5 + ,content: 'iframe/searchBatt.html' + }); + }); + + // 鏌ヨ鏈烘埧 + findHome(); + function findHome() { + var tmp = { + StationName1:'', + StationName2: '', + StationName5:'' + }; + + // 鏌ヨ鏈烘埧淇℃伅 + $.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(result){ + var rs = JSON.parse(result.result); + if(rs.code==1){ + homeSource = []; + var data = rs.data; + for(var i=0; i<data.length; i++) { + var _data = data[i]; + var tmp = { + label: _data.StationName+'('+_data.StationId+')', + province: _data.StationName1, + city: _data.StationName2, + county: _data.StationName5, + home: _data.StationName, + homeid: _data.StationId + }; + + // 娣诲姞鍒拌祫婧� + homeSource.push(tmp); + } + //console.log(homeSource) + // 璁剧疆璧勬簮鍐呭 + $('#searchHomeIframe').data('homeSource', homeSource); + } + }); + + } + + + + + // 鏈烘埧瀹氫綅闈㈡澘 + $('#homeLocation').on('click', function() { + var homeInfo = $(this).data('homeInfo'); + console.warn(homeInfo); + searchBattLife(); + }); + + + + //鎷︽埅瀹夊崜鍥為��鎸夐挳 + history.pushState(null, null, location.href); + window.addEventListener('popstate', function(event) { + history.pushState(null, null, location.href ); + //姝ゅ鍔犲叆鍥為��鏃朵綘瑕佹墽琛岀殑浠g爜 + }); + + var arrTd=new Array(); //褰撳墠琛ㄦ牸td鏁版嵁 + var tblCon = $('.tbl-container'); + var Page = { + pageSize:20, //姣忛〉鐨勮鏁� + pageCurr:1, //褰撳墠椤电爜鏁� + pageAll:0, + }; + + + $("#sure").click(function(){ + var currentlength = Math.floor(arrTd.length/34); + if(currentlength<Page.pageSize){ + setcookieCreat(currentlength-1); + }else{ + setcookieCreat(Page.pageSize-1); + } + window.location.href="batt-infor-conf-temp1.html"; + }); + + var arrTh = [ '鏈烘埧缂栧彿', '鐪�', '鍩庡競','鍖哄幙','鏈烘埧鍚嶇О','璁惧鍚嶇О','鏈烘埧IP','FBS璁惧ID(閲嶈)','FBS璁惧IP(閲嶈)','瀛愮綉鎺╃爜','缃戝叧','FBS璁惧鍚嶇О','FBS鐢垫睜绱㈠紩(0-3)','鐢垫睜缁処D','鏈烘埧鍐呯數姹犵粍缂栧彿','鐢垫睜缁勫悕绉�','娴厖鐢靛帇闃�鍊�(V)','绂荤嚎鐢靛帇闃�鍊�(V)','娴厖鐢垫祦闃�鍊�(A)','鍗曚綋鏁伴噺','鏍囩О瀹归噺(AH)','鏍囩О鍗曚綋鐢靛帇(V)','鏍囩О鍗曚綋鍐呴樆(m惟)','鏍囩О鍗曚綋鐢靛','鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�(V)','璐熻浇鐢垫祦(A)','鏈�澶ф牳瀹圭數娴�(A)','鍩虹珯鍙风爜','鐢垫睜鍝佺墝','鐢垫睜鍨嬪彿','鐢垫睜鐢熶骇鏃ユ湡','鎶曞叆浣跨敤鏃ユ湡','瀹夎浜哄憳','']; + dataArr = []; + var startTime = "1980-01-01"; + var endTime = new Date().format('yyyy-MM-dd'); + var tbl = $('.tbl-container'); + createTbl(tbl, arrTh, dataArr); + $(document).ready(function(){ + setPage(); + + //newbattnum; + + Page.pageCurr=1; + //searchBattLife(); + + }); + + function setcookieCreat(index){ + var arrcookie = new Array(); + for(var i=0;i<33;i++){//鍏�33椤� + var value = Math.floor(33*index); + console.info(value); + value = Math.floor(value+i); + if(i==13){//鏂板缓鍔熻兘锛岀數姹犵粍ID榛樿涓哄綋椤垫渶鍚庝竴涓數姹犵粍ID鍙峰姞1 + var groupid = Math.floor(arrTd[value]+1); + console.info(groupid); + arrcookie.push(groupid); + }else{ + console.info(value); + arrcookie.push(arrTd[value]); + } + } + console.info($("#newbattnum").val()); + arrcookie.push($("#newbattnum").val()); + + //console.info(arrcookie); + var json=window.JSON.stringify(arrcookie); + setCookie("eleparm",json); //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗� + } + function setcookieedit(index){ + var arrcookie = new Array(); + for(var i=0;i<33;i++){//鍏�33椤� + var value = Math.floor(33*index); + console.info(value); + value = Math.floor(value+i); + if(i==13){//鏂板缓鍔熻兘锛岀數姹犵粍ID榛樿涓哄綋椤垫渶鍚庝竴涓數姹犵粍ID鍙峰姞1 + var groupid = Math.floor(arrTd[value]+1); + console.info(groupid); + arrcookie.push(groupid); + }else{ + console.info(value); + arrcookie.push(arrTd[value]); + } + } + console.info($("#newbattnum").val()); + arrcookie.push($("#newbattnum").val()); + arrcookie.push("edit"); + //console.info(arrcookie); + var json=window.JSON.stringify(arrcookie); + setCookie("eleparm",json); //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗� + window.location.href="batt-infor-conf-temp1.html"; + } + // 鏌ヨ鍐呭 + function searchBattLife(){ + var temp = createSearchParam(); + var json = JSON.stringify(temp); + console.info(json); + arrTd = new Array(); + var load; + $.ajax({ + type:"post", + url:"BattInfAction!searchInform", + async:true, + datatype:'text', + data:"json="+json, + success:function(data){ + //console.info(data); + var data = JSON.parse(data.result); + //layer.close(load); + console.info(data); + if(data.code==1&&data.data.length>0){ + data=data.data; + var index = 0; + var ArryTb= new Array(); + for(i=0;i<data.length;i++){ + arrTd.push(data[i].StationId); //鏈烘埧缂栧彿 + arrTd.push(data[i].StationName1); // 鐪� + arrTd.push(data[i].StationName2); // 甯� + arrTd.push(data[i].StationName5); // 鍖�/鍘� + arrTd.push(data[i].StationName3); //鏈烘埧鍚嶇О + arrTd.push(data[i].StationName4); //璁惧鍚嶇О + arrTd.push(data[i].StationIp); //鏈烘埧ip + arrTd.push(data[i].FBSDeviceId); //FBS璁惧ID + arrTd.push(data[i].FbsDeviceIp); //FBS璁惧IP + arrTd.push(data[i].FbsDeviceIp_YM); //瀛愮綉鎺╃爜 + arrTd.push(data[i].FbsDeviceIp_WG); //缃戝叧 + arrTd.push(data[i].FBSDeviceName); //FBS璁惧鍚嶇О + arrTd.push(data[i].GroupIndexInFBSDevice); //FBS璁惧绱㈠紩 + arrTd.push(data[i].BattGroupId); //鐢垫睜缁処D + arrTd.push(data[i].BattGroupNum); //鏈烘埧鍐呯數姹犵粍缂栧彿 + arrTd.push(data[i].BattGroupName); //鐢垫睜缁勫悕绉� + arrTd.push(data[i].FloatVolLevel); //娴厖鐢靛帇闃�鍊� + arrTd.push(data[i].OfflineVolLevel); //绂荤嚎鐢靛帇闃�鍊� + arrTd.push(data[i].BattFloatCurrent); //娴厖闃�鍊� + arrTd.push(data[i].MonCount); //鍗曚綋鏁伴噺 + arrTd.push(data[i].MonCapStd); //鏍囩О瀹归噺 + arrTd.push(data[i].MonVolStd); //鏍囩О鍗曚綋鐢靛帇 + arrTd.push(data[i].MonResStd); //鏍囩О鍗曚綋鍐呴樆 + arrTd.push(data[i].MonSerStd); //鏍囩О鍗曚綋鐢靛 + arrTd.push(data[i].MonVolLowToAvg); //鍗曚綋鐢靛帇娆′綆鍋忕Щ閲� + + arrTd.push(data[i].Load_curr); //璐熻浇鐢垫祦 + arrTd.push(data[i].DisCurrMax); //鏈�澶ф牳瀹圭數娴� + arrTd.push(data[i].station_phone); //鍩虹珯鎵嬫満鍙风爜 + + + arrTd.push(data[i].BattProducer); //鐢垫睜鍝佺墝 + arrTd.push(data[i].BattModel); //鐢垫睜鍨嬪彿 + arrTd.push(data[i].BattProductDate.substr(0,10)); //鐢垫睜鐢熶骇鏃ユ湡 + arrTd.push(data[i].BattInUseDate.substr(0,10)); //鎶曞叆浣跨敤鏃ユ湡 + arrTd.push(data[i].install_user); // 璁惧瀹夎浜哄憳 + arrTd.push('<a onclick="getEditButIndex(this)" id="edit" class="ui-btn ui-btn-inline ui-corner-all operat-but" data-position-to="window"'+'but-index='+i+'>淇敼</a>'); + Page.pageAll = data[i].num; + } + + }else{ + Page.pageAll = 0; + } + setPage(); + createTbl(tblCon, arrTh, arrTd); + } + }); + + /* for(var i=0;i<340;i++){ + if(i%34==33){ + //<a href="count-report.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">杩斿洖</a> + console.info(i); + arrTd[i]='<a onclick="getEditButIndex(this)" id="edit" class="ui-btn ui-btn-inline ui-corner-all operat-but" data-position-to="window"'+'but-index='+i+'>淇敼</a>'; + + continue; + + } if(i==13){ + arrTd[i]=1002102; + }else{ + arrTd[i]=i*10; + } + } + + createTbl(tblCon, arrTh, arrTd); + */ + } + //鏋勯�犳煡璇㈡潯浠� + function createSearchParam(){ + var homeLocation = $('#homeLocation').data('homeInfo'); + console.info(homeLocation); + var temp = { + page:Page, + binf:{ + StationName1:homeLocation.province, + StationName2:homeLocation.city, + StationName5: homeLocation.county, + StationName:homeLocation.home, + }, + }; + console.info(temp); + return temp; + + } + function getUpdateArr(temp){ + var arr = new Array(); + var obj = new Object(); + obj.StationId = temp[0]; // 鏈烘埧缂栧彿 + obj.StationName = (temp[1]+"-"+temp[2]+"-"+temp[4]+"-"+temp[5]); // 鎷兼帴鏈烘埧鍚嶇О + obj.StationName1 = temp[1]; // 鐪� + obj.StationName2 = temp[2]; // 甯� + obj.StationName5 = temp[3]; // 鍖�/鍘� + obj.StationName3 = temp[4]; // 鏈烘埧鍚嶇О + obj.StationName4 = temp[5]; // 璁惧鍚嶇О + obj.StationIp = temp[6]; //鏈烘埧ip + obj.FBSDeviceId = temp[7]; //璁惧id + obj.FbsDeviceIp = temp[8]; //璁惧ip + obj.FbsDeviceIp_YM = temp[9]; // 璁惧鎺╃爜 + obj.FbsDeviceIp_WG = temp[10]; // 缃戝叧 + obj.FBSDeviceName = temp[11]; //璁惧鍚嶇О + obj.GroupIndexInFBSDevice = temp[12]; //fbs璁惧绱㈠紩 + obj.BattGroupId = temp[13]; //鐢垫睜缁刬d + obj.BattGroupNum = temp[14]; //鏈烘埧鍐呯數姹犵粍缂栧彿 + obj.BattGroupName = temp[15]; //鐢垫睜缁勫悕绉� + obj.FloatVolLevel = temp[16]; //娴厖鐢靛帇闃�鍊� + obj.OfflineVolLevel = temp[17]; //绂荤嚎鐢靛帇闃�鍊� + obj.BattFloatCurrent = temp[18]; //娴厖鐢垫祦闃�鍊� + obj.MonCount = temp[19]; //鍗曚綋鏁伴噺 + obj.MonCapStd = temp[20]; //鏍囩О瀹归噺 + obj.MonVolStd = temp[21]; //鏍囩О鐢靛帇 + obj.MonResStd = temp[22]; //鏍囩О鍐呴樆 + obj.MonSerStd = temp[23]; //鏍囩О鐢靛 + obj.MonVolLowToAvg = temp[24]; //鍗曚綋鐢靛帇娆′綆鍋忕Щ閲� + + + obj.Load_curr = temp[25]; //璐熻浇鐢垫祦 + obj.DisCurrMax = temp[26]; //鏈�澶ф牳瀹圭數娴� + obj.station_phone = temp[27]; //鍩虹珯鍙风爜 + + obj.BattProducer = temp[28]; //鐢垫睜鍝佺墝 + obj.BattModel = temp[29]; //鐢垫睜鍨嬪彿 + obj.BattProductDate = temp[30]; //鐢垫睜鐢熶骇鏃ユ湡 + obj.BattInUseDate = temp[31]; //鐢垫睜浣跨敤鏃ユ湡 + obj.install_user = temp[32]; //瀹夎浜哄憳 + arr.push(obj); + console.info(arr); + return arr; + } + + $(function() { + //鐐瑰嚮涓婁竴椤� + $('.pre-page').on('click', 'a', function() { + if(Page.pageCurr>1){ + Page.pageCurr = Page.pageCurr - 1; + searchBattLife(); + } + }); + + //鐐瑰嚮涓嬩竴椤� + $('.next-page').on('click', 'a', function() { + var pageNum = Math.ceil(Page.pageAll/Page.pageSize); + if(Page.pageCurr<pageNum){ + Page.pageCurr = Page.pageCurr + 1; + searchBattLife(); + } + }); + }); + + // 鍒ゆ柇鏄惁鏄剧ず缈婚〉鎸夐挳 + function setPageTurning(isShowPre, isShowNext) { + if(isShowPre) { // 鍒ゆ柇鏄惁鏄剧ず鍚戜笂缈婚〉鎸夐挳 + $('.pre-page').show(); + }else { + $('.pre-page').hide(); + } + + if(isShowNext) { // 鍒ゆ柇鏄惁鏄剧ず鍚戜笅缈婚〉鎸夐挳 + $('.next-page').show(); + }else { + $('.next-page').hide(); + } + } + + //璁剧疆椤甸潰鐨勮烦杞摼鎺� + function setPage(){ + if(Page.pageCurr <= 1){ + $('.pre-page').hide(); + }else{ + $('.pre-page').show(); + } + var pageNum = Math.ceil(Page.pageAll/Page.pageSize); + + if(Page.pageCurr < pageNum){ + $('.next-page').show(); + }else{ + $('.next-page').hide(); + } + + } + + </script> +</body> +</html> \ No newline at end of file diff --git a/gx_tieta/WebRoot/mobil/iframe/searchBatt.html b/gx_tieta/WebRoot/mobil/iframe/searchBatt.html new file mode 100644 index 0000000..47678b1 --- /dev/null +++ b/gx_tieta/WebRoot/mobil/iframe/searchBatt.html @@ -0,0 +1,147 @@ +<!DOCTYPE html> +<html lang="en" class="full-height"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1, user-scalable=no"> + <meta http-equiv="X-UA-Compatible" content="ie=edge"> + <title>鐧惧害鍦板浘</title> + <link rel="stylesheet" href="../css/basic.css"> + <link rel="stylesheet" href="../src/css/layui.css"> + <link rel="stylesheet" href="../app/css/common.css"> + <link rel="stylesheet" href="../app/css/map.css"> + <link rel="stylesheet" href="../font-awesome-4.7.0/css/font-awesome.css"> +</head> +<body class="full-height"> + <div class="rel-full"> + <div class="page-header bg-gay3"> + <div class="layui-row h40"> + <div class="layui-col-xs12 layui-col-md12 full-height line-height40"> + <div class="layui-form mrt4 mrr8" action=""> + <div class="layui-form-item"> + <div class="back-his" id="closeIframe"> + <i class="fa fa-angle-left"></i> + </div> + <div class="layui-input-block"> + <input type="text" name="title" id="searchInput" autocomplete="off" placeholder="璇疯緭鍏ユ満鎴跨殑鍚嶇О" class="layui-input"> + </div> + <div class="location-his" id="searchBtn"> + <i class="fa fa-check"></i> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="page-content abs abs-top40"> + <div class="rel-full"> + <div id="homeList" class="home-list mrt8 mrr8"></div> + </div> + + </div> + </div> + <script src="../js/jquery-1.8.3.js"></script> + <script src="../src/layui.js"></script> + <script src="../app/js/common.js"></script> + <script> + // layui妯″潡 + layui.use(['layer', 'laytpl', 'form'], function() { + var layer = layui.layer; // 鑾峰彇layer妯″潡 + var laytpl = layui.laytpl; // 鑾峰彇laytpl妯″潡 + var form = layui.form; // 鑾峰彇form妯″潡 + var upload = layui.upload; // 鑾峰彇upload妯″潡 + + // 鍏抽棴form + var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩 + $('#closeIframe').click(function() { // 璁剧疆鐐瑰嚮鎸夐挳鍏抽棴褰撳墠iframe + parent.layer.close(index); + }); + + // 鑾峰彇鎵�鏈夋満鎴跨殑鍒楄〃 + var homeSource = parent.$('#searchHomeIframe').data('homeSource'); + // 瀹炰緥鍖栨暟鎹娴� + var checkHomeData = new CheckData(); + checkHomeData.setSource(homeSource); + createHomeList($('#homeList'), homeSource); + + + // 鏇存敼鏂囨湰妗嗙殑鍊艰幏鍙� + $('#searchInput').on('input propertychange', function() { + var _val = $(this).val(); + $(this).data('homeInfo', ''); + // console.log($(this).data('homeInfo')); + var data = checkHomeData.getData(_val); + createHomeList($('#homeList'), data); + }); + + // 鐐瑰嚮鏌ヨ鑾峰彇homeInfo鐨勫�� + var homeLocation = parent.$('#homeLocation'); + $('#searchBtn').click(function() { + console.log(111); + var homeInfo = $('#searchInput').data('homeInfo'); + console.log(222); + if(homeInfo) { + // console.log(homeInfo); + homeLocation.data('homeInfo', homeInfo); + homeLocation.click(); + console.log(333); + parent.layer.close(index); + //searchBattLife() + }else { + layer.msg('璇烽�夋嫨涓嬫柟鐨勬満鎴�'); + } + }); + + // 鐐瑰嚮鏈烘埧鍒楄〃瑙﹀彂 + $('#homeList').on('click', '.home-item', function() { + var homeInfo = $(this).data('homeInfo'); + // 婵�娲婚�変腑鐨勮 + $('#homeList .home-item').removeClass('ac-this'); + $(this).addClass('ac-this'); + // 鑾峰彇鏈烘埧淇℃伅瀹氫綅鏈烘埧 + if(homeInfo.label.length!=0) { + $('#searchInput').val(homeInfo.label); + $('#searchInput').data('homeInfo', homeInfo); + }else { + $('#searchInput').data('homeInfo', ''); + } + }); + + // 鏍规嵁鏁版嵁鐢熸垚鍒楄〃 + function createHomeList(ele, data) { + // 娓呯┖鍒楄〃 + ele.text(''); + + // 璁剧疆榛樿鐨刣ata鍊� + var defaultData = [ + {label: ''} + ,{label: ''} + ,{label: ''} + ,{label: ''} + ,{label: ''} + ,{label: ''} + ]; + if(data.length == 0) { + data = defaultData; + } + + // 閬嶅巻data鐨勫�� + for(var i=0; i<data.length; i++) { + var _data = data[i]; + var homeItem = $('<div class="home-item"></div>'); + var homeIcon = $('<span class="home-item-icon fa fa-home"></span>'); + var homeTxt = $('<span class="home-item-txt">'+_data.label+'</span>'); + if(_data.label.length != 0) { + homeItem.append(homeIcon); + } + + homeItem.append(homeTxt); + homeItem.data('homeInfo', _data); + + ele.append(homeItem); + ele.append('<hr class="layui-bg-gray">') + } + } + }); + </script> +</body> +</html> \ No newline at end of file diff --git a/gx_tieta/WebRoot/mobil/testControl.html b/gx_tieta/WebRoot/mobil/testControl.html index 9b31db9..a06dd4e 100644 --- a/gx_tieta/WebRoot/mobil/testControl.html +++ b/gx_tieta/WebRoot/mobil/testControl.html @@ -20,7 +20,7 @@ <div data-role="content"> <ul data-role="listview" data-inset="true"> <li> - <a href="ele-param1.html" target="_top">鐢宠娣诲姞鐢垫睜缁�</a> + <a href="ele-param2.html" target="_top">鐢宠娣诲姞鐢垫睜缁�</a> </li> </ul> -- Gitblit v1.9.1