模拟考试样式调整,提交考试确认窗口回到第一题bug修复,答题后去除自动跳题
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | sleepTime:2000, |
| | | subHeaderTop: 0, |
| | | isreadOnly: true, |
| | | quesModules: [], |
| | |
| | | if (item.tempAnswer == item.answer) item.correctOrError = true |
| | | // 强制刷新更新视图 |
| | | this.$forceUpdate() |
| | | if (this.currentIndex < this.max) { |
| | | setTimeout(() => { |
| | | this.currentIndex += 1 |
| | | }, 300) |
| | | } |
| | | // if (this.currentIndex < this.max) { |
| | | // setTimeout(() => { |
| | | // this.currentIndex += 1 |
| | | // }, this.sleepTime) |
| | | // } |
| | | }, |
| | | /* 选择答案(多选)*/ |
| | | chooseMutiSolution(item, subItem) { |
| | |
| | | |
| | | this.$forceUpdate() |
| | | |
| | | if (this.currentIndex < this.max) { |
| | | setTimeout(() => { |
| | | this.currentIndex += 1 |
| | | }, 300) |
| | | } |
| | | // if (this.currentIndex < this.max) { |
| | | // setTimeout(() => { |
| | | // this.currentIndex += 1 |
| | | // }, this.sleepTime) |
| | | // } |
| | | }, |
| | | // 实操题中的答案确认 |
| | | pictureConfirm(item) { |
| | |
| | | |
| | | this.$forceUpdate() |
| | | |
| | | if (this.currentIndex < this.max) { |
| | | setTimeout(() => { |
| | | this.currentIndex += 1 |
| | | }, 300) |
| | | } |
| | | // if (this.currentIndex < this.max) { |
| | | // setTimeout(() => { |
| | | // this.currentIndex += 1 |
| | | // }, this.sleepTime) |
| | | // } |
| | | }, |
| | | /* 判断题答案 */ |
| | | judgeSolution(item, value) { |
| | |
| | | if (item.tempAnswer == item.answer) item.correctOrError = true |
| | | // 强制刷新更新视图 |
| | | this.$forceUpdate() |
| | | if (this.currentIndex < this.max) { |
| | | setTimeout(() => { |
| | | this.currentIndex += 1 |
| | | }, 300) |
| | | } |
| | | // if (this.currentIndex < this.max) { |
| | | // setTimeout(() => { |
| | | // this.currentIndex += 1 |
| | | // }, this.sleepTime) |
| | | // } |
| | | }, |
| | | /* 交卷 相同 */ |
| | | handleSubmit(submitORimeEnd) { |
| | | /*submitORimeEnd == 1,submit |
| | | submitORimeEnd == 0,stimeEnd*/ |
| | | if (this.currentIndex == 0) { |
| | | this.currentIndex++ |
| | | } else { |
| | | this.currentIndex = 0 |
| | | } |
| | | if (submitORimeEnd) { |
| | | // this.$emit('submit', this.questionList) |
| | | this.$emit('submit') |
| | |
| | | right: 10px; |
| | | bottom: 0; |
| | | margin: auto; |
| | | font-size: 1.0rem; |
| | | color: #fff; |
| | | letter-spacing: 4rpx; |
| | | /* 如果您想让slot内容占满整个导航栏的宽度 */ |
| | |
| | | .footer { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | padding: 30rpx 20rpx; |
| | | padding: 30rpx 25rpx; |
| | | position: fixed; |
| | | bottom: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 30rpx; |
| | | font-size: 1rem; |
| | | box-sizing: border-box; |
| | | color: #4c8af3; |
| | | box-shadow: 0 0 5px 1px #eee; |
| | |
| | | <!-- <nav-bar-sub></nav-bar-sub> --> |
| | | <!-- 用于提示是否确认退出考试 --> |
| | | <u-modal v-model="show" :content="content" :show-cancel-button="true" @confirm="handleConfirm"></u-modal> |
| | | |
| | | <!-- 渲染题目 --> |
| | | <Answer @submit='handleCommit' @timeEnd='handleConfirm' @onChange='onChange'></Answer> |
| | | |
| | |
| | | this.$store.state.questionList = [] |
| | | |
| | | var that = this |
| | | console.log(this.$store.state.UserData) |
| | | // 理论考试 |
| | | uni.request({ |
| | | url: "http://223.82.109.183:2080/api/simulateExamRecord/beginExam", |
| | | // url: "http://localhost:81/simulateExamRecord/beginExam", |
| | | method: 'POST', |
| | | data: { |
| | | idCardNo: this.$store.state.UserData.cardid |
| | |
| | | }, |
| | | methods: { |
| | | /* 提交答案 显示再次确认*/ |
| | | handleCommit(questionList) { |
| | | handleCommit() { |
| | | // 显示是否确认交卷 |
| | | this.show = true; |
| | | }, |
| | |
| | | }, |
| | | /* 题目答案变化 |
| | | */ |
| | | onChange(answer) {} |
| | | onChange(answer) { |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | img: "/static/workbench/task9.png", |
| | | url: "", |
| | | }, |
| | | // ,{ |
| | | // title:'模拟考试', |
| | | // img:'../../static/workbench/exam.png', |
| | | // url:'/pages/exam/startexam' |
| | | // } |
| | | { |
| | | title: "模拟考试", |
| | | img: "/static/workbench/task5.png", |
| | | url: "/pages/exam/startexam", |
| | | } |
| | | ], |
| | | }; |
| | | }, |
| | |
| | | this.getNum(); |
| | | }, |
| | | onLoad() { |
| | | if (this.$store.state.billFlag == true) { |
| | | this.dataTwo.push({ |
| | | title: "模拟考试", |
| | | img: "/static/workbench/task5.png", |
| | | url: "/pages/exam/startexam", |
| | | }); |
| | | } |
| | | // if (this.$store.state.billFlag == true) { |
| | | // this.dataTwo.push({ |
| | | // title: "模拟考试", |
| | | // img: "/static/workbench/task5.png", |
| | | // url: "/pages/exam/startexam", |
| | | // }); |
| | | // } |
| | | }, |
| | | onBackPress(e) { |
| | | console.log("监听返回按钮事件2", e); |