| | |
| | | <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>运维厂商:风正致远信息技术股份有限公司</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">
|
| | |
| | | <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>
|
| | |
| | | <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">正常</span>通讯状态
|
| | |
| | | </div><!--pdgxq-m1 end-->
|
| | |
|
| | | </div>
|
| | |
|
| | |
|
| | | </div> <!--i-container end-->
|
| | |
|
| | |
|
| | |
| | | $("#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("数据查询出错,请重新操作!");
|
| | |
| | | };
|
| | |
|
| | | //开始渲染实时数据
|
| | | 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 ? "正常" : "异常");
|
| | | $("#conState").html(item.value == 0 ? "正常" : "通讯异常");
|
| | | $("#warnState").html(item.value == 0 ? "正常" : "通讯异常");
|
| | | }
|
| | | //警告状态
|
| | | if (item.passcode == 2) {
|
| | | $("#warnState").html(item.value == 0 ? "无" : "报警");
|
| | | }
|
| | | // //门禁状态
|
| | | // if (item.passcode == 4) {
|
| | | // $("#warnState").html(item.value == 0 ? "关门" : "开门");
|
| | | // }
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | 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) {
|
| | | //渲染历史数据列表
|
| | |
| | | }
|
| | | //开始渲染
|
| | | 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>
|
| | |
|