154 lines
7.1 KiB
Plaintext
154 lines
7.1 KiB
Plaintext
|
|
<!DOCTYPE html
|
|||
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|||
|
|
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
|||
|
|
<style type="text/css">
|
|||
|
|
.select2-container .select2-selection--single {
|
|||
|
|
height: 34px;
|
|||
|
|
line-height: 34px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.select2-selection__arrow {
|
|||
|
|
margin-top: 3px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
</style>
|
|||
|
|
|
|||
|
|
<!-- <link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.css"/>
|
|||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/jquery.tablednd.js" charset="utf-8"></script>
|
|||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js" charset="utf-8"></script> -->
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
|
|||
|
|
|
|||
|
|
$(function () {
|
|||
|
|
|
|||
|
|
$("#table_Detail").bootstrapTable({ // 对应table标签的id
|
|||
|
|
url: ext.contextPath + '/exam/examrecord/getUserVisualexamList.do', // 获取表格数据的url
|
|||
|
|
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
|||
|
|
striped: true, //表格显示条纹,默认为false
|
|||
|
|
pagination: true, // 在表格底部显示分页组件,默认false
|
|||
|
|
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
|||
|
|
pageSize: 5, // 页面数据条数
|
|||
|
|
pageNumber: 1, // 首页页码
|
|||
|
|
paginationDetailHAlign:' hidden',//去除分页的显示
|
|||
|
|
sidePagination: 'server', // 设置为服务器端分页
|
|||
|
|
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
|||
|
|
return {
|
|||
|
|
rows: params.limit, // 每页要显示的数据条数
|
|||
|
|
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
|||
|
|
sort: params.sort, // 要排序的字段
|
|||
|
|
order: params.order
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
// sortName: 'ord', // 要排序的字段
|
|||
|
|
// sortOrder: 'asc', // 排序规则
|
|||
|
|
// onClickRow: function (row) {//单击行事件,执行查看功能
|
|||
|
|
// //viewFun(row.id);
|
|||
|
|
// },
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
field: '_examname', // 返回json数据中的name
|
|||
|
|
title: '考试名称', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居h中
|
|||
|
|
// width: '30%'
|
|||
|
|
},{
|
|||
|
|
field: 'startdate', // 返回json数据中的name
|
|||
|
|
title: '开始时间', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return value.substring(0, 19);
|
|||
|
|
}
|
|||
|
|
},{
|
|||
|
|
field: 'enddate', // 返回json数据中的name
|
|||
|
|
title: '结束时间', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
// width: '10%'
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return value.substring(0, 19);
|
|||
|
|
}
|
|||
|
|
},{
|
|||
|
|
field: 'status', // 返回json数据中的name
|
|||
|
|
title: '考试状态', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
// width: '10%'
|
|||
|
|
},{
|
|||
|
|
title: "操作",
|
|||
|
|
align: 'center',
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: 90, // 定义列的宽度,单位为像素px
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
var buts= '';
|
|||
|
|
if(row.status=='未考'){
|
|||
|
|
buts+= '<button class="btn btn-default btn-sm" title="开始考试" onclick="doexam(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 开始考试</span></button>';
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
buts='<div class="btn-group" >'+buts+'</div>';
|
|||
|
|
return buts;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
onLoadSuccess: function(){ //加载成功时执行
|
|||
|
|
adjustBootstrapTableView("table_Detail");
|
|||
|
|
},
|
|||
|
|
onLoadError: function(){ //加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
},
|
|||
|
|
//当拖拽结束后,整个表格的数据
|
|||
|
|
// onReorderRow: function (newData) {
|
|||
|
|
// //这里的newData是整个表格数据,数组形式
|
|||
|
|
// //console.log(newData); 调试用代码
|
|||
|
|
// $.post(ext.contextPath + '/exam/examTitleRange/dosort.do',
|
|||
|
|
// { jsondata: JSON.stringify(newData) },//将整张表数据Post,当然,先序列化成Json
|
|||
|
|
// function(data) {
|
|||
|
|
// if (data == 1) {
|
|||
|
|
// $("#table").bootstrapTable('refresh');
|
|||
|
|
// showAlert('s','排序成功','mainAlertdiv');
|
|||
|
|
// }else{
|
|||
|
|
// showAlert('d','数据错误','mainAlertdiv');
|
|||
|
|
// }
|
|||
|
|
// });
|
|||
|
|
|
|||
|
|
// }
|
|||
|
|
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="subModal">
|
|||
|
|
<div class="modal-dialog">
|
|||
|
|
<div class="modal-content" style="width: 800px">
|
|||
|
|
<div class="modal-header">
|
|||
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|||
|
|
<span aria-hidden="true">×</span></button>
|
|||
|
|
<h4 class="modal-title">模拟考试列表界面</h4>
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-body">
|
|||
|
|
<!-- <div class="box box-primary" >
|
|||
|
|
<div id="mainAlertDetaildiv"></div>
|
|||
|
|
<div id="subDetailDiv"></div>
|
|||
|
|
<div class="box-header with-border">
|
|||
|
|
<h3 class="box-title">模拟考试列表</h3>
|
|||
|
|
<div class="box-tools pull-right">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="box-body ">
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</div> -->
|
|||
|
|
<div style="height: 54%;">
|
|||
|
|
<table id="table_Detail" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-footer">
|
|||
|
|
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|