fuliqi
2024-06-20 8c0f29a39e8328b80635e803400d2825e2516408
Merge remote-tracking branch 'origin/master'
8个文件已修改
84 ■■■■■ 已修改文件
src/router.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/enumItem.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/answer/detail.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/answer/info.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/answer/list.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/exam/MarkPaper.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/exam/MarkPaperDetail.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/question/edit/audio.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router.js
@@ -52,6 +52,13 @@
        name: 'MarkPaper',
        meta: { title: '阅卷'},
        hidden: true
      },
      {
        path: '/exam/mark/paper/detail',
        component: () => import('@/views/exam/exam/MarkPaperDetail'),
        name: 'MarkPaperDetail',
        meta: { title: '阅卷'},
        hidden: true
      }
    ]
  },
src/store/modules/enumItem.js
@@ -4,8 +4,8 @@
    sexEnum: [{ key: 1, value: '男' }, { key: 2, value: '女' }],
    statusEnum: [{ key: 1, value: '启用' }, { key: 2, value: '禁用' }],
    levelEnum: [{ key: 1, value: '一年级' }, { key: 2, value: '二年级' }, { key: 3, value: '三年级' }, { key: 4, value: '四年级' }, { key: 5, value: '五年级' }, { key: 6, value: '六年级' },
      { key: 7, value: '初一' }, { key: 8, value: '初二' }, { key: 9, value: '初三' },
      { key: 10, value: '高一' }, { key: 11, value: '高二' }, { key: 12, value: '高三' }],
    { key: 7, value: '初一' }, { key: 8, value: '初二' }, { key: 9, value: '初三' },
    { key: 10, value: '高一' }, { key: 11, value: '高二' }, { key: 12, value: '高三' }],
    roleEnum: [{ key: 1, value: '学生' }, { key: 2, value: '教师' }, { key: 3, value: '管理员' }],
    statusTag: [{ key: 1, value: 'success' }, { key: 2, value: 'danger' }],
    statusBtn: [{ key: 1, value: '禁用' }, { key: 2, value: '启用' }]
@@ -17,13 +17,18 @@
    question: {
      typeEnum: [{ key: 1, value: '单选题' }, { key: 2, value: '多选题' }, { key: 3, value: '判断题' }, { key: 4, value: '填空题' }, { key: 5, value: '简答题' }, { key: 6, value: '语音题' }, { key: 7, value: '计算题' }, { key: 8, value: '分析题' }],
      editUrlEnum: [{ key: 1, value: '/exam/question/edit/singleChoice', name: '单选题' },
        { key: 2, value: '/exam/question/edit/multipleChoice', name: '多选题' },
        { key: 3, value: '/exam/question/edit/trueFalse', name: '判断题' },
        { key: 4, value: '/exam/question/edit/gapFilling', name: '填空题' },
        { key: 5, value: '/exam/question/edit/shortAnswer', name: '简答题' },
        { key: 6, value: '/exam/question/edit/audio', name: '语音题' },
        { key: 7, value: '/exam/question/edit/calculate', name: '计算题' },
        { key: 8, value: '/exam/question/edit/analysis', name: '分析题' }]
      { key: 2, value: '/exam/question/edit/multipleChoice', name: '多选题' },
      { key: 3, value: '/exam/question/edit/trueFalse', name: '判断题' },
      { key: 4, value: '/exam/question/edit/gapFilling', name: '填空题' },
      { key: 5, value: '/exam/question/edit/shortAnswer', name: '简答题' },
      { key: 6, value: '/exam/question/edit/audio', name: '语音题' },
      { key: 7, value: '/exam/question/edit/calculate', name: '计算题' },
      { key: 8, value: '/exam/question/edit/analysis', name: '分析题' }],
      answer: {
        doRightTag: [{ key: true, value: 'success' }, { key: false, value: 'danger' }, { key: null, value: 'warning' }],
        doRightEnum: [{ key: true, value: '正确' }, { key: false, value: '错误' }, { key: null, value: '待批改' }],
        doCompletedTag: [{ key: false, value: 'info' }, { key: true, value: 'success' }]
      }
    }
  }
}
src/views/answer/detail.vue
@@ -8,13 +8,6 @@
                </span>
            </el-col>
        </el-row>
        <el-row class="do-exam-title-hidden">
            <el-col :span="24">
                <span :key="item.itemOrder" v-for="item in answer.answerItems">
                    <el-tag class="do-exam-title-tag">{{ item.itemOrder }}</el-tag>
                </span>
            </el-col>
        </el-row>
        <el-container class="app-item-contain">
            <el-header class="align-center">
                <h1>{{ form.name }}</h1>
