feat: 添加考试试卷相关接口
parent
40bfdf1cf7
commit
3c7f0e696b
140
api/index.js
140
api/index.js
|
@ -1,78 +1,80 @@
|
||||||
import {post, upload, uploads} from "../utils/request";
|
import { post, upload, uploads } from '../utils/request'
|
||||||
import {setSecurityMeasures} from "@/utils/submitHomeworkProcess";
|
import { setSecurityMeasures } from '@/utils/submitHomeworkProcess'
|
||||||
|
|
||||||
export const submitLogin = (params) => post("/app/admin/check", params) // 登录
|
export const submitLogin = (params) => post('/app/admin/check', params) // 登录
|
||||||
export const getIDCardDeduplication = (params) => post("/app/user/goCheck", params) // 身份证去重
|
export const getIDCardDeduplication = (params) => post('/app/user/goCheck', params) // 身份证去重
|
||||||
export const getUserDeduplication = (params) => post("/app/user/goCheck", params) // 用户名去重
|
export const getUserDeduplication = (params) => post('/app/user/goCheck', params) // 用户名去重
|
||||||
export const getPhoneNumberDeduplication = (params) => post("/app/user/hasPhoneForApp", params) // 手机号去重
|
export const getPhoneNumberDeduplication = (params) => post('/app/user/hasPhoneForApp', params) // 手机号去重
|
||||||
export const setRegister = (params) => post("/app/admin/register", params) // 注册
|
export const setRegister = (params) => post('/app/admin/register', params) // 注册
|
||||||
export const setForgotPassword = (params) => post("/app/admin/forgetPassword", params) // 忘记密码
|
export const setForgotPassword = (params) => post('/app/admin/forgetPassword', params) // 忘记密码
|
||||||
export const getElectronicWorkCard = (params) => post("/app/user/getUserDetailInfoByUserIdForApp", params) // 电子工牌
|
export const getElectronicWorkCard = (params) => post('/app/user/getUserDetailInfoByUserIdForApp', params) // 电子工牌
|
||||||
export const getElectronicWorkCardQRCode = (params) => post("/app/user/generateQRCodeImageByUserId", params) // 电子工牌二维码
|
export const getElectronicWorkCardQRCode = (params) => post('/app/user/generateQRCodeImageByUserId', params) // 电子工牌二维码
|
||||||
export const getEmployedBy = (params) => post("/app/employmentApplyManagement/getEmploymentRecordByUserIdOrCorpInfoId", params) // 就职单位列表
|
export const getEmployedBy = (params) => post('/app/employmentApplyManagement/getEmploymentRecordByUserIdOrCorpInfoId', params) // 就职单位列表
|
||||||
export const setResignationApplication = (params) => post("/app/employmentApplyManagement/edit", params) // 离职申请
|
export const setResignationApplication = (params) => post('/app/employmentApplyManagement/edit', params) // 离职申请
|
||||||
export const resign = (params) => post("/app/user/resign", params) // 离职申请
|
export const resign = (params) => post('/app/user/resign', params) // 离职申请
|
||||||
export const setRelatedPartyScanning = (params) => post("/app/user/updateUserInfoAfterScanQRCode", params) // 相关方扫码
|
export const setRelatedPartyScanning = (params) => post('/app/user/updateUserInfoAfterScanQRCode', params) // 相关方扫码
|
||||||
export const getDataDictionary = (params) => post("/app/dictionaries/getLevels", params) // 数据字典
|
export const getDataDictionary = (params) => post('/app/dictionaries/getLevels', params) // 数据字典
|
||||||
export const setUploadAttachments = (params) => upload("/app/imgFiles/addSingleImg", params) // 上传附件
|
export const setUploadAttachments = (params) => upload('/app/imgFiles/addSingleImg', params) // 上传附件
|
||||||
export const removeUploadAttachments = (params) => post("/app/imgFiles/deleteImg", params) // 删除附件
|
export const removeUploadAttachments = (params) => post('/app/imgFiles/deleteImg', params) // 删除附件
|
||||||
export const setRelatedPartyRegistration = (params) => post("/app/user/saveUser", params) // 相关方注册
|
export const setRelatedPartyRegistration = (params) => post('/app/user/saveUser', params) // 相关方注册
|
||||||
export const setRelatedPartyUpdate = (params) => post("/app/user/editUser", params) // 相关方修改
|
export const setRelatedPartyUpdate = (params) => post('/app/user/editUser', params) // 相关方修改
|
||||||
export const checkRelatedUnitsPersonCount = (params) => post("/app/user/checkUserCountForApp", params) // 检查相关方单位流动人员数和单位总人数
|
export const checkRelatedUnitsPersonCount = (params) => post('/app/user/checkUserCountForApp', params) // 检查相关方单位流动人员数和单位总人数
|
||||||
export const getServiceUnitList = (params) => post("/app/user/getRelatedUnitsListByUserId", params) // 服务单位列表
|
export const getServiceUnitList = (params) => post('/app/user/getRelatedUnitsListByUserId', params) // 服务单位列表
|
||||||
export const getServiceUnitView = (params) => post("/app/user/getRelatedUnitsDetailById", params) // 服务单位查看
|
export const getServiceUnitView = (params) => post('/app/user/getRelatedUnitsDetailById', params) // 服务单位查看
|
||||||
export const setFeedbackUpload = (params) => upload("/app/feedback/upload", params) //反馈问题附件
|
export const setFeedbackUpload = (params) => upload('/app/feedback/upload', params) //反馈问题附件
|
||||||
export const setFeedbackAdd = (params) => post("/app/feedback/add", params) //反馈问题提交
|
export const setFeedbackAdd = (params) => post('/app/feedback/add', params) //反馈问题提交
|
||||||
export const getVersion = (params) => post("/app/versionmanager/getVersion", params) //版本更新
|
export const getVersion = (params) => post('/app/versionmanager/getVersion', params) // 版本更新
|
||||||
export const setUpdatePassword = (params) => post("/app/user/editUserPasswordByUserId", params) //修改密码
|
export const setUpdatePassword = (params) => post('/app/user/editUserPasswordByUserId', params) //修改密码
|
||||||
export const getUserInfo = (params) => post("/app/user/getDetailByUserIdAndCorpInfoId", params) //用户信息
|
export const getUserInfo = (params) => post('/app/user/getDetailByUserIdAndCorpInfoId', params) //用户信息
|
||||||
export const setUserInfo = (params) => post("/app/user/edit", params) //修改用户信息
|
export const setUserInfo = (params) => post('/app/user/edit', params) //修改用户信息
|
||||||
export const setEntry = (params) => post("/app/user/entry", params) //用户入职
|
export const setEntry = (params) => post('/app/user/entry', params) //用户入职
|
||||||
export const getCertificateInformationList = (params) => post("/app/specialUser/list", params) //证书信息列表
|
export const getCertificateInformationList = (params) => post('/app/specialUser/list', params) //证书信息列表
|
||||||
export const getCertificateInformationView = (params) => post("/app/specialUser/goEdit", params) //证书信息查看
|
export const getCertificateInformationView = (params) => post('/app/specialUser/goEdit', params) //证书信息查看
|
||||||
export const setCertificateInformationAdd = (params) => uploads("/app/specialUser/add", params) //证书信息添加
|
export const setCertificateInformationAdd = (params) => uploads('/app/specialUser/add', params) //证书信息添加
|
||||||
export const setCertificateInformationEdit = (params) => uploads("/app/specialUser/edit", params) //证书信息修改
|
export const setCertificateInformationEdit = (params) => uploads('/app/specialUser/edit', params) //证书信息修改
|
||||||
export const setCertificateInformationEditPost = (params) => post("/app/specialUser/edit", params) //证书信息修改
|
export const setCertificateInformationEditPost = (params) => post('/app/specialUser/edit', params) //证书信息修改
|
||||||
export const getDeptTree = (params) => post("/api/department/listzTree", params) //用户信息
|
export const getDeptTree = (params) => post('/api/department/listzTree', params) //用户信息
|
||||||
export const getEMPLOYMENTAPPLYMANAGEMENTID = (params) => post("/app/user/getEMPLOYMENTAPPLYMANAGEMENTID",
|
export const getEMPLOYMENTAPPLYMANAGEMENTID = (params) => post('/app/user/getEMPLOYMENTAPPLYMANAGEMENTID', params) //获取EMPLOYMENTAPPLYMANAGEMENTID
|
||||||
params) //获取EMPLOYMENTAPPLYMANAGEMENTID
|
|
||||||
|
|
||||||
// 以下接口八项作业流程使用
|
// 以下接口八项作业流程使用
|
||||||
export const getCorpInfoList = (params) => post("/app/util/getCorp", params) //获取公司列表
|
export const getCorpInfoList = (params) => post('/app/util/getCorp', params) //获取公司列表
|
||||||
export const getConfinedSpaceSelectList = (params) => post("/app/csSpe/getSpace", params) //获取受限空间名称选择列表
|
export const getConfinedSpaceSelectList = (params) => post('/app/csSpe/getSpace', params) //获取受限空间名称选择列表
|
||||||
export const getConfinedSpaceGasInfo = (params) => post("/app/csSpe/getGasInfo",params) //获取受限空间气体检测详情
|
export const getConfinedSpaceGasInfo = (params) => post('/app/csSpe/getGasInfo', params) //获取受限空间气体检测详情
|
||||||
export const setConfinedSpaceGasInfoSave = (params) => post("/app/csSpe/initGas", params) //受限空间气体检测详情保存
|
export const setConfinedSpaceGasInfoSave = (params) => post('/app/csSpe/initGas', params) //受限空间气体检测详情保存
|
||||||
export const setConfinedSpaceGasDelete = (params) => post("/app/csSpe/deleteGas", params) //保存受限空间气体检测删除
|
export const setConfinedSpaceGasDelete = (params) => post('/app/csSpe/deleteGas', params) //保存受限空间气体检测删除
|
||||||
export const getHotWorkGasAll = (params) => post("/app/elSpe/getAll", params) // 获取动火作业的所有受限空间气体检测数据
|
export const getHotWorkGasAll = (params) => post('/app/elSpe/getAll', params) // 获取动火作业的所有受限空间气体检测数据
|
||||||
export const getHotWorkGasInfo = (params) => post("/app/elSpe/getInfo", params) //获取动火作业的受限空间气体检测详情
|
export const getHotWorkGasInfo = (params) => post('/app/elSpe/getInfo', params) //获取动火作业的受限空间气体检测详情
|
||||||
export const getHotWorkGasInfoSave = (params) => post("/app/elSpe/init", params) //获取动火作业的受限空间气体检测详情保存
|
export const getHotWorkGasInfoSave = (params) => post('/app/elSpe/init', params) //获取动火作业的受限空间气体检测详情保存
|
||||||
export const getHotWorkGasDelete = (params) => post("/app/elSpe/delete", params) // 动火作业的受限空间气体检测删除
|
export const getHotWorkGasDelete = (params) => post('/app/elSpe/delete', params) // 动火作业的受限空间气体检测删除
|
||||||
export const setHotWorkRecord = (params) => post("/app/deHw/initRecord", params) // 动火作业延迟监火保存记录
|
export const setHotWorkRecord = (params) => post('/app/deHw/initRecord', params) // 动火作业延迟监火保存记录
|
||||||
export const deleteHotWorkRecord = (params) => post("/app/deHw/deleteRecord", params) //获取动火作业的受限空间气体检测详情
|
export const deleteHotWorkRecord = (params) => post('/app/deHw/deleteRecord', params) //获取动火作业的受限空间气体检测详情
|
||||||
export const getHotWorkRecord = (params) => post("/app/deHw/getRecords", params) //获取动火作业的受限空间气体检测详情保存
|
export const getHotWorkRecord = (params) => post('/app/deHw/getRecords', params) //获取动火作业的受限空间气体检测详情保存
|
||||||
export const getOtherAssignmentsSelectList = (params) => post("/app/Task/getAllUnEndList", params) //关联的其他特殊作业及安全作业票编号选择列表
|
export const getOtherAssignmentsSelectList = (params) => post('/app/Task/getAllUnEndList', params) //关联的其他特殊作业及安全作业票编号选择列表
|
||||||
export const getRiskIdentificationResultsSelectList = (params) => post("/app/eightWork/getInfo", params) //风险辨识结果选择列表
|
export const getRiskIdentificationResultsSelectList = (params) => post('/app/eightWork/getInfo', params) //风险辨识结果选择列表
|
||||||
export const getHotWorkMethodSelectList = (params) => post("/app/util/getDicList", params) // 动火方法选择列表
|
export const getHotWorkMethodSelectList = (params) => post('/app/util/getDicList', params) // 动火方法选择列表
|
||||||
export const getQyDicList = (params) => post("/app/util/otherSysDic", params) // 动火方法选择列表
|
export const getQyDicList = (params) => post('/app/util/otherSysDic', params) // 动火方法选择列表
|
||||||
export const setTaskSave = (params) => post("/app/Task/init", params) //八项作业、隐患整改、安全环保检查任务保存更新接口
|
export const setTaskSave = (params) => post('/app/Task/init', params) //八项作业、隐患整改、安全环保检查任务保存更新接口
|
||||||
export const getCurrentNextOperation = (params) => post("/app/Task/getSupplementInfo", params) //获取当前任务的下一步操作
|
export const getCurrentNextOperation = (params) => post('/app/Task/getSupplementInfo', params) //获取当前任务的下一步操作
|
||||||
export const addFormInfo = (params) => post("/app/Task/addSupplementInfo", params) //审批过程中添加其他信息
|
export const addFormInfo = (params) => post('/app/Task/addSupplementInfo', params) //审批过程中添加其他信息
|
||||||
export const getDepartmentTree = (params) => post("/app/util/getDepartmentTree", params) //获取部门树
|
export const getDepartmentTree = (params) => post('/app/util/getDepartmentTree', params) //获取部门树
|
||||||
export const getUserList = (params) => post("/app/util/getUserList", params) //获取人员
|
export const getUserList = (params) => post('/app/util/getUserList', params) //获取人员
|
||||||
export const getToDoTaskList = (params) => post("/app/Task/getAllList", params) //获取待办列表
|
export const getToDoTaskList = (params) => post('/app/Task/getAllList', params) //获取待办列表
|
||||||
export const getTaskTechnologicalProcess = (params) => post("/app/Task/getAgencyList", params) //获取流程
|
export const getTaskTechnologicalProcess = (params) => post('/app/Task/getAgencyList', params) //获取流程
|
||||||
export const getTaskInfo = (params) => post("/app/Task/getInfo", params) //查看信息
|
export const getTaskInfo = (params) => post('/app/Task/getInfo', params) //查看信息
|
||||||
export const setTaskFile = (params) => upload("/app/util/uploadFile", params) //上传文件
|
export const setTaskFile = (params) => upload('/app/util/uploadFile', params) //上传文件
|
||||||
export const setTaskSign = (params) => post("/app/Task/sign", params) //审批意见签字提交
|
export const setTaskSign = (params) => post('/app/Task/sign', params) //审批意见签字提交
|
||||||
export const setSecurityMeasuresSave = (params) => post("/app/Task/setQues", params) //安全措施提交
|
export const setSecurityMeasuresSave = (params) => post('/app/Task/setQues', params) //安全措施提交
|
||||||
export const setOtherSecurityMeasuresSave = (params) => post("/app/Task/setOtherQues", params) //其它安全措施提交
|
export const setOtherSecurityMeasuresSave = (params) => post('/app/Task/setOtherQues', params) //其它安全措施提交
|
||||||
export const getHistoricalApprovalRecords = (params) => post("/app/Task/getHis", params); // 历史审批记录
|
export const getHistoricalApprovalRecords = (params) => post('/app/Task/getHis', params) // 历史审批记录
|
||||||
// 结束
|
// 结束
|
||||||
|
|
||||||
// ****************************************************
|
// ****************************************************
|
||||||
// ************* 以下接口培训管理流程使用 ***************
|
// ************* 以下接口培训管理流程使用 ***************
|
||||||
// ********************* start ***********************
|
// ********************* start ***********************
|
||||||
export const getIsUploadFace = (params) => post("/app/user/getUserFace", params); // 获取是否上传人脸信息
|
export const getIsUploadFace = (params) => post('/app/user/getUserFace', params) // 获取是否上传人脸信息
|
||||||
export const getClassList = (params) => post("/app/stagestudentrelation/pageTaskByUser", params); //获取班级列表
|
export const getClassList = (params) => post('/app/stagestudentrelation/pageTaskByUser', params) //获取班级列表
|
||||||
export const joinClass = (params) => uploads("/app/student/joinClass", params); // 实名认证信息提交
|
export const joinClass = (params) => uploads('/app/student/joinClass', params) // 实名认证信息提交
|
||||||
|
export const getTaskScoreInfo = (params) => post('/app/stageexam/findResult', params) // 考试成绩详情
|
||||||
|
export const getExamExercises = (params) => post('/app/stageexam/getExam', params) // 考试习题
|
||||||
|
export const setTestPaperSubmission = (params) => post('/app/stageexam/submit', params) // 考试交卷
|
||||||
// ********************* end ***********************
|
// ********************* end ***********************
|
||||||
|
|
|
@ -1,463 +1,477 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="time">
|
<view class="time">
|
||||||
<text style="margin-right: 14rpx;" class="iconfont"></text>
|
<text style="margin-right: 14rpx" class="iconfont"></text>
|
||||||
<text>倒计时:</text>
|
<text>倒计时:</text>
|
||||||
<u-count-down :time="info.ANSWERSHEETTIME * 60 * 1000" format="mm 分 ss 秒" auto-start millisecond @finish="fnCountDownFinish" />
|
<u-count-down :time="info.ANSWERSHEETTIME * 60 * 1000" format="mm 分 ss 秒" auto-start millisecond @finish="fnCountDownFinish" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="topic">
|
<view class="topic">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text>
|
<text>
|
||||||
<text class="tag_title">
|
<text class="tag_title">
|
||||||
{{ handleCalcQuestType(options[current].QUESTIONTYPE) }}
|
{{ handleCalcQuestType(options[current].QUESTIONTYPE) }}
|
||||||
</text>
|
</text>
|
||||||
{{ current + 1 }}.{{ options[current].QUESTIONDRY }}
|
{{ current + 1 }}.{{ options[current].QUESTIONDRY }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-show="options[current].QUESTIONTYPE === '1'" class="options">
|
<view v-show="options[current].QUESTIONTYPE === '1'" class="options">
|
||||||
<view class="item" :class="{ active: options[current].checked === 'A' }" @click="fnChooseTopic('radio', 'A')">
|
<view class="item" :class="{ active: options[current].checked === 'A' }" @click="fnChooseTopic('radio', 'A')">
|
||||||
<text class="option">A</text>
|
<text class="option">A</text>
|
||||||
<text class="text">{{ options[current].OPTIONA }}</text>
|
<text class="text">{{ options[current].OPTIONA }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" :class="{ active: options[current].checked === 'B' }" @click="fnChooseTopic('radio', 'B')">
|
<view class="item" :class="{ active: options[current].checked === 'B' }" @click="fnChooseTopic('radio', 'B')">
|
||||||
<text class="option">B</text>
|
<text class="option">B</text>
|
||||||
<text class="text">{{ options[current].OPTIONB }}</text>
|
<text class="text">{{ options[current].OPTIONB }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" :class="{ active: options[current].checked === 'C' }" @click="fnChooseTopic('radio', 'C')">
|
<view class="item" :class="{ active: options[current].checked === 'C' }" @click="fnChooseTopic('radio', 'C')">
|
||||||
<text class="option">C</text>
|
<text class="option">C</text>
|
||||||
<text class="text">{{ options[current].OPTIONC }}</text>
|
<text class="text">{{ options[current].OPTIONC }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" :class="{ active: options[current].checked === 'D' }" @click="fnChooseTopic('radio', 'D')">
|
<view class="item" :class="{ active: options[current].checked === 'D' }" @click="fnChooseTopic('radio', 'D')">
|
||||||
<text class="option">D</text>
|
<text class="option">D</text>
|
||||||
<text class="text">{{ options[current].OPTIOND }}</text>
|
<text class="text">{{ options[current].OPTIOND }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-show="options[current].QUESTIONTYPE === '2'" class="options">
|
<view v-show="options[current].QUESTIONTYPE === '2'" class="options">
|
||||||
<view class="item" :class="{
|
<view
|
||||||
active:
|
class="item"
|
||||||
options[current].checked &&
|
:class="{
|
||||||
options[current].checked.indexOf('A') !== -1,
|
active: options[current].checked && options[current].checked.indexOf('A') !== -1
|
||||||
}" @click="fnChooseTopic('multiple', 'A')">
|
}"
|
||||||
<text class="option">A</text>
|
@click="fnChooseTopic('multiple', 'A')"
|
||||||
<text class="text">{{ options[current].OPTIONA }}</text>
|
>
|
||||||
</view>
|
<text class="option">A</text>
|
||||||
<view class="item" :class="{
|
<text class="text">{{ options[current].OPTIONA }}</text>
|
||||||
active:
|
</view>
|
||||||
options[current].checked &&
|
<view
|
||||||
options[current].checked.indexOf('B') !== -1,
|
class="item"
|
||||||
}" @click="fnChooseTopic('multiple', 'B')">
|
:class="{
|
||||||
<text class="option">B</text>
|
active: options[current].checked && options[current].checked.indexOf('B') !== -1
|
||||||
<text class="text">{{ options[current].OPTIONB }}</text>
|
}"
|
||||||
</view>
|
@click="fnChooseTopic('multiple', 'B')"
|
||||||
<view class="item" :class="{
|
>
|
||||||
active:
|
<text class="option">B</text>
|
||||||
options[current].checked &&
|
<text class="text">{{ options[current].OPTIONB }}</text>
|
||||||
options[current].checked.indexOf('C') !== -1,
|
</view>
|
||||||
}" @click="fnChooseTopic('multiple', 'C')">
|
<view
|
||||||
<text class="option">C</text>
|
class="item"
|
||||||
<text class="text">{{ options[current].OPTIONC }}</text>
|
:class="{
|
||||||
</view>
|
active: options[current].checked && options[current].checked.indexOf('C') !== -1
|
||||||
<view class="item" :class="{
|
}"
|
||||||
active:
|
@click="fnChooseTopic('multiple', 'C')"
|
||||||
options[current].checked &&
|
>
|
||||||
options[current].checked.indexOf('D') !== -1,
|
<text class="option">C</text>
|
||||||
}" @click="fnChooseTopic('multiple', 'D')">
|
<text class="text">{{ options[current].OPTIONC }}</text>
|
||||||
<text class="option">D</text>
|
</view>
|
||||||
<text class="text">{{ options[current].OPTIOND }}</text>
|
<view
|
||||||
</view>
|
class="item"
|
||||||
</view>
|
:class="{
|
||||||
<view v-show="options[current].QUESTIONTYPE === '3'" class="options">
|
active: options[current].checked && options[current].checked.indexOf('D') !== -1
|
||||||
<view class="item" :class="{ active: options[current].checked === 'A' }" @click="fnChooseTopic('judge', 'A')">
|
}"
|
||||||
<text class="option">{{ options[current].OPTIONA }}</text>
|
@click="fnChooseTopic('multiple', 'D')"
|
||||||
<text class="text"></text>
|
>
|
||||||
</view>
|
<text class="option">D</text>
|
||||||
<view class="item" :class="{ active: options[current].checked === 'B' }" @click="fnChooseTopic('judge', 'B')">
|
<text class="text">{{ options[current].OPTIOND }}</text>
|
||||||
<text class="option">{{ options[current].OPTIONB }}</text>
|
</view>
|
||||||
<text class="text"></text>
|
</view>
|
||||||
</view>
|
<view v-show="options[current].QUESTIONTYPE === '3'" class="options">
|
||||||
</view>
|
<view class="item" :class="{ active: options[current].checked === 'A' }" @click="fnChooseTopic('judge', 'A')">
|
||||||
<view v-show="options[current].QUESTIONTYPE === '4'" class="options">
|
<text class="option">{{ options[current].OPTIONA }}</text>
|
||||||
<view class="item">
|
<text class="text"></text>
|
||||||
<u-textarea v-model="options[current].checked" auto-height count />
|
</view>
|
||||||
</view>
|
<view class="item" :class="{ active: options[current].checked === 'B' }" @click="fnChooseTopic('judge', 'B')">
|
||||||
</view>
|
<text class="option">{{ options[current].OPTIONB }}</text>
|
||||||
</view>
|
<text class="text"></text>
|
||||||
<view class="footer">
|
</view>
|
||||||
<u-button v-show="current !== 0" :style="{ width: '45%' }" text="上一题" @click="fnPreviousQuestion" />
|
</view>
|
||||||
<u-button v-show="current !== options.length - 1" type="primary"
|
<view v-show="options[current].QUESTIONTYPE === '4'" class="options">
|
||||||
:style="{ width: current === 0 ? '100%' : '45%' }" text="下一题" @click="fnNextQuestion" />
|
<view class="item">
|
||||||
<u-button v-show="current === options.length - 1" type="primary" :style="{ width: '45%' }" text="交卷"
|
<u-textarea v-model="options[current].checked" auto-height count />
|
||||||
@click="fnHandInThePaper" />
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="footer">
|
||||||
|
<u-button v-show="current !== 0" :style="{ width: '45%' }" text="上一题" @click="fnPreviousQuestion" />
|
||||||
|
<u-button v-show="current !== options.length - 1" type="primary" :style="{ width: current === 0 ? '100%' : '45%' }" text="下一题" @click="fnNextQuestion" />
|
||||||
|
<u-button v-show="current === options.length - 1" type="primary" :style="{ width: '45%' }" text="交卷" @click="fnHandInThePaper" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import {
|
import {
|
||||||
// getExamExercises,
|
getExamExercises,
|
||||||
// getStrengthenExam,
|
// getStrengthenExam,
|
||||||
// setTestPaperSubmission,
|
setTestPaperSubmission,
|
||||||
// } from "@/api";
|
} from '../../api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
STAGEEXAMPAPERINPUT_ID: "",
|
// STAGEEXAMPAPERINPUT_ID: '',
|
||||||
STAGEEXAMPAPER_ID: "",
|
// STAGEEXAMPAPER_ID: '',
|
||||||
CLASS_ID: "",
|
// CLASS_ID: '',
|
||||||
POST_ID: "",
|
// POST_ID: '',
|
||||||
STUDENT_ID: "",
|
// STUDENT_ID: '',
|
||||||
NUMBEROFEXAMS: "",
|
// NUMBEROFEXAMS: '',
|
||||||
entrySite: "",
|
routeQuery: {},
|
||||||
info: {},
|
entrySite: '',
|
||||||
options: [{}],
|
info: {},
|
||||||
current: 0,
|
options: [{}],
|
||||||
questionTypeMap: {
|
current: 0,
|
||||||
1: '单选',
|
questionTypeMap: {
|
||||||
2: '多选',
|
1: '单选',
|
||||||
3: '判断',
|
2: '多选',
|
||||||
4: '填空',
|
3: '判断',
|
||||||
}
|
4: '填空'
|
||||||
};
|
}
|
||||||
},
|
}
|
||||||
onLoad(query) {
|
},
|
||||||
// this.STAGEEXAMPAPERINPUT_ID = query.STAGEEXAMPAPERINPUT_ID;
|
onLoad(query) {
|
||||||
// this.STAGEEXAMPAPER_ID = query.STAGEEXAMPAPER_ID;
|
console.log('query :>> ', query);
|
||||||
// this.CLASS_ID = query.CLASS_ID;
|
this.routeQuery = query
|
||||||
// this.POST_ID = query.POST_ID;
|
// this.STAGEEXAMPAPER_ID = query.STAGEEXAMPAPER_ID;
|
||||||
// this.STUDENT_ID = query.STUDENT_ID;
|
// this.entrySite = query.entrySite;
|
||||||
// this.NUMBEROFEXAMS = query.NUMBEROFEXAMS;
|
this.fnGetData()
|
||||||
// this.entrySite = query.entrySite;
|
},
|
||||||
this.fnGetData();
|
onBackPress(event) {
|
||||||
},
|
if (event.from === 'backbutton') {
|
||||||
onBackPress(event) {
|
uni.$u.toast('考试过程中不允许退出')
|
||||||
if (event.from === "backbutton") {
|
return true
|
||||||
uni.$u.toast("考试过程中不允许退出");
|
}
|
||||||
return true;
|
return false
|
||||||
}
|
},
|
||||||
return false;
|
computed: {
|
||||||
},
|
userInfo() {
|
||||||
computed: {
|
return this.$store.getters.getUserInfo
|
||||||
userInfo() {
|
}
|
||||||
return this.$store.getters.getUserInfo;
|
},
|
||||||
},
|
methods: {
|
||||||
},
|
async fnGetData() {
|
||||||
methods: {
|
const { stageexampaperinputId, classId, postId, studentId, numberofexams } = this.routeQuery
|
||||||
async fnGetData() {
|
const resData = await getExamExercises({
|
||||||
let resData = {};
|
STAGEEXAMPAPERINPUT_ID: stageexampaperinputId,
|
||||||
// if (this.entrySite === "strengththen") {
|
// STAGEEXAMPAPER_ID: this.STAGEEXAMPAPER_ID,
|
||||||
// resData = await getStrengthenExam({
|
CLASS_ID: classId,
|
||||||
// STRENGTHEN_STAGEEXAMPAPER_INPUT_ID: this.STAGEEXAMPAPERINPUT_ID,
|
POST_ID: postId,
|
||||||
// CLASS_ID: this.CLASS_ID,
|
STUDENT_ID: studentId,
|
||||||
// POST_ID: this.POST_ID,
|
NUMBEROFEXAMS: numberofexams
|
||||||
// STUDENT_ID: this.STUDENT_ID,
|
})
|
||||||
// NUMBEROFEXAMS: this.NUMBEROFEXAMS,
|
// if (this.entrySite === "strengththen") {
|
||||||
// });
|
// resData = await getStrengthenExam({
|
||||||
// } else {
|
// STRENGTHEN_STAGEEXAMPAPER_INPUT_ID: this.STAGEEXAMPAPERINPUT_ID,
|
||||||
// resData = await getExamExercises({
|
// CLASS_ID: this.CLASS_ID,
|
||||||
// STAGEEXAMPAPERINPUT_ID: this.STAGEEXAMPAPERINPUT_ID,
|
// POST_ID: this.POST_ID,
|
||||||
// STAGEEXAMPAPER_ID: this.STAGEEXAMPAPER_ID,
|
// STUDENT_ID: this.STUDENT_ID,
|
||||||
// CLASS_ID: this.CLASS_ID,
|
// NUMBEROFEXAMS: this.NUMBEROFEXAMS,
|
||||||
// POST_ID: this.POST_ID,
|
// });
|
||||||
// STUDENT_ID: this.STUDENT_ID,
|
// } else {
|
||||||
// NUMBEROFEXAMS: this.NUMBEROFEXAMS,
|
// resData = await getExamExercises({
|
||||||
// });
|
// STAGEEXAMPAPERINPUT_ID: this.STAGEEXAMPAPERINPUT_ID,
|
||||||
// }
|
// STAGEEXAMPAPER_ID: this.STAGEEXAMPAPER_ID,
|
||||||
|
// CLASS_ID: this.CLASS_ID,
|
||||||
|
// POST_ID: this.POST_ID,
|
||||||
|
// STUDENT_ID: this.STUDENT_ID,
|
||||||
|
// NUMBEROFEXAMS: this.NUMBEROFEXAMS,
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
// this.info = resData.pd;
|
// this.info = resData.pd;
|
||||||
this.info = { ...this.info, ANSWERSHEETTIME: 30 }
|
this.info = { ...this.info, ANSWERSHEETTIME: 30 }
|
||||||
this.options = [
|
this.options = [
|
||||||
{
|
{
|
||||||
QUESTIONDRY: "题干题干题干题干题干1 ( ) .",
|
QUESTIONDRY: '题干题干题干题干题干1 ( ) .',
|
||||||
QUESTIONTYPE: "1",
|
QUESTIONTYPE: '1',
|
||||||
OPTIONA: '这是选项A',
|
OPTIONA: '这是选项A',
|
||||||
OPTIONB: '这是选项B',
|
OPTIONB: '这是选项B',
|
||||||
OPTIONC: '这是选项C',
|
OPTIONC: '这是选项C',
|
||||||
OPTIOND: '这是选项D',
|
OPTIOND: '这是选项D'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
QUESTIONDRY: "题干题干题干题干题干2 ()",
|
QUESTIONDRY: '题干题干题干题干题干2 ()',
|
||||||
QUESTIONTYPE: "2",
|
QUESTIONTYPE: '2',
|
||||||
OPTIONA: '这是选项A',
|
OPTIONA: '这是选项A',
|
||||||
OPTIONB: '这是选项B',
|
OPTIONB: '这是选项B',
|
||||||
OPTIONC: '这是选项C',
|
OPTIONC: '这是选项C',
|
||||||
OPTIOND: '这是选项D',
|
OPTIOND: '这是选项D'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
QUESTIONDRY: "未带安全头盔可正常进入堆场进行工业,以上说法是否正确?",
|
QUESTIONDRY: '未带安全头盔可正常进入堆场进行工业,以上说法是否正确?',
|
||||||
QUESTIONTYPE: "3",
|
QUESTIONTYPE: '3',
|
||||||
OPTIONA: '对',
|
OPTIONA: '对',
|
||||||
OPTIONB: '错',
|
OPTIONB: '错'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
QUESTIONDRY: "当进入施工现场后, 应立刻对_____设施做全面检查?",
|
QUESTIONDRY: '当进入施工现场后, 应立刻对_____设施做全面检查?',
|
||||||
QUESTIONTYPE: "4",
|
QUESTIONTYPE: '4',
|
||||||
OPTIONA: '对',
|
OPTIONA: '对',
|
||||||
OPTIONB: '错',
|
OPTIONB: '错'
|
||||||
},
|
}
|
||||||
];
|
]
|
||||||
// if (resData.NUMBEROFEXAMS > 0) {
|
// if (resData.NUMBEROFEXAMS > 0) {
|
||||||
// uni.showModal({
|
// uni.showModal({
|
||||||
// title: "温馨提示",
|
// title: "温馨提示",
|
||||||
// content: `您还可以考试${resData.NUMBEROFEXAMS}次!`,
|
// content: `您还可以考试${resData.NUMBEROFEXAMS}次!`,
|
||||||
// showCancel: false,
|
// showCancel: false,
|
||||||
// });
|
// });
|
||||||
// } else if (resData.NUMBEROFEXAMS === "-9999") {
|
// } else if (resData.NUMBEROFEXAMS === "-9999") {
|
||||||
// uni.showModal({
|
// uni.showModal({
|
||||||
// title: "温馨提示",
|
// title: "温馨提示",
|
||||||
// content: `加强学习考试开始,限时60分钟,请注意答题时间!`,
|
// content: `加强学习考试开始,限时60分钟,请注意答题时间!`,
|
||||||
// showCancel: false,
|
// showCancel: false,
|
||||||
// });
|
// });
|
||||||
// } else {
|
// } else {
|
||||||
// uni.showModal({
|
// uni.showModal({
|
||||||
// title: "温馨提示",
|
// title: "温馨提示",
|
||||||
// content: `您无考试次数!`,
|
// content: `您无考试次数!`,
|
||||||
// showCancel: false,
|
// showCancel: false,
|
||||||
// success: (res) => {
|
// success: (res) => {
|
||||||
// if (res.confirm) {
|
// if (res.confirm) {
|
||||||
// uni.navigateBack();
|
// uni.navigateBack();
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
fnChooseTopic(type, checked) {
|
fnChooseTopic(type, checked) {
|
||||||
if (!this.options[this.current].checked) {
|
if (!this.options[this.current].checked) {
|
||||||
this.$set(this.options[this.current], "checked", "");
|
this.$set(this.options[this.current], 'checked', '')
|
||||||
}
|
}
|
||||||
if (type === "judge" || type === "radio") {
|
if (type === 'judge' || type === 'radio') {
|
||||||
if (this.options[this.current].checked === checked) {
|
if (this.options[this.current].checked === checked) {
|
||||||
this.options[this.current].checked = "";
|
this.options[this.current].checked = ''
|
||||||
} else {
|
} else {
|
||||||
this.options[this.current].checked = checked;
|
this.options[this.current].checked = checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type === "multiple") {
|
if (type === 'multiple') {
|
||||||
if (this.options[this.current].checked) {
|
if (this.options[this.current].checked) {
|
||||||
const checkedArr = this.options[this.current].checked.split(",");
|
const checkedArr = this.options[this.current].checked.split(',')
|
||||||
if (checkedArr.indexOf(checked) !== -1) {
|
if (checkedArr.indexOf(checked) !== -1) {
|
||||||
checkedArr.splice(checkedArr.indexOf(checked), 1);
|
checkedArr.splice(checkedArr.indexOf(checked), 1)
|
||||||
this.options[this.current].checked = checkedArr.join(",");
|
this.options[this.current].checked = checkedArr.join(',')
|
||||||
} else {
|
} else {
|
||||||
checkedArr.push(checked);
|
checkedArr.push(checked)
|
||||||
checkedArr.sort();
|
checkedArr.sort()
|
||||||
this.options[this.current].checked = checkedArr.join(",");
|
this.options[this.current].checked = checkedArr.join(',')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.options[this.current].checked = checked;
|
this.options[this.current].checked = checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleCalcQuestType(type) {
|
handleCalcQuestType(type) {
|
||||||
return `(${this.questionTypeMap[type]})`
|
return `(${this.questionTypeMap[type]})`
|
||||||
},
|
},
|
||||||
fnIsFinish() {
|
fnIsFinish() {
|
||||||
if (!this.options[this.current].checked) {
|
if (!this.options[this.current].checked) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "温馨提示",
|
title: '温馨提示',
|
||||||
content: "请对本题进行作答。",
|
content: '请对本题进行作答。',
|
||||||
showCancel: false,
|
showCancel: false
|
||||||
});
|
})
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
return true;
|
return true
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 下一题按钮点击事件
|
* 下一题按钮点击事件
|
||||||
*/
|
*/
|
||||||
fnNextQuestion() {
|
fnNextQuestion() {
|
||||||
if (!this.fnIsFinish()) return;
|
if (!this.fnIsFinish()) return
|
||||||
this.current++;
|
this.current++
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 上一题按钮点击事件
|
* 上一题按钮点击事件
|
||||||
*/
|
*/
|
||||||
fnPreviousQuestion() {
|
fnPreviousQuestion() {
|
||||||
this.current--;
|
this.current--
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 交卷按钮点击事件
|
* 交卷按钮点击事件
|
||||||
*/
|
*/
|
||||||
fnHandInThePaper() {
|
fnHandInThePaper() {
|
||||||
if (!this.fnIsFinish()) return;
|
if (!this.fnIsFinish()) return
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "温馨提示",
|
title: '温馨提示',
|
||||||
content: `题目已全部做完,确认交卷吗?`,
|
content: `题目已全部做完,确认交卷吗?`,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.fnSubmit();
|
this.fnSubmit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
fnCountDownFinish() {
|
fnCountDownFinish() {
|
||||||
uni.$u.toast("考试时间已结束");
|
uni.$u.toast('考试时间已结束')
|
||||||
for (let i = 0; i < this.options.length; i++) {
|
for (let i = 0; i < this.options.length; i++) {
|
||||||
if (!this.options[i].checked) {
|
if (!this.options[i].checked) {
|
||||||
this.options[i].checked = "";
|
this.options[i].checked = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.fnSubmit();
|
this.fnSubmit()
|
||||||
},
|
},
|
||||||
async fnSubmit() {
|
async fnSubmit() {
|
||||||
uni.navigateBack({ delta: 2 });
|
// uni.navigateBack({ delta: 2 })
|
||||||
// for (let i = 0; i < this.options.length; i++) {
|
for (let i = 0; i < this.options.length; i++) {
|
||||||
// if (this.options[i].QUESTIONTYPE === "2") {
|
if (this.options[i].QUESTIONTYPE === "2") {
|
||||||
// this.options[i].checked = this.options[i].checked.replace(/,/g, "");
|
this.options[i].checked = this.options[i].checked.replace(/,/g, "");
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// const resData = await setTestPaperSubmission({
|
const resData = await setTestPaperSubmission({
|
||||||
// USERNAME: this.userInfo.NAME,
|
USERNAME: this.userInfo.NAME,
|
||||||
// entrySite: this.entrySite,
|
entrySite: this.entrySite,
|
||||||
// STAGEEXAMPAPERINPUT_ID: this.STAGEEXAMPAPERINPUT_ID,
|
STAGEEXAMPAPERINPUT_ID: this.STAGEEXAMPAPERINPUT_ID,
|
||||||
// CLASS_ID: this.CLASS_ID,
|
CLASS_ID: this.CLASS_ID,
|
||||||
// STUDENT_ID: this.STUDENT_ID,
|
STUDENT_ID: this.STUDENT_ID,
|
||||||
// NUMBEROFEXAMS: this.NUMBEROFEXAMS,
|
NUMBEROFEXAMS: this.NUMBEROFEXAMS,
|
||||||
// PASSSCORE: this.info.PASSSCORE,
|
PASSSCORE: this.info.PASSSCORE,
|
||||||
// EXAMSCORE: this.info.EXAMSCORE,
|
EXAMSCORE: this.info.EXAMSCORE,
|
||||||
// EXAMTIMEBEGIN: this.info.EXAMTIMEBEGIN,
|
EXAMTIMEBEGIN: this.info.EXAMTIMEBEGIN,
|
||||||
// options: JSON.stringify(this.options),
|
options: JSON.stringify(this.options),
|
||||||
// });
|
});
|
||||||
// if (resData.examResult === "0") {
|
if (resData.examResult === "0") {
|
||||||
// uni.showModal({
|
uni.showModal({
|
||||||
// title: "温馨提示",
|
title: "温馨提示",
|
||||||
// content: `您的成绩为${resData.examScore}分,很遗憾您没有通过本次考试,请再接再厉!`,
|
content: `您的成绩为${resData.examScore}分,很遗憾您没有通过本次考试,请再接再厉!`,
|
||||||
// showCancel: false,
|
showCancel: false,
|
||||||
// success: (res) => {
|
success: (res) => {
|
||||||
// if (res.confirm) {
|
if (res.confirm) {
|
||||||
// if (this.entrySite === "video_study")
|
if (this.entrySite === "video_study")
|
||||||
// uni.navigateBack({ delta: 3 });
|
uni.navigateBack({ delta: 3 });
|
||||||
// else uni.navigateBack();
|
else uni.navigateBack();
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
// } else {
|
} else {
|
||||||
// uni.showModal({
|
uni.showModal({
|
||||||
// title: "温馨提示",
|
title: "温馨提示",
|
||||||
// content: `您的成绩为${resData.examScore}分,恭喜您通过本次考试,请继续保持!`,
|
content: `您的成绩为${resData.examScore}分,恭喜您通过本次考试,请继续保持!`,
|
||||||
// showCancel: false,
|
showCancel: false,
|
||||||
// success: (res) => {
|
success: (res) => {
|
||||||
// if (res.confirm) {
|
if (res.confirm) {
|
||||||
// if (this.entrySite === "video_study")
|
if (this.entrySite === "video_study")
|
||||||
// uni.navigateBack({ delta: 3 });
|
uni.navigateBack({ delta: 3 });
|
||||||
// else if (this.entrySite === "strengththen")
|
else if (this.entrySite === "strengththen")
|
||||||
// uni.navigateBack({ delta: 2 });
|
uni.navigateBack({ delta: 2 });
|
||||||
// else uni.navigateBack();
|
else uni.navigateBack();
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import '/static/fonts/iconfont_timer.css';
|
@import '/static/fonts/iconfont_timer.css';
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
.top {
|
.top {
|
||||||
padding: 17rpx;
|
padding: 17rpx;
|
||||||
.time {
|
.time {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: #363636;
|
color: #363636;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.u-count-down__text {
|
.u-count-down__text {
|
||||||
display: inline;
|
display: inline;
|
||||||
color: #363636;
|
color: #363636;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic {
|
.topic {
|
||||||
margin: 20rpx;
|
margin: 20rpx;
|
||||||
padding: 20rpx 20rpx 150rpx;
|
padding: 20rpx 20rpx 150rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
||||||
.question-type {
|
.question-type {
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
padding: 4rpx 14rpx;
|
padding: 4rpx 14rpx;
|
||||||
border: 1rpx solid #3c9cff;
|
border: 1rpx solid #3c9cff;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #3c9cff;
|
color: #3c9cff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_title {
|
.tag_title {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
background-color: #b3b3b3;
|
background-color: #b3b3b3;
|
||||||
color: #FFF;
|
color: #fff;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
padding: 2rpx 10rpx;
|
padding: 2rpx 10rpx;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.options {
|
.options {
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
color: #696868;
|
color: #696868;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
color: #3c9cff;
|
color: #3c9cff;
|
||||||
|
|
||||||
.option {
|
.option {
|
||||||
background-color: #3c9cff;
|
background-color: #3c9cff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.option {
|
.option {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
border-radius: 80rpx;
|
border-radius: 80rpx;
|
||||||
width: 65rpx;
|
width: 65rpx;
|
||||||
height: 65rpx;
|
height: 65rpx;
|
||||||
line-height: 65rpx;
|
line-height: 65rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
line-height: 60rpx;
|
line-height: 60rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -92,6 +92,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getTaskScoreInfo } from "../../api";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -99,8 +101,7 @@ export default {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
totalPage: 0,
|
totalPage: 0,
|
||||||
questionList: [],
|
questionList: [],
|
||||||
// 新增当前激活的题目索引
|
current: 0, // 新增当前激活的题目索引
|
||||||
current: 0,
|
|
||||||
questionTypeMap: {
|
questionTypeMap: {
|
||||||
1: '单选题',
|
1: '单选题',
|
||||||
2: '多选题',
|
2: '多选题',
|
||||||
|
@ -111,14 +112,20 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onLoad(query) {
|
||||||
this.resetList()
|
const { stagestudentrelationId, classId } = query
|
||||||
|
this.getData(stagestudentrelationId, classId)
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {},
|
mounted() {},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async getData() {
|
async getData(stagestudentrelationId, classId) {
|
||||||
|
// const resData = await getTaskScoreInfo({
|
||||||
|
// stagestudentrelationId,
|
||||||
|
// classId
|
||||||
|
// })
|
||||||
|
// console.log('resData :>> ', resData);
|
||||||
this.questionList = [
|
this.questionList = [
|
||||||
{
|
{
|
||||||
stageexamrecordId: '7cea826c3c974cb69028dd0624b632ba',
|
stageexamrecordId: '7cea826c3c974cb69028dd0624b632ba',
|
||||||
|
|
|
@ -45,8 +45,8 @@ export default {
|
||||||
isFirst: "", // 是否为第一次开启摄像头
|
isFirst: "", // 是否为第一次开启摄像头
|
||||||
type: "", // 摄像头使用类别
|
type: "", // 摄像头使用类别
|
||||||
// showButton: "yes",
|
// showButton: "yes",
|
||||||
params: {}, // 额外携带的参数
|
routeQueryparams: {}, // 额外携带的参数
|
||||||
btnTextStr: "拍照"
|
btnTextStr: "拍照"
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
|
@ -71,7 +71,7 @@ export default {
|
||||||
if (query.type === "learning_certification") this.btnTextStr = "开始考试";
|
if (query.type === "learning_certification") this.btnTextStr = "开始考试";
|
||||||
this.type = query.type;
|
this.type = query.type;
|
||||||
// this.showButton = query.showButton || "yes";
|
// this.showButton = query.showButton || "yes";
|
||||||
this.params = query.params ? JSON.parse(query.params) : {};
|
this.routeQueryparams = query ?? {};
|
||||||
},
|
},
|
||||||
onBackPress(event) {
|
onBackPress(event) {
|
||||||
if (event.from === "backbutton") {
|
if (event.from === "backbutton") {
|
||||||
|
@ -111,17 +111,19 @@ export default {
|
||||||
src: imgPath,
|
src: imgPath,
|
||||||
dst: imgPath,
|
dst: imgPath,
|
||||||
overwrite: true,
|
overwrite: true,
|
||||||
quality: 40,
|
quality: 40
|
||||||
},
|
},
|
||||||
(zipRes) => {
|
(zipRes) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const reader = new plus.io.FileReader();
|
const reader = new plus.io.FileReader();
|
||||||
reader.onloadend = async (res) => {
|
reader.onloadend = async (res) => {
|
||||||
const speech = res.target.result;
|
const speech = res.target.result;
|
||||||
|
// 获取 base 64 图片编码的前缀
|
||||||
const USERAVATARPREFIX = speech.substring(
|
const USERAVATARPREFIX = speech.substring(
|
||||||
0,
|
0,
|
||||||
speech.indexOf("base64,") + 7,
|
speech.indexOf("base64,") + 7,
|
||||||
);
|
);
|
||||||
|
// 获取 base 64 图片的二进制到文本
|
||||||
const USERAVATARURL = speech.substring(
|
const USERAVATARURL = speech.substring(
|
||||||
speech.indexOf("base64,") + 7,
|
speech.indexOf("base64,") + 7,
|
||||||
);
|
);
|
||||||
|
@ -146,9 +148,10 @@ export default {
|
||||||
// await this.$store.dispatch("setVerification", true);
|
// await this.$store.dispatch("setVerification", true);
|
||||||
uni.$u.toast("认证成功");
|
uni.$u.toast("认证成功");
|
||||||
// uni.navigateBack();
|
// uni.navigateBack();
|
||||||
uni.$u.route({
|
uni.$u.route({
|
||||||
url: '/pages/train_management/course_exam'
|
url: '/pages/train_management/course_exam',
|
||||||
})
|
params: { ...this.routeQueryparams }
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if(e && e.msg){
|
if(e && e.msg){
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<view> <text class="content_label">任务状态: </text>{{ handleCalcTaskStatus(item.state) }} </view>
|
<view> <text class="content_label">任务状态: </text>{{ handleCalcTaskStatus(item.state) }} </view>
|
||||||
<view class="action-row">
|
<view class="action-row">
|
||||||
<u-button size="mini" type="primary" text="签到信息" :disabled="item.userSignPath === '0'" @click="signInInformation(item.classId)" />
|
<u-button size="mini" type="primary" text="签到信息" :disabled="item.userSignPath === '0'" @click="signInInformation(item.classId)" />
|
||||||
<u-button size="mini" type="primary" text="考试记录" :disabled="item.stageexamstate === '1' || item.stageexamstate === '4'" @click="ExamRecord(item.classId)" />
|
<u-button size="mini" type="primary" text="考试记录" :disabled="item.stageexamstate === '1' || item.stageexamstate === '4'" @click="ExamRecord(item)" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getClassList } from '../../api'
|
import { getClassList, getIsUploadFace } from '../../api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
@ -69,8 +69,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async onLoad(query) {
|
async onLoad(query) {
|
||||||
console.log('页面加载完成 :>> ', query)
|
await this.getUserFaceCompleted()
|
||||||
// await this.getUserFaceCompleted()
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -99,17 +98,17 @@ export default {
|
||||||
// 只允许通过手机相机扫码
|
// 只允许通过手机相机扫码
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
// scanType: ['qrCode'], // 仅支持二维码扫码
|
// scanType: ['qrCode'], // 仅支持二维码扫码
|
||||||
onlyFromCamera: false, // 是否只能从相机扫码,不允许从相册选择图片
|
onlyFromCamera: false, // 是否只能从相机扫码,允许从相册选择图片
|
||||||
hideAlbum: false, // 隐藏相册,不允许从相册选择图片,只能从相机扫码
|
hideAlbum: false, // 显示相册,允许从相册选择图片
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
const { id, type } = JSON.parse(response.result);
|
const { stageexampaperinputId, classId, postId, studentId, numberofexams, type } = JSON.parse(response.result)
|
||||||
if (type === '0') {
|
if (type === '0') {
|
||||||
// 签到二维码方式进入
|
// 签到二维码方式进入
|
||||||
uni.$u.route({
|
uni.$u.route({
|
||||||
url: '/pages/train_management/realname_info_auth',
|
url: '/pages/train_management/realname_info_auth',
|
||||||
params: {
|
params: {
|
||||||
type: 'scan_face',
|
type: 'scan_face',
|
||||||
classId: id
|
classId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (type === '1') {
|
} else if (type === '1') {
|
||||||
|
@ -118,7 +117,11 @@ export default {
|
||||||
url: '/pages/train_management/face_authentication',
|
url: '/pages/train_management/face_authentication',
|
||||||
params: {
|
params: {
|
||||||
type: 'learning_certification',
|
type: 'learning_certification',
|
||||||
classId: id
|
stageexampaperinputId,
|
||||||
|
classId,
|
||||||
|
postId,
|
||||||
|
studentId,
|
||||||
|
numberofexams
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -134,28 +137,29 @@ export default {
|
||||||
/**
|
/**
|
||||||
* 获取是否已经完成上传人脸信息
|
* 获取是否已经完成上传人脸信息
|
||||||
*/
|
*/
|
||||||
// async getUserFaceCompleted() {
|
async getUserFaceCompleted() {
|
||||||
// const userFaceData = await getIsUploadFace()
|
const userFaceData = await getIsUploadFace()
|
||||||
// console.log('userFaceData :>> ', userFaceData)
|
console.log('userFaceData :>> ', userFaceData)
|
||||||
// if (!userFaceData?.data) {
|
if (!userFaceData?.data) {
|
||||||
// uni.showModal({
|
uni.showModal({
|
||||||
// title: '温馨提示',
|
title: '温馨提示',
|
||||||
// content: '检测到您还未完成人脸信息读取,请先完成人脸信息认证!',
|
content: '检测到您还未完成人脸信息读取,请先完成人脸信息认证!',
|
||||||
// success: function (res) {
|
success: function (res) {
|
||||||
// if (res.confirm) {
|
if (res.confirm) {
|
||||||
// uni.$u.route({
|
uni.$u.route({
|
||||||
// url: '/pages/train_management/face_authentication',
|
url: '/pages/train_management/face_authentication',
|
||||||
// params: {
|
params: {
|
||||||
// type: 'facial_input'
|
type: 'facial_input'
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// } else if (res.cancel) {
|
}
|
||||||
// uni.navigateBack({ delta: 1 });
|
if (res.cancel) {
|
||||||
// }
|
uni.navigateBack({ delta: 1 })
|
||||||
// }
|
}
|
||||||
// })
|
}
|
||||||
// }
|
})
|
||||||
// },
|
}
|
||||||
|
},
|
||||||
handleCalcTaskStatus(type) {
|
handleCalcTaskStatus(type) {
|
||||||
return this.taskStatusMap[type]
|
return this.taskStatusMap[type]
|
||||||
},
|
},
|
||||||
|
@ -173,11 +177,13 @@ export default {
|
||||||
/**
|
/**
|
||||||
* 考试记录
|
* 考试记录
|
||||||
*/
|
*/
|
||||||
ExamRecord(classId) {
|
ExamRecord(record) {
|
||||||
|
const { stagestudentrelationId, classId } = record
|
||||||
uni.$u.route({
|
uni.$u.route({
|
||||||
url: '/pages/train_management/exam_record',
|
url: '/pages/train_management/exam_record',
|
||||||
params: {
|
params: {
|
||||||
classId
|
classId,
|
||||||
|
stagestudentrelationId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
let requestPath = 'https://qggf.qhdsafety.com/xgfApi/'; // 后台请求地址
|
// let requestPath = 'https://qggf.qhdsafety.com/xgfApi/'; // 后台请求地址
|
||||||
|
let requestPath = 'http://192.168.0.37:8058/xgf_gwj'; // 后台请求地址
|
||||||
// let requestPath = 'https://skqhdg.porthebei.com:9006/qa-prevention-xgf/'; // 后台请求地址
|
// let requestPath = 'https://skqhdg.porthebei.com:9006/qa-prevention-xgf/'; // 后台请求地址
|
||||||
// let requestPath = 'https://qgxgf.qhdsafety.com/qa-prevention-xgf/'; // 外网地址
|
// let requestPath = 'https://qgxgf.qhdsafety.com/qa-prevention-xgf/'; // 外网地址
|
||||||
import store from '../store/index'
|
import store from '../store/index'
|
||||||
|
|
Loading…
Reference in New Issue