article.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. import {
  2. displayList,
  3. serialNumberTypeList,
  4. serialNumberPositionList,
  5. arrangeTypeList,
  6. switchOption,
  7. isEnable,
  8. pinyinPositionList
  9. } from '@/views/book/courseware/data/common';
  10. export { arrangeTypeList, switchOption, isEnable, pinyinPositionList };
  11. // 显示
  12. export const positionList = [
  13. {
  14. value: 'top',
  15. label: '上',
  16. },
  17. {
  18. value: 'bottom',
  19. label: '下',
  20. },
  21. ];
  22. export const wordShowList = [
  23. { value: 'true', label: '是' },
  24. { value: 'false', label: '否' },
  25. ];
  26. export const inforList = [
  27. { value: 'true', label: '有' },
  28. { value: 'false', label: '没有' },
  29. ];
  30. // 拼音位置
  31. export const pinyinPositionLists = [
  32. { value: 'front', label: '前面' },
  33. { value: 'back', label: '后面' },
  34. { value: 'top', label: '上面' },
  35. { value: 'bottom', label: '下面' },
  36. ];
  37. // 读音生成方式
  38. export const audioGenerationMethodList = [
  39. {
  40. value: 'upload',
  41. label: '上传',
  42. },
  43. {
  44. value: 'auto',
  45. label: '自动生成',
  46. },
  47. {
  48. value: 'record',
  49. label: '录音',
  50. },
  51. ];
  52. // 多语言显示方式
  53. export const multilingualList = [
  54. { value: 'para', label: '句/段落' },
  55. { value: 'all', label: '整篇' },
  56. ]
  57. export function getArticleProperty() {
  58. return {
  59. serial_number: 1,
  60. sn_type: serialNumberTypeList[0].value,
  61. sn_position: serialNumberPositionList[3].value,
  62. sn_display_mode: displayList[0].value,
  63. mp3_position: positionList[0].value,
  64. is_enable_new_word: switchOption[0].value,
  65. is_enable_read: switchOption[0].value,
  66. is_enable_word: switchOption[0].value,
  67. view_pinyin: 'true',
  68. pinyin_position: pinyinPositionList[0].value,
  69. is_first_sentence_first_hz_pinyin_first_char_upper_case: 'true', // 句首大写
  70. multilingual_position: multilingualList[1].value,
  71. };
  72. }
  73. export function getArticleData() {
  74. return {
  75. type: 'article',
  76. title: '课文组件',
  77. property: getArticleProperty(),
  78. content: '', // 课文内容
  79. mp3_list: [], // 音频列表
  80. file_id_list: [], // 文件 id
  81. detail: [], // 分段分句分词详情
  82. wordTime: [], // 字幕时间
  83. new_word_list: {
  84. title_con: '',
  85. property: {
  86. audio_generation_method: audioGenerationMethodList[0].value,
  87. pinyin_position: pinyinPositionLists[0].value,
  88. auto_wrap: switchOption[0].value, // 自动换行
  89. is_has_infor: inforList[0].value,
  90. },
  91. new_word_list: [],
  92. lrc_arr: [], // lrc 文件解析后的数据
  93. // lrc 文件数据
  94. lrc_data: {
  95. name: '',
  96. url: '',
  97. id: '',
  98. file_id: '',
  99. },
  100. // 音频文件数据
  101. audio_data: {
  102. name: '',
  103. media_duration: 0,
  104. temporary_url: '',
  105. url: '',
  106. file_id: '',
  107. },
  108. wordTime: [], // 字幕时间节点
  109. taskId:'',
  110. file_id_list: [], // 文件 id
  111. col_width: [
  112. {
  113. value:100 // 生词
  114. },{
  115. value:110 // 拼音
  116. },{
  117. value:50 // 词性
  118. },{
  119. value:180 // 释义
  120. },{
  121. value:180 // 搭配
  122. },{
  123. value:200 // 例句
  124. }
  125. ], // 列宽
  126. multilingual: [], // 多语言
  127. }, // 生词列表
  128. other_word_list: {
  129. title_con: '',
  130. property: {
  131. audio_generation_method: audioGenerationMethodList[0].value,
  132. pinyin_position: pinyinPositionLists[0].value,
  133. auto_wrap: switchOption[0].value, // 自动换行
  134. is_has_infor: inforList[0].value,
  135. },
  136. new_word_list: [],
  137. lrc_arr: [], // lrc 文件解析后的数据
  138. // lrc 文件数据
  139. lrc_data: {
  140. name: '',
  141. url: '',
  142. id: '',
  143. file_id: '',
  144. },
  145. // 音频文件数据
  146. audio_data: {
  147. name: '',
  148. media_duration: 0,
  149. temporary_url: '',
  150. url: '',
  151. file_id: '',
  152. },
  153. wordTime: [], // 字幕时间节点
  154. taskId:'',
  155. file_id_list: [], // 文件 id
  156. col_width: [
  157. {
  158. value:125 // 生词
  159. },{
  160. value:125 // 拼音
  161. },{
  162. value:125 // 词性
  163. },{
  164. value:125 // 释义
  165. },{
  166. value:150 // 搭配
  167. },{
  168. value:300 // 例句
  169. }
  170. ], // 列宽
  171. multilingual: [], // 多语言
  172. },
  173. notes_list: {
  174. title_con: '',
  175. option: [],
  176. property:{},
  177. multilingual: [], // 多语言
  178. },
  179. sentence_list_mp: [], // 句子+分词数组
  180. pinyin_type:'pinyin',
  181. mind_map: {
  182. node_list: [
  183. { name: '课文组件' }
  184. ], // 思维导图数据
  185. },
  186. multilingual: [], // 多语言
  187. };
  188. }