writePicture.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import { stemTypeList, scoreTypeList, questionNumberTypeList, switchOption, fontSizeList } from './common';
  2. import { getRandomNumber } from '@/utils/index';
  3. export function getOption() {
  4. return {
  5. picture_title: '',
  6. picture_info: '',
  7. picture_file_id: '',
  8. mark: getRandomNumber(),
  9. };
  10. }
  11. // 看图写作数据模板
  12. export const writePictrueData = {
  13. type: 'write_picture', // 题型
  14. stem: '', // 题干
  15. description: '',
  16. sample_text: '',
  17. option_list: [], // 选项
  18. file_id_list: [],
  19. answer: { score: 1, score_type: scoreTypeList[0].value }, // 答案
  20. // 题型属性
  21. property: {
  22. stem_type: stemTypeList[1].value, // 题干类型
  23. question_number: '1', // 题号
  24. stem_question_number_font_size: fontSizeList[6], // 题干题号
  25. score: 1, // 分值
  26. is_enable_description: switchOption[1].value, // 描述
  27. score_type: scoreTypeList[0].value, // 分值类型
  28. word_num: 50, // 字数
  29. is_enable_sample_text: 'true', // 范文开启
  30. is_enable_upload_accessory: 'true', // 上传附件
  31. },
  32. // 其他属性
  33. other: {
  34. question_number_type: questionNumberTypeList[1].value, // 题号类型
  35. },
  36. };