考核评估-我的考试模块(基础功能)
This commit is contained in:
parent
9384462a57
commit
03e674249d
@ -115,4 +115,13 @@ public class ExamAttestationController extends BaseController
|
||||
List<ExamAttestationPeople> list = examAttestationService.selectPeopleList(examAttestationPeople);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:selection')")
|
||||
@GetMapping("/selection")
|
||||
public List<ExamAttestation> selection(){
|
||||
return examAttestationService.selection();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,94 @@
|
||||
package com.inspur.web.controller.examine;
|
||||
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.common.core.page.TableDataInfo;
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
import com.inspur.examine.domain.ExamInfo;
|
||||
import com.inspur.examine.domain.ExamPaperInfo;
|
||||
import com.inspur.examine.service.IMyExamineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 我的考试
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 2024/5/8 10:57
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/examine/myExamine")
|
||||
public class ExamMyExamineController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IMyExamineService myExamineService;
|
||||
|
||||
/**
|
||||
* 查询考试信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:myExamine:examList')")
|
||||
@GetMapping("/examList")
|
||||
public TableDataInfo examList(ExamInfo examInfo) {
|
||||
startPage();
|
||||
List<ExamInfo> list = myExamineService.examList(examInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成考试信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:myExamine:generateExam')")
|
||||
@PostMapping("/generateExam/{id}")
|
||||
public AjaxResult generateExam(@PathVariable("id") String id){
|
||||
return toAjax(myExamineService.generateExam(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 待考试列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:myExamine:waitExamList')")
|
||||
@GetMapping("/waitExamList")
|
||||
public TableDataInfo waitExamList(ExamPaperInfo examPaperInfo)
|
||||
{
|
||||
startPage();
|
||||
List<ExamPaperInfo> list = myExamineService.waitExamList(examPaperInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考试信息以及试题
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:myExamine:getExam')")
|
||||
@GetMapping("/getExam/{id}")
|
||||
public void getExam(@PathVariable("id") String id){
|
||||
//todo: 获取考试信息以及试题
|
||||
}
|
||||
|
||||
/**
|
||||
* 历史考试成绩
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:myExamine:examHistoryList')")
|
||||
@GetMapping("/examHistoryList")
|
||||
public TableDataInfo examHistoryList(ExamPaperInfo examPaperInfo)
|
||||
{
|
||||
startPage();
|
||||
List<ExamPaperInfo> list = myExamineService.examHistoryList(examPaperInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我的认证管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:myExamine:attestationList')")
|
||||
@GetMapping("/attestationList")
|
||||
public TableDataInfo attestationList(ExamAttestation examAttestation)
|
||||
{
|
||||
startPage();
|
||||
List<ExamAttestation> list = myExamineService.attestationList(examAttestation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
@ -56,4 +56,15 @@ public class ExamAttestation {
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 认证时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date attestationTime;
|
||||
}
|
||||
|
@ -41,6 +41,17 @@ public class ExamInfo extends BaseEntity {
|
||||
@Excel(name = "考试类型" ,dictType = "exam_type")
|
||||
private String examType;
|
||||
|
||||
/**
|
||||
* 证书id
|
||||
*/
|
||||
private String attestationId;
|
||||
|
||||
/**
|
||||
* 证书名称
|
||||
*/
|
||||
@Excel(name = "相关证书")
|
||||
private String attestationName;
|
||||
|
||||
/**
|
||||
* 考试时长
|
||||
*/
|
||||
@ -106,4 +117,6 @@ public class ExamInfo extends BaseEntity {
|
||||
@Excel(name = "通过分数")
|
||||
private BigDecimal passScore;
|
||||
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
|
@ -75,4 +75,19 @@ public class ExamPaperInfo {
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 考试时长
|
||||
*/
|
||||
private Integer examDuration;
|
||||
|
||||
/**
|
||||
* 考试时长(带单位)
|
||||
*/
|
||||
private String examDurationHaveUnit;
|
||||
|
||||
/**
|
||||
* 总分数
|
||||
*/
|
||||
private BigDecimal totalScore;
|
||||
}
|
||||
|
@ -58,4 +58,9 @@ public interface ExamAttestationMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 下拉
|
||||
*/
|
||||
List<ExamAttestation> selection();
|
||||
}
|
||||
|
@ -0,0 +1,34 @@
|
||||
package com.inspur.examine.mapper;
|
||||
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
import com.inspur.examine.domain.ExamInfo;
|
||||
import com.inspur.examine.domain.ExamPaperInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author xusd
|
||||
* @Date 2024/5/8 11:03
|
||||
**/
|
||||
public interface MyExamineMapper {
|
||||
|
||||
/**
|
||||
* 查询考试信息列表
|
||||
*/
|
||||
List<ExamInfo> examList(ExamInfo examInfo);
|
||||
|
||||
/**
|
||||
* 待考试列表
|
||||
*/
|
||||
List<ExamPaperInfo> waitExamList(ExamPaperInfo examPaperInfo);
|
||||
|
||||
/**
|
||||
* 历史考试成绩
|
||||
*/
|
||||
List<ExamPaperInfo> examHistoryList(ExamPaperInfo examPaperInfo);
|
||||
|
||||
/**
|
||||
* 查询我的认证管理列表
|
||||
*/
|
||||
List<ExamAttestation> attestationList(ExamAttestation examAttestation);
|
||||
}
|
@ -66,4 +66,9 @@ public interface IExamAttestationService
|
||||
* 查询证书认证名单
|
||||
*/
|
||||
List<ExamAttestationPeople> selectPeopleList(ExamAttestationPeople examAttestationPeople) throws ServiceException;
|
||||
|
||||
/**
|
||||
* 下拉
|
||||
*/
|
||||
List<ExamAttestation> selection();
|
||||
}
|
||||
|
@ -0,0 +1,42 @@
|
||||
package com.inspur.examine.service;
|
||||
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
import com.inspur.examine.domain.ExamInfo;
|
||||
import com.inspur.examine.domain.ExamPaperInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 我的考试
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 2024/5/8 10:58
|
||||
**/
|
||||
public interface IMyExamineService {
|
||||
|
||||
/**
|
||||
* 查询考试信息列表
|
||||
*/
|
||||
List<ExamInfo> examList(ExamInfo examInfo);
|
||||
|
||||
/**
|
||||
* 生成考试信息
|
||||
*/
|
||||
int generateExam(String id);
|
||||
|
||||
/**
|
||||
* 待考试列表
|
||||
*/
|
||||
List<ExamPaperInfo> waitExamList(ExamPaperInfo examPaperInfo);
|
||||
|
||||
/**
|
||||
* 历史考试成绩
|
||||
*/
|
||||
List<ExamPaperInfo> examHistoryList(ExamPaperInfo examPaperInfo);
|
||||
|
||||
/**
|
||||
* 查询我的认证管理列表
|
||||
*/
|
||||
List<ExamAttestation> attestationList(ExamAttestation examAttestation);
|
||||
}
|
@ -127,4 +127,12 @@ public class ExamAttestationServiceImpl implements IExamAttestationService
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉
|
||||
*/
|
||||
@Override
|
||||
public List<ExamAttestation> selection() {
|
||||
return examAttestationMapper.selection();
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.inspur.examine.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.inspur.common.utils.SecurityUtils;
|
||||
import com.inspur.common.utils.uuid.IdUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.examine.mapper.ExamPaperInfoMapper;
|
||||
@ -40,6 +43,7 @@ public class ExamPaperInfoServiceImpl implements IExamPaperInfoService
|
||||
@Override
|
||||
public List<ExamPaperInfo> selectExamPaperInfoList(ExamPaperInfo examPaperInfo)
|
||||
{
|
||||
examPaperInfo.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
return examPaperInfoMapper.selectExamPaperInfoList(examPaperInfo);
|
||||
}
|
||||
|
||||
@ -52,6 +56,8 @@ public class ExamPaperInfoServiceImpl implements IExamPaperInfoService
|
||||
@Override
|
||||
public int insertExamPaperInfo(ExamPaperInfo examPaperInfo)
|
||||
{
|
||||
examPaperInfo.setId(IdUtils.fastSimpleUUID());
|
||||
examPaperInfo.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
return examPaperInfoMapper.insertExamPaperInfo(examPaperInfo);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,102 @@
|
||||
package com.inspur.examine.service.impl;
|
||||
|
||||
import com.inspur.common.utils.SecurityUtils;
|
||||
import com.inspur.common.utils.StringUtils;
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
import com.inspur.examine.domain.ExamInfo;
|
||||
import com.inspur.examine.domain.ExamPaperInfo;
|
||||
import com.inspur.examine.mapper.MyExamineMapper;
|
||||
import com.inspur.examine.service.IExamInfoService;
|
||||
import com.inspur.examine.service.IExamPaperInfoService;
|
||||
import com.inspur.examine.service.IMyExamineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 我的考试
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 2024/5/8 10:58
|
||||
**/
|
||||
@Service
|
||||
public class MyExamineServiceImpl implements IMyExamineService {
|
||||
|
||||
@Autowired
|
||||
private MyExamineMapper myExamineMapper;
|
||||
|
||||
@Autowired
|
||||
private IExamPaperInfoService examPaperInfoService;
|
||||
|
||||
/**
|
||||
* 查询考试信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExamInfo> examList(ExamInfo examInfo) {
|
||||
examInfo.setUserId(SecurityUtils.getUserId());
|
||||
List<ExamInfo> list = myExamineMapper.examList(examInfo);
|
||||
if (StringUtils.isNotEmpty(list)){
|
||||
list.forEach(item->{
|
||||
if (Objects.nonNull(item.getExamDuration())){
|
||||
item.setExamDurationHaveUnit(item.getExamDuration() + "分钟");
|
||||
}
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成考试信息
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int generateExam(String id) {
|
||||
ExamPaperInfo examPaperInfo = new ExamPaperInfo();
|
||||
examPaperInfo.setExamId(id);
|
||||
examPaperInfo.setExamineId(SecurityUtils.getUserId());
|
||||
examPaperInfo.setStatus("0");
|
||||
int i = examPaperInfoService.insertExamPaperInfo(examPaperInfo);
|
||||
if (i > 0){
|
||||
//todo:生成考试试题等
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* 待考试列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExamPaperInfo> waitExamList(ExamPaperInfo examPaperInfo) {
|
||||
examPaperInfo.setExamineId(SecurityUtils.getUserId());
|
||||
examPaperInfo.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
List<ExamPaperInfo> list = myExamineMapper.waitExamList(examPaperInfo);
|
||||
if (StringUtils.isNotEmpty(list)){
|
||||
list.forEach(item->item.setExamDurationHaveUnit(item.getExamDuration() + "分钟"));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 历史考试成绩
|
||||
*/
|
||||
@Override
|
||||
public List<ExamPaperInfo> examHistoryList(ExamPaperInfo examPaperInfo) {
|
||||
examPaperInfo.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
examPaperInfo.setExamineId(SecurityUtils.getUserId());
|
||||
return myExamineMapper.examHistoryList(examPaperInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我的认证管理列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExamAttestation> attestationList(ExamAttestation examAttestation) {
|
||||
examAttestation.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
examAttestation.setUserId(SecurityUtils.getUserId());
|
||||
return myExamineMapper.attestationList(examAttestation);
|
||||
}
|
||||
}
|
@ -30,9 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
LEFT JOIN exam_attestation_people AS eap ON ea.id = eap.attestation_id
|
||||
<if test="tenantId != null and tenantId != ''">AND eap.tenant_id = #{tenantId}</if>
|
||||
<where>
|
||||
<if test="attestationName != null and attestationName != ''"> and attestation_name like concat('%', #{attestationName}, '%')</if>
|
||||
<if test="attestationUnit != null and attestationUnit != ''"> and attestation_unit like concat('%', #{attestationUnit}, '%')</if>
|
||||
<if test="attestationInfo != null and attestationInfo != ''"> and attestation_info like concat('%', #{attestationInfo}, '%')</if>
|
||||
<if test="attestationName != null and attestationName != ''"> and ea.attestation_name like concat('%', #{attestationName}, '%')</if>
|
||||
<if test="attestationUnit != null and attestationUnit != ''"> and ea.attestation_unit like concat('%', #{attestationUnit}, '%')</if>
|
||||
<if test="attestationInfo != null and attestationInfo != ''"> and ea.attestation_info like concat('%', #{attestationInfo}, '%')</if>
|
||||
</where>
|
||||
GROUP BY ea.id
|
||||
order by ea.create_time desc
|
||||
@ -42,7 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectExamAttestationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selection" resultMap="ExamAttestationResult">
|
||||
<include refid="selectExamAttestationVo"/>
|
||||
</select>
|
||||
|
||||
<insert id="insertExamAttestation" parameterType="com.inspur.examine.domain.ExamAttestation">
|
||||
insert into exam_attestation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -23,25 +23,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="attestationId" column="attestation_id" />
|
||||
<result property="attestationName" column="attestation_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamInfoVo">
|
||||
select id, exam_name, exam_level, exam_type, exam_duration, exam_rules, single_choice, multiple_choice, judge, single_choice_score, multiple_choice_score, judge_score, total_score, pass_score, create_by, create_time, update_by, update_time from exam_info
|
||||
SELECT
|
||||
ei.id,
|
||||
ei.exam_name,
|
||||
ei.exam_level,
|
||||
ei.exam_type,
|
||||
ei.exam_duration,
|
||||
ei.exam_rules,
|
||||
ei.single_choice,
|
||||
ei.multiple_choice,
|
||||
ei.judge,
|
||||
ei.single_choice_score,
|
||||
ei.multiple_choice_score,
|
||||
ei.judge_score,
|
||||
ei.total_score,
|
||||
ei.pass_score,
|
||||
ei.create_by,
|
||||
ei.create_time,
|
||||
ei.update_by,
|
||||
ei.update_time,
|
||||
ei.attestation_id,
|
||||
ea.attestation_name
|
||||
FROM
|
||||
exam_info AS ei
|
||||
LEFT JOIN exam_attestation AS ea ON ei.attestation_id = ea.id
|
||||
</sql>
|
||||
|
||||
<select id="selectExamInfoList" parameterType="com.inspur.examine.domain.ExamInfo" resultMap="ExamInfoResult">
|
||||
<include refid="selectExamInfoVo"/>
|
||||
<where>
|
||||
<if test="examName != null and examName != ''"> and exam_name like concat('%', #{examName}, '%')</if>
|
||||
<if test="examLevel != null and examLevel != ''"> and exam_level = #{examLevel}</if>
|
||||
<if test="examType != null and examType != ''"> and exam_type = #{examType}</if>
|
||||
<if test="examName != null and examName != ''"> and ei.exam_name like concat('%', #{examName}, '%')</if>
|
||||
<if test="examLevel != null and examLevel != ''"> and ei.exam_level = #{examLevel}</if>
|
||||
<if test="examType != null and examType != ''"> and ei.exam_type = #{examType}</if>
|
||||
<if test="attestationId != null and attestationId != ''"> and ei.attestation_id = #{attestationId}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
order by ei.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectExamInfoById" parameterType="String" resultMap="ExamInfoResult">
|
||||
<include refid="selectExamInfoVo"/>
|
||||
where id = #{id}
|
||||
where ei.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selection" resultMap="ExamInfoResult">
|
||||
@ -69,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="attestationId != null">attestation_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
@ -89,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="attestationId != null">#{attestationId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -112,6 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="attestationId != null">attestation_id = #{attestationId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -0,0 +1,162 @@
|
||||
<?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.inspur.examine.mapper.MyExamineMapper">
|
||||
|
||||
<resultMap type="com.inspur.examine.domain.ExamInfo" id="ExamInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="examName" column="exam_name" />
|
||||
<result property="examLevel" column="exam_level" />
|
||||
<result property="examType" column="exam_type" />
|
||||
<result property="examDuration" column="exam_duration" />
|
||||
<result property="examRules" column="exam_rules" />
|
||||
<result property="singleChoice" column="single_choice" />
|
||||
<result property="multipleChoice" column="multiple_choice" />
|
||||
<result property="judge" column="judge" />
|
||||
<result property="singleChoiceScore" column="single_choice_score" />
|
||||
<result property="multipleChoiceScore" column="multiple_choice_score" />
|
||||
<result property="judgeScore" column="judge_score" />
|
||||
<result property="totalScore" column="total_score" />
|
||||
<result property="passScore" column="pass_score" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="attestationId" column="attestation_id" />
|
||||
<result property="attestationName" column="attestation_name" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.inspur.examine.domain.ExamPaperInfo" id="ExamPaperInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="examId" column="exam_id" />
|
||||
<result property="examineId" column="examine_id" />
|
||||
<result property="score" column="score" />
|
||||
<result property="status" column="status" />
|
||||
<result property="examStartTime" column="exam_start_time" />
|
||||
<result property="examEndTime" column="exam_end_time" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="examName" column="exam_name" />
|
||||
<result property="examineName" column="nick_name" />
|
||||
<result property="examDuration" column="exam_duration" />
|
||||
<result property="totalScore" column="total_score" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.inspur.examine.domain.ExamAttestation" id="ExamAttestationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="attestationName" column="attestation_name" />
|
||||
<result property="attestationUnit" column="attestation_unit" />
|
||||
<result property="attestationInfo" column="attestation_info" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="peopleCount" column="people_count" />
|
||||
<result property="attestationTime" column="attestation_time" />
|
||||
</resultMap>
|
||||
|
||||
<select id="examList" resultMap="ExamInfoResult">
|
||||
SELECT
|
||||
ei.id,
|
||||
ei.exam_name,
|
||||
ei.exam_level,
|
||||
ei.exam_type,
|
||||
ei.exam_duration,
|
||||
ei.exam_rules,
|
||||
ei.single_choice,
|
||||
ei.multiple_choice,
|
||||
ei.judge,
|
||||
ei.single_choice_score,
|
||||
ei.multiple_choice_score,
|
||||
ei.judge_score,
|
||||
ei.total_score,
|
||||
ei.pass_score,
|
||||
ei.create_by,
|
||||
ei.create_time,
|
||||
ei.update_by,
|
||||
ei.update_time,
|
||||
ei.attestation_id,
|
||||
ea.attestation_name
|
||||
FROM
|
||||
exam_info AS ei
|
||||
LEFT JOIN exam_attestation AS ea ON ei.attestation_id = ea.id
|
||||
<where>
|
||||
and ei.id not in (SELECT exam_id from exam_paper_info where examine_id = #{userId})
|
||||
<if test="examName != null and examName != ''"> and ei.exam_name like concat('%', #{examName}, '%')</if>
|
||||
<if test="examLevel != null and examLevel != ''"> and ei.exam_level = #{examLevel}</if>
|
||||
<if test="examType != null and examType != ''"> and ei.exam_type = #{examType}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="waitExamList" resultMap="ExamPaperInfoResult">
|
||||
SELECT
|
||||
epi.id,
|
||||
epi.exam_id,
|
||||
epi.examine_id,
|
||||
epi.score,
|
||||
epi.`status`,
|
||||
epi.exam_start_time,
|
||||
epi.exam_end_time,
|
||||
epi.tenant_id,
|
||||
su.nick_name,
|
||||
ei.exam_name,
|
||||
ei.exam_duration
|
||||
FROM
|
||||
exam_paper_info AS epi
|
||||
LEFT JOIN sys_user AS su ON su.user_id = epi.examine_id
|
||||
LEFT JOIN exam_info AS ei ON ei.id = epi.exam_id
|
||||
<where>
|
||||
and epi.status = '0'
|
||||
and epi.examine_id = #{examineId}
|
||||
and epi.tenant_id = #{tenantId}
|
||||
<if test="examId != null and examId != ''"> and epi.exam_id = #{examId}</if>
|
||||
</where>
|
||||
order by epi.exam_start_time desc
|
||||
</select>
|
||||
|
||||
<select id="examHistoryList" resultMap="ExamPaperInfoResult">
|
||||
SELECT
|
||||
epi.id,
|
||||
epi.exam_id,
|
||||
epi.examine_id,
|
||||
epi.score,
|
||||
epi.`status`,
|
||||
epi.exam_start_time,
|
||||
epi.exam_end_time,
|
||||
epi.tenant_id,
|
||||
su.nick_name,
|
||||
ei.exam_name,
|
||||
ei.total_score
|
||||
FROM
|
||||
exam_paper_info AS epi
|
||||
LEFT JOIN sys_user AS su ON su.user_id = epi.examine_id
|
||||
LEFT JOIN exam_info AS ei ON ei.id = epi.exam_id
|
||||
<where>
|
||||
and (epi.status = '1' or epi.status = '2')
|
||||
and epi.examine_id = #{examineId}
|
||||
<if test="examId != null and examId != ''"> and epi.exam_id = #{examId}</if>
|
||||
<if test="status != null and status != ''"> and epi.status = #{status}</if>
|
||||
<if test="tenantId != null and tenantId != ''"> and epi.tenant_id = #{tenantId}</if>
|
||||
</where>
|
||||
order by epi.exam_start_time desc
|
||||
</select>
|
||||
|
||||
<select id="attestationList" resultMap="ExamAttestationResult">
|
||||
SELECT
|
||||
ea.id,
|
||||
ea.attestation_name,
|
||||
ea.attestation_unit,
|
||||
ea.attestation_info,
|
||||
eap.attestation_time
|
||||
FROM
|
||||
exam_attestation_people AS eap
|
||||
JOIN exam_attestation AS ea ON eap.attestation_id = ea.id
|
||||
<where>
|
||||
and eap.people_id = #{userId}
|
||||
<if test="tenantId != null and tenantId != ''"> and eap.tenant_id = #{tenantId}</if>
|
||||
<if test="attestationName != null and attestationName != ''"> and ea.attestation_name like concat('%', #{attestationName}, '%')</if>
|
||||
<if test="attestationUnit != null and attestationUnit != ''"> and ea.attestation_unit like concat('%', #{attestationUnit}, '%')</if>
|
||||
<if test="attestationInfo != null and attestationInfo != ''"> and ea.attestation_info like concat('%', #{attestationInfo}, '%')</if>
|
||||
</where>
|
||||
order by eap.attestation_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -51,3 +51,11 @@ export function listAttestationPeople(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 下拉
|
||||
export function attestationSelection() {
|
||||
return request({
|
||||
url: '/examine/attestation/selection',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
53
inspur-ui/src/api/examine/myExamine.js
Normal file
53
inspur-ui/src/api/examine/myExamine.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询考试信息列表
|
||||
export function getExamList(query) {
|
||||
return request({
|
||||
url: '/examine/myExamine/examList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 参与考试
|
||||
export function generateExam(id) {
|
||||
return request({
|
||||
url: '/examine/myExamine/generateExam/' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 待考试列表
|
||||
export function waitExamList(query) {
|
||||
return request({
|
||||
url: '/examine/myExamine/waitExamList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取考试信息以及试题
|
||||
export function getExam(id) {
|
||||
return request({
|
||||
url: '/examine/myExamine/getExam/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 历史考试成绩
|
||||
export function getExamHistoryList(query) {
|
||||
return request({
|
||||
url: '/examine/myExamine/examHistoryList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 认证记录
|
||||
export function getAttestationList(query) {
|
||||
return request({
|
||||
url: '/examine/myExamine/attestationList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -29,6 +29,16 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="相关证书" prop="attestationId">
|
||||
<el-select v-model="queryParams.attestationId" placeholder="请选择相关证书" clearable>
|
||||
<el-option
|
||||
v-for="item in attestationSelection"
|
||||
:key="item.id"
|
||||
:label="item.attestationName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -96,6 +106,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="考试规则" align="center" prop="examRules" />
|
||||
<el-table-column label="考试时长" align="center" prop="examDurationHaveUnit" />
|
||||
<el-table-column label="相关证书" align="center" prop="attestationName" />
|
||||
<el-table-column label="单选题数量" align="center" prop="singleChoice" />
|
||||
<el-table-column label="多选题数量" align="center" prop="multipleChoice" />
|
||||
<el-table-column label="判断题数量" align="center" prop="judge" />
|
||||
@ -164,6 +175,16 @@
|
||||
<el-form-item label="考试时长(分钟)" prop="examDuration">
|
||||
<el-input-number v-model="form.examDuration" :min="1"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="相关证书" prop="attestationId">
|
||||
<el-select v-model="form.attestationId" placeholder="请选择相关证书" clearable>
|
||||
<el-option
|
||||
v-for="item in attestationSelection"
|
||||
:key="item.id"
|
||||
:label="item.attestationName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单选题数量" prop="singleChoice">
|
||||
<el-input-number @change="changeMark" v-model="form.singleChoice" :min="0" />
|
||||
</el-form-item>
|
||||
@ -199,12 +220,14 @@
|
||||
|
||||
<script>
|
||||
import { listExamInfo, getExamInfo, delExamInfo, addExamInfo, updateExamInfo } from "@/api/examine/examInfo";
|
||||
import { attestationSelection } from "@/api/examine/attestation";
|
||||
|
||||
export default {
|
||||
name: "ExamInfo",
|
||||
dicts: ['exam_type', 'exam_level'],
|
||||
data() {
|
||||
return {
|
||||
attestationSelection:[],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@ -279,11 +302,17 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getAttestationSelection();
|
||||
},
|
||||
methods: {
|
||||
//修改分数时计算分数
|
||||
changeMark(){
|
||||
this.form.totalScore = (this.form.singleChoice * this.form.singleChoiceScore) + (this.form.multipleChoice * this.form.multipleChoiceScore) + (this.form.judge * this.form.judgeScore);
|
||||
this.form.totalScore = ((this.form.singleChoice * this.form.singleChoiceScore) + (this.form.multipleChoice * this.form.multipleChoiceScore) + (this.form.judge * this.form.judgeScore)).toFixed(2);
|
||||
},
|
||||
getAttestationSelection(){
|
||||
attestationSelection().then(res=>{
|
||||
this.attestationSelection = res;
|
||||
})
|
||||
},
|
||||
/** 查询考试信息列表 */
|
||||
getList() {
|
||||
@ -342,6 +371,7 @@ export default {
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.getAttestationSelection();
|
||||
this.form.totalScore = 0;
|
||||
this.open = true;
|
||||
this.title = "添加考试信息";
|
||||
@ -349,6 +379,7 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.getAttestationSelection();
|
||||
const id = row.id || this.ids
|
||||
getExamInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
|
416
inspur-ui/src/views/examine/myExamine/index.vue
Normal file
416
inspur-ui/src/views/examine/myExamine/index.vue
Normal file
@ -0,0 +1,416 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClickTab">
|
||||
<el-tab-pane label="选择考试" name="1">
|
||||
<el-form>
|
||||
<el-form :model="examQueryParams" ref="examQueryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="考试名称" prop="examName">
|
||||
<el-input
|
||||
v-model="examQueryParams.examName"
|
||||
placeholder="请输入考试名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQueryExam"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="考试等级" prop="examLevel">
|
||||
<el-select v-model="examQueryParams.examLevel" placeholder="请选择考试等级" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.exam_level"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="考试类型" prop="examType">
|
||||
<el-select v-model="examQueryParams.examType" placeholder="请选择考试类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.exam_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQueryExam">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQueryExam">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form>
|
||||
<el-table v-loading="examLoading" :data="examInfoList">
|
||||
<el-table-column label="考试名称" align="center" prop="examName"/>
|
||||
<el-table-column label="考试等级" align="center" prop="examLevel">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.exam_level" :value="scope.row.examLevel"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="考试类型" align="center" prop="examType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.exam_type" :value="scope.row.examType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="考试规则" align="center" prop="examRules"/>
|
||||
<el-table-column label="考试时长" align="center" prop="examDurationHaveUnit"/>
|
||||
<el-table-column label="总分数" align="center" prop="totalScore"/>
|
||||
<el-table-column label="通过分数" align="center" prop="passScore"/>
|
||||
<el-table-column label="相关证书" align="center" prop="attestationName"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="generateExam(scope.row)"
|
||||
v-hasPermi="['examine:myExamine:generateExam']"
|
||||
>参与考试</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="examTotal>0"
|
||||
:total="examTotal"
|
||||
:page.sync="examQueryParams.pageNum"
|
||||
:limit.sync="examQueryParams.pageSize"
|
||||
@pagination="getExamList"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="待考试" name="2">
|
||||
<el-form :model="paperQueryParams" ref="paperQueryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="考试名称" prop="status">
|
||||
<el-select v-model="paperQueryParams.examId" placeholder="请选择考试名称" clearable>
|
||||
<el-option
|
||||
v-for="item in examInfoSelection"
|
||||
:key="item.id"
|
||||
:label="item.examName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="paperHandleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="paperResetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="paperLoading" :data="paperInfoList">
|
||||
<el-table-column label="考试名称" align="center" prop="examName" />
|
||||
<el-table-column label="考生名称" align="center" prop="examineName" />
|
||||
<el-table-column label="考试时长" align="center" prop="examDurationHaveUnit" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.examine_result" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleStartExam(scope.row)"
|
||||
v-hasPermi="['examine:myExamine:getExam']"
|
||||
>开始考试</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="paperTotal>0"
|
||||
:total="paperTotal"
|
||||
:page.sync="paperQueryParams.pageNum"
|
||||
:limit.sync="paperQueryParams.pageSize"
|
||||
@pagination="getPaperList"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="考试成绩" name="3">
|
||||
<el-form :model="examHistoryQueryParams" ref="examHistoryQueryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="考试名称" prop="status">
|
||||
<el-select v-model="examHistoryQueryParams.examId" placeholder="请选择考试名称" clearable>
|
||||
<el-option
|
||||
v-for="item in examInfoSelection"
|
||||
:key="item.id"
|
||||
:label="item.examName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="examHistoryQueryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="item in statusList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="examHistoryHandleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="examHistoryResetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="examHistoryLoading" :data="examHistoryList">
|
||||
<el-table-column label="考试名称" align="center" prop="examName" />
|
||||
<el-table-column label="考生名称" align="center" prop="examineName" />
|
||||
<el-table-column label="考试开始时间" align="center" prop="examStartTime"/>
|
||||
<el-table-column label="考试结束时间" align="center" prop="examEndTime"/>
|
||||
<el-table-column label="考试分数" align="center" prop="score" />
|
||||
<el-table-column label="满分分数" align="center" prop="totalScore" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.examine_result" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleShowExam(scope.row)"
|
||||
v-hasPermi="['examine:myExamine:getExam']"
|
||||
>查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="examHistoryTotal>0"
|
||||
:total="examHistoryTotal"
|
||||
:page.sync="examHistoryQueryParams.pageNum"
|
||||
:limit.sync="examHistoryQueryParams.pageSize"
|
||||
@pagination="getExamHistoryList"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="我的认证" name="4">
|
||||
<el-form :model="attestationQueryParams" ref="attestationQueryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="认证名称" prop="attestationName">
|
||||
<el-input
|
||||
v-model="attestationQueryParams.attestationName"
|
||||
placeholder="请输入认证名称"
|
||||
clearable
|
||||
@keyup.enter.native="attestationHandleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布单位" prop="attestationUnit">
|
||||
<el-input
|
||||
v-model="attestationQueryParams.attestationUnit"
|
||||
placeholder="请输入发布单位"
|
||||
clearable
|
||||
@keyup.enter.native="attestationHandleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="认证说明" prop="attestationInfo">
|
||||
<el-input
|
||||
v-model="attestationQueryParams.attestationInfo"
|
||||
placeholder="请输入认证说明"
|
||||
clearable
|
||||
@keyup.enter.native="attestationHandleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="attestationHandleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="attestationResetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="attestationLoading" :data="attestationList">
|
||||
<el-table-column label="认证名称" align="center" prop="attestationName" />
|
||||
<el-table-column label="发布单位" align="center" prop="attestationUnit" />
|
||||
<el-table-column label="认证说明" align="center" prop="attestationInfo" />
|
||||
<el-table-column label="认证时间" align="center" prop="attestationTime" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="attestationTotal>0"
|
||||
:total="attestationTotal"
|
||||
:page.sync="attestationQueryParams.pageNum"
|
||||
:limit.sync="attestationQueryParams.pageSize"
|
||||
@pagination="getAttestationList"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getExamList, generateExam, waitExamList, getExam, getExamHistoryList,getAttestationList} from '@/api/examine/myExamine'
|
||||
import { examInfoSelection } from "@/api/examine/examInfo";
|
||||
|
||||
export default {
|
||||
name: 'myExamine',
|
||||
dicts: ['exam_type', 'exam_level', 'examine_result'],
|
||||
data() {
|
||||
return {
|
||||
activeName: '1',
|
||||
examQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
examName: null,
|
||||
examLevel: null,
|
||||
examType: null
|
||||
},
|
||||
examLoading: false,
|
||||
examInfoList: [],
|
||||
examTotal: 0,
|
||||
|
||||
paperQueryParams:{
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
examId: null
|
||||
},
|
||||
examInfoSelection:[],
|
||||
paperInfoList:[],
|
||||
paperLoading: false,
|
||||
paperTotal: 0,
|
||||
|
||||
examHistoryQueryParams:{
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
examId: null,
|
||||
status: null
|
||||
},
|
||||
statusList:[
|
||||
{
|
||||
value:"1",
|
||||
label:"未通过"
|
||||
},{
|
||||
value:"2",
|
||||
label:"通过"
|
||||
}
|
||||
],
|
||||
examHistoryLoading: false,
|
||||
examHistoryList: [],
|
||||
examHistoryTotal: 0,
|
||||
|
||||
attestationQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
attestationName: null,
|
||||
attestationUnit: null,
|
||||
attestationInfo: null,
|
||||
},
|
||||
attestationLoading: false,
|
||||
attestationList: [],
|
||||
attestationTotal: 0,
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getExamList()
|
||||
},
|
||||
methods: {
|
||||
handleClickTab(tab, event) {
|
||||
console.log(tab.name)
|
||||
if ('1' === tab.name) {
|
||||
this.getExamList()
|
||||
} else if ('2' === tab.name) {
|
||||
this.getExamInfoSelection();
|
||||
this.getPaperList();
|
||||
} else if ('3' === tab.name) {
|
||||
this.getExamInfoSelection();
|
||||
this.getExamHistoryList();
|
||||
} else if ('4' === tab.name) {
|
||||
this.getAttestationList();
|
||||
}
|
||||
},
|
||||
handleQueryExam() {
|
||||
this.examQueryParams.pageNum = 1
|
||||
this.getExamList()
|
||||
},
|
||||
resetQueryExam() {
|
||||
this.resetForm('examQueryForm')
|
||||
this.handleQueryExam()
|
||||
},
|
||||
getExamList() {
|
||||
this.examLoading = true
|
||||
getExamList(this.examQueryParams).then(response => {
|
||||
this.examInfoList = response.rows
|
||||
this.examTotal = response.total
|
||||
this.examLoading = false
|
||||
})
|
||||
},
|
||||
generateExam(row){
|
||||
this.examLoading = true
|
||||
generateExam(row.id).then(()=>{
|
||||
this.$modal.msgSuccess("参与成功");
|
||||
this.examLoading = false;
|
||||
this.getExamList();
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
paperHandleQuery() {
|
||||
this.paperQueryParams.pageNum = 1;
|
||||
this.getPaperList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
paperResetQuery() {
|
||||
this.paperQueryParams = {}
|
||||
this.resetForm("paperQueryForm");
|
||||
this.paperHandleQuery();
|
||||
},
|
||||
//考试信息下拉
|
||||
getExamInfoSelection(){
|
||||
examInfoSelection().then((res)=>{
|
||||
this.examInfoSelection = res;
|
||||
})
|
||||
},
|
||||
/** 查询试卷信息列表 */
|
||||
getPaperList(){
|
||||
this.paperLoading = true;
|
||||
waitExamList(this.paperQueryParams).then(response => {
|
||||
this.paperInfoList = response.rows;
|
||||
this.paperTotal = response.total;
|
||||
this.paperLoading = false;
|
||||
});
|
||||
},
|
||||
//开始考试
|
||||
handleStartExam(row){
|
||||
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
examHistoryHandleQuery() {
|
||||
this.examHistoryQueryParams.pageNum = 1;
|
||||
this.getExamHistoryList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
examHistoryResetQuery() {
|
||||
this.examHistoryQueryParams = {}
|
||||
this.resetForm("examHistoryQueryForm");
|
||||
this.examHistoryHandleQuery();
|
||||
},
|
||||
getExamHistoryList(){
|
||||
this.examHistoryLoading = true;
|
||||
getExamHistoryList(this.examHistoryQueryParams).then(response => {
|
||||
this.examHistoryList = response.rows;
|
||||
this.examHistoryTotal = response.total;
|
||||
this.examHistoryLoading = false;
|
||||
});
|
||||
},
|
||||
handleShowExam(row){
|
||||
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
attestationHandleQuery() {
|
||||
this.attestationQueryParams.pageNum = 1;
|
||||
this.getAttestationList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
attestationResetQuery() {
|
||||
this.resetForm("attestationQueryForm");
|
||||
this.attestationHandleQuery();
|
||||
},
|
||||
/** 查询认证管理列表 */
|
||||
getAttestationList() {
|
||||
this.attestationLoading = true;
|
||||
getAttestationList(this.attestationQueryParams).then(response => {
|
||||
this.attestationList = response.rows;
|
||||
this.attestationTotal = response.total;
|
||||
this.attestationLoading = false;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user