Merge branch 'dev_lxw' of https://gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
| | |
| | | // 设置通信计数
|
| | | status.setText('count', "通信计数:"+data.dev_commcount);
|
| | |
|
| | | // 设置设备版本号
|
| | | status.setText('devVersion', '设备版本号:'+data.dev_version);
|
| | | |
| | | // 设置丢包率
|
| | | var errorCount = data.dev_errcommcount;
|
| | | var allCount = data.dev_commcount+errorCount;
|
| | |
| | | VideoOrImage: 'video'
|
| | | })
|
| | | }
|
| | | ,exts: 'mp4|MOV|avi|rmvb'
|
| | | ,accept: 'video' //视频
|
| | | ,choose: function(obj) {
|
| | | var files = this.files = obj.pushFile();
|
| | |
| | | }
|
| | | },
|
| | | {
|
| | | name:'devVersion',
|
| | | type: 'text',
|
| | | status: 0,
|
| | | notShow: false,
|
| | | content: {
|
| | | text: '设备版本号:???'
|
| | | }
|
| | | },
|
| | | {
|
| | | name: 'signal',
|
| | | type: 'text',
|
| | | status: 0,
|
| | |
| | | </td>
|
| | | </tr>
|
| | |
|
| | | <tr>
|
| | | <td>*通讯计数</td>
|
| | | <td>
|
| | | <input type="text" id="tongxunnumber" class="unable" data-mini="true" />
|
| | | </td>
|
| | | </tr>
|
| | |
|
| | | <tr>
|
| | | <td>*丢包率</td>
|
| | | <td>
|
| | | <input type="text" id="diubaonumber" class="unable" data-mini="true" />
|
| | | </td>
|
| | | </tr>
|
| | |
|
| | | <tr>
|
| | | <td>*是否验收</td>
|
| | |
| | | //setTimes($("#startTestrecord"),'2000-01-01');
|
| | | //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
|
| | | installstartdata(temp);//导入初始页面值
|
| | | getnewnumber(temp[0].binf.FBSDeviceId);
|
| | | //getnewnumber(temp[0].binf.FBSDeviceId);
|
| | | updateinstalldata();
|
| | | });
|
| | | var timeer = '';
|
| | |
| | |
|
| | |
|
| | | function selectedIndex(index){
|
| | | var battproducer = getCookie("producer");
|
| | | battproducer = JSON.parse(battproducer);
|
| | | console.info(battproducer);
|
| | | var selected='',
|
| | | i=0;
|
| | | var battproducer = ["理士","圣阳","双登","SENRY","南都","爱默生","科士达","银泰","丰日","中兴能派","光宇",
|
| | | "艾诺斯华达","雄韬","风帆","文隆","中山"];
|
| | | //onsole.info(inde)
|
| | | selected+= '<option '+'value='+temp[index].binf.BattProducer+'>'+temp[index].binf.BattProducer+'</option>';
|
| | | for(var i=0;i<battproducer.length;i++){
|
| | | if(temp[index].binf.BattProducer!=battproducer[i]){
|
| | |
| | | }
|
| | |
|
| | | function selectedIndex(index){
|
| | | var selected='',
|
| | | /* var selected='',
|
| | | i=0;
|
| | | selected+= '<option '+'value='+'理士'+'>'+'理士'+'</option>';
|
| | | selected+= '<option '+'value='+'圣阳'+'>'+'圣阳'+'</option>';
|
| | |
| | | selected+= '<option '+'value='+'中山'+'>'+' 中山'+'</option>';
|
| | | selected+= '<option '+'value='+'美的'+'>'+' 美的'+'</option>';
|
| | | selected+= '<option '+'value='+'朗达'+'>'+' 朗达'+'</option>';
|
| | | selected+= '<option '+'value='+'烽火'+'>'+' 烽火'+'</option>';*/
|
| | | var battproducer = getCookie("producer");
|
| | | battproducer = JSON.parse(battproducer);
|
| | | var selected='',
|
| | | i=0;
|
| | | for(var i=1;i<battproducer.length;i++){
|
| | | console.info(battproducer[i]);
|
| | | selected+= '<option '+'value='+battproducer[i]+'>'+battproducer[i]+'</option>'; |
| | | } |
| | | return selected;
|
| | | }
|
| | | var temp = getCookie("eleparm");
|
| | | var test=getCookie("eleparm2newbatt");
|
| | | //jifangname = JSON.parse(jifangname);
|
| | | console.info(test);
|
| | | //console.info(temp);
|
| | | temp=JSON.parse(temp);
|
| | | console.info(temp);
|
| | |
| | | </li> -->
|
| | | </ul>
|
| | | <div data-role="collapsible" data-collapsed="false">
|
| | | <h1 id="jifangzhuangtai">bts设备状态</h1>
|
| | | <div class="tbl-container"></div>
|
| | | </div>
|
| | | <div data-role="collapsible" data-collapsed="false">
|
| | | <h1 id="zhuangtai">电池组状态</h1>
|
| | | <div class="tbl-container"></div>
|
| | | </div>
|
| | | <div data-role="footer" data-position="fixed" data-theme="a"> |
| | | <div data-role="navbar">
|
| | | <ul>
|
| | | <li><a href="" id="battparm" target="_top" data-role="button" data-icon="home" data-transition="slide">电池参数</a></li>
|
| | | <li><a href="" id ="sysparm" class="ui-btn ui-btn-inline ui-corner-all ui-btn-icon-check" data-icon="check" data-role="button">系统参数</a></li>
|
| | | <li><a href="" id="signalqual" class="ui-btn ui-btn-inline ui-corner-all ui-btn-icon-check" data-icon="check" data-role="button">信号质量</a></li>
|
| | | </ul>
|
| | | </div>
|
| | | </div>
|
| | | <script type="text/javascript" src="js/tbl.js"></script>
|
| | |
| | | <script type="text/javascript" src="js/battNav.js"></script>
|
| | | <script>
|
| | | var arrTh = ['电池状态:', '端电压:', '电池电流:', '测试日期:', '测试时长:', '测试容量:', '剩余容量:', '续航时间:'];
|
| | | var tbl = $('.tbl-container').eq(0);
|
| | | |
| | | var tbl = $('.tbl-container').eq(1);
|
| | | var jifangarrTh = ['SD卡','通讯计数','通信丢包率','测试组号','设备工作状态']
|
| | | var tbl1 = $('.tbl-container').eq(0);
|
| | | var arrtdjifangstate = new Array;
|
| | | var temp = getCookie("batt");
|
| | | var batt = JSON.parse(temp);
|
| | | var arrTd1 = new Array();
|
| | | $(function() {
|
| | | //findrtstate();
|
| | | //searchStationSignal();
|
| | | searchDevSDState();
|
| | | searchBattInfo();
|
| | | //searchdiubao();
|
| | | createTbl(tbl1, jifangarrTh, arrTd1);
|
| | | //searchJifangInfo();
|
| | | //searchSysData();
|
| | | });
|
| | | $("#return").click(function(){
|
| | | var temp = getCookie("batt");
|
| | |
| | | window.location.href="testdata.html";
|
| | | }
|
| | | });
|
| | | $("#signalqual").click(function(){
|
| | | searchStationSignal();
|
| | | })
|
| | | $("#battparm").click(function(){
|
| | | searchBattparm();
|
| | | })
|
| | | $("#sysparm").click(function(){
|
| | | //console.info("aaa")
|
| | | searchSysData();
|
| | | })
|
| | | |
| | | var timeer ;
|
| | | //根据电池组id查询电池组信息
|
| | | /* function findrtstate(){
|
| | |
| | |
|
| | | //查询电池信息
|
| | | function searchBattInfo(){
|
| | | var temp = getCookie("batt");
|
| | | var batt = JSON.parse(temp);
|
| | | console.info(batt);
|
| | | |
| | | //console.info(batt);
|
| | | arrTd = new Array();
|
| | | $.ajax({
|
| | | type: "post",
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | function searchBattparm() {
|
| | | //console.info(temp);
|
| | | var temp={
|
| | | dev_id:batt.FBSDeviceId,
|
| | | }
|
| | | loadshow();
|
| | | // 查询电池参数
|
| | | $.ajax({
|
| | | type: 'post'
|
| | | ,async: true
|
| | | ,url:'Fbs9100_battparamAction_action_serchByCondition'
|
| | | ,data: 'json='+JSON.stringify(temp)
|
| | | ,dataType: 'json'
|
| | | ,success: function(res) {
|
| | | var rs = JSON.parse(res.result);
|
| | | console.log(rs);
|
| | | if(rs.code==1){
|
| | | var data = rs.data[0];
|
| | | var json=window.JSON.stringify(data);
|
| | | setCookie("control_battparm",json);
|
| | | window.location.href="control_battparm.html"
|
| | | }else{
|
| | | alert("查询失败");
|
| | | }
|
| | | loadclose();
|
| | | }
|
| | | ,complete: function() {
|
| | | loadclose();
|
| | | }
|
| | | });
|
| | | |
| | | }
|
| | | |
| | | function searchdiubao(arrTd1){
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "Fbs9100_stateAction_action_serchContactorState", |
| | | async:true, |
| | | dataType:'text',
|
| | | data:"json="+JSON.stringify({
|
| | | dev_id:batt.FBSDeviceId
|
| | | }), |
| | | success: function(data){ |
| | | data=JSON.parse(data);
|
| | | data = JSON.parse(data.result);
|
| | | console.info(data);
|
| | | if(data.code==1&&data.data.length>0){
|
| | | data = data.data[0];
|
| | | var jishu = data.dev_commcount;
|
| | | //console.info(jishu);
|
| | | arrTd1.push(jishu);
|
| | | var diubao=(data.dev_commcount==0?0:(data.dev_errcommcount*100/data.dev_commcount)).toFixed(2);
|
| | | arrTd1.push(diubao);
|
| | | arrTd1.push("电池组"+data.dev_testgroupnum);
|
| | | arrTd1.push(workstate(data.dev_workstate));
|
| | | createTbl(tbl1, jifangarrTh, arrTd1);
|
| | | }else{
|
| | | var arrTd2 = new Array();
|
| | | arrTd2.push("设备未连接")
|
| | | var jifangzhuangtai=["设备状态"]
|
| | | createTbl(tbl1,jifangzhuangtai,arrTd2);
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | function workstate(data){
|
| | | switch (data){
|
| | | case 0:
|
| | | return "在线浮充";
|
| | | break;
|
| | | case 1:
|
| | | return "放电状态";
|
| | | break;
|
| | | case 2:
|
| | | return "充电状态";
|
| | | break;
|
| | | case 3:
|
| | | return "内阻测试";
|
| | | break;
|
| | | case 4:
|
| | | return "未知" |
| | | break;
|
| | | default:{
|
| | | //未连接
|
| | | return "未连接";
|
| | | }
|
| | | break; |
| | | }
|
| | | }
|
| | | //查询设备的SD卡状态
|
| | | function searchDevSDState(){
|
| | | arrTd1=new Array();
|
| | | //console.info(batt);
|
| | | //var status = GLOBAL.circleStatus.status; |
| | | $.ajax({
|
| | | type: "post",
|
| | | url: "Bts_station_stateAction_action_serchSDCard",
|
| | | async: true,
|
| | | dataType: 'json',
|
| | | data: "json = " + JSON.stringify(batt),
|
| | | success: function(result) {
|
| | | //console.info(result);
|
| | | var rs = JSON.parse(result.result);
|
| | | console.info(rs);
|
| | | var sdStatus = (rs.data == 0)?'正常': '<span style="color: #FF0000">故障</span>';
|
| | | arrtdjifangstate .push(sdStatus);
|
| | | //console.log(sdStatus);
|
| | | // status.setText('sdCard', "SD卡状态:"+sdStatus);
|
| | | arrTd1.push(sdStatus);
|
| | | searchdiubao(arrTd1);
|
| | | clearTimeout(searchDevSDState.timeout);
|
| | | searchDevSDState.timeout = setTimeout(function() {
|
| | | searchDevSDState();
|
| | | }, 2000);
|
| | | },
|
| | | error: function() {
|
| | | clearTimeout(searchDevSDState.timeout);
|
| | | searchDevSDState.timeout = setTimeout(function() {
|
| | | searchDevSDState();
|
| | | }, 5000);
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | function searchStationSignal(){//信号强度
|
| | | var param={
|
| | | num:145,
|
| | | AT_cmd:"CSQ",
|
| | | dev_id:batt.FBSDeviceId,
|
| | | }
|
| | | loadshow();
|
| | | console.info(param);
|
| | | $.ajax({ |
| | | type:"post", |
| | | url: "Bts_gprs_stateAction_action_update?t="+(new Date().getTime()), |
| | | async:true, |
| | | dataType:'json',
|
| | | data:'json='+JSON.stringify(param), |
| | | success: function(data){ |
| | | var model = eval('('+data.result+')');
|
| | | console.info(model);
|
| | | //layer.msg(model);
|
| | | if(model.code==1){
|
| | | console.info(model.data);
|
| | | data = model.data; |
| | | console.info(data.ack_inf);
|
| | | var msg=formatSignal(data.ack_inf);
|
| | | console.info(msg.signal);
|
| | | loadclose();
|
| | | alert(msg.signal);
|
| | | }
|
| | | },error:function(e){
|
| | | var model = {
|
| | | code:0,
|
| | | data:e,
|
| | | msg:'通信失败'
|
| | | };
|
| | | } |
| | | });
|
| | | }
|
| | | // 解析信号质量结果
|
| | | function formatSignal(signal) {
|
| | | var rs = {
|
| | | signal: '未知',
|
| | | bitError: '未知',
|
| | | img: 0
|
| | | };
|
| | | var ptn = new RegExp(".*:\\s(\\d{2}),(\\d{2})");
|
| | | var testCsq = ptn.test(signal);
|
| | | if(testCsq) {
|
| | | rs.signal = RegExp.$1;
|
| | | rs.bitError = RegExp.$2;
|
| | | if(rs.signal>25) {
|
| | | rs.img = 1;
|
| | | rs.signal += '(强)';
|
| | | }else if(rs.signal>19) {
|
| | | rs.img = 1;
|
| | | rs.signal += '(中)';
|
| | | }else {
|
| | | rs.signal += '(弱)';
|
| | | }
|
| | | }
|
| | | //console.info(rs);
|
| | | return rs;
|
| | | }
|
| | | |
| | | |
| | | // 查询设备的系统参数
|
| | | function searchSysData() {
|
| | | // 开启等待框
|
| | | loadshow();
|
| | | var temp = {
|
| | | num:128,
|
| | | dev_id:batt.FBSDeviceId,
|
| | | }
|
| | | console.info(temp);
|
| | | // 请求后台
|
| | | $.ajax({
|
| | | type: "post",
|
| | | url: "Fbs9100_sysparamAction_action_serchByCondition",
|
| | | async: true,
|
| | | dataType: 'json',
|
| | | data: "json = " + JSON.stringify(temp),
|
| | | success: function(result) {
|
| | | var rs = JSON.parse(result.result);
|
| | | console.info(rs);
|
| | | if(rs.code == 1){
|
| | | var data = rs.data[0];
|
| | | console.info(data);
|
| | | //if(showSU) {
|
| | | //alert('读取成功', true);
|
| | | var json=window.JSON.stringify(data);
|
| | | setCookie("control_parm",json);
|
| | | window.location.href="control_sysparm.html"
|
| | | loadclose();
|
| | | //}
|
| | | }else{
|
| | | noContent.showNoContent('查询失败!');
|
| | | loadclose();
|
| | | }
|
| | | },
|
| | | error: function() {
|
| | | noContent.showNoContent('查询失败!');
|
| | | loadclose();
|
| | | // 关闭等待 |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | |
|
| | | var battstate=['无','浮充','充电','放电','均充','电导/内阻','电导','温度','连接条','在线监测'];
|
| | | function getBattstate(state){
|
New file |
| | |
| | | <!DOCTYPE html>
|
| | | <html lang="en">
|
| | | <head>
|
| | | <meta charset="UTF-8">
|
| | | <title>系统参数</title>
|
| | | <meta name="viewport" content="width=device-width,initial-scale=1">
|
| | | <meta name="apple-mobile-web-app-capable" content="yes">
|
| | | <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
| | | <link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css"/>
|
| | | <link href="mobilCss/mobiscroll.core-2.5.2.css" rel="stylesheet" type="text/css" />
|
| | | <link href="mobilCss/mobiscroll.animation-2.5.2.css" rel="stylesheet" type="text/css" />
|
| | | <link rel="stylesheet" type="text/css" href="css/tbl.css">
|
| | | <link rel="stylesheet" type="text/css" href="src/css/layui.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>
|
| | | <style type="text/css">
|
| | | |
| | | /*规定面板的样式*/
|
| | | .ui-panel {
|
| | | width: 80%;
|
| | | }
|
| | | .ui-panel-dismiss{
|
| | | width: 20%;
|
| | | }
|
| | | .ui-panel-inner{
|
| | | padding:0 !important;
|
| | | }
|
| | | .ui-collapsible-heading-toggle{
|
| | | padding-left: 1em !important;
|
| | | }
|
| | | .panel-header{
|
| | | padding: 8px 0;
|
| | | font-size: 1.2em;
|
| | | text-indent: 1em;
|
| | | background-color: #DFDCDC;
|
| | | }
|
| | | /*规定开关的位置*/
|
| | | .ui-flipswitch {
|
| | | margin-left: 0.5em;
|
| | | }
|
| | | |
| | | .ui-field-contain{
|
| | | padding: 0 0.6em ;
|
| | | }
|
| | | .ui-field-contain {
|
| | | border-bottom-color: #828282;
|
| | | border-bottom-color: rgba(0,0,0,.15);
|
| | | border-bottom-width: 1px;
|
| | | border-bottom-style: none;
|
| | | }
|
| | | .sicon{ |
| | | display:inline-block;width:4%;margin:1em 0;float:left; |
| | | }
|
| | | .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;
|
| | | }
|
| | | .bg-line{
|
| | | background-color:#ddd;
|
| | | }
|
| | | .operat-but{
|
| | | margin: 0;
|
| | | padding-top: 0.1em;
|
| | | padding-bottom: 0.1em;
|
| | | |
| | | }
|
| | | .ui-table-reflow td .ui-table-cell-label, .ui-table-reflow th .ui-table-cell-label{
|
| | | width:35%;
|
| | | } |
| | | .fr{
|
| | | float:right;
|
| | | }
|
| | | </style>
|
| | | <link rel="stylesheet" href="css/fgpanel.css">
|
| | | </head>
|
| | | <body>
|
| | | <div data-role="page">
|
| | | |
| | | <!-- 头部内容 -->
|
| | | <div data-role="header" data-position="fixed">
|
| | | <a href="control.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>
|
| | | <!-- 主体内容 -->
|
| | | <div data-role="main">
|
| | | <!-- 表格容器 -->
|
| | | <div class="tbl-container"></div>
|
| | | <table data-role="table" class="ui-responsive ui-shadow" id="tab" >
|
| | | |
| | | </table>
|
| | | </div>
|
| | |
|
| | | |
| | | </div>
|
| | | <!-- 存储homeinfo的值 -->
|
| | | <div id="homeInfoIframe"></div>
|
| | | <div id="homeInfoIframeAll"></div>
|
| | | </body>
|
| | |
|
| | | <script src="mobilJs/mobiscroll.core-2.5.2.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.core-2.5.2-zh.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.datetime-2.5.1.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.datetime-2.5.1-zh.js" type="text/javascript"></script>
|
| | | <script type="text/javascript" src="js/tbl.js"></script>
|
| | | <script type="text/javascript" src="mobilJs/base.js"></script>
|
| | | <script type="text/javascript" src="src/layui.all.js"></script>
|
| | |
|
| | | <script type="text/javascript">
|
| | | /* 获取点击的是哪个按钮 */
|
| | |
|
| | | var arrTd = new Array(); //当前表格td数据
|
| | | var tblCon = $('.tbl-container');
|
| | | var Page = {
|
| | | pageSize:20, //每页的行数
|
| | | pageCurr:1, //当前页码数
|
| | | pageAll:0,
|
| | | };
|
| | | |
| | | var arrTh = [ '设备ID', '机房名称', '电池标称容量','电池标称内阻','电池组数','每组电池单体数量','单体标称电压','电池组端标称电压','电池标称温度','电池浮充电压阈值','电池浮充电流阈值','在线电压低阈值','电池组连接类型'];
|
| | | dataArr = [];
|
| | | var tbl = $('.tbl-container');
|
| | | var temp = getCookie("control_battparm");
|
| | | temp = JSON.parse(temp);
|
| | | console.info(temp);
|
| | | createTbl(tbl, arrTh, dataArr);
|
| | | $(document).ready(function(){
|
| | | Page.pageCurr=1; |
| | | console.info(temp);
|
| | | setBattLife();
|
| | | //searchBattLife();
|
| | | //console.info($("#getnumber").val()); |
| | | });
|
| | | |
| | | function setBattLife(){
|
| | | data = temp;
|
| | | var index=0;
|
| | | arrTd[index++] = data.dev_id;
|
| | | arrTd[index++] = data.StationName;
|
| | | arrTd[index++] = data.STD_CAP+"AH";
|
| | | arrTd[index++] = data.STD_RES+"uΩ";
|
| | | arrTd[index++] = data.BattGroupCount;
|
| | | arrTd[index++] = data.EachGroupBattCount;
|
| | | arrTd[index++] = data.MonomerVol+"V";
|
| | | arrTd[index++] = data.GroupVol+"V";
|
| | | arrTd[index++] = data.BattTemp+"℃";
|
| | | arrTd[index++] = data.FloatChargeVol+"v";
|
| | | arrTd[index++] = data.FloatChargeCurr+"A";
|
| | | arrTd[index++] = data.OnlineVolLow+"V";
|
| | | arrTd[index++] = data.GroupConnType;
|
| | | createTbl(tblCon, arrTh, arrTd);
|
| | | }
|
| | |
|
| | | </script>
|
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html>
|
| | | <html lang="en">
|
| | | <head>
|
| | | <meta charset="UTF-8">
|
| | | <title>系统参数</title>
|
| | | <meta name="viewport" content="width=device-width,initial-scale=1">
|
| | | <meta name="apple-mobile-web-app-capable" content="yes">
|
| | | <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
| | | <link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css"/>
|
| | | <link href="mobilCss/mobiscroll.core-2.5.2.css" rel="stylesheet" type="text/css" />
|
| | | <link href="mobilCss/mobiscroll.animation-2.5.2.css" rel="stylesheet" type="text/css" />
|
| | | <link rel="stylesheet" type="text/css" href="css/tbl.css">
|
| | | <link rel="stylesheet" type="text/css" href="src/css/layui.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>
|
| | | <style type="text/css">
|
| | | |
| | | /*规定面板的样式*/
|
| | | .ui-panel {
|
| | | width: 80%;
|
| | | }
|
| | | .ui-panel-dismiss{
|
| | | width: 20%;
|
| | | }
|
| | | .ui-panel-inner{
|
| | | padding:0 !important;
|
| | | }
|
| | | .ui-collapsible-heading-toggle{
|
| | | padding-left: 1em !important;
|
| | | }
|
| | | .panel-header{
|
| | | padding: 8px 0;
|
| | | font-size: 1.2em;
|
| | | text-indent: 1em;
|
| | | background-color: #DFDCDC;
|
| | | }
|
| | | /*规定开关的位置*/
|
| | | .ui-flipswitch {
|
| | | margin-left: 0.5em;
|
| | | }
|
| | | |
| | | .ui-field-contain{
|
| | | padding: 0 0.6em ;
|
| | | }
|
| | | .ui-field-contain {
|
| | | border-bottom-color: #828282;
|
| | | border-bottom-color: rgba(0,0,0,.15);
|
| | | border-bottom-width: 1px;
|
| | | border-bottom-style: none;
|
| | | }
|
| | | .sicon{ |
| | | display:inline-block;width:4%;margin:1em 0;float:left; |
| | | }
|
| | | .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;
|
| | | }
|
| | | .bg-line{
|
| | | background-color:#ddd;
|
| | | }
|
| | | .operat-but{
|
| | | margin: 0;
|
| | | padding-top: 0.1em;
|
| | | padding-bottom: 0.1em;
|
| | | |
| | | }
|
| | | .ui-table-reflow td .ui-table-cell-label, .ui-table-reflow th .ui-table-cell-label{
|
| | | width:35%;
|
| | | } |
| | | .fr{
|
| | | float:right;
|
| | | }
|
| | | </style>
|
| | | <link rel="stylesheet" href="css/fgpanel.css">
|
| | | </head>
|
| | | <body>
|
| | | <div data-role="page">
|
| | | |
| | | <!-- 头部内容 -->
|
| | | <div data-role="header" data-position="fixed">
|
| | | <a href="control.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>
|
| | | <!-- 主体内容 -->
|
| | | <div data-role="main">
|
| | | <!-- 表格容器 -->
|
| | | <div class="tbl-container"></div>
|
| | | <table data-role="table" class="ui-responsive ui-shadow" id="tab" >
|
| | | |
| | | </table>
|
| | | </div>
|
| | |
|
| | | |
| | | </div>
|
| | | <!-- 存储homeinfo的值 -->
|
| | | <div id="homeInfoIframe"></div>
|
| | | <div id="homeInfoIframeAll"></div>
|
| | | </body>
|
| | |
|
| | | <script src="mobilJs/mobiscroll.core-2.5.2.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.core-2.5.2-zh.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.datetime-2.5.1.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.datetime-2.5.1-zh.js" type="text/javascript"></script>
|
| | | <script type="text/javascript" src="js/tbl.js"></script>
|
| | | <script type="text/javascript" src="mobilJs/base.js"></script>
|
| | | <script type="text/javascript" src="src/layui.all.js"></script>
|
| | |
|
| | | <script type="text/javascript">
|
| | | /* 获取点击的是哪个按钮 */
|
| | |
|
| | | var arrTd = new Array(); //当前表格td数据
|
| | | var tblCon = $('.tbl-container');
|
| | | var Page = {
|
| | | pageSize:20, //每页的行数
|
| | | pageCurr:1, //当前页码数
|
| | | pageAll:0,
|
| | | };
|
| | | |
| | | var arrTh = [ '设备ID', '设备名称', '总续航时间','保一次下电续航时间','电流钳量程','一次下电电压','二次下电电压','DCDC模块数量','单体数据来源类型','续航组数','续航下限','续航启动下限','电池合路器主电池组编号','背光时长','停电充电电流'];
|
| | | dataArr = [];
|
| | | var tbl = $('.tbl-container');
|
| | | var temp = getCookie("control_parm");
|
| | | temp = JSON.parse(temp);
|
| | | console.info(temp);
|
| | | createTbl(tbl, arrTh, dataArr);
|
| | | $(document).ready(function(){
|
| | | Page.pageCurr=1; |
| | | console.info(temp);
|
| | | setBattLife();
|
| | | //searchBattLife();
|
| | | //console.info($("#getnumber").val()); |
| | | });
|
| | | |
| | | function setBattLife(){
|
| | | data = temp;
|
| | | var index=0;
|
| | | arrTd[index++] = data.dev_id;
|
| | | arrTd[index++] = data.stationName;
|
| | | arrTd[index++] = data.GroupVolRange+"分钟";
|
| | | arrTd[index++] = data.GroupVolSorce+"分钟";
|
| | | arrTd[index++] = data.CurrentRange+"A";
|
| | | arrTd[index++] = Math.ceil(data.CurrentTyte/10)+"V";
|
| | | arrTd[index++] = Math.ceil(data.MonomerOrder/10)+"V";
|
| | | arrTd[index++] = data.LoaderCount;//DC数量
|
| | | arrTd[index++] = data.DtCardCount;
|
| | | arrTd[index++] = data.POF_BG_Boost_Cnt;
|
| | | arrTd[index++] = data.POF_BG_Boost_VolStop+"V";
|
| | | arrTd[index++] = data.POF_BG_Boost_VolStart+"V";
|
| | | arrTd[index++] = data.MajorBattGroupNum;
|
| | | arrTd[index++] = data.BackLightTime+"分钟";
|
| | | arrTd[index++] = data.PowerBreakChargeCurr+"A";
|
| | | createTbl(tblCon, arrTh, arrTd);
|
| | | }
|
| | |
|
| | | </script>
|
| | | </html> |
| | |
| | | <!-- 存在机房信息 -->
|
| | | <div id="homeInfoIframe"></div>
|
| | | <input id="handle_status" value="" type="hidden">
|
| | | <input id="jifangname" value="" type="hidden">
|
| | | <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>
|
| | |
| | | }else{
|
| | | setcookieCreat(Page.pageSize-1);
|
| | | }
|
| | | var test=getCookie("eleparm2newbatt");
|
| | | console.info(test);
|
| | | var jiafangname = $("#jifangname").val();
|
| | | console.info($("#jifangname").val());
|
| | | console.info(test);
|
| | | window.location.href="batt-infor-conf-temp1.html";
|
| | | });
|
| | |
|
| | |
| | | var endTime = new Date().format('yyyy-MM-dd');
|
| | | var tbl = $('.tbl-container');
|
| | | createTbl(tbl, arrTh, dataArr);
|
| | | serchProducer();
|
| | | $(document).ready(function(){
|
| | | setPage();
|
| | | //newbattnum;
|
| | |
| | | getEditButIndex(0);
|
| | | }
|
| | | });
|
| | |
|
| | |
|
| | | }
|
| | | //构造查询条件
|
| | |
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | |
| | | function serchProducer(){
|
| | | var battproducer = new Array(); |
| | | $.ajax({
|
| | | type: 'post'
|
| | | ,async: false
|
| | | ,url: 'BattInfAction!serchByBattProducer'
|
| | | ,data: null
|
| | | ,dataType: 'json'
|
| | | ,success:function(res) {
|
| | | //console.info(res);
|
| | | data = JSON.parse(res.result);
|
| | | console.info(data.data);
|
| | | if(data.code==1&&data.data.length>0){
|
| | | data = data.data;
|
| | | for(var i=0;i<data.length;i++){
|
| | | //console.info(data);
|
| | | battproducer.push(data[i].BattProducer); |
| | | } |
| | | }
|
| | | var json = window.JSON.stringify(battproducer);
|
| | | setCookie("producer",json);
|
| | | //var battproduce = getCookie("producer");
|
| | | //battproduce1 = JSON.parse(battproduce);
|
| | | //console.info(battproduce1);
|
| | | } |
| | | });
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
| | | ,lng: lng
|
| | | ,lat: lat
|
| | | }
|
| | | console.info(temp);
|
| | | // 显示暂无可设站点
|
| | | if(homeId == 0) {
|
| | | layer.msg(homeName);
|
| | |
| | |
|
| | |
|
| | | var footerMenu = new FooterMenu($('#pageFooter')); // 实例化底部导航栏
|
| | | |
| | | // 上传视频模块
|
| | | var videoInfoTbl = $('#videoInfoTbl');
|
| | | // 渲染并初始化上传按钮
|
| | |
| | | VideoOrImage: 'video'
|
| | | })
|
| | | }
|
| | | ,exts: 'mp4|MOV|avi|rmvb'
|
| | | ,accept: 'video' //视频
|
| | | ,choose: function(obj) {
|
| | |
|
| | |
| | | if(data.length>0){
|
| | | layer.msg('请选择下方的机房');
|
| | | }else{
|
| | | var json = window.JSON.stringify(input);
|
| | | setCookie("eleparm2newbatt",json);
|
| | | layer.confirm('您输入的机房不存在!是否要该新建机房?',{btn:['新建','取消']},function(){
|
| | | setV();
|
| | | var json = window.JSON.stringify(input);
|
| | | //setCookie("eleparm2newbatt",json);
|
| | | // $("#jifangname").val(input);
|
| | | //console.info(input);
|
| | | // var test=getCookie("eleparm2newbatt");
|
| | | //console.info(test);
|
| | | });
|
| | | input = window.JSON.stringify(input);
|
| | | setCookie("ele_parm2_newbatt",input);
|
| | | //var test=getCookie("eleparm2newbatt");
|
| | | //console.info(test);
|
| | | //console.info(input);
|
| | | //var json = window.JSON.stringify(input);
|
| | | //setCookie("ele_parm2_newbatt",json);
|
| | | }
|
| | | }
|
| | | });
|
| | |
| | | $(this).addClass('active');
|
| | | });
|
| | | }); |
| | |
|
| | | //对mobile端数据表格进行操作
|
| | | var MobileTbl = function(tbl, arrTh) {
|
| | | this.tbl = tbl;
|
| | | this.arrTh = arrTh;
|
| | | };
|
| | |
|
| | | // 定义对象的原型函数
|
| | | MobileTbl.prototype = {
|
| | | setArrTh:function(arrTh) { // 设置表格的头部数据
|
| | | this.arrTh = arrTh;
|
| | | }
|
| | | ,updateCell: function(rows, cols, value) { // 更新指定的单元格
|
| | | var tbody = this.tbl.find('tbody'); // 获取tbody
|
| | | var tr = tbody.find('tr').eq(rows); // 获取tr
|
| | | var td = tr.find('td').eq(cols); // 获取td
|
| | | var th = this.arrTh[cols]; // 列头部数据信息
|
| | | |
| | | // 生成html标记字符串
|
| | | var tdHtml = '<b class="ui-table-cell-label">'+th+'</b>';
|
| | | tdHtml += value;
|
| | |
|
| | | // 添加内容到td
|
| | | td.html(tdHtml);
|
| | | }
|
| | | };
|
| | |
|
| | | //对于手机端表格进行的二次开发
|
| | | var MobileTable = function(opts) {
|
| | | this.opts = {}; // 生成表格的配置项
|
| | | this.el = '';
|
| | | this.cols = []; // 表格的头部
|
| | | this.data = []; // 表格的内容
|
| | | this.render(opts);
|
| | | }
|
| | | // 定义对象的原型函数
|
| | | MobileTable.prototype = {
|
| | | _setEl: function(el) { // 设置表格所在的容器
|
| | | if(typeof el == 'object') {
|
| | | this.el = el;
|
| | | }else {
|
| | | this.el = $(el);
|
| | | }
|
| | | }
|
| | | ,_setOpts: function(opts) { // 设置配置项
|
| | | this.opts = opts;
|
| | | }
|
| | | ,_setCols: function(cols) { // 设置表格的头部
|
| | | this.cols = cols;
|
| | | }
|
| | | ,_setData: function(data) {
|
| | | this.data = data;
|
| | | }
|
| | | ,_init: function(opts) {
|
| | | let cols = opts.cols;
|
| | | let data = opts.data;
|
| | | let el = opts.el;
|
| | | this._setOpts(opts); // 初始化配置项
|
| | | this._setEl(el); // 初始化el
|
| | | this._setCols(cols); // 初始化头部数据
|
| | | this._setData(data); // 初始化表格数据
|
| | | }
|
| | | ,render: function(opts) {
|
| | | this._init(opts);
|
| | | var table = $('<table data-role="table" class="ui-responsive"></table>');
|
| | | var thead = this._getThead();
|
| | | var tbody = this._getTbody();
|
| | | |
| | | // 生成表格
|
| | | table.append(thead);
|
| | | table.append(tbody);
|
| | | // 清空容器
|
| | | this.el.text('');
|
| | | this.el.append(table).trigger('create');
|
| | | }
|
| | | ,_getThead: function() { // 获取表格的头部
|
| | | var cols = this.cols;
|
| | | var thead = $('<thead></thead>');
|
| | | var tr = $('<tr></tr>');
|
| | | // 遍历cols的值,根据数据项thead添加内容
|
| | | for(let i=0; i<cols.length; i++) {
|
| | | let _cols = cols[i];
|
| | | var th = $('<th></th>');
|
| | | th.html(_cols.title);
|
| | | th.attr('data-field', _cols.field);
|
| | | tr.append(th)
|
| | | |
| | | }
|
| | | thead.append(tr);
|
| | | return thead;
|
| | | }
|
| | | ,_getTbody: function() { // 获取表格的内容
|
| | | var cols = this.cols;
|
| | | var data = this.data;
|
| | | var tbody = $('<tbody></tbody>');
|
| | |
|
| | | // 遍历data的值
|
| | | for(let i=0; i<data.length; i++) {
|
| | | let _data = data[i];
|
| | | let tr = $('<tr></tr>');
|
| | | // 遍历cols的值
|
| | | for(let k=0; k<cols.length; k++) {
|
| | | let _cols = cols[k];
|
| | | var field = _cols.field;
|
| | | var title = _cols.title;
|
| | | var td = $('<td></td>');
|
| | | if(field in _data) {
|
| | | td = $('<td>'+_data[field]+'</td>');
|
| | | }
|
| | | // 设置值
|
| | | td.attr('data-field', field);
|
| | | td.attr('data-title', title);
|
| | | tr.append(td);
|
| | | }
|
| | | tr.append($('<td data-field="visibility" style="visibility: hidden"></td>'));
|
| | | // 生成tr
|
| | | tbody.append(tr);
|
| | | }
|
| | |
|
| | | // 返回结果
|
| | | return tbody;
|
| | | }
|
| | | ,updateAll: function(field, data) {
|
| | | // 遍历data的值
|
| | | for(let i=0; i<data.length; i++) {
|
| | | let _data = data[i];
|
| | | if(field in _data) {
|
| | | let fVal = _data[field];
|
| | | this.update(field, fVal, _data); // 更新表格
|
| | | }else {
|
| | | console.log('该条数据不存在标识位'+field);
|
| | | console.log(_data);
|
| | | }
|
| | | }
|
| | | }
|
| | | ,update: function(field, fVal, data) {
|
| | | let rowsInfo = this._getRows(field, fVal);
|
| | | // 如果获取到了行号
|
| | | if(rowsInfo.code==1) {
|
| | | let rows = rowsInfo.data; // 数据所在的行号
|
| | | this.updateTr(rows, data);
|
| | | }else {
|
| | | console.log(rowsInfo.msg);
|
| | | }
|
| | | }
|
| | | ,updateTr: function(rows, data) {
|
| | | let tbody = this.el.find('tbody');
|
| | | let tr = tbody.find('tr').eq(rows);
|
| | | let td = tr.find('td');
|
| | | // 遍历td的内容
|
| | | td.each(function() {
|
| | | let field = $(this).data('field');
|
| | | let title = $(this).data('title');
|
| | | // 判断当前属性是否在data中
|
| | | if(field in data) {
|
| | | // 生成html标记字符串
|
| | | var tdHtml = '<b class="ui-table-cell-label">'+title+'</b>';
|
| | | tdHtml += data[field];
|
| | | $(this).html(tdHtml);
|
| | | }
|
| | | });
|
| | |
|
| | | }
|
| | | ,_getRows: function(field, fVal) { // 根据标识位的值获取当前数据所在的行
|
| | | var rs = {
|
| | | code: 0
|
| | | ,data: -1
|
| | | ,msg: '未获取到标识位'+field+':'+fVal+'所在的行'
|
| | | };
|
| | | var data = this.data;
|
| | | // 遍历data的值
|
| | | for(let i=0; i<data.length; i++) {
|
| | | let _data = data[i];
|
| | | if(field in _data) {
|
| | | let _fVal = _data[field]; // 获取当前数据的标识位的值
|
| | | if(_fVal == fVal) {
|
| | | rs.code = 1; // 标识获取到了下标
|
| | | rs.data = i; // 下标的值
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | // 返回结果
|
| | | return rs;
|
| | | }
|
| | | }; |
| | |
| | | <a href="battinfors.html" target="_top" data-ajax="false">电池组信息</a>
|
| | | </li>
|
| | | <li>
|
| | | <a href="base-station-info.html" target="_top" data-ajax="false">基站信息</a>
|
| | | <a href="" id="jizhandata" target="_top" data-ajax="false">基站信息</a>
|
| | | </li>
|
| | |
|
| | | </ul>
|
| | | </div>
|
| | | <div id="homeInfoIframe"></div>
|
| | | <script type="text/javascript" src="js/battNav.js"></script>
|
| | | <script type="text/javascript" src="src/layui.all.js"></script>
|
| | | <script type="text/javascript">
|
| | | $(function() {
|
| | | //console.warn(111133);
|
| | |
| | | console.info(data);
|
| | | addBreadCrumb($('.breadcrumb').eq(0), data);
|
| | | });
|
| | | |
| | | $("#jizhandata").off('click').on('click.cjj1123',function(){
|
| | | var temp = getCookie("batt");
|
| | | temp = JSON.parse(temp);
|
| | | console.info(temp);
|
| | | var data = temp;
|
| | | var lng = 0; // 获取经度
|
| | | var lat = 0; // 获取纬度
|
| | | var addr = ""; // 获取地址
|
| | | var homeId = data.StationId; // 机房Id
|
| | | var homeName = data.StationName; // 机房名称
|
| | | var _temp = {
|
| | | homeId: homeId
|
| | | ,homeName: homeName
|
| | | ,addr: addr
|
| | | ,lng: lng
|
| | | ,lat: lat
|
| | | }
|
| | | console.info(_temp);
|
| | | // 显示暂无可设站点
|
| | | if(homeId == 0) {
|
| | | alert(homeName);
|
| | | return;
|
| | | }
|
| | | $('#homeInfoIframe').data('homeInfo', _temp);
|
| | | iframePopup = layer.open({
|
| | | type: 2
|
| | | ,closeBtn: 0
|
| | | ,title: false
|
| | | ,area: ['100%', '100%']
|
| | | ,full: true
|
| | | ,anim: 4
|
| | | ,content: 'iframe/seenhomeinfo.html'
|
| | | ,success: function() {
|
| | | $('div[data-role=page]').hide();
|
| | | }
|
| | | ,end: function() {
|
| | | $('div[data-role=page]').show();
|
| | | }
|
| | | });
|
| | | iframePopup = layer.open({
|
| | | type: 2
|
| | | ,closeBtn: 0
|
| | | ,title: false
|
| | | ,area: ['100%', '100%']
|
| | | ,full: true
|
| | | ,anim: 4
|
| | | ,content: 'iframe/seenhomeinfo.html'
|
| | | ,success: function() {
|
| | | $('div[data-role=page]').hide();
|
| | | }
|
| | | ,end: function() {
|
| | | $('div[data-role=page]').show();
|
| | | }
|
| | | });
|
| | | layer.full(iframePopup);
|
| | | })
|
| | | </script>
|
| | | </div>
|
| | | </body>
|