From e8c9c0ca7e6c307243c158fd529c59c5a3717f2f Mon Sep 17 00:00:00 2001 From: wuwei <wuquan-1230@q63.com> Date: 星期五, 13 六月 2025 10:05:06 +0800 Subject: [PATCH] 1.同步最新的文件 --- local/www/detail-mj.html | 298 ++++++++++++++++++----------------------------------------- 1 files changed, 90 insertions(+), 208 deletions(-) diff --git a/local/www/detail-mj.html b/local/www/detail-mj.html index 01593ae..2a24808 100644 --- a/local/www/detail-mj.html +++ b/local/www/detail-mj.html @@ -14,158 +14,6 @@ <body class="pdgxq-body"> <div class="i-container"> -<!-- <div class="jmkt-main">--> - -<!-- <div class="layui-fluid">--> -<!-- <div class="pdgxq-m1 layui-row layui-col-space20">--> -<!-- <div class="layui-col-lg5 layui-col-md5">--> -<!-- <div class="pdgxq-m1-left pdgxq-m1-box" style="height: 730px">--> -<!-- <div class="pdgxq-H">--> -<!-- <h3><i></i>鏈�杩戝紑闂ㄨ褰�</h3>--> -<!-- </div>--> - -<!-- <div class="pdgxq-table jmkt-table-wrap">--> -<!-- <table class="layui-table pdgxq-table1" lay-skin="nob">--> -<!-- <colgroup>--> -<!-- <col width="30%">--> -<!-- <col width="30%">--> -<!-- <col width="40%">--> -<!-- <col>--> -<!-- </colgroup>--> -<!-- <thead>--> -<!-- <tr>--> -<!-- <th>鍗″彿/濮撳悕</th>--> -<!-- <th>寮�闂ㄨ鏄�</th>--> -<!-- <th>寮�闂ㄦ椂闂�</th>--> -<!-- </tr>--> -<!-- </thead>--> -<!-- <tbody>--> -<!-- <tr>--> -<!-- <td>1001/寮犱笁</td>--> -<!-- <td>1鍙烽棬-鍒峰崱寮�闂�</td>--> -<!-- <td>2020-04-26 12:30:56</td>--> -<!-- </tr>--> -<!-- <tr>--> -<!-- <td>1002/鏉庡洓</td>--> -<!-- <td>2鍙烽棬-鎸囩汗寮�闂�</td>--> -<!-- <td>2020-04-25 12:35:28</td>--> -<!-- </tr>--> -<!-- <tr>--> -<!-- <td>1003/鐜嬩簲</td>--> -<!-- <td>3鍙烽棬-瀵嗙爜寮�闂�</td>--> -<!-- <td>2020-04-25 12:35:28</td>--> -<!-- </tr>--> -<!-- <tr>--> -<!-- <td>1002/鏉庡洓</td>--> -<!-- <td>2鍙烽棬-鎸囩汗寮�闂�</td>--> -<!-- <td>2020-04-25 12:35:28</td>--> -<!-- </tr>--> -<!-- <tr>--> -<!-- <td>1003/鐜嬩簲</td>--> -<!-- <td>3鍙烽棬-瀵嗙爜寮�闂�</td>--> -<!-- <td>2020-04-25 12:35:28</td>--> -<!-- </tr>--> -<!-- <tr>--> -<!-- <td>1002/鏉庡洓</td>--> -<!-- <td>2鍙烽棬-鎸囩汗寮�闂�</td>--> -<!-- <td>2020-04-25 12:35:28</td>--> -<!-- </tr>--> -<!-- <tr>--> -<!-- <td>1003/鐜嬩簲</td>--> -<!-- <td>3鍙烽棬-瀵嗙爜寮�闂�</td>--> -<!-- <td>2020-04-25 12:35:28</td>--> -<!-- </tr>--> -<!-- <tr>--> -<!-- <td>1003/鐜嬩簲</td>--> -<!-- <td>3鍙烽棬-瀵嗙爜寮�闂�</td>--> -<!-- <td>2020-04-25 12:35:28</td>--> -<!-- </tr>--> -<!-- <tr>--> -<!-- <td>1003/鐜嬩簲</td>--> -<!-- <td>3鍙烽棬-瀵嗙爜寮�闂�</td>--> -<!-- <td>2020-04-25 12:35:28</td>--> -<!-- </tr>--> -<!-- <tr>--> -<!-- <td>1003/鐜嬩簲</td>--> -<!-- <td>3鍙烽棬-瀵嗙爜寮�闂�</td>--> -<!-- <td>2020-04-25 12:35:28</td>--> -<!-- </tr>--> -<!-- <tr>--> -<!-- <td>1003/鐜嬩簲</td>--> -<!-- <td>3鍙烽棬-瀵嗙爜寮�闂�</td>--> -<!-- <td>2020-04-25 12:35:28</td>--> -<!-- </tr>--> -<!-- <tr>--> -<!-- <td>1003/鐜嬩簲</td>--> -<!-- <td>3鍙烽棬-瀵嗙爜寮�闂�</td>--> -<!-- <td>2020-04-25 12:35:28</td>--> -<!-- </tr>--> - -<!-- </tbody>--> -<!-- </table>--> - -<!-- </div><!–pdgxq-table end–>--> - -<!-- </div>--> - -<!-- </div><!–pdgxq-m1-left end–>--> - -<!-- <div class="layui-col-lg7 layui-col-md7">--> -<!-- <div class="pdgxq-m1-right pdgxq-m1-box">--> -<!-- <div class="pdgxq-H">--> -<!-- <h3><i></i>缁熻淇℃伅</h3>--> -<!-- </div>--> - -<!-- <div class="lsyg-jkxx-box">--> - -<!-- <div class=" layui-row">--> - -<!-- <div class="layui-col-lg6 layui-col-md6">--> -<!-- <div class="mj-item mj-item1">--> -<!-- <img src="./images/mj-bg1-img.png" class="mj-item-img"/>--> -<!-- <div class="mj-itemCon">--> -<!-- <h4>鍗曟棩寮�闂ㄦ鏁�</h4>--> -<!-- <p>5</p>--> -<!-- </div>--> - -<!-- </div>--> - -<!-- </div>--> - -<!-- <div class="layui-col-lg6 layui-col-md6">--> -<!-- <div class="mj-item mj-item2">--> -<!-- <img src="./images/mj-bg1-img.png" class="mj-item-img"/>--> -<!-- <div class="mj-itemCon">--> -<!-- <h4>杩�7澶╁紑闂ㄦ鏁�</h4>--> -<!-- <p>20</p>--> -<!-- </div>--> -<!-- </div>--> -<!-- </div>--> -<!-- </div>--> - -<!-- </div><!–lsyg-jkxx-box end–>--> -<!-- </div>--> - -<!-- <div style="padding-top: 20px">--> -<!-- <div class="pdgxq-m2-right pdgxq-m2-box">--> -<!-- <h3>璁惧鍩烘湰淇℃伅</h3>--> -<!-- <p>璁惧鍚嶇О锛氭満鎴块棬绂�</p>--> -<!-- <p>璁惧鐘舵�侊細婵�娲�</p>--> -<!-- <p>杩愮淮鍘傚晢锛氶姝h嚧杩滀俊鎭妧鏈偂浠芥湁闄愬叕鍙�</p>--> - -<!-- <div class="pdgxq-phone">--> -<!-- <h4>杩愮淮鐢佃瘽</h4>--> -<!-- <p>400-627-1116</p>--> -<!-- </div>--> -<!-- </div>--> -<!-- </div>--> - -<!-- </div><!–pdgxq-m1-left end–>--> - -<!-- </div><!–pdgxq-m1 end–>--> -<!-- </div>--> - -<!-- </div><!–jmkt-main end–>--> <div class="jmkt-main"> <div class="layui-fluid"> @@ -182,9 +30,9 @@ <p></p> <p>璁惧鍚嶇О锛�<span id="deviceName">鏈煡璁惧#1</span></p> <p>璁惧鐘舵�侊細<span id="deviceVld">婵�娲�</span></p> - <p>杩愮淮鍘傚晢锛�<span id="opVendor"></span></p> + <p style="display: none;">杩愮淮鍘傚晢锛�<span id="opVendor"></span></p> - <div class="pdgxq-phone"> + <div class="pdgxq-phone" style="display: none;"> <h4>杩愮淮鐢佃瘽</h4> <p id="opPhone"></p> </div> @@ -200,15 +48,15 @@ <div class="pdgxq-m1-right pdgxq-m1-box" style="height: 730px"> <div class="pdgxq-H"> <h3><i></i>寮�闂ㄨ褰�</h3> -<!-- <div id="open" class="jmkt-tit-more" onclick="sendAction();">--> -<!-- <button type="button" class="layui-btn layui-btn-normal pop-complete-btn"--> -<!-- style="background-color: #46b8da;color: #ffffff;">寮�闂�</button>--> -<!-- </div>--> + <div id="open" class="jmkt-tit-more" onclick="sendAction();"> + <button type="button" class="layui-btn layui-btn-normal pop-complete-btn" + style="background-color: #46b8da;color: #ffffff;">寮�闂�</button> + </div> </div> - <div class="pdgxq-group clearfix"> + <div class="pdgxq-group clearfix" style=""> <div class="pdgxq-group-item jmkt-chuli"> - <span id="warnState">鏃�</span>璀﹀憡鐘舵�� + <span id="warnState">鍏抽棬</span>鍛婅鐘舵�� </div> <div class="pdgxq-group-item jmkt-yichuli"> <span id="conState">姝e父</span>閫氳鐘舵�� @@ -268,6 +116,8 @@ </div><!--pdgxq-m1 end--> </div> + + </div> <!--i-container end--> @@ -297,21 +147,21 @@ $("#deviceName").html(device.name); $("#deviceVld").html(device.vld==0?'婵�娲�':'鍋滅敤'); queryRecord(deviceId); - //setInterval(function () { - // queryRecord(deviceId); - // // queryData(deviceId); - //},5000); + setInterval(function () { + // queryRecord(deviceId); + queryData(deviceId); + },5000); } - function queryData(deviceId,device) { + function queryData(deviceId) { console.log("======闂ㄧ椤甸潰-鏌ヨ瀹炴椂======"); var data = {id: deviceId}; $.post("./cgi-bin/detail/query-data", JSON.stringify(data), function (data, status) { if ("success" == status) { console.log('---------鑾峰彇鍒扮殑璁惧瀹炴椂鏁版嵁-----' + data); - renderInfo(data,device); + renderInfo(data); } else { console.log("鏁版嵁鏌ヨ鍑洪敊锛岃閲嶆柊鎿嶄綔锛�"); window.parent.notify("鏁版嵁鏌ヨ鍑洪敊锛岃閲嶆柊鎿嶄綔锛�"); @@ -320,25 +170,20 @@ }; //寮�濮嬫覆鏌撳疄鏃舵暟鎹� - function renderInfo(deviceData, device) { - console.log("--------娓叉煋瀹炴椂鏁版嵁-------闂ㄧid="+device.id); - console.log(deviceData); - //璁惧鍩烘湰淇℃伅 - $("#deviceName").html(device.name); - $("#deviceVld").html(device.vld==0?'婵�娲�':'鍋滅敤'); - + function renderInfo(deviceData) { //鐩戞帶灞炴�у疄鏃舵暟鎹覆鏌� var list = deviceData.value; if(list !=null && list.length>0){ $.each(list,function(index,item) { //閫氳鐘舵�� if (item.passcode == 1) { - $("#conState").html(item.value == 0 ? "姝e父" : "寮傚父"); + $("#conState").html(item.value == 0 ? "姝e父" : "閫氳寮傚父"); + $("#warnState").html(item.value == 0 ? "姝e父" : "閫氳寮傚父"); } - //璀﹀憡鐘舵�� - if (item.passcode == 2) { - $("#warnState").html(item.value == 0 ? "鏃�" : "鎶ヨ"); - } + // //闂ㄧ鐘舵�� + // if (item.passcode == 4) { + // $("#warnState").html(item.value == 0 ? "鍏抽棬" : "寮�闂�"); + // } }); } @@ -361,6 +206,15 @@ function queryRecord(id) { console.log("--------鏌ョ湅闂ㄧ鍘嗗彶璁板綍-------闂ㄧid="+id); var param = {"id": id}; + // $.post("./cgi-bin/record-his/query", JSON.stringify(param), function (data, status) { + // if ("success" == status) { + // //娓叉煋鍘嗗彶鏁版嵁鍒楄〃 + // renderRecordInfo(data); + // }else { + // window.parent.notify("闂ㄧ鏁版嵁鏌ヨ鍑洪敊锛岃閲嶆柊鎿嶄綔锛�"); + // } + // }, "json"); + $.post("./cgi-bin/record-his/query-by-id", JSON.stringify(param), function (data, status) { if ("success" == status) { //娓叉煋鍘嗗彶鏁版嵁鍒楄〃 @@ -372,46 +226,74 @@ } //寮�濮嬫覆鏌� function renderRecordInfo(dataList) { - console.log(dataList); - + var li = dataList; + console.log(li); + console.log(li.length); //闂ㄧ鍘嗗彶鏁版嵁娓叉煋 var html=""; - if(dataList !=null && dataList.length>0){ + if(li != null && li.length > 0){ var list; - $.each(dataList,function(index,item){ - list = eval(item.value); - if(list !=null && list.length>0){ - var tag1 = ''; //鍗″彿/濮撳悕 - var tag2 = ''; //闂ㄥ彿 - var tag3 = ''; //寮�闂ㄧ被鍨� - var tag4 = ''; //寮�闂ㄦ椂闂� - $.each(list,function(index,item){ - if(item.passcode == 3){ - tag2 = item.value + '鍙烽棬-'; + $.each(li,function(index,item){ + if(item.value){ + list = eval(item.value); + if(list !=null && list.length>0) { + var tag1 = ''; //鍗″彿/濮撳悕 + var tag2 = ''; //闂ㄥ彿 + var tag3 = ''; //寮�闂ㄧ被鍨� + var tag4 = ''; //寮�闂ㄦ椂闂� + for (var i = 0; i < list.length; i++) { + var cur = list[i]; + if (cur.passcode == 3) { + tag2 = cur.value + '鍙烽棬-'; + } + if (cur.passcode == 5) { + tag1 = cur.value; + } + if (cur.passcode == 6) { + tag3 = cur.value; + } + if (cur.passcode == 7) { + // tag4 = cur.value.substring(0, 4) + "-" + + // cur.value.substring(4, 6) + "-" + + // cur.value.substring(6, 8) + " " + + // cur.value.substring(8, 10) + ":" + + // cur.value.substring(10, 12) + ":" + + // cur.value.substring(12, 14); + tag4 = cur.value; + } } - if(item.passcode == 5){ - tag1 = item.value; - } - if(item.passcode == 6){ - tag3 = item.value; - } - if(item.passcode == 7){ - tag4 = item.value.substring(0,4) + "-" + - item.value.substring(4,6) + "-" + - item.value.substring(6,8) + " " + - item.value.substring(8,10) + ":" + - item.value.substring(10,12)+ ":" + - item.value.substring(12,14); - } - }); - html += "<tr><td>"+ tag1 +"</td><td>" + tag2 + tag3 + "</td><td>" + tag4 + "</td></tr>"; + + html += "<tr><td>" + tag1 + "</td><td>" + tag2 + tag3 + "</td><td>" + tag4 + "</td></tr>"; + } } + }); }else { - html += "<tr><td colspan='3'>鏆傛棤鏁版嵁</td></tr>"; + // html += "<tr><td colspan='3'>鏆傛棤鏁版嵁</td></tr>"; } $("#listData").html(html); } + + + + function sendAction() { + if (confirm('鏄惁杩涜寮�闂ㄦ搷浣滐紵')){ + var param = {"id": deviceId,"passcode":8,"value":1}; + console.log("======寮�闂ㄦ搷浣滃懡浠ゅ彂閫�======"); + // console.log(JSON.stringify(param)); + // $.post("./cgi-bin/action/open-door", JSON.stringify(param), function (data, status) { + // + // }, "json"); + $.ajaxSettings.async = false; + $.post("./cgi-bin/file/action-control", JSON.stringify(param), function (data, status) { + + }, "json"); + window.parent.notify("鍛戒护鍙戦�佹垚鍔燂紒"); + } + return false; + } + + </script> </body> -- Gitblit v1.9.3