repeat.js 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. import { optionTypeList, stemTypeList, scoreTypeList, questionNumberTypeList } from './common';
  2. import { getRandomNumber } from '@/utils/index';
  3. export function getOption(content = '') {
  4. return { content, mark: getRandomNumber(), file_id_list: [] };
  5. }
  6. // 听后训练数据模板
  7. export const repeatData = {
  8. type: 'repeat', // 题型
  9. stem: '', // 题干
  10. option_number_show_mode: optionTypeList[0].value, // 选项类型
  11. description: '', // 描述
  12. option_list: [
  13. { content: '', mark: getRandomNumber(), file_id_list: [] },
  14. { content: '', mark: getRandomNumber(), file_id_list: [] },
  15. { content: '', mark: getRandomNumber(), file_id_list: [] },
  16. ], // 选项
  17. answer: { select_list: [], score: 0, score_type: scoreTypeList[0].value }, // 答案
  18. // 题型属性
  19. property: {
  20. stem_type: stemTypeList[0].value, // 题干类型
  21. question_number: 1, // 题号
  22. is_enable_description: false, // 描述
  23. score: 1, // 分值
  24. score_type: scoreTypeList[0].value, // 分值类型
  25. },
  26. // 其他属性
  27. other: {
  28. question_number_type: questionNumberTypeList[0].value, // 题号类型
  29. },
  30. };