vue 答题(单选,多选,判断)

这里是后台处理得计分,前台这是渲染题目,以及回显用户答得题

答题

后台数据格式
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

    <ul>
        <li v-for="(i, index1) in arrlist.pqList" :key="index1">
          <h3>
            <span>{
  { index1 + 1 }}、</span>
            <div class="newtuexam_box">
              <span v-show="i.questionBankType == '1'">(单选题)</span>
              <span v-show="i.questionBankType == '2'">(多选题)</span>
              <span v-show="i.questionBankType == '3'">(判断题)</span>
              {
  { i.subjectContent }}
            </div>
          </h3>
            <!-- 单选,判断 -->
          <div v-show="i.questionBankType !== '2'" style="margin-left: 60px">
            <el-radio-group v-model="radioList[index1]">
              <el-radio
                v-for="(j, index2) in i.optionAll"
                :key="index2"
                :label="j.pqaId"
                @change="handleRadioChanges(j)"
              >
                {
  { j.answerContent }}
              </el-radio>
            </el-radio-group>
          </div>
            <!-- 多选题 -->
          <div v-show="i.questionBankType == '2'" style="margin-left: 60px">
            <el-checkbox-group v-model="checkboxList">
              <el-checkbox
                v-for="(x, index2) in i.optionAll"
                :key="index2"
                :label="x.pqaId"
                @change="handleCheckboxChanges(x)"
              >
                {
  { x.answerContent }}
              </el-checkbox>
            </el-checkbox-group>
          </div>
        </li>
      </ul>
      
      <div class="newtuexam_cont_btn" @click="getsubmit">提交试卷</div>
import { createPaper, paperInfo, inspectionPaper } from "@/api/newtu";
export default {
  components: {},
  data() {
    return {
      arrlist: {},
      paperId: "",
      checkboxList: [],
      r
  • 9
    点赞
  • 61
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值