龚焕茏
2024-06-19 c20a16253461b9b9e8484d65e976fbf705748f6c
feat:示例数据
2个文件已修改
31 ■■■■ 已修改文件
src/store/modules/enumItem.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/answer/detail.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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":"智能训练试卷 - 1","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":"7.5","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