linzhijie
2021-04-12 2f737df6f8e482540a465445bdb003d98103db54
src/main/resources/templates/main.html
@@ -10,11 +10,11 @@
            <form id="post-form1">
                <div class="select-list">
                    <ul>
                        <li>
                        <li id="hideA">
                            <p>[[#{jsp.exam.enterprise.companyname}]]:</p><input type="text" name="userName"
                                                                                 id="userName" value=""/>
                        </li>
                        <li><a class="btn btn-primary btn-rounded btn-sm" onclick="openUserList()"><i
                        <li id="hideB"><a class="btn btn-primary btn-rounded btn-sm" onclick="openUserList()"><i
                                class="fa fa-search"></i>&nbsp;[[#{menu.exam.enterprise.view1}]]</a></li>
                        <li>
                            <input type="text" name="queryValue" id="queryValue" value=""/>
@@ -29,14 +29,6 @@
                </div>
            </form>
        </div>
<!--        <div class="col-sm-12 select-table" id="enterpriseInfo">-->
<!--            <p class="select-title" align="center">企业信息</p>-->
<!--            <table id="bootstrap-table1" data-mobile-responsive="true"></table>-->
<!--        </div>-->
<!--        <div class="col-sm-12 select-table" id="memberInfo">-->
<!--            <p class="select-title" align="center">用户信息</p>-->
<!--            <table id="bootstrap-table2" data-mobile-responsive="true"></table>-->
<!--        </div>-->
        <div class="col-sm-12 select-table">
            <p class="select-title" align="center">[[#{jsp.main.other.001}]]</p>
            <table id="bootstrap-table-form1" data-mobile-responsive="true"></table>
@@ -67,72 +59,18 @@
    var statusDatas = [[${@dict.getType('test_status')}]];
    var userId = [[${user.userId}]];
    // $(function () {
    //     var options = {
    //         id: "bootstrap-table1",
    //         url: ctx + "exam/extend/list2?userType=02",
    //         showSearch: false,
    //         showRefresh: false,
    //         showToggle: false,
    //         showColumns: false,
    //         createUrl: ctx + "exam/enterprise/add",
    //         updateUrl: ctx + "exam/enterprise/edit/{id}",
    //         removeUrl: ctx + "exam/enterprise/remove",
    //         exportUrl: ctx + "exam/enterprise/export",
    //         modalName: [[#{jsp.exam.demographyParam.businessuser}]],
    //         // showRefresh: true,
    //         queryParams: queryParams,
    //         pageSize: 10,
    //         pageList: [10, 50, 100],
    //         columns: [
    //             {
    //                 field: 'userId',
    //                 title: 'ID'
    //             },
    //             {
    //                 field: 'loginName',
    //                 title: [[#{jsp.exam.distributor.loginname}]]
    //             },
    //             {
    //                 field: 'userName',
    //                 title: [[#{jsp.exam.enterprise.companyname}]]
    //             },
    //             {
    //                 field: 'businessManager',
    //                 title: [[#{jsp.exam.distributor.businessmanager}]]
    //             },
    //             {
    //                 field: 'testNum',
    //                 title: [[#{jsp.exam.enterprise.usetimes}]],
    //                 formatter: function (value, row, index) {
    //                     return '<a href="javascript:void(0)" onclick="modifyUsageCount(\'' + row.id + '\')">' + value + '</a>';
    //                 }
    //             },
    //             {
    //                 field: 'effectTime',
    //                 title: [[#{jsp.exam.enterprise.effectivetime}]]
    //             },
    //             {
    //                 field: 'invalidTime',
    //                 title: [[#{jsp.exam.distributor.termcooperation}]]
    //             },
    //             {
    //                 field: 'legalPerson',
    //                 title: [[#{jsp.exam.enterprise.corporate}]]
    //             },
    //             {
    //                 title: [[#{basis.operate}]],
    //                 align: 'center',
    //                 formatter: function (value, row, index) {
    //                     var actions = [];
    //                     actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="freelogin(\'' + row.userId + '\')"><i class="fa fa-eye"></i>' + [[#{basis.freelogin}]] + '</a>');
    //                     return actions.join('');
    //                 }
    //             }
    //         ]
    //     };
    //     $.table.init(options);
    // });
    $(function(){ //代码部分
        $.ajax({
            type: "post",
            url: ctx + "exam/enterprise/checkUser",
            success: function (data) {
                if(data.code=='0') {
                    $("#hideA").css('display','none');
                    $("#hideB").css('display','none');
                }
            }
        });
    })
    function freelogin(id) {
        $.ajax({
@@ -170,146 +108,6 @@
        }
        $("#" + tableId).bootstrapTable('refresh', params);
    }
    // function searchDefine2() {
    //     var tableId = 'bootstrap-table2';
    //     var params = {
    //         queryValue: $("#queryValue").val(),
    //         queryType: $("#queryType").val(),
    //         limit: 10,
    //     }
    //     $("#" + tableId).bootstrapTable('refresh', params);
    // }
    //
    // $(function () {
    //     var options = {
    //         id: "bootstrap-table2",
    //         url: ctx + "exam/testMember" + "/list",
    //         showSearch: false,
    //         showRefresh: false,
    //         showToggle: false,
    //         showColumns: false,
    //         createUrl: ctx + "exam/testMember" + "/add/" + $("#testId").val(),
    //         updateUrl: ctx + "exam/testMember" + "/edit/{id}",
    //         removeUrl: ctx + "exam/testMember" + "/remove",
    //         exportUrl: ctx + "exam/testMember" + "/export",
    //         exportUrlLinkTest: ctx + "exam/testMember" + "/exportLinkTest",
    //         importUrl: ctx + "exam/testMember" + "/importData/" + $("#testId").val(),
    //         importTemplateUrl: ctx + "exam/testMember" + "/importTemplate",
    //         modalName: [[#{jsp.exam.test_package.032}]],
    //         pageSize: 10,
    //         pageList: [10, 50, 100],
    //         queryParams: queryParams2,
    //         // queryParams: function (params) {
    //         //     var temp = {
    //         //         queryValue:$("#queryValue").val(),
    //         //         queryType: $("#queryType").val(),
    //         //     }
    //         //     return temp;
    //         // },
    //         columns: [
    //             {
    //                 field: 'memberId',
    //                 title: [[#{jsp.exam.test_package.033}]],
    //                 visible: false
    //             },
    //             {
    //                 field: 'memberName',
    //                 title: [[#{jsp.exam.report.008}]]
    //             },
    //             {
    //                 field: 'memberDept',
    //                 title: [[#{jsp.system.dept.002}]],
    //                 sortable: true
    //
    //             },
    //             {
    //                 field: 'memberEmail',
    //                 title: [[#{jsp.system.user.profile.005}]]
    //             },
    //             {
    //                 field: 'memberPhone',
    //                 title: [[#{jsp.system.user.profile.003}]]
    //             },
    //             {
    //                 field: 'testId',
    //                 title: [[#{jsp.exam.report.014}]],
    //                 visible: false
    //             },
    //             {
    //                 field: 'startTime',
    //                 title: [[#{jsp.exam.test_package.startTime}]]
    //             },
    //             {
    //                 field: 'endTime',
    //                 title: [[#{jsp.exam.test_package.endTime}]]
    //             },
    //             {
    //                 field: 'smsStatus',
    //                 title: [[#{jsp.exam.test_package.035}]],
    //                 formatter: function (value, row, index) {
    //                     return $.table.selectDictLabel(sms_type, value);
    //                 }
    //             },
    //             {
    //                 field: 'smsTime',
    //                 title: [[#{jsp.exam.test_package.036}]]
    //             },
    //             {
    //                 field: 'emailStatus',
    //                 title: [[#{jsp.exam.test_package.037}]],
    //                 formatter: function (value, row, index) {
    //                     return $.table.selectDictLabel(email_status, value);
    //                 }
    //             },
    //             {
    //                 field: 'emailTime',
    //                 title: [[#{jsp.exam.test_package.038}]]
    //             },
    //             {
    //                 field: 'status',
    //                 title: [[#{basis.state}]],
    //                 formatter: function (value, row, index) {
    //                     return $.table.selectDictLabel(test_member_status, value);
    //                 }
    //             },
    //             {
    //                 field: 'remark',
    //                 title: [[#{basis.remark}]]
    //             },
    //             {
    //                 field: 'token',
    //                 title: [[#{jsp.exam.test_package.testtoken}]],
    //                 visible: false
    //             },
    //             {
    //                 field: 'hrEmailStatus',
    //                 title: [[#{hr.mailbox.status}]],
    //                 formatter: function (value, row, index) {
    //                     if (value == 1) {
    //                         return [[#{dict.ic138}]];
    //                     } else if (value == 2) {
    //                         return [[#{dict.ic140}]];
    //                     } else {
    //                         return "-";
    //                     }
    //                 },
    //                 visible: false
    //             },
    //             {
    //                 title: [[#{basis.operate}]],
    //                 align: 'center',
    //                 formatter: function (value, row, index) {
    //                     var actions = [];
    //                     actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="openTestDetail(\'' + row.token + '\')"><i class="fa fa-edit"></i>[[#{jsp.exam.test_package.testinfo}]]</a> ');
    //                     actions.push('<a class="btn btn-warning btn-xs " href="javascript:void(0)" onclick="openMemberReport(' + row.memberId + "," + row.testId + ')"><i class="fa fa-edit"></i>[[#{view.report}]]</a> ');
    //                     return actions.join('');
    //                 }
    //             }
    //         ]
    //     };
    //     $.table.init(options);
    // });
    // 查看测试进度
    function openTestDetail(token) {
@@ -422,7 +220,7 @@
    $(function () {
        var options = {
            id: "bootstrap-table-form2",
            url: "/exam/testMember/listTopAnswering",
            url: "/exam/testMember/listTopAnswering2",
            showSearch: false,
            showRefresh: false,
            showToggle: false,