12345678910111213141516171819202122232425262728293031323334 |
- import { stemTypeList, scoreTypeList, questionNumberTypeList } from './common';
- import { getRandomNumber } from '@/utils/index';
- export function getOption(content = '') {
- return [
- { content, mark: getRandomNumber() },
- { content, mark: getRandomNumber() },
- { content, mark: getRandomNumber() },
- { content, mark: getRandomNumber() },
- ];
- }
- // 替换练习数据模板
- export const replaceAnswerData = {
- type: 'replace_answer', // 题型
- stem: '', // 题干
- description: '', // 描述
- option_list: [getOption(), getOption(), getOption(), getOption()], // 选项
- file_id_list: [], // 文件 id 列表
- answer: { score: 0, score_type: scoreTypeList[0].value }, // 答案
- // 题型属性
- property: {
- stem_type: stemTypeList[0].value, // 题干类型
- question_number: '1', // 题号
- is_enable_description: 'false', // 描述
- score: 1, // 分值
- score_type: scoreTypeList[0].value, // 分值类型
- row_count: 4,
- },
- // 其他属性
- other: {
- question_number_type: questionNumberTypeList[0].value, // 题号类型
- },
- };
|