YNUtdPlatform/pages/YNEduApp/exam/examination.vue

778 lines
24 KiB
Vue
Raw Normal View History

2024-08-14 18:55:18 +08:00
<template>
<view>
<u-navbar leftIcon="" title="考试" :placeholder="true" />
2024-11-26 18:32:28 +08:00
<div class="content" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd">
2024-08-14 18:55:18 +08:00
<div class="top-content">
<div class="top-wrapper">
<div class="time">
<div>距离考试结束</div>
<div>
<u-count-down
class="count-down"
ref="countDown"
:autoStart="false"
:time="time"
@change="changeCountDown"
/>
</div>
</div>
<div>
<span style="color: #1989fa">{{ currentIndex + 1 }}</span>
/{{ questionList.length }}
</div>
</div>
<div class="center-wrapper">
<div class="answer-wrapper">
<div
class="item-wrapper"
v-for="(item, index) in questionList"
:key="index"
v-show="item.isShow"
@click="handleQuestionNumber(item, index)"
>
2024-08-23 16:00:43 +08:00
<div class="answer-item" :class="{ isActive: item.isActive, currentActive: currentIndex == index }">
{{ index + 1 }}
</div>
2024-08-14 18:55:18 +08:00
</div>
</div>
<div class="unfold" @click="handleUnfold">
{{ isRotating ? '收起' : '展开' }}
<u-icon v-if="!this.isRotating" name="arrow-down-fill" size="10" />
<u-icon v-else name="arrow-up-fill" size="10" />
</div>
</div>
</div>
<!-- 题目 -->
<div class="question-wrapper" v-for="(item, index) in questionList" :key="index" v-show="index == currentIndex">
<div class="question-type-wrapper">
<div class="line" />
<div class="question-type">
2024-08-23 16:00:43 +08:00
<div v-if="item.examType == 1">单选题{{ item.questionScore }}</div>
<div v-if="item.examType == 2">多选题{{ item.questionScore }}</div>
<div v-if="item.examType == 3">判断题{{ item.questionScore }}</div>
2024-08-14 18:55:18 +08:00
</div>
</div>
2024-08-23 16:00:43 +08:00
<div class="question">{{ currentIndex + 1 }}. {{ item.examTopic }}</div>
2024-08-26 21:46:08 +08:00
<u--image
v-if="item.examTopicUrl"
:showLoading="true"
:src="fileUrl + item.examTopicUrl || ''"
width="60px"
height="60px"
style="margin-bottom: 10px"
@click="clickImg(fileUrl + item.examTopicUrl)"
/>
2024-08-14 18:55:18 +08:00
<div class="options">
2024-09-04 15:18:01 +08:00
<div class="option-wrapper" v-for="(option, optionIndex) in item.listOption" :key="optionIndex">
<div
class="option"
:class="{ isActive: option.isActive }"
@click="handleSelectOption(item, index, option, optionIndex)"
>
<div class="option-item">{{ option.optionIdent }}.</div>
<div class="option-content">{{ option.optionContent }}</div>
</div>
<u--image
v-if="option.optionUrl"
:showLoading="true"
:src="fileUrl + option.optionUrl || ''"
width="60px"
height="60px"
style="margin-bottom: 10px"
@click="clickImg(fileUrl + option.optionUrl)"
/>
2024-08-14 18:55:18 +08:00
</div>
</div>
</div>
<!-- 底部按钮 -->
<div class="bottom-btn">
<div class="btn" v-show="currentIndex != 0">
<u-button size="small" shape="circle" text="上一题" @click="currentIndex--" />
</div>
<div class="btn" v-if="currentIndex !== questionList.length - 1">
<u-button type="primary" size="small" shape="circle" text="下一题" @click="currentIndex++" />
</div>
<div class="btn" v-else>
<u-button type="primary" size="small" shape="circle" text="交 卷" @click="openConfirmModal" />
</div>
</div>
</div>
<!-- 提交弹框 -->
<u-modal
:show="showConfirmModal"
title="提示"
showCancelButton
@cancel="showConfirmModal = false"
@confirm="handleConfirmSubmit"
>
<view class="slot-content">
<view v-if="unDoCount > 0">
本场考试还有
<span style="color: #1989fa; margin: 0 5px">{{ unDoCount }}</span>
题尚未完成
</view>
2024-08-15 17:47:52 +08:00
<view style="text-align: center">确定交卷</view>
2024-08-14 18:55:18 +08:00
</view>
</u-modal>
2024-08-15 17:47:52 +08:00
<u-toast ref="uToast"></u-toast>
2024-08-14 18:55:18 +08:00
</view>
</template>
<script>
2024-08-30 17:35:33 +08:00
import { pathToBase64, base64ToPath } from 'image-tools'
2024-11-25 15:04:09 +08:00
// import face from '@/uni_modules/mcc-face/index.js'
2024-08-26 21:46:08 +08:00
import {
getExamQuestionList,
insertQuestionAnswerById,
commitExamByRecordId,
getFaceRecognition,
updStudyDurationExamPractice
} from '@/api/eduApp'
2024-08-28 09:51:05 +08:00
import config from '@/config'
2024-08-15 17:47:52 +08:00
2024-08-14 18:55:18 +08:00
export default {
data() {
return {
2024-09-04 19:20:45 +08:00
isLoading: false,
2024-08-23 16:00:43 +08:00
// 考试id
examId: '',
// 考试记录id
recordId: '',
2024-08-15 17:47:52 +08:00
// 切屏次数
screenCount: 0,
2024-08-23 16:00:43 +08:00
// 允许切屏次数
switchCount: 0,
2024-08-14 18:55:18 +08:00
showConfirmModal: false,
2024-08-23 16:00:43 +08:00
// 考试时间
time: 0,
examTime: 0,
2024-08-15 17:47:52 +08:00
random1: 0,
random2: 0,
2024-08-14 18:55:18 +08:00
// 答题时间
answerTime: 0,
currentIndex: 0,
// 是否展开
isRotating: false,
// 未做题目数
unDoCount: 0,
2024-08-23 16:00:43 +08:00
examNum: 0, // 考试次数
examCount: 1, // 1: 不限次 2: 及格终止 3: 自定义
examCustom: 0, // 自定义次数
results: 0, // 考试结果
2024-08-26 21:46:08 +08:00
studyId: '', // 学习id
2024-08-14 18:55:18 +08:00
// 题目列表
2024-08-26 21:46:08 +08:00
questionList: [],
2024-08-28 09:51:05 +08:00
fileUrl: config.fileUrl,
score: 0,
2024-08-30 17:35:33 +08:00
passScore: 0,
2024-09-18 17:15:31 +08:00
isHide: false,
2024-11-26 18:32:28 +08:00
failCount: 3,
startX: 0, // 起始触摸点X坐标
endX: 0 // 结束触摸点X坐标
2024-08-14 18:55:18 +08:00
}
},
2024-08-23 16:00:43 +08:00
onLoad(opt) {
opt = JSON.parse(opt.params)
2024-08-28 09:51:05 +08:00
console.log('🚀 ~ onLoad ~ opt考试中--:', opt)
2024-08-23 16:00:43 +08:00
this.examId = opt.examId
this.switchCount = Number(opt.switchCount)
this.examNum = opt.examNum
this.examCount = opt.examCount
this.examCustom = opt.examCustom
2024-08-26 21:46:08 +08:00
this.studyId = opt.studyId || ''
2024-08-28 09:51:05 +08:00
this.score = opt.score
this.passScore = opt.passScore
2024-11-25 15:04:09 +08:00
this.getList()
2024-08-15 17:47:52 +08:00
},
2024-08-30 17:35:33 +08:00
onShow() {
this.isHide = false
// setTimeout(() => {
// if (this.screenCount > this.switchCount) {
// this.$refs.uToast.show({
// message: '切屏次数已达上限, 系统将自动提交',
// duration: 1000
// })
// this.handleConfirmSubmit()
// }
// }, 1000)
},
2024-08-23 16:00:43 +08:00
onHide() {
2024-08-29 18:12:47 +08:00
// this.screenCount++
// console.log('🚀 ~ onHide ~ this.screenCount:', this.screenCount)
2024-09-06 18:43:47 +08:00
setTimeout(() => {
if (!this.isHide) {
this.handleConfirmSubmit()
}
}, 500)
2024-08-15 17:47:52 +08:00
},
2024-08-14 18:55:18 +08:00
mounted() {
2024-11-25 15:04:09 +08:00
// this.getList()
2024-08-14 18:55:18 +08:00
},
2024-08-29 18:12:47 +08:00
// onUnload() {
// console.log('🚀 ~ onUnload ~ 页面关闭')
// this.handleConfirmSubmit()
// },
2024-08-14 18:55:18 +08:00
methods: {
// 获取列表
2024-08-23 16:00:43 +08:00
async getList() {
try {
const params = {
examId: this.examId
}
2024-11-25 15:04:09 +08:00
console.log('🚀 ~ 考试 ~ params:', params)
2024-09-06 14:53:49 +08:00
this.$verificationToken()
2024-11-25 15:04:09 +08:00
console.log('🚀 ~ 考试 ~ config:', config)
2024-08-28 09:51:05 +08:00
uni.request({
url: config.baseUrl + '/exam-student/studentExam/getExamQuestionList',
method: 'post',
data: params,
header: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: uni.getStorageSync('access_token')
},
success: res => {
console.log('🚀 ~ getList ~ res:', res)
res = res.data
const data = res.data
this.questionList = data.examPaperData
this.recordId = data.recordId
this.examTime = data.answerTime
this.time = Number(data.answerTime) * 60 * 1000
console.log('🚀 ~ getList ~ this.time:', this.time)
console.log('🚀 ~ getList ~ this.questionList:', this.questionList)
2024-11-25 15:04:09 +08:00
// this.random1 = (data.answerTime / 3) * 60 + Math.ceil(Math.random() * 20) + 20
// this.random2 = (data.answerTime / 1.5) * 60 + Math.ceil(Math.random() * 30) + 30
// console.log('🚀 ~ getList ~ this.random1:', this.random1, this.random2)
2024-08-28 09:51:05 +08:00
if (this.questionList.length > 0) {
this.questionList.forEach((item, index) => {
this.$set(item, 'isShow', index < 7)
this.$set(item, 'isActive', false)
if (item.listOption) {
item.listOption.forEach(option => {
this.$set(option, 'isActive', false)
})
}
2024-08-23 16:00:43 +08:00
})
2024-08-28 09:51:05 +08:00
console.log('🚀 ~ this.questionList.forEach ~ this.questionList:', this.questionList)
setTimeout(() => {
this.$refs.countDown.start()
}, 100)
2024-08-23 16:00:43 +08:00
}
2024-08-28 09:51:05 +08:00
},
fail: err => {
console.log(err)
}
})
2024-08-23 16:00:43 +08:00
} catch (error) {
console.log('🚀 ~ getList ~ error:', error)
2024-08-14 18:55:18 +08:00
}
},
changeCountDown(time) {
// console.log('🚀 ~ changeCountDown ~ time:', time)
2024-08-23 16:00:43 +08:00
// 等时间赋值后再开始计时
2024-09-06 18:43:47 +08:00
if (this.time == 0 && !this.isLoading) return
2024-08-14 18:55:18 +08:00
this.answerTime =
this.time - (time.days * 24 * 60 * 60 + time.hours * 60 * 60 + time.minutes * 60 + time.seconds) * 1000
2024-08-20 17:44:53 +08:00
// console.log('🚀 ~ changeCountDown ~ this.answerTime:', this.answerTime)
2024-11-25 15:04:09 +08:00
// console.log(
// '🚀 ~ changeCountDown ~ this.answerTime:',
// this.time,
// this.answerTime / 1000,
// )
// console.log('🚀 ~ changeCountDown ~:', this.answerTime / 1000 == this.random1)
// console.log('🚀 ~ changeCountDown ~:', this.answerTime / 1000 == this.random2)
2024-11-13 16:21:21 +08:00
// if (this.answerTime / 1000 == this.random1) {
// console.log('🚀 ~ changeCountDown ~ 人脸识别')
// // this.openFaceScan() // Android 人脸识别
// this.openPhotograph() // IOS 拍照识别
// } else if (this.answerTime / 1000 == this.random2) {
// // this.openFaceScan()
// this.openPhotograph()
// } else
if (this.answerTime == this.time) {
2024-08-14 18:55:18 +08:00
// 提示: 时间结束, 自动提交
this.$refs.uToast.show({
message: '考试时间结束, 系统将自动提交',
duration: 1000
})
this.handleConfirmSubmit()
}
},
// 点击题号
handleQuestionNumber(item, index) {
console.log('🚀 ~ handleQuestionNumber ~ item:', item)
this.currentIndex = index
},
// 展开
handleUnfold() {
this.questionList.forEach((item, index) => {
if (index > 6) {
this.$set(item, 'isShow', !item.isShow)
}
})
this.isRotating = !this.isRotating
console.log('🚀 ~ this.questionList.forEach ~ this.isRotating:', this.isRotating)
},
handleSelectOption(item, index, option, optionIndex) {
2024-08-23 16:00:43 +08:00
let selectAnswer = ''
console.log('🚀 ~ handleSelectOption ~ option:', item, option, optionIndex)
2024-08-14 18:55:18 +08:00
item.isActive = true
// 如果是单选题与判断题 则只能选中一个 多选题可以选中多个
2024-08-23 16:00:43 +08:00
if (item.examType == 1 || item.examType == 3) {
2024-08-14 18:55:18 +08:00
this.$set(option, 'isActive', true)
2024-08-23 16:00:43 +08:00
item.listOption.forEach((option, optIndex) => {
2024-08-14 18:55:18 +08:00
// 除了当前选中的其他都设置为未选中
if (optIndex != optionIndex) {
this.$set(option, 'isActive', false)
}
})
2024-08-23 16:00:43 +08:00
selectAnswer = option.optionIdent
2024-08-14 18:55:18 +08:00
} else {
this.$set(option, 'isActive', !option.isActive)
// 如果所有选项都是未选中状态, 则题目也是未选中状态
2024-08-23 16:00:43 +08:00
let isActive = item.listOption.some(option => option.isActive)
2024-08-14 18:55:18 +08:00
item.isActive = isActive
2024-08-23 16:00:43 +08:00
// 将点击的选项的 optionIdent 'ABC' 拼接成字符串
item.listOption.forEach(option => {
if (option.isActive) {
selectAnswer += option.optionIdent
}
})
2024-08-14 18:55:18 +08:00
}
2024-08-23 16:00:43 +08:00
const params = {
recordId: this.recordId,
questionId: item.id,
selectAnswer
}
2024-09-03 16:07:30 +08:00
if (item.examType == 3) {
params.selectAnswer = selectAnswer == 'A' ? '对' : '错'
}
2024-08-23 16:00:43 +08:00
console.log('🚀 ~ handleSelectOption ~ params:', params)
2024-08-28 09:51:05 +08:00
// insertQuestionAnswerById(params)
2024-09-06 14:53:49 +08:00
this.$verificationToken()
2024-08-28 09:51:05 +08:00
uni.request({
url: config.baseUrl + '/exam-student/studentExam/insertQuestionAnswerById',
method: 'post',
data: params,
header: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: uni.getStorageSync('access_token')
2024-09-03 16:07:30 +08:00
},
success: res => {
console.log('🚀 ~ handleSelectOption ~ res:', res)
2024-08-28 09:51:05 +08:00
}
})
2024-08-14 18:55:18 +08:00
},
openConfirmModal() {
this.unDoCount = this.questionList.filter(item => !item.isActive).length
this.showConfirmModal = true
},
// 确认提交
2024-08-28 17:23:03 +08:00
handleConfirmSubmit() {
2024-09-04 19:20:45 +08:00
console.log('🚀 ~ 提交-->', this.isLoading)
if (this.isLoading) {
uni.showToast({
title: '正在提交中, 请稍后',
icon: 'none'
})
return
}
this.isLoading = true
2024-08-14 18:55:18 +08:00
// 停止计时
this.$refs.countDown.pause()
2024-08-23 16:00:43 +08:00
const params = {
2024-08-26 21:46:08 +08:00
userId: uni.getStorageSync('userId'),
2024-08-23 16:00:43 +08:00
recordId: this.recordId,
examId: this.examId,
// 时间 转换为分钟, 不足一分钟算一分钟
answerTime: Math.ceil(this.answerTime / 60000)
}
2024-08-28 09:51:05 +08:00
// const res = await commitExamByRecordId(params)
2024-09-06 14:53:49 +08:00
this.$verificationToken()
2024-08-28 09:51:05 +08:00
uni.request({
url: config.baseUrl + '/exam-student/studentExam/commitExamByRecordId',
method: 'post',
data: params,
header: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: uni.getStorageSync('access_token')
},
success: res => {
console.log('🚀 ~ handleConfirmSubmit ~ res:', res)
res = res.data
const params2 = {
examId: this.examId,
examGrade: res.examGrade,
examResult: res.examResult,
gradeAverage: res.gradeAverage,
answerTime: Math.ceil(this.answerTime / 60000),
examTime: this.examTime,
questionCount: this.questionList.length,
switchCount: this.switchCount,
2024-09-04 15:18:01 +08:00
examNum: this.examNum + 1,
2024-08-28 09:51:05 +08:00
examCount: this.examCount,
examCustom: this.examCustom,
results: res.examResult,
studyId: this.studyId || '',
score: this.score,
passScore: this.passScore
}
uni.navigateTo({
url: `/pages/YNEduApp/exam/examinationDetails?params=${JSON.stringify(params2)}`
})
2024-09-04 19:20:45 +08:00
setTimeout(() => {
this.showConfirmModal = false
}, 1000)
2024-08-28 09:51:05 +08:00
}
})
2024-08-26 21:46:08 +08:00
if (this.studyId) {
2024-08-28 09:51:05 +08:00
// updStudyDurationExamPractice({ userId: params.userId, studyId: this.studyId })
this.updStudyDurationExamPractice({ userId: params.userId, studyId: this.studyId })
2024-08-26 21:46:08 +08:00
}
2024-08-23 16:00:43 +08:00
console.log('🚀 ~ handleConfirmSubmit ~ params:', params, res)
2024-08-28 09:51:05 +08:00
// this.showConfirmModal = false
// const params2 = {
// examId: this.examId,
// examGrade: res.examGrade,
// examResult: res.examResult,
// gradeAverage: res.gradeAverage,
// answerTime: Math.ceil(this.answerTime / 60000),
// examTime: this.examTime,
// questionCount: this.questionList.length,
// switchCount: this.switchCount,
// examNum: this.examNum,
// examCount: this.examCount,
// examCustom: this.examCustom,
// results: res.examResult,
// studyId: this.studyId || ''
// }
// uni.navigateTo({
// url: `/pages/YNEduApp/exam/examinationDetails?params=${JSON.stringify(params2)}`
// })
2024-08-15 17:47:52 +08:00
},
// 人脸识别
2024-09-05 18:17:59 +08:00
// async openFaceScan() {
// face.open(['a'], e => {
// console.log('🚀 ~ e-人脸识别:', e)
// face.close()
// let params = {
// userId: uni.getStorageSync('userId'),
// img: e
// }
// params = JSON.stringify(params)
// this.getFaceRecognition(params)
// })
// },
2024-08-30 17:35:33 +08:00
// 拍照录入
2024-11-25 15:04:09 +08:00
// openPhotograph() {
// this.isHide = true
// setTimeout(() => {
// this.$refs.countDown.pause()
// uni.chooseImage({
// count: 1,
// sizeType: ['compressed'],
// sourceType: ['camera'],
// success: res => {
// this.isHide = false
// let url = ''
// console.log('🚀 ~ res-拍照:', res)
// this.imgToBase64(res.tempFilePaths[0]).then(base64 => {
// url = base64
// console.log('🚀 ~ this.imgToBase64 ~ base64:', url)
// this.getFaceRecognition({ userId: uni.getStorageSync('userId'), img: url })
// })
// },
// fail: err => {
// this.isHide = false
// console.log('🚀 ~ err:', err)
// }
// })
// }, 10)
// },
// imgToBase64(data) {
// return new Promise((resolve, reject) => {
// pathToBase64(data)
// .then(base64 => {
// resolve(base64)
// })
// .catch(error => {
// console.error(error)
// reject(error)
// })
// })
// },
2024-08-30 17:35:33 +08:00
// 发送请求
2024-11-25 15:04:09 +08:00
// getFaceRecognition(params) {
// console.log('🚀 ~ getFaceRecognition ~ params:', params)
// this.$verificationToken()
// uni.request({
// url: config.baseUrl + '/exam-student/personalCenter/getFaceRecognition',
// method: 'POST',
// header: {
// 'content-type': 'application/json',
// Authorization: uni.getStorageSync('access_token')
// },
// data: params,
// success: res => {
// console.log('🚀 ~ openFaceScan ~ res-人脸识别:', res)
// res = res.data
// console.log('🚀 ~ openFaceScan ~ res-人脸识别:', res.code)
// if (res.code == 200) {
// this.$refs.uToast.show({
// message: '人脸识别成功',
// duration: 1000
// })
// this.failCount = 3
// // 继续计时
// this.$refs.countDown.start()
// } else {
// this.failCount--
// if (this.failCount == 0) {
// this.$refs.uToast.show({
// message: '人脸识别失败, 即将结束考试',
// duration: 1500
// })
// setTimeout(() => {
// this.handleConfirmSubmit()
// }, 1000)
// } else {
// this.$refs.uToast.show({
// message: '人脸识别失败, 请重新录入, 剩余次数: ' + this.failCount + '次',
// duration: 1500
// })
// setTimeout(() => {
// this.openPhotograph()
// }, 1700)
// }
// }
// },
// fail(err) {
// console.log('🚀 ~ openFaceScan ~ 人脸识别失败', err)
// this.$refs.uToast.show({
// message: err.errMsg,
// duration: 1000
// })
// }
// })
// },
2024-08-26 21:46:08 +08:00
clickImg(url) {
2024-08-30 17:35:33 +08:00
this.isHide = true
2024-08-26 21:46:08 +08:00
uni.previewImage({
urls: [url]
})
2024-08-30 17:35:33 +08:00
// this.screenCount--
2024-08-26 21:46:08 +08:00
},
2024-08-28 09:51:05 +08:00
updStudyDurationExamPractice(params) {
2024-09-06 14:53:49 +08:00
this.$verificationToken()
2024-08-28 09:51:05 +08:00
uni.request({
url: config.baseUrl + '/exam-student/student/updStudyDurationExamPractice',
method: 'post',
data: params,
header: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: uni.getStorageSync('access_token')
},
fail: err => {
console.log(err)
}
})
2024-11-26 18:32:28 +08:00
},
touchStart(event) {
this.startX = 0
this.endX = 0
console.log('🚀 ~ 开始 ~ event:', event)
// 记录触摸开始的位置
this.startX = event.touches[0].clientX
console.log('🚀 ~ touchStart ~ this.startX:', this.startX)
},
touchMove(event) {
console.log('🚀 ~ 移动 ~ event:', event)
// 在触摸过程中可以获取当前触摸点位置
this.endX = event.touches[0].clientX
console.log('🚀 ~ touchMove ~ this.endX:', this.endX)
},
touchEnd() {
// 判断滑动方向
if (this.startX != 0 && this.endX != 0 && this.startX - this.endX > 10) {
// 左滑
console.log('向左滑动')
this.currentIndex++
} else if (this.startX != 0 && this.endX != 0 && this.endX - this.startX > 10) {
// 右滑
console.log('向右滑动')
this.currentIndex--
}
if (this.currentIndex < 0) {
this.currentIndex = 0
} else if (this.currentIndex > this.questionList.length - 1) {
this.currentIndex = this.questionList.length - 1
}
2024-09-18 17:15:31 +08:00
}
2024-09-14 09:32:50 +08:00
},
onBackPress(options) {
console.log(options)
if (options.from == 'backbutton') {
// 来自手势返回
console.log('手势返回')
// 返回为 true 时,不会执行返回操作,可以自定义返回逻辑
// 返回为 false 或者不返回时,则执行默认返回操作
return true
2024-08-28 09:51:05 +08:00
}
2024-09-14 09:32:50 +08:00
// 返回为 false 或者不返回时,则执行默认返回操作
return false
2024-08-14 18:55:18 +08:00
}
}
</script>
<style lang="scss" scoped>
.content {
2024-11-26 18:32:28 +08:00
width: 100vw;
height: 90vh;
2024-08-14 18:55:18 +08:00
.top-content {
background: #fff;
padding: 10px;
border-radius: 5px;
}
.top-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
.time {
display: flex;
justify-content: flex-start;
}
}
.center-wrapper {
display: flex;
justify-content: space-between;
.unfold {
height: 50px;
line-height: 50px;
text-align: center;
display: flex;
justify-content: center;
}
.answer-wrapper {
width: 86%;
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.item-wrapper {
padding: 5px 5px 0 0;
width: 12%;
height: 45px;
display: flex;
justify-content: center;
align-items: center;
.answer-item {
width: 33px;
height: 33px;
line-height: 33px;
text-align: center;
border-radius: 5px;
background: #f4f9fe;
color: #333;
&.isActive {
background: #1989fa;
}
2024-08-23 16:00:43 +08:00
&.currentActive {
background: #f4c14a;
}
2024-08-14 18:55:18 +08:00
}
}
}
}
.question-wrapper {
2024-11-26 18:32:28 +08:00
padding: 10px;
2024-08-14 18:55:18 +08:00
.question-type-wrapper {
margin: 20px 0;
display: flex;
justify-content: flex-start;
align-items: center;
.line {
width: 2px;
height: 11px;
background: #1989fa;
margin-right: 3px;
}
.question-type {
color: #8a8a8a;
}
}
.question {
font-weight: 800;
font-size: 15px;
color: #333333;
}
}
.options {
margin-top: 10px;
2024-09-04 15:18:01 +08:00
margin-bottom: 30px;
.option-wrapper {
max-height: 500px;
overflow: auto;
.option {
display: flex;
justify-content: flex-start;
align-items: center;
margin-top: 10px;
background: #f4f9fe;
border-radius: 5px;
&.isActive {
background: #8cbff1;
color: #fff;
}
.option-item {
width: 33px;
height: 33px;
line-height: 33px;
text-align: center;
color: #333;
}
.option-content {
margin-left: 10px;
color: #333;
}
2024-08-14 18:55:18 +08:00
}
}
}
.bottom-btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #fff;
padding: 15px 0;
display: flex;
justify-content: flex-end;
align-items: center;
.btn {
width: 100px;
margin-right: 10px;
}
}
}
::v-deep .u-count-down__text {
font-weight: 700;
color: #1989fa;
}
</style>