123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <script type="text/javascript" src="__static__/js/jquery-1.10.2.min.js"></script>
- <link rel="stylesheet" href="__static__/css/bootstrap.min.css">
- <script type="text/javascript" src="__static__/js/bootstrap.min.js"></script>
- <title></title>
- </head>
- <body>
- <div class="mainbox" style="padding: 20px;">
- <div class="page-toolbar">
- <div class="btn">
- <a href="{:url('add')}" class="btn btn-primary"><i class="aicon ai-tianjia"></i>注册设备</a>
- </div>
- </div>
- <form id="pageListForm">
- <div class="layui-form">
- <table class="table table-bordered table-striped " lay-even="" lay-skin="row">
- <thead>
- <th>设备号</th>
- <th>名称</th>
- <th>iot-id</th>
- <th>设备类型</th>
- <th>厂商名称</th>
- <th>设备型号</th>
- <th>安全设备</th>
- <th>添加时间</th>
- <th>功能</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- {volist name="data_list" id="vo"}
- <tr>
- <td>{$vo['device_id']}</td>
- <td class="font12">{$vo['name']}</td>
- <td>{$vo['iot_id']}</td>
- <td>{$vo['deviceType']}</td>
- <td>{$vo['manufacturerName']}</td>
- <td>{$vo['model']}</td>
- <td>{$vo['isSecure']}</td>
- <td>{$vo['addtime']}</td>
- <td>
- <a href="{:url('manage/add')}?deviceId={$vo['iot_id']}&IMEI={$vo['device_id']}" style="cursor: pointer;">下发命令</a>
- <a href="{:url('history')}?id={$vo['device_id']}">历史数据</a>
- </td>
- <td>
- <a onclick="status('{$vo['iot_id']}')" style="cursor: pointer;">状态</a>
- <a href="{:url('edit')}?id={$vo['id']}">编辑</a>
- <a onclick="del('{$vo['iot_id']}','{$vo['device_id']}')" style="cursor: pointer;">删除</a>
- </td>
- </tr>
- {/volist}
-
- </tbody>
- </table>
- {$pages}
- </div>
- </form>
- <script>
- function del(iot_id,device_id){
- var msg = "确定要删除该设备吗";
- if (confirm(msg)==true){
- window.location.href='{:url("delete")}?auth=xw12345&iot_id='+iot_id+'&device_id='+device_id;
- return true;
- }else{
- return false;
- }
- }
- function status(iot_id){
- $.post('{:url("status")}',{iot_id:iot_id},function(res){
- var res=JSON.parse(res);
- if(res.activated){
- alert("已绑定");
- }else{
- alert("未绑定");
- }
- });
- return false;
- }
- </script>
- </body>
- </html>
|