1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- import {
- displayList,
- serialNumberTypeList,
- serialNumberPositionList,
- switchOption,
- } from '@/views/book/courseware/data/common';
- import { getRandomNumber } from '@/utils';
- export { switchOption };
- export const alignTypeList = [
- { value: 'left', label: '左对齐' },
- { value: 'center', label: '居中对齐' },
- { value: 'right', label: '右对齐' },
- { value: 'justify', label: '两端对齐' },
- ];
- export function getVoiceMatrixProperty() {
- return {
- serial_number: 1,
- sn_type: serialNumberTypeList[0].value,
- sn_position: serialNumberPositionList[3].value,
- sn_display_mode: displayList[0].value,
- align: alignTypeList[0].value, // 对齐方式
- is_enable_row_play: switchOption[0].value, // 是否开启行播放
- is_enable_column_play: switchOption[0].value, // 是否开启列播放
- is_enable_record: switchOption[0].value, // 是否开启录音
- row_count: 2,
- column_count: 5,
- };
- }
- export function getOption() {
- return {
- content: '',
- mark: getRandomNumber(),
- lrc_data: {
- begin_time: 0,
- end_time: 0,
- text: '',
- },
- multilingual: [], // 多语言
- };
- }
- export function getVoiceMatrixData() {
- return {
- type: 'voice_matrix',
- title: '语音矩阵',
- lrc_arr: [], // lrc 文件解析后的数据
- // lrc 文件数据
- lrc_data: {
- name: '',
- url: '',
- id: '',
- file_id: '',
- },
- // 音频文件数据
- audio_data: {
- name: '',
- media_duration: 0,
- temporary_url: '',
- url: '',
- file_id: '',
- },
- option_list: Array.from({ length: 2 }, () => Array.from({ length: 5 }, getOption)),
- record_list: [],
- min_height: 100,
- min_width: 300,
- property: getVoiceMatrixProperty(),
- mind_map: {
- node_list: [{ name: '语音矩阵' }],
- },
- };
- }
|