read.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import { stemTypeList, scoreTypeList, questionNumberTypeList, getExerciseTypeList, switchOption } from './common';
  2. // 题型类型选项
  3. export const questionTypeOption = [
  4. { label: '选择题', value: 'select' },
  5. { label: '判断题', value: 'judge' },
  6. { label: '填空题', value: 'fill' },
  7. { label: '连线题', value: 'matching' },
  8. { label: '简答题', value: 'short_answer' },
  9. ];
  10. // 题型类型列表
  11. export const exerciseTypeList = getExerciseTypeList(questionTypeOption);
  12. // 阅读题数据模板
  13. export const readData = {
  14. type: 'read', // 题型
  15. stem: '', // 题干
  16. description: '', // 描述
  17. article: '', // 文章
  18. answer: { score: 0, score_type: scoreTypeList[0].value }, // 答案
  19. question_list: [], // 题目列表
  20. file_id_list: [], // 文件 id 列表
  21. // 题型属性
  22. property: {
  23. stem_type: stemTypeList[0].value, // 题干类型
  24. question_number: '1', // 题号
  25. is_enable_description: switchOption[1].value, // 描述
  26. score: 1, // 分值
  27. score_type: scoreTypeList[0].value, // 分值类型
  28. },
  29. // 其他属性
  30. other: {
  31. question_number_type: questionNumberTypeList[0].value, // 题号类型
  32. },
  33. };