chinese.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import { optionTypeList, stemTypeList, scoreTypeList, questionNumberTypeList } from './common';
  2. import { getRandomNumber } from '@/utils/index';
  3. // 汉字类型列表
  4. export const learnTypeList = [
  5. { value: 'miao', label: '描红' },
  6. { value: 'write', label: '书写' },
  7. { value: 'learn', label: '笔画学习' },
  8. ];
  9. export function getOption(content = '') {
  10. return { content, mark: getRandomNumber() };
  11. }
  12. // 选择题数据模板
  13. export const chineseData = {
  14. type: 'chinese', // 题型
  15. stem: '', // 题干
  16. option_number_show_mode: optionTypeList[0].value, // 选项类型
  17. description: '', // 描述
  18. content: '', // 题目
  19. answer: { select_list: [], score: 0, score_type: scoreTypeList[0].value }, // 答案
  20. // 题型属性
  21. property: {
  22. stem_type: stemTypeList[0].value, // 题干类型
  23. question_number: 1, // 题号
  24. is_enable_description: false, // 描述
  25. score: 1, // 分值
  26. score_type: scoreTypeList[0].value, // 分值类型
  27. learn_type: learnTypeList[0].value,
  28. },
  29. // 其他属性
  30. other: {
  31. question_number_type: questionNumberTypeList[0].value, // 题号类型
  32. },
  33. };