read.js 1.2 KB

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