wzp
2021-04-06 5e873863bc7324894c89b0a0fc77a6202c91cd64
src/main/resources/templates/main.html
@@ -10,12 +10,12 @@
            <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
                                class="fa fa-search"></i>&nbsp;[[#{menu.exam.enterprise.view}]]</a></li>
                        <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=""/>
                            <select name="queryType" id="queryType" th:with="type=${@dict.getType('quickQueryType')}">
@@ -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({
@@ -171,146 +109,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) {
        var url = ctx + 'exam/entTestDetail/testDetail/' + token;
@@ -340,8 +138,8 @@
            showColumns: false,
            sortName: "updateTime",
            sortOrder: "desc",
            pageSize: 50,
            pageList: [50, 100, 200],
            pageSize: 25,
            pageList: [25, 100, 200],
            queryParams: querylistTopAnsweFinished,
            columns: [
                {
@@ -405,7 +203,7 @@
    function openUserList() {
        var url = ctx + 'exam/enterprise?userName=' + $("#userName").val();
        $.modal.openTab([[#{menu.exam.enterprise.view}]], url);
        $.modal.openTab([[#{menu.exam.enterprise.view1}]], url);
    }
    function openMemberSearch() {
@@ -422,15 +220,15 @@
    $(function () {
        var options = {
            id: "bootstrap-table-form2",
            url: "/exam/testMember/listTopAnswering",
            url: "/exam/testMember/listTopAnswering2",
            showSearch: false,
            showRefresh: false,
            showToggle: false,
            showColumns: false,
            sortName: "updateTime",
            sortOrder: "desc",
            pageSize: 50,
            pageList: [50, 100, 200],
            pageSize: 25,
            pageList: [25, 100, 200],
            queryParams: querylistTopAnswering,
            columns: [
                {
@@ -470,16 +268,16 @@
                    field: 'langType',
                    title: [[#{language.used.in.the.test}]]
                },
                {
                    field: 'status',
                    title: [[#{basis.state}]],
                    formatter: function (value, row, index) {
                        return $.table.selectDictLabel(test_member_status, value);
                    }
                },
                // {
                //     field: 'status',
                //     title: [[#{basis.state}]],
                //     formatter: function (value, row, index) {
                //         return $.table.selectDictLabel(test_member_status, value);
                //     }
                // },
                {
                    field: 'startTime',
                    title: [[#{current.time}]]
                    title: [[#{jsp.main.other.004}]]
                },
            ]
        };
@@ -531,7 +329,7 @@
                },
                {
                    field: 'userName',
                    title: [[#{jsp.exam.enterprise.companyname}]],
                    title: [[#{enterprise.customer.name}]],
                    formatter: function (value, row, index) {
                        // return '<a href="javascript:void(0)" onclick="userDetail(\'' + row.userId + '\')">' + value + '</a>';
                        return '<a href="javascript:void(0)" onclick="freelogin(\'' + row.userId + '\')">' + value + '</a>';
@@ -543,7 +341,7 @@
                },
                {
                    field: 'testType',
                    title: [[#{basis.type}]],
                    title: [[#{jsp.main.other.005}]],
                    formatter: function (value, row, index) {
                        return $.table.selectDictLabel(testTypeDatas, value);
                    }
@@ -559,21 +357,21 @@
                    field: 'testNum',
                    title: [[#{jsp.exam.test_package.009}]]
                },
                {
                    field: 'finishNum',
                    title: [[#{jsp.exam.test_package.010}]]
                }, {
                    field: 'testingNum',
                    title: [[#{jsp.exam.test_package.0101}]]
                },
                {
                    field: 'unTestNum',
                    title: [[#{jsp.exam.test_package.011}]]
                },
                {
                    field: 'testEmail',
                    title: [[#{jsp.exam.test_package.012}]]
                },
                // {
                //     field: 'finishNum',
                //     title: [[#{jsp.exam.test_package.010}]]
                // }, {
                //     field: 'testingNum',
                //     title: [[#{jsp.exam.test_package.0101}]]
                // },
                // {
                //     field: 'unTestNum',
                //     title: [[#{jsp.exam.test_package.011}]]
                // },
                // {
                //     field: 'testEmail',
                //     title: [[#{jsp.exam.test_package.012}]]
                // },
                {
                    field: 'invalidTime',
                    title: [[#{jsp.exam.test_package.004}]],
@@ -633,7 +431,7 @@
    /*企业用户或者分销商界面-详细*/
    function userDetail(userId) {
        var url = ctx + "exam/distributor";
        $.modal.openTab([[#{menu.exam.enterprise.view}]], url);
        $.modal.openTab([[#{menu.exam.enterprise.view1}]], url);
    }
</script>
</body>