@@ -67,6 +60,7 @@
        if (id && parseInt(id) !== 0) {
            _this.formLoading = true
            examPaperAnswerApi.read(id).then(re => {
                re = {"code":1,"message":"成功","data":{"paper":{"id":30,"level":1,"subjectId":4,"paperType":7,"name":"这是一个测试试卷","suggestTime":12,"limitDateTime":null,"titleItems":[{"name":"单选题","questionItems":[{"id":25,"questionType":1,"subjectId":4,"title":"中华四大名著都有哪些,下列正确的是","gradeLevel":1,"items":[{"prefix":"A","content":"红楼梦","score":null,"itemUuid":null},{"prefix":"B","content":"白楼梦","score":null,"itemUuid":null},{"prefix":"C","content":"青楼梦","score":null,"itemUuid":null},{"prefix":"D","content":"绿楼梦","score":null,"itemUuid":null}],"analyze":"题目比较简单,自行分析","correctArray":null,"correct":"A","score":"2.5","difficult":3,"itemOrder":1,"knowledgeIdList":[8,9]},{"id":30,"questionType":1,"subjectId":4,"title":"中华四大名著都有哪些,下列正确的是","gradeLevel":1,"items":[{"prefix":"A","content":"红楼梦","score":null,"itemUuid":null},{"prefix":"B","content":"白楼梦","score":null,"itemUuid":null},{"prefix":"C","content":"青楼梦","score":null,"itemUuid":null},{"prefix":"D","content":"绿楼梦","score":null,"itemUuid":null}],"analyze":"题目比较简单,自行分析","correctArray":null,"correct":"A","score":"2.5","difficult":3,"itemOrder":2,"knowledgeIdList":[8,9]}]},{"name":"多选题","questionItems":[{"id":26,"questionType":2,"subjectId":4,"title":"中华四大名著都有哪些,下列正确的是","gradeLevel":1,"items":[{"prefix":"A","content":"红楼梦","score":null,"itemUuid":null},{"prefix":"B","content":"白楼梦","score":null,"itemUuid":null},{"prefix":"C","content":"青楼梦","score":null,"itemUuid":null},{"prefix":"D","content":"绿楼梦","score":null,"itemUuid":null}],"analyze":"题目比较简单,自行分析","correctArray":["A","C"],"correct":"A,C","score":"2.5","difficult":3,"itemOrder":3,"knowledgeIdList":[8,9]},{"id":31,"questionType":2,"subjectId":4,"title":"中华四大名著都有哪些,下列正确的是","gradeLevel":1,"items":[{"prefix":"A","content":"红楼梦","score":null,"itemUuid":null},{"prefix":"B","content":"白楼梦","score":null,"itemUuid":null},{"prefix":"C","content":"青楼梦","score":null,"itemUuid":null},{"prefix":"D","content":"绿楼梦","score":null,"itemUuid":null}],"analyze":"题目比较简单,自行分析","correctArray":["A","C"],"correct":"A,C","score":"2.5","difficult":3,"itemOrder":4,"knowledgeIdList":[8,9]}]},{"name":"判断题","questionItems":[{"id":27,"questionType":3,"subjectId":4,"title":"中华四大名著都有哪些,下列说明正确吗","gradeLevel":1,"items":[{"prefix":"A","content":"正确","score":null,"itemUuid":null},{"prefix":"B","content":"错误","score":null,"itemUuid":null}],"analyze":"题目比较简单,自行分析","correctArray":null,"correct":"A","score":"2.5","difficult":3,"itemOrder":5,"knowledgeIdList":[8,9]},{"id":32,"questionType":3,"subjectId":4,"title":"中华四大名著都有哪些,下列说明正确吗","gradeLevel":1,"items":[{"prefix":"A","content":"正确","score":null,"itemUuid":null},{"prefix":"B","content":"错误","score":null,"itemUuid":null}],"analyze":"题目比较简单,自行分析","correctArray":null,"correct":"A","score":"2.5","difficult":3,"itemOrder":6,"knowledgeIdList":[8,9]}]}],"score":"15","classes":null},"answer":{"id":9,"doTime":26,"score":"100","createUser":null,"answerItems":[{"id":25,"questionId":25,"doRight":true,"content":"A","itemOrder":1,"contentArray":null,"score":"2.5","questionScore":"2.5"},{"id":26,"questionId":30,"doRight":false,"content":"C","itemOrder":2,"contentArray":null,"score":"0","questionScore":"2.5"},{"id":27,"questionId":26,"doRight":false,"content":"","itemOrder":3,"contentArray":[""],"score":"0","questionScore":"2.5"},{"id":28,"questionId":31,"doRight":false,"content":"C,D","itemOrder":4,"contentArray":["C","D"],"score":"0","questionScore":"2.5"},{"id":29,"questionId":27,"doRight":true,"content":"A","itemOrder":5,"contentArray":null,"score":"2.5","questionScore":"2.5"},{"id":30,"questionId":32,"doRight":true,"content":"A","itemOrder":6,"contentArray":null,"score":"2.5","questionScore":"2.5"}],"doTimeStr":"26秒"}}}
                _this.form = re.data.paper
                _this.answer = re.data.answer
                _this.formLoading = false
src/views/answer/info.vue
@@ -21,7 +21,7 @@
          <!-- 表格 -->
          <el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row>
            <el-table-column prop="paperName" label="试卷名称" align="center" />
            <el-table-column prop="userName" label="用户名称" align="center" />
            <el-table-column prop="userName" label="参考人" align="center" />
            <el-table-column label="得分" width="100px">
              <template slot-scope="{row}">
                {{ row.userScore }} / {{ row.paperScore }}
src/views/answer/list.vue
@@ -36,7 +36,7 @@
          <span>{{ row.personAnswerNum + "/" + row.personTotalNum }}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" prop="userName" label="创建人" width="100px" />
      <el-table-column align="center" prop="userName" label="发起人" width="100px" />
      <el-table-column label="操作" align="center">
        <template slot-scope="{row}">
          <el-button size="mini" @click="view(row)">查看</el-button>
src/views/exam/exam/MarkPaper.vue
@@ -82,7 +82,7 @@
        width="300px"
      >
        <template slot-scope="scope">
          <el-button @click="markPaper(scope.row)" type="warning">阅卷</el-button>
          <el-button @click="markPaper(scope.row.userId)" type="warning">阅卷</el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -124,8 +124,9 @@
        return '未完成'
      }
    },
    markPaper (row) {
    markPaper (userId) {
      // todo打开阅卷页面
      this.$router.push({path: "/exam/mark/paper/detail", query: {examId: this.examInfo.examId, examName: this.examInfo.examName, userId: userId}})
    },
    getExamInfo () {
      getExamMarkPaperInfo(this.examInfo.examId).then(res => {
src/views/exam/exam/MarkPaperDetail.vue
@@ -1,10 +1,19 @@
<template>
  <div>
    <el-row style="text-align: center">xxx考试</el-row>
    <el-row>
      <div>xxx姓名</div>
      <div>xxx交卷时间</div>
      <div>xxx答题时间</div>
    <el-row style="text-align: center;margin-top: 20px;margin-bottom: 20px; font-size: 28px">xxx考试</el-row>
    <el-row :gutter="20">
      <el-col :span="8" class="info">
        <span class="exam-info">学员姓名:</span>
        <span class="exam-info">{{userName}}</span>
      </el-col>
      <el-col :span="8" class="info">
        <span class="exam-info">交卷时间:</span>
        <span class="exam-info">{{examInfo.updateTime}}</span>
      </el-col>
      <el-col :span="8" class="info">
        <span class="exam-info">完成耗时:</span>
        <span class="exam-info">{{examInfo.doTime}}</span>
      </el-col>
    </el-row>
    <el-row class="paper-warp">
      <div v-for="(paper,index) in examInfo.paperQuestionList" :key="index" class="paperTitleWarp">
@@ -36,19 +45,24 @@
  },
  data () {
    return {
      paperQuestionList: [
      ],
      userId: null,
      userName: null,
      questionLoading: false,
      examInfo: {
        examId: null,
        examName: '',
        doTime: 0,
        updateTime: null,
        paperQuestionList: []
      }
    }
  },
  methods: {
    getStudentPaper () {
      this.getStudentExam(this.examInfo.examId, this.userId).then(res => {
      getStudentExam(this.examInfo.examId, this.userId).then(res => {
        this.examInfo = res.data.data
      })
    }
@@ -61,4 +75,13 @@
  margin-top: 50px;
}
.exam-info {
}
.info {
  display: flex;
  flex-direction: row;
  justify-content: center;
}
</style>
src/views/exam/question/edit/audio.vue
@@ -14,7 +14,7 @@
          :on-remove="handleRemove" :file-list="audioList">
          <el-button size="small" type="primary">点击上传</el-button>
          <el-button v-if="form.audioFile" size="small" type="primary" @click.stop="audioPlay(form.audioFile)">{{
      audioInstance ? '暂停' : '试听' }}</el-button>
      audioInstance ? '停止' : '播放' }}</el-button>
        </el-upload>
      </el-form-item>
      <el-form-item label="选项:" required>