fill.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import {
  2. displayList,
  3. serialNumberTypeList,
  4. serialNumberPositionList,
  5. arrangeTypeList,
  6. switchOption,
  7. } from '@/views/book/courseware/data/common';
  8. export { arrangeTypeList, switchOption };
  9. // 音频位置
  10. export const audioPositionList = [
  11. { value: 'front', label: '前' },
  12. { value: 'back', label: '后' },
  13. ];
  14. // 读音生成方式
  15. export const audioGenerationMethodList = [
  16. {
  17. value: 'upload',
  18. label: '上传',
  19. },
  20. {
  21. value: 'auto',
  22. label: '自动生成',
  23. },
  24. {
  25. value: 'record',
  26. label: '录音',
  27. },
  28. ];
  29. // 填空字体
  30. export const fillFontList = [
  31. { value: 'chinese', label: '中文', font: 'arial' },
  32. { value: 'english', label: '英文', font: 'arial' },
  33. { value: 'pinyin', label: '拼音', font: 'PINYIN-B' },
  34. ];
  35. export function getFillProperty() {
  36. return {
  37. serial_number: 1,
  38. sn_type: serialNumberTypeList[0].value,
  39. sn_position: serialNumberPositionList[0].value,
  40. sn_display_mode: displayList[0].value,
  41. arrange_type: arrangeTypeList[0].value,
  42. audio_position: audioPositionList[0].value,
  43. audio_generation_method: audioGenerationMethodList[0].value,
  44. fill_font: fillFontList[0].value,
  45. is_enable_voice_answer: switchOption[0].value,
  46. };
  47. }
  48. export function getFillData() {
  49. return {
  50. type: 'fill',
  51. title: '填空',
  52. property: getFillProperty(),
  53. content: '',
  54. audio_file_id: '',
  55. record_list: [],
  56. model_essay: [],
  57. answer: {
  58. answer_list: [],
  59. },
  60. };
  61. }