yks-element 1.0.319 → 1.0.320
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* uploadRecording 录音
|
|
3
|
+
* uploadVideo 视频
|
|
4
|
+
* uploadAudio 音频
|
|
5
|
+
* uploadFile 文件
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const toolbar = [
|
|
9
|
+
'bold underline italic strikethrough | kityformula-editor subscript superscript charmap | link image | table | removeformat | uploadRecording uploadVideo uploadAudio uploadFile'
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
/* 选项、填空等 */
|
|
13
|
+
export const toolbarSpare = ['kityformula-editor subscript superscript charmap']
|
|
14
|
+
|
|
15
|
+
/* 插件 */
|
|
16
|
+
export const plugins = ['kityformula-editor powerpaste lists image media table charmap imagetools']
|
|
17
|
+
|
|
18
|
+
/* 选项字符 */
|
|
19
|
+
export const letter = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N']
|
|
20
|
+
|
|
21
|
+
/* 自定义添加菜单项(录音、上传视频、上传音乐、上传文件):题干 / 标题 - 类型 */
|
|
22
|
+
export const stemItemType = {
|
|
23
|
+
recording: 'stem_voiceRecord',
|
|
24
|
+
video: 'stem_video',
|
|
25
|
+
audio: 'stem_audio',
|
|
26
|
+
file: 'stem_document'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* 自定义添加菜单项(录音、上传视频、上传音乐、上传文件): 标准答案 - 类型 */
|
|
30
|
+
export const shortItemType = {
|
|
31
|
+
recording: 'answer_voiceRecord',
|
|
32
|
+
video: 'answer_video',
|
|
33
|
+
audio: 'answer_audio',
|
|
34
|
+
file: 'answer_document'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* 自定义添加菜单项(录音、上传视频、上传音乐、上传文件): 选项 - 类型 */
|
|
38
|
+
export const optionItemType = {
|
|
39
|
+
recording: 'option_voiceRecord',
|
|
40
|
+
video: 'option_video',
|
|
41
|
+
audio: 'option_audio',
|
|
42
|
+
file: 'option_document'
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* 自定义添加菜单项(录音、上传视频、上传音乐、上传文件): 答案解析 - 类型 */
|
|
46
|
+
export const analysisItemType = {
|
|
47
|
+
recording: 'description_voiceRecord',
|
|
48
|
+
video: 'description_video',
|
|
49
|
+
audio: 'description_audio',
|
|
50
|
+
file: 'description_document'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 获取题类型
|
|
55
|
+
* @param {string} type
|
|
56
|
+
* @return {Object}
|
|
57
|
+
*/
|
|
58
|
+
export const getFileType = (type, data) => {
|
|
59
|
+
if (data) {
|
|
60
|
+
let params = {}
|
|
61
|
+
switch (type) {
|
|
62
|
+
case 'stem':
|
|
63
|
+
params = {
|
|
64
|
+
stem_voiceRecord: 'recording',
|
|
65
|
+
stem_video: 'video',
|
|
66
|
+
stem_audio: 'audio',
|
|
67
|
+
stem_document: 'file'
|
|
68
|
+
}
|
|
69
|
+
break
|
|
70
|
+
case 'answer':
|
|
71
|
+
params = {
|
|
72
|
+
answer_voiceRecord: 'recording',
|
|
73
|
+
answer_video: 'video',
|
|
74
|
+
answer_audio: 'audio',
|
|
75
|
+
answer_document: 'file'
|
|
76
|
+
}
|
|
77
|
+
break
|
|
78
|
+
case 'option':
|
|
79
|
+
params = {
|
|
80
|
+
option_voiceRecord: 'recording',
|
|
81
|
+
option_video: 'video',
|
|
82
|
+
option_audio: 'audio',
|
|
83
|
+
option_document: 'file'
|
|
84
|
+
}
|
|
85
|
+
break
|
|
86
|
+
case 'analysis':
|
|
87
|
+
params = {
|
|
88
|
+
description_voiceRecord: 'recording',
|
|
89
|
+
description_video: 'video',
|
|
90
|
+
description_audio: 'audio',
|
|
91
|
+
description_document: 'file'
|
|
92
|
+
}
|
|
93
|
+
break
|
|
94
|
+
}
|
|
95
|
+
const fileType = params[data.type]
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
...data,
|
|
99
|
+
fileType
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return false
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export const itemDataLists = () => {
|
|
106
|
+
return [
|
|
107
|
+
{
|
|
108
|
+
optionName: 'A',
|
|
109
|
+
content: '',
|
|
110
|
+
optionAttrs: [],
|
|
111
|
+
score: ''
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
optionName: 'B',
|
|
115
|
+
content: '',
|
|
116
|
+
optionAttrs: [],
|
|
117
|
+
score: ''
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
optionName: 'C',
|
|
121
|
+
content: '',
|
|
122
|
+
optionAttrs: [],
|
|
123
|
+
score: ''
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
optionName: 'D',
|
|
127
|
+
content: '',
|
|
128
|
+
optionAttrs: [],
|
|
129
|
+
score: ''
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|