考试管理
This commit is contained in:
parent
f4c4967d54
commit
550450164b
|
|
@ -0,0 +1,132 @@
|
|||
package com.ruoyi.exam.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.framework.web.util.ShiroUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.exam.domain.ExamExamination;
|
||||
import com.ruoyi.exam.service.IExamExaminationService;
|
||||
import com.ruoyi.framework.web.base.BaseController;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.base.AjaxResult;
|
||||
import com.ruoyi.common.utils.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 考试 信息操作处理
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-24
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/exam/examExamination")
|
||||
public class ExamExaminationController extends BaseController
|
||||
{
|
||||
private String prefix = "exam/examExamination";
|
||||
|
||||
@Autowired
|
||||
private IExamExaminationService examExaminationService;
|
||||
|
||||
@RequiresPermissions("exam:examExamination:view")
|
||||
@GetMapping()
|
||||
public String examExamination()
|
||||
{
|
||||
return prefix + "/examExamination";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询考试列表
|
||||
*/
|
||||
@RequiresPermissions("exam:examExamination:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ExamExamination examExamination)
|
||||
{
|
||||
List<ExamExamination> list = examExaminationService.selectExamExaminationPage(examExamination);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出考试列表
|
||||
*/
|
||||
@RequiresPermissions("exam:examExamination:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ExamExamination examExamination)
|
||||
{
|
||||
List<ExamExamination> list = examExaminationService.selectExamExaminationList(examExamination);
|
||||
ExcelUtil<ExamExamination> util = new ExcelUtil<ExamExamination>(ExamExamination.class);
|
||||
return util.exportExcel(list, "examExamination");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考试
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存考试
|
||||
*/
|
||||
@RequiresPermissions("exam:examExamination:add")
|
||||
@Log(title = "考试", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ExamExamination examExamination)
|
||||
{
|
||||
examExamination.setDelFlag("0");
|
||||
examExamination.setCreateDate(new Date());
|
||||
examExamination.setCreateBy(ShiroUtils.getLoginName());
|
||||
return toAjax(examExaminationService.insert(examExamination));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考试
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
|
||||
{
|
||||
ExamExamination examExamination = examExaminationService.selectById(id);
|
||||
mmap.put("examExamination", examExamination);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存考试
|
||||
*/
|
||||
@RequiresPermissions("exam:examExamination:edit")
|
||||
@Log(title = "考试", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ExamExamination examExamination)
|
||||
{
|
||||
return toAjax(examExaminationService.updateById(examExamination));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考试
|
||||
*/
|
||||
@RequiresPermissions("exam:examExamination:remove")
|
||||
@Log(title = "考试", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(examExaminationService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,306 @@
|
|||
package com.ruoyi.exam.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.base.BaseEntity;
|
||||
import javax.persistence.Id;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 考试表 exam_examination
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-24
|
||||
*/
|
||||
public class ExamExamination
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 考试ID */
|
||||
@Id
|
||||
private Integer id;
|
||||
/** 部门ID */
|
||||
private Integer deptId;
|
||||
/** 试卷代码 */
|
||||
private Integer examPaperId;
|
||||
/** 试卷名称 */
|
||||
private String name;
|
||||
/** 是否控制开始结束时间(0-不控制,1-控制) */
|
||||
private String enableControlTime;
|
||||
/** 开始时间 */
|
||||
private Date startTime;
|
||||
/** 结束时间 */
|
||||
private Date endTime;
|
||||
/** 考试时长(分钟) */
|
||||
private Integer timeLength;
|
||||
/** 考试次数 */
|
||||
private Integer examNumber;
|
||||
/** 及格分数 */
|
||||
private Integer passMark;
|
||||
/** 题目乱序(1-不打乱顺序,2-打乱顺序) */
|
||||
private String questionDisorder;
|
||||
/** 交卷后(0-全部不可见,1-分数可见,2-对错可见,3-答案可见) */
|
||||
private String finishedPaper;
|
||||
/** 考试结束后(0-全部不可见,1-分数可见,2-对错可见,3-答案可见) */
|
||||
private String examEnd;
|
||||
/** 考试对象(1-所有人,2-限定对象) */
|
||||
private String examinationUserLimit;
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
private Date createDate;
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
/** 更新时间 */
|
||||
private Date updateDate;
|
||||
/** 考试说明 */
|
||||
private String remarks;
|
||||
/** 删除标记 */
|
||||
private String delFlag;
|
||||
|
||||
/** 设置考试ID */
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/** 获取考试ID */
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
/** 设置部门ID */
|
||||
public void setDeptId(Integer deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
/** 获取部门ID */
|
||||
public Integer getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
/** 设置试卷代码 */
|
||||
public void setExamPaperId(Integer examPaperId)
|
||||
{
|
||||
this.examPaperId = examPaperId;
|
||||
}
|
||||
|
||||
/** 获取试卷代码 */
|
||||
public Integer getExamPaperId()
|
||||
{
|
||||
return examPaperId;
|
||||
}
|
||||
/** 设置试卷名称 */
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/** 获取试卷名称 */
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
/** 设置是否控制开始结束时间(0-不控制,1-控制) */
|
||||
public void setEnableControlTime(String enableControlTime)
|
||||
{
|
||||
this.enableControlTime = enableControlTime;
|
||||
}
|
||||
|
||||
/** 获取是否控制开始结束时间(0-不控制,1-控制) */
|
||||
public String getEnableControlTime()
|
||||
{
|
||||
return enableControlTime;
|
||||
}
|
||||
/** 设置开始时间 */
|
||||
public void setStartTime(Date startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
/** 获取开始时间 */
|
||||
public Date getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
/** 设置结束时间 */
|
||||
public void setEndTime(Date endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
/** 获取结束时间 */
|
||||
public Date getEndTime()
|
||||
{
|
||||
return endTime;
|
||||
}
|
||||
/** 设置考试时长(分钟) */
|
||||
public void setTimeLength(Integer timeLength)
|
||||
{
|
||||
this.timeLength = timeLength;
|
||||
}
|
||||
|
||||
/** 获取考试时长(分钟) */
|
||||
public Integer getTimeLength()
|
||||
{
|
||||
return timeLength;
|
||||
}
|
||||
/** 设置考试次数 */
|
||||
public void setExamNumber(Integer examNumber)
|
||||
{
|
||||
this.examNumber = examNumber;
|
||||
}
|
||||
|
||||
/** 获取考试次数 */
|
||||
public Integer getExamNumber()
|
||||
{
|
||||
return examNumber;
|
||||
}
|
||||
/** 设置及格分数 */
|
||||
public void setPassMark(Integer passMark)
|
||||
{
|
||||
this.passMark = passMark;
|
||||
}
|
||||
|
||||
/** 获取及格分数 */
|
||||
public Integer getPassMark()
|
||||
{
|
||||
return passMark;
|
||||
}
|
||||
/** 设置题目乱序(1-不打乱顺序,2-打乱顺序) */
|
||||
public void setQuestionDisorder(String questionDisorder)
|
||||
{
|
||||
this.questionDisorder = questionDisorder;
|
||||
}
|
||||
|
||||
/** 获取题目乱序(1-不打乱顺序,2-打乱顺序) */
|
||||
public String getQuestionDisorder()
|
||||
{
|
||||
return questionDisorder;
|
||||
}
|
||||
/** 设置交卷后(0-全部不可见,1-分数可见,2-对错可见,3-答案可见) */
|
||||
public void setFinishedPaper(String finishedPaper)
|
||||
{
|
||||
this.finishedPaper = finishedPaper;
|
||||
}
|
||||
|
||||
/** 获取交卷后(0-全部不可见,1-分数可见,2-对错可见,3-答案可见) */
|
||||
public String getFinishedPaper()
|
||||
{
|
||||
return finishedPaper;
|
||||
}
|
||||
/** 设置考试结束后(0-全部不可见,1-分数可见,2-对错可见,3-答案可见) */
|
||||
public void setExamEnd(String examEnd)
|
||||
{
|
||||
this.examEnd = examEnd;
|
||||
}
|
||||
|
||||
/** 获取考试结束后(0-全部不可见,1-分数可见,2-对错可见,3-答案可见) */
|
||||
public String getExamEnd()
|
||||
{
|
||||
return examEnd;
|
||||
}
|
||||
/** 设置考试对象(1-所有人,2-限定对象) */
|
||||
public void setExaminationUserLimit(String examinationUserLimit)
|
||||
{
|
||||
this.examinationUserLimit = examinationUserLimit;
|
||||
}
|
||||
|
||||
/** 获取考试对象(1-所有人,2-限定对象) */
|
||||
public String getExaminationUserLimit()
|
||||
{
|
||||
return examinationUserLimit;
|
||||
}
|
||||
/** 设置创建者 */
|
||||
public void setCreateBy(String createBy)
|
||||
{
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
/** 获取创建者 */
|
||||
public String getCreateBy()
|
||||
{
|
||||
return createBy;
|
||||
}
|
||||
/** 设置创建时间 */
|
||||
public void setCreateDate(Date createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
/** 获取创建时间 */
|
||||
public Date getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
/** 设置更新者 */
|
||||
public void setUpdateBy(String updateBy)
|
||||
{
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
/** 获取更新者 */
|
||||
public String getUpdateBy()
|
||||
{
|
||||
return updateBy;
|
||||
}
|
||||
/** 设置更新时间 */
|
||||
public void setUpdateDate(Date updateDate)
|
||||
{
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
/** 获取更新时间 */
|
||||
public Date getUpdateDate()
|
||||
{
|
||||
return updateDate;
|
||||
}
|
||||
/** 设置考试说明 */
|
||||
public void setRemarks(String remarks)
|
||||
{
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
/** 获取考试说明 */
|
||||
public String getRemarks()
|
||||
{
|
||||
return remarks;
|
||||
}
|
||||
/** 设置删除标记 */
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
/** 获取删除标记 */
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("examPaperId", getExamPaperId())
|
||||
.append("name", getName())
|
||||
.append("enableControlTime", getEnableControlTime())
|
||||
.append("startTime", getStartTime())
|
||||
.append("endTime", getEndTime())
|
||||
.append("timeLength", getTimeLength())
|
||||
.append("examNumber", getExamNumber())
|
||||
.append("passMark", getPassMark())
|
||||
.append("questionDisorder", getQuestionDisorder())
|
||||
.append("finishedPaper", getFinishedPaper())
|
||||
.append("examEnd", getExamEnd())
|
||||
.append("examinationUserLimit", getExaminationUserLimit())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateDate", getUpdateDate())
|
||||
.append("remarks", getRemarks())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.ruoyi.exam.mapper;
|
||||
|
||||
import com.ruoyi.exam.domain.ExamExamination;
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.MyMapper;
|
||||
|
||||
/**
|
||||
* 考试 数据层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-24
|
||||
*/
|
||||
public interface ExamExaminationMapper extends MyMapper<ExamExamination>
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询考试列表
|
||||
*
|
||||
* @param examExamination 考试信息
|
||||
* @return 考试集合
|
||||
*/
|
||||
public List<ExamExamination> selectExamExaminationList(ExamExamination examExamination);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.ruoyi.exam.service;
|
||||
|
||||
import com.ruoyi.exam.domain.ExamExamination;
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseService;
|
||||
/**
|
||||
* 考试 服务层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-24
|
||||
*/
|
||||
public interface IExamExaminationService extends AbstractBaseService<ExamExamination>
|
||||
{
|
||||
/**
|
||||
* 查询考试分页列表
|
||||
*
|
||||
* @param examExamination 考试信息
|
||||
* @return 考试集合
|
||||
*/
|
||||
public List<ExamExamination> selectExamExaminationPage(ExamExamination examExamination);
|
||||
/**
|
||||
* 查询考试列表
|
||||
*
|
||||
* @param examExamination 考试信息
|
||||
* @return 考试集合
|
||||
*/
|
||||
public List<ExamExamination> selectExamExaminationList(ExamExamination examExamination);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.ruoyi.exam.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.exam.mapper.ExamExaminationMapper;
|
||||
import com.ruoyi.exam.domain.ExamExamination;
|
||||
import com.ruoyi.exam.service.IExamExaminationService;
|
||||
import com.ruoyi.common.support.Convert;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseServiceImpl;
|
||||
/**
|
||||
* 考试 服务层实现
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-24
|
||||
*/
|
||||
@Service
|
||||
public class ExamExaminationServiceImpl extends AbstractBaseServiceImpl<ExamExaminationMapper,ExamExamination> implements IExamExaminationService
|
||||
{
|
||||
@Autowired
|
||||
private ExamExaminationMapper examExaminationMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询考试列表
|
||||
*
|
||||
* @param examExamination 考试信息
|
||||
* @return 考试集合
|
||||
*/
|
||||
@Override
|
||||
public List<ExamExamination> selectExamExaminationList(ExamExamination examExamination)
|
||||
{
|
||||
return examExaminationMapper.selectExamExaminationList(examExamination);
|
||||
}
|
||||
/**
|
||||
* 查询考试分页列表
|
||||
*
|
||||
* @param examExamination 考试信息
|
||||
* @return 考试集合
|
||||
*/
|
||||
@Override
|
||||
public List<ExamExamination> selectExamExaminationPage(ExamExamination examExamination)
|
||||
{
|
||||
startPage();
|
||||
return examExaminationMapper.selectExamExaminationList(examExamination);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.exam.mapper.ExamExaminationMapper">
|
||||
|
||||
<resultMap type="ExamExamination" id="ExamExaminationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="examPaperId" column="exam_paper_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="enableControlTime" column="enable_control_time" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="timeLength" column="time_length" />
|
||||
<result property="examNumber" column="exam_number" />
|
||||
<result property="passMark" column="pass_mark" />
|
||||
<result property="questionDisorder" column="question_disorder" />
|
||||
<result property="finishedPaper" column="finished_paper" />
|
||||
<result property="examEnd" column="exam_end" />
|
||||
<result property="examinationUserLimit" column="examination_user_limit" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateDate" column="update_date" />
|
||||
<result property="remarks" column="remarks" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamExaminationVo">
|
||||
id, dept_id, exam_paper_id, name, enable_control_time, start_time, end_time, time_length, exam_number, pass_mark, question_disorder, finished_paper, exam_end, examination_user_limit, create_by, create_date, update_by, update_date, remarks, del_flag </sql>
|
||||
|
||||
<select id="selectExamExaminationList" parameterType="ExamExamination" resultMap="ExamExaminationResult">
|
||||
select
|
||||
<include refid="selectExamExaminationVo"/>
|
||||
from exam_examination
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="examPaperId != null "> and exam_paper_id = #{examPaperId}</if>
|
||||
<if test="name != null and name != '' "> and name = #{name}</if>
|
||||
<if test="enableControlTime != null and enableControlTime != '' "> and enable_control_time = #{enableControlTime}</if>
|
||||
<if test="startTime != null "> and start_time = #{startTime}</if>
|
||||
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||
<if test="timeLength != null "> and time_length = #{timeLength}</if>
|
||||
<if test="examNumber != null "> and exam_number = #{examNumber}</if>
|
||||
<if test="passMark != null "> and pass_mark = #{passMark}</if>
|
||||
<if test="questionDisorder != null and questionDisorder != '' "> and question_disorder = #{questionDisorder}</if>
|
||||
<if test="finishedPaper != null and finishedPaper != '' "> and finished_paper = #{finishedPaper}</if>
|
||||
<if test="examEnd != null and examEnd != '' "> and exam_end = #{examEnd}</if>
|
||||
<if test="examinationUserLimit != null and examinationUserLimit != '' "> and examination_user_limit = #{examinationUserLimit}</if>
|
||||
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
|
||||
<if test="createDate != null "> and create_date = #{createDate}</if>
|
||||
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
|
||||
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||
<if test="remarks != null and remarks != '' "> and remarks = #{remarks}</if>
|
||||
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-examExamination-add">
|
||||
<!--<div class="form-group"> -->
|
||||
<!--<label class="col-sm-3 control-label">部门ID:</label>-->
|
||||
<!--<div class="col-sm-8">-->
|
||||
<!--<input id="deptId" name="deptId" class="form-control" type="text">-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<div class="form-group">
|
||||
<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">
|
||||
<input id="name" name="name" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否控制开始结束时间:</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<select id="enableControlTime" name="enableControlTime" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_enableControlTime')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">开始时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="startTime" name="startTime" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">结束时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="endTime" name="endTime" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考试时长(分钟):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="timeLength" name="timeLength" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="form-group"> -->
|
||||
<!--<label class="col-sm-3 control-label">考试次数:</label>-->
|
||||
<!--<div class="col-sm-8">-->
|
||||
<!--<input id="examNumber" name="examNumber" class="form-control" type="text">-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">及格分数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="passMark" name="passMark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">题目乱序:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="questionDisorder" name="questionDisorder" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_questionDisorder')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">交卷后:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="finishedPaper" name="finishedPaper" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_finishedPaper')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考试结束后:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="examEnd" name="examEnd" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_examEnd')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考试对象:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="examinationUserLimit" name="examinationUserLimit" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_examinationUserLimit')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考试说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remarks" name="remarks" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "exam/examExamination"
|
||||
$("#form-examExamination-add").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
debugger
|
||||
$.operate.save(prefix + "/add", $('#form-examExamination-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-examExamination-edit" th:object="${examExamination}">
|
||||
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">试卷代码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="examPaperId" name="examPaperId" th:field="*{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">
|
||||
<input id="name" name="name" th:field="*{name}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否控制开始结束时间:</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<select id="enableControlTime" name="enableControlTime" th:field="*{enableControlTime}" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_enableControlTime')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">开始时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="startTime" name="startTime" th:field="*{startTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">结束时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="endTime" name="endTime" th:field="*{endTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考试时长(分钟):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="timeLength" name="timeLength" th:field="*{timeLength}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="form-group"> -->
|
||||
<!--<label class="col-sm-3 control-label">考试次数:</label>-->
|
||||
<!--<div class="col-sm-8">-->
|
||||
<!--<input id="examNumber" name="examNumber" class="form-control" type="text">-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">及格分数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="passMark" name="passMark" th:field="*{passMark}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">题目乱序:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="questionDisorder" name="questionDisorder" th:field="*{questionDisorder}" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_questionDisorder')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">交卷后:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="finishedPaper" name="finishedPaper" th:field="*{finishedPaper}" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_finishedPaper')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考试结束后:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="examEnd" name="examEnd" class="form-control m-b" th:field="*{examEnd}" th:with="type=${@dict.getType('exam_ination_examEnd')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考试对象:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="examinationUserLimit" name="examinationUserLimit" th:field="*{examinationUserLimit}" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_examinationUserLimit')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考试说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remarks" name="remarks" th:field="*{remarks}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "exam/examExamination"
|
||||
$("#form-examExamination-edit").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-examExamination-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head 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>
|
||||
考试名称:<input type="text" name="name"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="exam:examExamination:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="exam:examExamination:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="exam:examExamination:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('exam:examExamination:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('exam:examExamination:remove')}]];
|
||||
var examinationUserLimit = [[${@dict.getType('exam_ination_examinationUserLimit')}]];
|
||||
var prefix = ctx + "exam/examExamination";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "考试",
|
||||
search: false,
|
||||
showExport: true,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'id',
|
||||
title : '考试ID',
|
||||
visible: false
|
||||
},
|
||||
// {
|
||||
// field : 'examPaperId',
|
||||
// title : '试卷代码',
|
||||
// sortable: true
|
||||
// },
|
||||
{
|
||||
field : 'name',
|
||||
title : '试卷名称',
|
||||
sortable: true
|
||||
},
|
||||
// {
|
||||
// field : 'enableControlTime',
|
||||
// title : '是否控制开始结束时间(0-不控制,1-控制)',
|
||||
// sortable: true
|
||||
// },
|
||||
{
|
||||
field : 'startTime',
|
||||
title : '开始时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'endTime',
|
||||
title : '结束时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'timeLength',
|
||||
title : '考试时长(分钟)',
|
||||
sortable: true
|
||||
},
|
||||
// {
|
||||
// field : 'examNumber',
|
||||
// title : '考试次数',
|
||||
// sortable: true
|
||||
// },
|
||||
{
|
||||
field : 'passMark',
|
||||
title : '及格分数',
|
||||
sortable: true
|
||||
},
|
||||
// {
|
||||
// field : 'questionDisorder',
|
||||
// title : '题目乱序(1-不打乱顺序,2-打乱顺序)',
|
||||
// sortable: true
|
||||
// },
|
||||
// {
|
||||
// field : 'finishedPaper',
|
||||
// title : '交卷后(0-全部不可见,1-分数可见,2-对错可见,3-答案可见)',
|
||||
// sortable: true
|
||||
// },
|
||||
// {
|
||||
// field : 'examEnd',
|
||||
// title : '考试结束后(0-全部不可见,1-分数可见,2-对错可见,3-答案可见)',
|
||||
// sortable: true
|
||||
// },
|
||||
{
|
||||
field : 'examinationUserLimit',
|
||||
title : '考试对象',
|
||||
sortable: true,
|
||||
formatter: function(value, item, index) {
|
||||
debugger
|
||||
return $.table.selectDictLabel(examinationUserLimit, item.examinationUserLimit);
|
||||
}
|
||||
},
|
||||
{
|
||||
field : 'createBy',
|
||||
title : '创建者',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'createDate',
|
||||
title : '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
// {
|
||||
// field : 'updateBy',
|
||||
// title : '更新者',
|
||||
// sortable: true
|
||||
// },
|
||||
// {
|
||||
// field : 'updateDate',
|
||||
// title : '更新时间',
|
||||
// sortable: true
|
||||
// },
|
||||
// {
|
||||
// field : 'remarks',
|
||||
// title : '考试说明',
|
||||
// sortable: true
|
||||
// },
|
||||
// {
|
||||
// field : 'delFlag',
|
||||
// title : '删除标记',
|
||||
// sortable: true
|
||||
// },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue