考试管理新增页面完善
This commit is contained in:
parent
2db66566af
commit
50ef7bd77b
|
|
@ -57,6 +57,9 @@ public class ExamPaperController extends BaseController
|
||||||
return prefix + "/examPaper";
|
return prefix + "/examPaper";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询试卷列表
|
* 查询试卷列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -11,18 +11,26 @@
|
||||||
<!--<input id="deptId" name="deptId" class="form-control" type="text">-->
|
<!--<input id="deptId" name="deptId" class="form-control" type="text">-->
|
||||||
<!--</div>-->
|
<!--</div>-->
|
||||||
<!--</div>-->
|
<!--</div>-->
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">试卷代码:</label>
|
<label class="col-sm-3 control-label">考试名称:</label>
|
||||||
<div class="col-sm-8">
|
|
||||||
<input id="examPaperId" name="examPaperId" class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">试卷名称:</label>
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input id="name" name="name" class="form-control" type="text">
|
<input id="name" name="name" class="form-control" type="text">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">考试试卷:</label>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<input id="treeName" name="treeName" onclick="selectExamPaperCategoryTree()" class="form-control" type="text" readonly="true">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-5">
|
||||||
|
<select id="examPaperId" name="examPaperId" class="form-control m-b" >
|
||||||
|
<option>---请选择---</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">是否控制开始结束时间:</label>
|
<label class="col-sm-3 control-label">是否控制开始结束时间:</label>
|
||||||
|
|
||||||
|
|
@ -105,6 +113,9 @@
|
||||||
<div th:include="include::footer"></div>
|
<div th:include="include::footer"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var prefix = ctx + "exam/examExamination"
|
var prefix = ctx + "exam/examExamination"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#form-examExamination-add").validate({
|
$("#form-examExamination-add").validate({
|
||||||
rules:{
|
rules:{
|
||||||
xxxx:{
|
xxxx:{
|
||||||
|
|
@ -119,6 +130,41 @@
|
||||||
$.operate.save(prefix + "/add", $('#form-examExamination-add').serialize());
|
$.operate.save(prefix + "/add", $('#form-examExamination-add').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var id = 1;
|
||||||
|
function selectExamPaperCategoryTree() {
|
||||||
|
var options = {
|
||||||
|
title: '分类选择',
|
||||||
|
width: "380",
|
||||||
|
url: ctx + "exam/examPaperCategory" + "/selectExamPaperCategoryTree/"+id,
|
||||||
|
callBack: doSubmit
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function doSubmit(index, layero){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
id = body.find('#treeId').val()
|
||||||
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
|
layer.close(index);
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
url: ctx + "exam/examPaper"+ "/list",
|
||||||
|
type: "post",
|
||||||
|
dataType: "json",
|
||||||
|
data: {examPaperCategoryId:id},
|
||||||
|
// contentType:"application/json",
|
||||||
|
success: function(result) {
|
||||||
|
$("#examPaperId").html("<option>---请选择---</option>");
|
||||||
|
var rows =result.rows;
|
||||||
|
for(var i in rows){
|
||||||
|
$("#examPaperId").append("<option value='"+rows[i].id+"'>"+rows[i].name+"</option>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$.ajax(config)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,25 @@
|
||||||
<form class="form-horizontal m" id="form-examExamination-edit" th:object="${examExamination}">
|
<form class="form-horizontal m" id="form-examExamination-edit" th:object="${examExamination}">
|
||||||
<input id="id" name="id" th:field="*{id}" type="hidden">
|
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">试卷代码:</label>
|
|
||||||
<div class="col-sm-8">
|
<div class="form-group">
|
||||||
<input id="examPaperId" name="examPaperId" th:field="*{examPaperId}" class="form-control" type="text">
|
<label class="col-sm-3 control-label">考试名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="name" name="name" th:field="*{name}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">试卷名称:</label>
|
<label class="col-sm-3 control-label">考试试卷:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-3">
|
||||||
<input id="name" name="name" th:field="*{name}" class="form-control" type="text">
|
<input id="treeName" name="treeName" value="试卷分类" onclick="selectExamPaperCategoryTree()" class="form-control" type="text" readonly="true">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-5">
|
||||||
|
<select id="examPaperId" name="examPaperId" class="form-control m-b" >
|
||||||
|
<option>---请选择---</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">是否控制开始结束时间:</label>
|
<label class="col-sm-3 control-label">是否控制开始结束时间:</label>
|
||||||
|
|
||||||
|
|
@ -100,6 +108,25 @@
|
||||||
<div th:include="include::footer"></div>
|
<div th:include="include::footer"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var prefix = ctx + "exam/examExamination"
|
var prefix = ctx + "exam/examExamination"
|
||||||
|
$(function () {
|
||||||
|
var config = {
|
||||||
|
url: ctx + "exam/examPaper"+ "/list",
|
||||||
|
type: "post",
|
||||||
|
dataType: "json",
|
||||||
|
data: {examPaperCategoryId:$("#examPaperId").val()},
|
||||||
|
// contentType:"application/json",
|
||||||
|
success: function(result) {
|
||||||
|
$("#examPaperId").html("<option>---请选择---</option>");
|
||||||
|
var rows =result.rows;
|
||||||
|
for(var i in rows){
|
||||||
|
$("#examPaperId").append("<option value='"+rows[i].id+"'>"+rows[i].name+"</option>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$.ajax(config)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
$("#form-examExamination-edit").validate({
|
$("#form-examExamination-edit").validate({
|
||||||
rules:{
|
rules:{
|
||||||
xxxx:{
|
xxxx:{
|
||||||
|
|
@ -113,6 +140,41 @@
|
||||||
$.operate.save(prefix + "/edit", $('#form-examExamination-edit').serialize());
|
$.operate.save(prefix + "/edit", $('#form-examExamination-edit').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var id = 1;
|
||||||
|
function selectExamPaperCategoryTree() {
|
||||||
|
var options = {
|
||||||
|
title: '分类选择',
|
||||||
|
width: "380",
|
||||||
|
url: ctx + "exam/examPaperCategory" + "/selectExamPaperCategoryTree/"+id,
|
||||||
|
callBack: doSubmit
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function doSubmit(index, layero){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
id = body.find('#treeId').val()
|
||||||
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
|
layer.close(index);
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
url: ctx + "exam/examPaper"+ "/list",
|
||||||
|
type: "post",
|
||||||
|
dataType: "json",
|
||||||
|
data: {examPaperCategoryId:id},
|
||||||
|
// contentType:"application/json",
|
||||||
|
success: function(result) {
|
||||||
|
$("#examPaperId").html("<option>---请选择---</option>");
|
||||||
|
var rows =result.rows;
|
||||||
|
for(var i in rows){
|
||||||
|
$("#examPaperId").append("<option value='"+rows[i].id+"'>"+rows[i].name+"</option>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$.ajax(config)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
$.operate.save(prefix + "/add", $('#form-examPaperCategory-add').serialize());
|
$.operate.save(prefix + "/add", $('#form-examPaperCategory-add').serialize());
|
||||||
}
|
}5
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectExamPaperCategoryTree() {
|
function selectExamPaperCategoryTree() {
|
||||||
|
|
@ -66,6 +66,8 @@
|
||||||
$("#treeId").val(body.find('#treeId').val());
|
$("#treeId").val(body.find('#treeId').val());
|
||||||
$("#treeName").val(body.find('#treeName').val());
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
layer.close(index);
|
layer.close(index);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue