| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- {% load staticfiles %}
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8" />
- <link href="{% static '/lib/bootstrap-3.3.7/css/bootstrap.css' %}" rel="stylesheet">
- <link rel="stylesheet" href="{% static '/lib/font-awesome/4.5.0/css/font-awesome.css' %}">
- <link rel="stylesheet" href="{% static '/lib/css/ace.min.css' %}"/>
- <link rel="stylesheet" href="{% static '/lib/css/ace-skins.min.css' %}">
- <link rel="stylesheet" href="{% static '/lib/css/ace-rtl.min.css' %}">
- <link rel="stylesheet" href="{% static '/lib/layui/css/layui.css' %}">
- <link rel="stylesheet" href="{% static '/css/loading.css' %}?versions=0.5.0" />
- <style type="text/css">
- body {
- overflow: hidden;
- background: #fff;
- }
- .searchCover {
- margin: 20px 0;
- margin-bottom: 10px;
- }
- .innerTable {
- padding: 0 1px 0 0;
- min-width: 750px;
- }
- .table,
- .table.table-striped>thead>tr>th {
- text-align: center;
- }
- table td {
- vertical-align: middle !important;
- }
- .nullData {
- width: 100%;
- height: 500px;
- background: #ddd;
- text-align: center;
- line-height: 500px;
- font-size: 20px;
- border: 1px solid #ddd;
- }
- .check,
- #checkAll {
- width: 18px;
- height: 19px;
- vertical-align: middle;
- margin-top: -6px;
- visibility: hidden;
- display: none;
- }
- .my_protocol input[type='checkbox']+span {
- cursor: pointer;
- width: 18px;
- height: 18px;
- background-color: red;
- display: inline-block;
- background: url(/static/img/tick.png) no-repeat center;
- background-position: -19px 0px;
- position: relative;
- top: 3px;
- border: 1px solid #bbb;
- }
- .my_protocol input[type='checkbox']:checked+span {
- background-position-x: 3px;
- background-position-y: 3px;
- }
- .controlModel{
- display: none;
- margin-bottom: 10px;
- background: rgb(236, 246, 255);
- text-align: right;
- padding: 10px 0;
- }
- .selectedColor{
- background: #faffc2;
- }
- .content{
- overflow-x: scroll;
- }
- .coerce{
- display: inline-block;
- width: 0;
- transition: all .3s;
- opacity: 0;
- height: 33px;
- overflow: hidden;
- vertical-align: middle;
- }
- .coerceBlock{
- width: 109px;
- opacity: 1;
- }
- .controlModel select,.controlModel select:focus{
- vertical-align: middle;
- border-color: #ABBAC3;
- }
- #inquireBtn,#operationBtn{
- height: 30px;
- line-height: 20px;
- }
- </style>
- <body>
- <div class="content">
- <div class="searchCover">
- 开关状态:
- <select class="enter-select " name="openState" id="eswitch">
- <option selected="selected" value="-1">请选择</option>
- <option value="1">开启</option>
- <option value="0">关闭</option>
- </select>
- 设备名称:
- <input type="text" value="" class="fp-user" id="ename" placeholder="请输入设备名称" onkeypress="if (event.keyCode == 13) sub_filter();" /> 设备ID:
- <input type="text" value="" id="eId" placeholder="请输入设备ID" onkeypress="if (event.keyCode == 13) sub_filter();" />
- <button type="button" onclick="sub_filter()" class="btn btn-sm btn-primary">筛选</button>
- </div>
- <div class="controlModel">
- <!-- 全局定时控制 -->
- <span>
- <img src="{% static '/img/timingIcon.png' %}" style="width: 19px;" alt="定时">
- </span>
- <select class="worktime-select" id="state" onchange="timing($(this))">
- <OPTION>定时时长</OPTION>
- <OPTION value="0">常亮</OPTION>
- <OPTION value="1">1小时</OPTION>
- <OPTION value="2">2小时</OPTION>
- <OPTION value="3">3小时</OPTION>
- <OPTION value="4">4小时</OPTION>
- <OPTION value="5">5小时</OPTION>
- <OPTION value="6">6小时</OPTION>
- <OPTION value="7">7小时</OPTION>
- </select>
- <!-- 设备开关 -->
- <span>
- <img src="{% static '/img/switchBtnIcon.png' %}" style="width: 21px;" alt="开关">
- </span>
- <select class="worktime-select" id="switchBtn" onchange="SetSwitch($(this))">
- <OPTION>设备开关</OPTION>
- <OPTION value="1">开启</OPTION>
- <OPTION value="0">关闭</OPTION>
- </select>
- <button class="btn btn-white btn-sm btn-default" id="inquireBtn" onclick="reloadPage()">
- <i class="ace-icon fa fa-search"></i>
- 查询
- </button>
- <button class="btn btn-white btn-sm btn-default" id="operationBtn" onclick="coerceshow(this)">
- <i class="ace-icon fa fa-cog"></i>
- 设置
- </button>
- <div class="coerce">
- <button type="button" class="btn btn-sm btn-danger" onclick="popupFrame('升级','ctrl','update')">升级</button>
- <button type="button" class="btn btn-sm btn-danger" onclick="popupFrame('重启','ctrl','reboot')">重启</button>
- </div>
- </div>
- <div class="innerTable">
- <table id="datatable" class="table table-striped table-hover">
- <thead>
- <tr>
- <th>
- <div style="position:relative">
- <label class="my_protocol">
- <input type="checkbox" onchange="checkAll($(this))" id="checkAll" name="title-table-checkbox" />
- <span></span>
- </label>
- </div>
- </th>
- <th>设备ID</th>
- <th>设备名称</th>
- <th>在线状态</th>
- <th>设备开关</th>
- <th>工作状态</th>
- <!-- <th>定时模式</th> -->
- <th>定时时长</th>
- <th>灯管状态</th>
- <th>光控状态</th>
- <th>雨控状态</th>
- <th>温控状态</th>
- <th>倾倒状态</th>
- <th>信号强度</th>
- <th>设备版本</th>
- <th>上报时间</th>
- <!-- <th>详情</th> -->
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- <div class="fenpei-bottom">
- <input type="hidden" id="totalPage" value={{ nums }}>
- <div id="page" style="text-align: center;"></div>
- </div>
- </div>
- </div>
- <!-- 配置模态框 -->
- <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- <h4 class="modal-title" id="myModalLabel">配置</h4>
- </div>
- <div class="modal-body">
- <div class="clearfix">
- <div class="fl modelTitle">定时模式:</div>
- <div class="fl modeBody">
- <select name="" id="clock">
- <option value="0">光控</option>
- <option value="1">时控</option>
- </select>
- </div>
- </div>
- <div class="clearfix" id="durationParent">
- <div class="fl modelTitle">定时时长:</div>
- <div class="fl modeBody">
- <select name="" id="duration">
- <option value="0">常亮</option>
- <option value="1">1小时</option>
- <option value="2">2小时</option>
- <option value="3">3小时</option>
- <option value="4">4小时</option>
- <option value="5">5小时</option>
- <option value="6">6小时</option>
- <option value="7">7小时</option>
- </select>
- </div>
- </div>
- <div class="clearfix" id="timeHourParent">
- <div class="fl modelTitle">定时时间:</div>
- <div class="fl modeBody">
- <div class="enter-form layui-input-inline">
- <input type="text" class="layui-input" class="laydate-icon" id="timSelectBox" placeholder="请选择时间段 ">
- <input type="hidden" value="00:00:00" id="begin">
- <input type="hidden" value="00:00:00" id="end">
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
- <button type="button" class="btn btn-primary" id="saveMode" onclick="saveMode()">保存</button>
- </div>
- </div>
- </div>
- </div>
- <!-- loading -->
- <div id="loadingParent">
- <div id="loadCenter">
- <div class="skype-loader">
- <div class="dot">
- <div class="first"></div>
- </div>
- <div class="dot"></div>
- <div class="dot"></div>
- <div class="dot"></div>
- </div>
- Logging in...
- </div>
- </div>
- <script src="{% static '/lib/js/jquery-2.1.4.min.js' %}"></script>
- <script src="{% static '/lib/bootstrap-3.3.7/js/bootstrap.js' %}"></script>
- <script src="{% static '/lib/layui/layui.all.js' %}"></script>
- <script src="{% static '/js/common.js' %}?versions=0.5.0"></script>
- <script type="text/javascript">
- $.ajaxSetup({
- data: { csrfmiddlewaretoken: '{{ csrf_token }}' },
- });
- var parentUserName = $('#parentUserName', parent.document).html();
- if (!(parentUserName == 'admin' || parentUserName == 'user')) {
- $('#operationBtn').remove();
- $('.coerce').remove();
- }
- </script>
- <script src="{% static '/js/equipmanage/equipmanage_ybq.js' %}?versions=0.5.0" type="text/javascript"></script>
- </body>
- </html>
|