<!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>
<style>
    .gray-bg{
        padding: 20px;
    }
    .container-div{
        height: 100%;
        background-color: #ffffff;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .content{
        width: 60%;
        height: 60%;
        /*background-color: #f2f2f2;*/
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .table{
        width:43% ;
    }
    .unnamed1{
        color: red;
    }
</style>
<body class="gray-bg">
<div class="container-div">
    <div class="content">
        <form name="form1" method="post" action="">
            <input type="hidden" name="operate" value=""/>
            <br>
            <table width="90%"   align="center" cellpadding="2" cellspacing="1"  class="table02">
                <tr>
                    <td class="cell1">
                        <div align="center">
                            <table width="600">
                                <tr>
                                    <td colspan="3" ><br><h4>您的相关信息:</h4><hr   /></td>
                                </tr>
                                <tr>
                                    <td class="table"  align="left"><b>人员编号: </b>[[${user.loginName}]]<hr /></td>
                                    <td class="table" align="left"><b>性别: </b><span th:text="${user.sex == 0 ? '女' : '男'}"></span><hr /></td>
                                    <td class="table" align="left"><b>选择相关考题</b><hr   /></td>
                                </tr>
                                <tr>
                                    <td class="table" align="left"><b>人员姓名: </b> <span class="user_name">[[${user.userName}]] </span><hr/></td>
                                    <td class="table" align="left"><b>单位: </b><span class="dept_name">[[${user.dept.deptName}]]</span><hr/></td>
                                    <td class="table" align="left">
                                        <select name="TYPEID" th:with="type=${@dict.getType('td_question_type')}">
                                            <option value="">-请选择-</option>
                                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                        </select>
                                        <hr/></td>
                                </tr>
                                <tr>
                                    <td colspan="3"><p align="center" class="unnamed1">友情提示</p>
                                        <p align="center" class="unnamed1">答题过程不能中断!不能作弊和抄袭,</p>
                                        <p align="center" class="unnamed1">答题过程中不能切换屏幕，否则将进行强制提交！</p>
                                        <p align="center" class="unnamed1">考试时间为：45分钟，到考试结束时间没有交卷的，系统将强制交卷！</p>
                                        <p align="center">
                                            <input type="button"  class="btn btn-primary" name="button1" value=" 开始答卷"  onclick="check()"/>
                                        </p>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
<script th:inline="javascript">
    function check() {
        if (form1.TYPEID.value=='') {
            alert("请选择相关考题！");
            return false;
        }
        var userName = [[${user.userName}]];
        var deptName = [[${user.dept.deptName}]];
        window.location.href = `/system/exam/edit?TYPEID=${form1.TYPEID.value}&userName=${userName}&deptName=${deptName}`;
        // form1.action = "/zhyw/smsj/TryBook.jsp";
        // form1.button1.disabled=true;
        // form1.submit();
    }
</script>
</body>
</html>
