pinyinBase.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 funList = [
  31. {
  32. value: 'mark',
  33. label: '标声调',
  34. },
  35. {
  36. value: 'show',
  37. label: '拼音展示',
  38. },
  39. {
  40. value: 'input',
  41. label: '输入',
  42. },
  43. ]
  44. // 标声调类型
  45. export const markList = [
  46. {
  47. value: 'select',
  48. label: '选择声调',
  49. },
  50. {
  51. value: 'label',
  52. label: '标注声调',
  53. },
  54. ]
  55. export function getPinyinBaseProperty() {
  56. return {
  57. serial_number: 1,
  58. sn_type: serialNumberTypeList[0].value,
  59. sn_position: serialNumberPositionList[0].value,
  60. sn_display_mode: displayList[0].value,
  61. arrange_type: arrangeTypeList[0].value,
  62. audio_position: audioPositionList[0].value,
  63. audio_generation_method: audioGenerationMethodList[0].value,
  64. is_enable_voice_answer: switchOption[0].value,
  65. fun_type: 'mark',
  66. mark_type: 'select',
  67. };
  68. }
  69. export function getPinyinBaseData() {
  70. return {
  71. type: 'pinyin_base',
  72. title: '拼音',
  73. property: getPinyinBaseProperty(),
  74. content: '',
  75. audio_file_id: '',
  76. model_essay: [],
  77. answer: {
  78. answer_list: [],
  79. },
  80. };
  81. }