123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- import {
- displayList,
- serialNumberTypeList,
- serialNumberPositionList,
- arrangeTypeList,
- switchOption,
- isEnable,
- } from '@/views/book/courseware/data/common';
- export { arrangeTypeList, switchOption, isEnable };
- export const wordShowList = [
- { value: 'true', label: '是' },
- { value: 'false', label: '否' },
- ];
- export const inforList = [
- { value: 'true', label: '有' },
- { value: 'false', label: '没有' },
- ];
- // 拼音位置
- export const pinyinPositionList = [
- { value: 'front', label: '前面' },
- { value: 'back', label: '后面' },
- { value: 'top', label: '上面' },
- { value: 'bottom', label: '下面' },
- ];
- // 读音生成方式
- export const audioGenerationMethodList = [
- {
- value: 'upload',
- label: '上传',
- },
- {
- value: 'auto',
- label: '自动生成',
- },
- {
- value: 'record',
- label: '录音',
- },
- ];
- export function getOption() {
- return {
- number: '',
- new_word: '',
- cixing: '', // 词性
- definition_list: '', // 释义
- pinyin: '',
- mp3_list: '',
- collocation: '', // 搭配
- liju_list: '', // 例句
- file_list: [''], // 图片
- header_con: '', // 页眉
- label: '', // 标签
- hz_info: [],
- };
- }
- export function getNewWordProperty() {
- return {
- serial_number: 1,
- sn_type: serialNumberTypeList[0].value,
- sn_position: serialNumberPositionList[3].value,
- sn_display_mode: displayList[0].value,
- audio_generation_method: audioGenerationMethodList[0].value,
- pinyin_position: pinyinPositionList[0].value,
- is_word_show: wordShowList[1].value,
- is_has_infor: inforList[0].value,
- };
- }
- export function getNewWordData() {
- return {
- type: 'new_word',
- title: '生词组件',
- property: getNewWordProperty(),
- title_con: '',
- new_word_list: [getOption()],
- lrc_arr: [], // lrc 文件解析后的数据
- // lrc 文件数据
- lrc_data: {
- name: '',
- url: '',
- id: '',
- file_id: '',
- },
- // 音频文件数据
- audio_data: {
- name: '',
- media_duration: 0,
- temporary_url: '',
- url: '',
- file_id: '',
- },
- mind_map: {
- node_list: [
- { name: '生词组件' }
- ], // 思维导图数据
- },
- answer: {
- answer_list: [],
- },
- };
- }
|