123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- import {
- displayList,
- serialNumberTypeList,
- serialNumberPositionList,
- switchOption,
- pinyinPositionList,
- } from '@/views/book/courseware/data/common';
- import { getRandomNumber } from '@/utils';
- export { switchOption };
- export const tableTypeList = [
- { value: 'short', label: '精简模式' },
- { value: 'normal', label: '常规模式' },
- ];
- export const fontFamilyList = [
- { value: '楷体,微软雅黑', label: '楷体' },
- { value: '黑体,微软雅黑', label: '黑体' },
- { value: '宋体,微软雅黑', label: '宋体' },
- { value: 'arial,helvetica,sans-serif', label: 'Arial' },
- { value: 'times new roman,times,serif', label: 'Times New Roman' },
- { value: 'League', label: '拼音' },
- ];
- // 填空方式
- export const fillTypeList = [
- { value: 'input', label: '输入' },
- { value: 'select', label: '选词' },
- { value: 'handwriting', label: '手写' },
- { value: 'voice', label: '语音' },
- ];
- export function getTableProperty() {
- return {
- serial_number: 1,
- sn_type: serialNumberTypeList[0].value,
- sn_position: serialNumberPositionList[3].value,
- sn_display_mode: displayList[0].value,
- height: 400,
- width: 600,
- row_count: 2,
- column_count: 3,
- auto_wrap: switchOption[0].value, // 自动换行
- fill_type: fillTypeList[0].value,
- first_line_color: '', // 首行颜色
- first_column_color: '', // 首列颜色
- border_color: '#e6e6e6', // 边框颜色
- decoration_color: '#e7b576', // 装饰颜色
- view_pinyin: 'false', // 显示拼音
- pinyin_position: pinyinPositionList[0].value, // top bottom
- is_first_sentence_first_hz_pinyin_first_char_upper_case: 'true', // 句首大写
- };
- }
- export function getOption() {
- return {
- content: '',
- mark: getRandomNumber(),
- model_essay:[]
- };
- }
- export function getAnswerOption () {
- return {
- answer: '',
- answer_list:[]
- };
- }
- export function getTableData() {
- return {
- type: 'table',
- title: '表格',
- option_list: Array.from({ length: 2 }, () => Array.from({ length: 3 }, getOption)),
- record_list: [],
- answer_list:Array.from({ length: 2 }, () => Array.from({ length: 3 }, getAnswerOption)),
- mode: tableTypeList[0].value,
- vocabulary: '', // 用于选词的词汇
- word_list: [], // 选词列表
- styles: {
- fontFamily: 'Arial',
- fontSize: '12pt',
- fontColor: '#1d2129',
- bgColor: '',
- isUnderline: false,
- isBold: false,
- isItalic: false,
- isStrikethrough: false,
- textAlign: ''
- },
- col_width: [
- {
- value:100
- },{
- value:100
- },{
- value:100
- }
- ], // 列宽
- property: getTableProperty(),
- has_identify: 'false', // 是否已识别
- paragraph_list: [],
- paragraph_list_parameter: {
- text: '',
- is_first_sentence_first_hz_pinyin_first_char_upper_case: 'true',
- pinyin_proofread_word_list: [],
- },
- mind_map: {
- node_list: [{ name: '表格' }],
- },
- multilingual: [], // 多语言
- };
- }
|