<!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>
|
<p>[[#{jsp.exam.enterprise.companyname}]]:</p>
|
<input type="text" name="userName"/>
|
</li>
|
<li>
|
<p>[[#{basis.name}]]:</p>
|
<input type="text" name="testName"/>
|
</li>
|
<li>
|
<p>[[#{basis.type}]]:</p>
|
<select name="testType" th:with="type=${@dict.getType('test_type')}">
|
<option value="">All</option>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
th:value="${dict.dictValue}"></option>
|
</select>
|
</li>
|
<li>
|
<p>[[#{basis.area}]]:</p>
|
<select name="testArea" th:with="type=${@dict.getType('test_area')}">
|
<option value="">All</option>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
th:value="${dict.dictValue}"></option>
|
</select>
|
</li>
|
<li>
|
<p>[[#{jsp.exam.test_package.001}]]:</p>
|
<select name="langType" th:with="type=${@dict.getType('lang_type')}">
|
<option value="">All</option>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
th:value="${dict.dictValue}"></option>
|
</select>
|
</li>
|
<li>
|
<p>[[#{jsp.exam.test_package.003}]]:</p>
|
<input type="email" name="testEmail"/>
|
</li>
|
<li class="select-time">
|
<p>[[#{jsp.exam.test_package.004}]]:</p>
|
<input type="text" class="time-input" id="startTime" th:placeholder="#{jsp.system.user.profile.027}"
|
name="params[beginInvalidTime]"/>
|
<span>-</span>
|
<input type="text" class="time-input" id="endTime" th:placeholder="#{jsp.system.user.profile.028}"
|
name="params[endInvalidTime]"/>
|
</li>
|
<li>
|
<p>[[#{basis.state}]]:</p>
|
<select name="status" th:with="type=${@dict.getType('test_status')}">
|
<option value="">All</option>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
th:value="${dict.dictValue}"></option>
|
</select>
|
</li>
|
<li>
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
class="fa fa-search"></i> [[#{basis.search}]]</a>
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
class="fa fa-refresh"></i> [[#{basis.reset}]]</a>
|
</li>
|
</ul>
|
</div>
|
</form>
|
</div>
|
|
<div class="btn-group-sm" id="toolbar" role="group">
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="exam:test_package:add">
|
<i class="fa fa-plus"></i> [[#{basis.create}]]
|
</a>
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
|
shiro:hasPermission="exam:test_package:edit">
|
<i class="fa fa-edit"></i> [[#{basis.edit}]]
|
</a>
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
|
shiro:hasPermission="exam:test_package:remove">
|
<i class="fa fa-remove"></i> [[#{basis.del}]]
|
</a>
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="exam:test_package:export">
|
<i class="fa fa-download"></i> [[#{basis.export}]]
|
</a>
|
<a class="btn btn-default" onclick="javascript:recover()" shiro:hasPermission="exam:test_package:recover">
|
<i class="fa fa-address-book"></i> [[#{jsp.exam.test_package.006}]]
|
</a>
|
<a class="btn btn-warning" onclick="javascript:testReport()" shiro:hasPermission="exam:test_package:testreport">
|
<i class="fa fa-download"></i> [[#{jsp.exam.test_package.007}]]
|
</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:test_package:edit')}]];
|
var removeFlag = [[${@permission.hasPermi('exam:test_package:remove')}]];
|
var testTypeDatas = [[${@dict.getType('test_type')}]];
|
var testAreaDatas = [[${@dict.getType('test_area')}]];
|
var langTypeDatas = [[${@dict.getType('lang_type')}]];
|
var statusDatas = [[${@dict.getType('test_status')}]];
|
var prefix = ctx + "exam/test_package";
|
var member_prefix = ctx + "exam/testMember";
|
|
$(function () {
|
var options = {
|
url: prefix + "/list",
|
createUrl: prefix + "/add",
|
updateUrl: prefix + "/edit/{id}",
|
removeUrl: prefix + "/remove",
|
exportUrl: prefix + "/export",
|
modalName: [[#{menu.testbackage.manager}]],
|
columns: [{
|
checkbox: true
|
},
|
{
|
field: 'id',
|
title: 'id',
|
visible: false
|
},
|
{
|
field: 'prodId',
|
title: 'prodId',
|
visible: false
|
},
|
{
|
field: 'userId',
|
title: [[#{jsp.exam.test_package.008}]],
|
visible: false
|
},
|
{
|
field: 'testName',
|
title: [[#{jsp.exam.report.006}]],
|
sortable: true,
|
formatter: function (value, row, index) {
|
return '<a href="javascript:void(0)" onclick="memberDetail(\'' + row.id + '\')">' + value + '</a>';
|
}
|
},
|
{
|
field: 'userName',
|
title: [[#{jsp.exam.enterprise.companyname}]]
|
},
|
{
|
field: 'prodName',
|
title: [[#{jsp.exam.report.007}]]
|
},
|
{
|
field: 'testType',
|
title: [[#{basis.type}]],
|
formatter: function (value, row, index) {
|
return $.table.selectDictLabel(testTypeDatas, value);
|
}
|
},
|
{
|
field: 'testArea',
|
title: [[#{basis.area}]],
|
formatter: function (value, row, index) {
|
return $.table.selectDictLabel(testAreaDatas, value);
|
}
|
},
|
// {
|
// field: 'langType',
|
// title: [[#{jsp.exam.test_package.001}]],
|
// formatter: function (value, row, index) {
|
// return $.table.selectDictLabel(langTypeDatas, value);
|
// }
|
// },
|
{
|
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: 'invalidTime',
|
title: [[#{jsp.exam.test_package.004}]],
|
visible: false
|
},
|
{
|
field: 'createTime',
|
title: [[#{basis.createTime}]],
|
sortable: true
|
},
|
{
|
field: 'status',
|
title: [[#{basis.state}]],
|
formatter: function (value, row, index) {
|
return $.table.selectDictLabel(statusDatas, value);
|
}
|
},
|
{
|
field: 'template',
|
title: [[#{basis.template}]],
|
visible: false
|
},
|
{
|
field: 'reportTemplateId',
|
title: [[#{report.type.code}]],
|
visible: false
|
},
|
{
|
field: 'reportTemplateShowValue',
|
title: [[#{jsp.exam.template.reporttype}]],
|
visible: false
|
},
|
{
|
field: 'remark',
|
title: [[#{basis.remark}]],
|
visible: false
|
},
|
{
|
title: [[#{basis.operate}]],
|
align: 'center',
|
formatter: function (value, row, index) {
|
var actions = [];
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>'+[[#{basis.edit}]]+'</a> ');
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>'+[[#{basis.del}]]+'</a>');
|
return actions.join('');
|
}
|
}]
|
};
|
$.table.init(options);
|
});
|
|
/*字典列表-详细*/
|
function memberDetail(testId) {
|
$.get(member_prefix + "/memberDetailVerify/" + testId, function (result) {
|
if (result.code != web_status.SUCCESS) {
|
$.modal.alertWarning(result.msg);
|
$.modal.closeLoading();
|
} else {
|
var url = member_prefix + '/memberDetail/' + testId;
|
$.modal.openTab([[#{jsp.exam.enterprise.listofreviewers}]], url);
|
}
|
});
|
}
|
|
function recover() {
|
var ids = $.table.selectColumns("id");
|
var testNames = $.table.selectColumns("testName");
|
if (ids.length == 0) {
|
$.modal.alertWarning([[#{jsp.exam.test_package.013}]]);
|
return;
|
}
|
|
if (ids.length > 1) {
|
$.modal.alertWarning([[#{jsp.exam.test_package.014}]]);
|
return;
|
}
|
var url = prefix + '/recover/' + ids;
|
$.modal.confirm([[#{confirm.the.need.for.recycling}]] + "【" + testNames + "】" + [[#{confirm.the.need.for.recycling.apend}]], function () {
|
$.modal.loading("loading...");
|
$.post(url, "", function (result) {
|
if (result.code == web_status.SUCCESS) {
|
$.modal.alertWarning(result.msg)
|
} else if (result.code == web_status.WARNING) {
|
$.modal.alertWarning(result.msg)
|
} else {
|
$.modal.alertError(result.msg);
|
}
|
$.modal.closeLoading();
|
});
|
});
|
}
|
|
function testReport() {
|
var ids = $.table.selectColumns("id");
|
var prodId = $.table.selectColumns("prodId");
|
if (ids.length == 0) {
|
$.modal.alertWarning([[#{basis.pleasechoose}]]);
|
return;
|
}
|
|
if (ids.length > 1) {
|
$.modal.alertWarning([[#{jsp.exam.test_package.015}]]);
|
return;
|
}
|
var url = '/exam/report/reportView/' + ids + '/' + prodId;
|
$.modal.openTab([[#{jsp.exam.test_package.016}]], url);
|
}
|
|
</script>
|
</body>
|
</html>
|