{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">

<head>
  <title>设备列表</title>
  <meta charset="UTF-8" />
  <link rel="stylesheet" href="{% static '/lib/layui/css/layui.css' %}">
  <link rel="stylesheet" href="{% static '/lib/font-awesome/4.5.0/css/font-awesome.css' %}">
  <link rel="stylesheet" href="{% static '/lib/css/reset.css' %}">
  <style>
    /* 面包屑导航 */

    .breadcrumbs {
      /* line-height: 38px; */
      padding: 12px 0 12px 30px;
      border-bottom: 1px solid #dbdbdb;
    }

    .layui-breadcrumb>* {
      font-size: 16px;
    }

    /* 内容 */

    .uploadContent {
      padding: 25px;
    }

    .searchCover input {
      border: 1px solid #D5D5D5;
      line-height: 33px;
      padding-left: 5px;
      width: 200px;
    }

    #allotBtn {
      float: right;
    }

    /* 返回 */

    .headerPlace {
      font-size: 22px;
      color: #418fbb;
      cursor: pointer;
      margin-bottom: 12px;
    }

    .headerPlace img {
      vertical-align: middle;
      /* margin-right: 10px; */
      margin-top: -4px;
    }

    .allotInnerDiv {
      margin-top: 12px;
    }
  </style>
</head>

<body>
  <div class="content">
    <!-- 导航 -->
    <div class="floatNav">
      <!-- 导航 -->
      <div class="breadcrumbs">
        <span class="layui-breadcrumb">
          <a target="BoardRight">首页</a>
          <a>
            <cite>设备分配</cite>
          </a>
        </span>
      </div>
    </div>
    <div class="uploadContent">
      <div class="headerPlace">
        <span onclick="goback()">
          <img src="{% static 'imgs/gobackIcon (1).png'%}" alt=""> 返回
        </span>
      </div>
      <form class="layui-form" action="">
        <div class="searchCover">
          设备类型：
          <div class="layui-input-inline">
            <select name="city" lay-verify="required" id="type">
              <option value="5">气象站</option>
              <option value="6">监控</option>
            </select>
          </div>
          设备ID：
          <input type="text" id="identity" value="" onkeypress="if (event.keyCode == 13) sub_filter();" />
          <button type="button" onclick="sub_filter()" class="layui-btn layui-btn-sm layui-btn-normal">筛选</button>
        </div>
      </form>
      <div class="innerTable">
        <form action="" class="layui-form" method="post"> {% csrf_token %}
          <table id="table" class="layui-table" lay-skin="line">
            <thead>
              <tr>
                <th style="width:50px">
                  <input type="checkbox" onchange="checkAllFun($(this))" id="checkAll" name="title-table-checkbox" lay-skin="primary" lay-filter="checkAll"
                  />
                </th>
                <th>设备ID</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"></div>
          </div>
          <div class="btnBox">
            <input type="hidden" name="uname" id="uname" value={{ uname }}>
            <span class="color-background2 " style="color:#FF0015;">
              {{allot_note}}
            </span>
            <button type="submit" name="submit" id="allotBtn" value="fenpei" class="layui-btn layui-btn-sm layui-btn-normal">确定分配</button>
          </div>
        </form>
      </div>

      <div style="line-height:50px;">
        <i class="star">*</i>注：以上所选设备分配给用户：{{ uname }}
      </div>
    </div>
  </div>
  <input type="hidden" value="{{f_name}}" id="f_name">
  <input type="hidden" value="{{currpage}}" id="currPage">


  <script src="{% static '/lib/js/jquery-2.1.4.min.js' %}"></script>
  <script src="{% static '/lib/layui/layui.all.js' %}"></script>
  <script type="text/javascript">
    $.ajaxSetup({
      data: { csrfmiddlewaretoken: '{{ csrf_token }}' },
    });
  </script>
  <script src="{% static '/js/equipallot/equipallotList.js' %}?versions=0.2.3" type="text/javascript"></script>
</body>

</html>