<!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="userName"/>
                        </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="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 examineFlag = [[${@permission.hasPermi('system:userexamine:examine')}]];
    var downloadFlag = [[${@permission.hasPermi('system:userexamine:examine')}]];
    var userStatus = [[${@dict.getType('sys_normal_disable')}]];
    var userPolitics = [[${@dict.getType('sys_user_politics')}]];
    var examineState = [[${@dict.getType('sys_user_examine')}]];
    var prefix = ctx + "system/userApply";

    $(function() {
        var options = {
            url: prefix + "/list",
            modalName: "涉密人员审核",
            columns: [
                {
                    field: 'userId',
                    title: '人员ID',
                },
                {
                    field: 'loginName',
                    title: '人员编号',
                },
                {
                    field: 'userName',
                    title: '人员姓名',
                },
                {
                    field: 'examine',
                    title: '状态',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(examineState, value);
                    }
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + examineFlag + '" href="javascript:void(0)" onclick="examinedetail(\'' + row.userId + '\')"><i class="fa fa-edit"></i>申报</a> ');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
    function examinedetail(id) {
        var url =prefix + '/apply/' + id;
        $.modal.openTab("涉密人员申请", url);
    }
</script>
</body>
</html>
