|
@@ -142,16 +142,26 @@
|
|
|
<input id="btnImport" class="btn" type="button" value="导入"/>
|
|
|
<a href="###" class="btn hide" id="save-button"">绑定评卷员</a>
|
|
|
<!-- <input id="btnExport" class="btn" type="button" value="导出"/> -->
|
|
|
+
|
|
|
+ <input id="btnEnable" class="btn" type="button" value="启用" onclick="goEnable(true)"/>
|
|
|
+
|
|
|
+ <input id="btnEnable" class="btn" type="button" value="禁用" onclick="goEnable(false)"/>
|
|
|
+
|
|
|
+ <input id="btnRelease" class="btn" type="button" value="回收" onclick="goRelease()"/>
|
|
|
+
|
|
|
+ <input id="btnTaskCount" class="btn" type="button" value="设置评卷数" onclick="goTaskCount()"/>
|
|
|
+
|
|
|
+ <input id="btnResetPassword" class="btn" type="button" value="重置密码" onclick="goResetPassword()"/>
|
|
|
</div>
|
|
|
</form>
|
|
|
<tags:message content="${message}"/>
|
|
|
<table id="contentTable" class="table table-striped table-bordered table-condensed">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
+ <th><input type="checkbox" id="ids">登录名</th>
|
|
|
+ <th>姓名</th>
|
|
|
<th>科目</th>
|
|
|
<th>分组</th>
|
|
|
- <th>登录名</th>
|
|
|
- <th>姓名</th>
|
|
|
<th>状态</th>
|
|
|
<th>已评数量</th>
|
|
|
<th>正在评卷</th>
|
|
@@ -163,6 +173,8 @@
|
|
|
<tbody>
|
|
|
<c:forEach items="${query.result}" var="marker">
|
|
|
<tr>
|
|
|
+ <td><input type="checkbox" class="ids" name="ids" value="${marker.id}">${marker.user.loginName}</td>
|
|
|
+ <td>${marker.user.name}</td>
|
|
|
<td>
|
|
|
<c:if test="${marker.subject!=null}">
|
|
|
${marker.subject.code}-${marker.subject.name}
|
|
@@ -173,8 +185,6 @@
|
|
|
${marker.group.number}-${marker.group.title}
|
|
|
</c:if>
|
|
|
</td>
|
|
|
- <td>${marker.user.loginName}</td>
|
|
|
- <td>${marker.user.name}</td>
|
|
|
<td>${marker.enable eq true ? "启用" : "禁用"}</td>
|
|
|
<td>${marker.markedCount}</td>
|
|
|
<td>${marker.currentCount}</td>
|
|
@@ -224,7 +234,7 @@
|
|
|
<script type="text/javascript">
|
|
|
var searchSubjectCode = '${query.subjectCode}';
|
|
|
var searchGroupNumber = '${query.groupNumber}';
|
|
|
- var markerId;
|
|
|
+ var check_list;
|
|
|
$(document).ready(function () {
|
|
|
$('#cover').hide();
|
|
|
});
|
|
@@ -266,24 +276,40 @@
|
|
|
$('.toggle-button').click(function () {
|
|
|
var id = $(this).attr('data-id');
|
|
|
var enable = $(this).attr('data-value');
|
|
|
- $.post('${ctx}/admin/exam/marker/toggle', {id: id, enable: enable}, function (result) {
|
|
|
- if (result.success == true) {
|
|
|
- alert('修改成功');
|
|
|
- $("#searchForm").submit();
|
|
|
- } else {
|
|
|
- alert(result.message);
|
|
|
- }
|
|
|
+ var check_list =[];
|
|
|
+ check_list.push(id);
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/admin/exam/marker/toggle",
|
|
|
+ data:{ids: check_list, enable: enable},
|
|
|
+ traditional:true,
|
|
|
+ type:"post",
|
|
|
+ success:function (result) {
|
|
|
+ if (result.success == true) {
|
|
|
+ alert('修改成功');
|
|
|
+ $("#searchForm").submit();
|
|
|
+ } else {
|
|
|
+ alert(result.message);
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
$('.release-button').click(function () {
|
|
|
var id = $(this).attr('data-id');
|
|
|
- $.post('${ctx}/admin/exam/marker/release', {id: id}, function (result) {
|
|
|
- if (result.success == true) {
|
|
|
- alert('回收成功');
|
|
|
- $("#searchForm").submit();
|
|
|
- } else {
|
|
|
- alert(result.message);
|
|
|
- }
|
|
|
+ var check_list =[];
|
|
|
+ check_list.push(id);
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/admin/exam/marker/release",
|
|
|
+ data:{ids: check_list},
|
|
|
+ traditional:true,
|
|
|
+ type:"post",
|
|
|
+ success:function (result) {
|
|
|
+ if (result.success == true) {
|
|
|
+ alert('回收成功');
|
|
|
+ $("#searchForm").submit();
|
|
|
+ } else {
|
|
|
+ alert(result.message);
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
$('#subject-select').change(function () {
|
|
@@ -329,7 +355,8 @@
|
|
|
$('.task-count').val('');
|
|
|
$('.taskWindow').show();
|
|
|
$('#cover').show();
|
|
|
- markerId = obj;
|
|
|
+ check_list =[];
|
|
|
+ check_list.push(obj);
|
|
|
}
|
|
|
|
|
|
function reSetPassword(obj) {
|
|
@@ -337,7 +364,8 @@
|
|
|
$('.password-value').val('');
|
|
|
$('.reSetPasswordWin').show();
|
|
|
$('#cover').show();
|
|
|
- markerId = obj;
|
|
|
+ check_list =[];
|
|
|
+ check_list.push(obj);
|
|
|
}
|
|
|
|
|
|
$('.image-close').click(function () {
|
|
@@ -348,7 +376,21 @@
|
|
|
$('.reSetPasswordWin').hide();
|
|
|
$('#cover').hide();
|
|
|
});
|
|
|
-
|
|
|
+ function goTaskCount() {
|
|
|
+ check_list = [];
|
|
|
+ $("input[name='ids']:checked").each(function(){
|
|
|
+ check_list.push($(this).val())
|
|
|
+ })
|
|
|
+ if(check_list.length==0) {
|
|
|
+ alert('请选择');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $('.wrong').html('');
|
|
|
+ $('.task-count').val('');
|
|
|
+ $('.taskWindow').show();
|
|
|
+ $('#cover').show();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
$('.task-btn').click(function () {
|
|
|
var taskCount = $('.task-count').val();
|
|
|
var wrongMessage = $('.wrong');
|
|
@@ -366,15 +408,37 @@
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
- $.post('${ctx}/admin/exam/marker/setTaskCount', {id: markerId, taskCount: taskCount}, function (result) {
|
|
|
- if (result.success == true) {
|
|
|
- $("#searchForm").submit();
|
|
|
- } else {
|
|
|
- alert(result.message);
|
|
|
- }
|
|
|
- $('.taskWindow').hide();
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/admin/exam/marker/setTaskCount",
|
|
|
+ data:{ids: check_list, taskCount: taskCount},
|
|
|
+ traditional:true,
|
|
|
+ type:"post",
|
|
|
+ success:function (result) {
|
|
|
+ if (result.success == true) {
|
|
|
+ alert('设置成功');
|
|
|
+ $("#searchForm").submit();
|
|
|
+ } else {
|
|
|
+ alert(result.message);
|
|
|
+ }
|
|
|
+ $('.taskWindow').hide();
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
+ function goResetPassword() {
|
|
|
+ check_list = [];
|
|
|
+ $("input[name='ids']:checked").each(function(){
|
|
|
+ check_list.push($(this).val())
|
|
|
+ })
|
|
|
+ if(check_list.length==0) {
|
|
|
+ alert('请选择');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $('.passwordWrong').html('');
|
|
|
+ $('.password-value').val('');
|
|
|
+ $('.reSetPasswordWin').show();
|
|
|
+ $('#cover').show();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
$('.password-btn').click(function () {
|
|
|
var password = $('.password-value').val();
|
|
|
var wrongMessage = $('.passwordWrong');
|
|
@@ -386,14 +450,20 @@
|
|
|
wrongMessage.html('密码至少4位!');
|
|
|
return false;
|
|
|
}
|
|
|
- $.post('${ctx}/admin/exam/marker/reSetPassword', {id: markerId, password: password}, function (result) {
|
|
|
- if (result.success == true) {
|
|
|
- alert('修改成功');
|
|
|
- $("#searchForm").submit();
|
|
|
- } else {
|
|
|
- alert(result.message);
|
|
|
- }
|
|
|
- $('.reSetPasswordWin').hide();
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/admin/exam/marker/reSetPassword",
|
|
|
+ data:{ids: check_list, password: password},
|
|
|
+ traditional:true,
|
|
|
+ type:"post",
|
|
|
+ success:function (result) {
|
|
|
+ if (result.success == true) {
|
|
|
+ alert('修改成功');
|
|
|
+ $("#searchForm").submit();
|
|
|
+ } else {
|
|
|
+ alert(result.message);
|
|
|
+ }
|
|
|
+ $('.reSetPasswordWin').hide();
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
$('#save-button').click(function () {
|
|
@@ -414,6 +484,71 @@
|
|
|
$('#save-button').show();
|
|
|
}
|
|
|
});
|
|
|
+ $("#ids").change(function () {
|
|
|
+ if ($("#ids").is(':checked')) {
|
|
|
+ $(".ids").attr("checked", true);
|
|
|
+ } else {
|
|
|
+ $(".ids").attr("checked", false);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $(".ids").change(function () {
|
|
|
+ var all = true;
|
|
|
+ $("input[name='ids']").each(function(){
|
|
|
+ if(!$(this).is(':checked')){
|
|
|
+ all = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $("#ids").attr("checked", all);
|
|
|
+ });
|
|
|
+ function goEnable(enable) {
|
|
|
+ var check_list = []
|
|
|
+ $("input[name='ids']:checked").each(function(){
|
|
|
+ check_list.push($(this).val())
|
|
|
+ })
|
|
|
+ if(check_list.length==0) {
|
|
|
+ alert('请选择');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/admin/exam/marker/toggle",
|
|
|
+ data:{ids: check_list, enable: enable},
|
|
|
+ traditional:true,
|
|
|
+ type:"post",
|
|
|
+ success:function (result) {
|
|
|
+ if (result.success == true) {
|
|
|
+ alert('修改成功');
|
|
|
+ $("#searchForm").submit();
|
|
|
+ } else {
|
|
|
+ alert(result.message);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function goRelease() {
|
|
|
+ var check_list = []
|
|
|
+ $("input[name='ids']:checked").each(function(){
|
|
|
+ check_list.push($(this).val())
|
|
|
+ })
|
|
|
+ if(check_list.length==0) {
|
|
|
+ alert('请选择');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/admin/exam/marker/release",
|
|
|
+ data:{ids: check_list},
|
|
|
+ traditional:true,
|
|
|
+ type:"post",
|
|
|
+ success:function (result) {
|
|
|
+ if (result.success == true) {
|
|
|
+ alert('回收成功');
|
|
|
+ $("#searchForm").submit();
|
|
|
+ } else {
|
|
|
+ alert(result.message);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
</body>
|