linzhijie
2021-03-11 c33914ba0a98c823c4b4d7da21cdd476906c9924
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!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('entTestDetail列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <input type="hidden" id="token" name="token" th:value="${entTestDetail.token}">
                <input type="hidden" id="sortType" name="sortType" th:value="${entTestDetail.sortType}">
            </form>
        </div>
        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success" onclick="defineSoreTime()">
                <i class="fa fa-plus"></i> [[#{time.consuming.sorting}]]
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('exam:entTestDetail:edit')}]];
    var removeFlag = [[${@permission.hasPermi('exam:entTestDetail:remove')}]];
    var prefix = ctx + "exam/entTestDetail";
    var userType = [[${entTestDetail.userType}]];
 
    $(function () {
        var columns = [
            {
                field: 'id',
                title: 'id',
            },
            {
                field: 'memberId',
                title: [[#{jsp.exam.test_package.033}]]
            },
            {
                field: 'memberName',
                title: [[#{jsp.testPackage.name}]]
            },
            // {
            //     field: 'permanentId',
            //     title: [[#{jsp.exam.product.permanentNumber}]]
            // },
            {
                field: 'timeSpent',
                title: [[#{jsp.exam.test_package.timeSpent}]],
            },
            {
                field: 'startTime',
                title: [[#{jsp.exam.test_package.startTime}]]
            },
            {
                field: 'endTime',
                title: [[#{jsp.exam.test_package.endTime}]]
            }];
        if (userType == '00') {
            columns.splice(5,0,{field: 'questionTitle',title:[[#{jsp.exam.product.question}]]});
        }
 
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "entTestDetail",
            columns: columns
        };
        $.table.init(options);
    });
 
    function defineSoreTime() {
        $("#sortType").val("TimeSpent");
        $.table.search();
        $("#sortType").val("None");
    }
</script>
</body>
</html>