<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('设备列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>设备分类编号：</label>
                                <input type="text" name="sortId"/>
                            </li>
                            <li>
                                <label>一级分类(1监控设备 2门禁设备 3电子围栏设备 4巡更设备 5入侵报警设备)：</label>
                                <select name="devicetype">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>二级分类：</label>
                                <select name="subdevicetype">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>：</label>
                                <input type="text" name="area"/>
                            </li>
                            <li>
                                <label>所属建筑：</label>
                                <input type="text" name="build"/>
                            </li>
                            <li>
                                <label>所属楼层：</label>
                                <input type="text" name="floor"/>
                            </li>
                            <li>
                                <label>设备名称：</label>
                                <input type="text" name="devicename"/>
                            </li>
                            <li>
                                <label>是否人脸识别 0否 1是：</label>
                                <input type="text" name="isface"/>
                            </li>
                            <li>
                                <label>区域编号：</label>
                                <input type="text" name="areaid"/>
                            </li>
                            <li>
                                <label>地图编号：</label>
                                <input type="text" name="mapid"/>
                            </li>
                            <li>
                                <label>位置：</label>
                                <input type="text" name="address"/>
                            </li>
                            <li>
                                <label>地图坐标X：</label>
                                <input type="text" name="x"/>
                            </li>
                            <li>
                                <label>地图坐标y：</label>
                                <input type="text" name="y"/>
                            </li>
                            <li>
                                <label>地图坐标z：</label>
                                <input type="text" name="z"/>
                            </li>
                            <li>
                                <label>设备型号：</label>
                                <input type="text" name="devicemodal"/>
                            </li>
                            <li>
                                <label>设备品牌：</label>
                                <input type="text" name="devicebrand"/>
                            </li>
                            <li>
                                <label>供应商：</label>
                                <input type="text" name="devicesupplier"/>
                            </li>
                            <li>
                                <label>联系方式：</label>
                                <input type="text" name="contactdetails"/>
                            </li>
                            <li>
                                <label>ip：</label>
                                <input type="text" name="ip"/>
                            </li>
                            <li>
                                <label>port：</label>
                                <input type="text" name="port"/>
                            </li>
                            <li>
                                <label>用户名：</label>
                                <input type="text" name="username"/>
                            </li>
                            <li>
                                <label>密码：</label>
                                <input type="text" name="password"/>
                            </li>
                            <li>
                                <label>rtsp视频流地址：</label>
                                <input type="text" name="rtspurl"/>
                            </li>
                            <li>
                                <label>：</label>
                                <input type="text" name="doorno"/>
                            </li>
                            <li>
                                <label>在线 0离线 1在线：</label>
                                <input type="text" name="online"/>
                            </li>
                            <li>
                                <label>状态：</label>
                                <select name="status">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>：</label>
                                <input type="text" name="alarm"/>
                            </li>
                            <li>
                                <label>是否启用：</label>
                                <input type="text" name="isenable"/>
                            </li>
                            <li>
                                <label>采购时间：</label>
                                <input type="text" class="time-input" placeholder="请选择采购时间" name="purchasetime"/>
                            </li>
                            <li>
                                <label>安装时间：</label>
                                <input type="text" class="time-input" placeholder="请选择安装时间" name="installationtime"/>
                            </li>
                            <li>
                                <label>有效时间：</label>
                                <input type="text" class="time-input" placeholder="请选择有效时间" name="effectivetime"/>
                            </li>
                            <li>
                                <label>：</label>
                                <input type="text" class="time-input" placeholder="请选择" name="ctime"/>
                            </li>
                            <li>
                                <label>位置类型：</label>
                                <select name="positiontype">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>：</label>
                                <input type="text" class="time-input" placeholder="请选择" name="createtime"/>
                            </li>
                            <li>
                                <label>是否过保：</label>
                                <input type="text" name="overInsurance"/>
                            </li>
                            <li>
                                <label>：</label>
                                <input type="text" name="data"/>
                            </li>
                            <li>
                                <label>：</label>
                                <input type="text" name="imageUrl"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="zhny:device:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="zhny:device:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="zhny:device:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="zhny:device:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('zhny:device:edit')}]];
        var removeFlag = [[${@permission.hasPermi('zhny:device:remove')}]];
        var prefix = ctx + "zhny/device";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "设备",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '',
                    visible: false
                },
                {
                    field: 'sortId',
                    title: '设备分类编号'
                },
                {
                    field: 'devicetype',
                    title: '一级分类(1监控设备 2门禁设备 3电子围栏设备 4巡更设备 5入侵报警设备)'
                },
                {
                    field: 'subdevicetype',
                    title: '二级分类'
                },
                {
                    field: 'area',
                    title: ''
                },
                {
                    field: 'build',
                    title: '所属建筑'
                },
                {
                    field: 'floor',
                    title: '所属楼层'
                },
                {
                    field: 'devicename',
                    title: '设备名称'
                },
                {
                    field: 'isface',
                    title: '是否人脸识别 0否 1是'
                },
                {
                    field: 'areaid',
                    title: '区域编号'
                },
                {
                    field: 'mapid',
                    title: '地图编号'
                },
                {
                    field: 'address',
                    title: '位置'
                },
                {
                    field: 'x',
                    title: '地图坐标X'
                },
                {
                    field: 'y',
                    title: '地图坐标y'
                },
                {
                    field: 'z',
                    title: '地图坐标z'
                },
                {
                    field: 'devicecode',
                    title: '设备编号'
                },
                {
                    field: 'devicemodal',
                    title: '设备型号'
                },
                {
                    field: 'devicebrand',
                    title: '设备品牌'
                },
                {
                    field: 'devicesupplier',
                    title: '供应商'
                },
                {
                    field: 'contactdetails',
                    title: '联系方式'
                },
                {
                    field: 'ip',
                    title: 'ip'
                },
                {
                    field: 'port',
                    title: 'port'
                },
                {
                    field: 'username',
                    title: '用户名'
                },
                {
                    field: 'password',
                    title: '密码'
                },
                {
                    field: 'rtspurl',
                    title: 'rtsp视频流地址'
                },
                {
                    field: 'doorno',
                    title: ''
                },
                {
                    field: 'online',
                    title: '在线 0离线 1在线'
                },
                {
                    field: 'status',
                    title: '状态'
                },
                {
                    field: 'alarm',
                    title: ''
                },
                {
                    field: 'isenable',
                    title: '是否启用'
                },
                {
                    field: 'purchasetime',
                    title: '采购时间'
                },
                {
                    field: 'installationtime',
                    title: '安装时间'
                },
                {
                    field: 'effectivetime',
                    title: '有效时间'
                },
                {
                    field: 'remark',
                    title: ''
                },
                {
                    field: 'ctime',
                    title: ''
                },
                {
                    field: 'positiontype',
                    title: '位置类型'
                },
                {
                    field: 'createtime',
                    title: ''
                },
                {
                    field: 'overInsurance',
                    title: '是否过保'
                },
                {
                    field: 'data',
                    title: ''
                },
                {
                    field: 'imageUrl',
                    title: ''
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>