analysis.vue 4.93 KB
<template>
  <div>
    <back-box>
      <template slot="title">
        <span>单课分析</span>
      </template>
    </back-box>
    <div class="page-content">
      <div class="tab-box">
        <span
          class="tab-item"
          :class="type == 1 ? 'active' : ''"
          @click="type = 1"
          >答题表现</span
        >
        <span
          class="tab-item"
          :class="type == 2 ? 'active' : ''"
          @click="type = 2"
          >学生问答表现</span
        >
        <span
          class="tab-item"
          :class="type == 3 ? 'active' : ''"
          @click="type = 3"
          >学生互动表现</span
        >
        <span
          class="tab-item"
          :class="type == 4 ? 'active' : ''"
          @click="type = 4"
          >签到明细</span
        >
      </div>
      <ul class="info">
        <li class="info-item">科目:语文</li>
        <li class="info-item">课时:课时1</li>
        <li class="info-item">上课时间:2022-11-9 21:30</li>
        <li class="info-item">下课时间:2022-11-9 21:30</li>
        <li class="info-item">签到人数:45</li>
        <li class="info-item">题目总数:8</li>
        <li class="info-item">答题总数:8</li>
        <li class="info-item">课时时长:45分钟</li>
        <li class="info-item">总参与度::80%</li>
        <li class="info-item">班级总正确率:82%</li>
        <li class="info-item">已答总正确率:89%</li>
        <li class="info-item">反馈时长:15分钟</li>
      </ul>
      <el-table
        :data="tableData"
        border
        style="width: 100%"
        :default-sort="{ prop: 'dadui', order: 'descending' }"
      >
        <el-table-column
          prop="questionIndex"
          label="题号"
          align="center"
        ><template slot-scope="scoped">Q{{scoped.row.questionIndex}}</template></el-table-column>
        <el-table-column
          prop="questionType"
          label="题型"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="dati"
          label="答题人数"
          sortable
          align="center"
        ></el-table-column>
        <el-table-column
          prop="dadui"
          label="答对人数"
          sortable
          align="center"
        ></el-table-column>
        <el-table-column
          prop="canyu"
          label="班级参与度"
          sortable
          align="center"
        ><template slot-scope="scoped">{{scoped.row.canyu}}%</template></el-table-column>
        <el-table-column
          prop="banjidadui"
          label="班级正确率"
          sortable
          align="center"
        ><template slot-scope="scoped">{{scoped.row.banjidadui}}%</template></el-table-column>
        <el-table-column
          prop="yida"
          label="已答正确率"
          sortable
          align="center"
        ><template slot-scope="scoped">{{scoped.row.yida}}%</template></el-table-column>
        <el-table-column
          prop="correctAnswer"
          label="正确答案"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="ganrao"
          label="干扰答案"
          align="center"
        ></el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      id: "",
      type: 1,
      tableData: [
        {
          questionIndex: 1,
          questionType: "单选题",
          dati: 5,
          dadui: 60,
          canyu: 50,
          banjidadui: 80,
          yida: 90,
          correctAnswer:"A",
          ganrao:"C"
        },
        {
          questionIndex: 2,
          questionType: "单选题",
          dati: 6,
          dadui: 80,
          canyu: 60,
          banjidadui: 90,
          yida: 100,
          correctAnswer:"B",
          ganrao:"D"
        },
      ],
    };
  },
  created() {
    this.id = this.$route.query.id;
    // this._QueryData()
  },
  methods: {
    async _QueryData() {
      let { data, info, status } = this.$request.quizDetail({
        id: this.id,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.page-content {
  padding: 20px 20px 0;
}
.tab-box {
  width: 800px;
  margin: 0 auto 12px;
  background: #f8f8f8;
  border-radius: 20px;
  display: flex;
  .tab-item {
    flex: 1;
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-size: 16px;
    color: #666;
    font-weight: 500;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    &.active {
      background: #667ffd;
      color: #fff;
    }
  }
}
.info {
  display: flex;
  flex-wrap: wrap;
  border-left: 1px solid #e2e2e2;
  border-top: 1px solid #e2e2e2;
  margin-bottom: 12px;
  .info-item {
    width: 25%;
    height: 50px;
    box-sizing: border-box;
    flex-shrink: 0;
    background: #f8f8f8;
    border-right: 1px solid #e2e2e2;
    border-bottom: 1px solid #e2e2e2;
    line-height: 50px;
    text-align: center;
  }
}
</style>