zydx-plus 1.14.56 → 1.15.57
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 +3 -2
- package/src/components/biz_header/src/bizHeader.vue +37 -7
- package/src/components/biz_header/src/button_name.js +439 -58
- package/src/components/editor2/index.js +6 -0
- package/src/components/editor2/src/editor.vue +154 -0
- package/src/components/switch/src/switch.vue +6 -2
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zydx-plus",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.57",
|
|
4
4
|
"description": "Vue.js",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"snabbdom": "^3.5.1",
|
|
29
29
|
"@wangeditor/plugin-formula": "^1.0.11",
|
|
30
30
|
"katex": "^0.15.6",
|
|
31
|
-
"simple-mind-map": "^0.5.8"
|
|
31
|
+
"simple-mind-map": "^0.5.8",
|
|
32
|
+
"html2json": "^1.0.2"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
35
|
"vue": "^3.2.13"
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
tabType: 0班级 2 个人
|
|
9
9
|
selectBtnIndex: 选中按钮标识
|
|
10
10
|
catalogList: 目录集合。 需要带 children
|
|
11
|
+
headerType: 0动作或者1资源或者2学生端
|
|
11
12
|
* @回调事件:clickRightBtn: 按钮点击事件 回参有 选中节点,选中标识,当前点击节点结合
|
|
12
13
|
* @组件内方法:
|
|
13
14
|
*/
|
|
@@ -17,13 +18,30 @@
|
|
|
17
18
|
<zydx-topic-dry>
|
|
18
19
|
<template v-slot:title_slot><span class="fontSize16">{{item.name}}</span></template>
|
|
19
20
|
<template v-slot:button_slot v-show="isShowBtn">
|
|
20
|
-
<template v-for="(buttonInfo, buttonIndex) in initConfig(item)
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
<template v-for="(buttonInfo, buttonIndex) in initConfig(item).buttonList[tabType]">
|
|
22
|
+
<template v-if="buttonInfo instanceof Object">
|
|
23
|
+
<!-- 我是在课级节点上渲染的 -->
|
|
24
|
+
<button class="z-button" :class="childButtonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active' : ''" v-if="item.level === 0 && (buttonIndex === 'prefixLevel0btn' || buttonIndex === 'suffixLevel0btn')" v-for="(childButtonInfo, childButtonIndex) in buttonInfo" @click="clickRightBtn(item, childButtonIndex)">
|
|
25
|
+
{{childButtonInfo}}
|
|
26
|
+
</button>
|
|
27
|
+
<!-- 我是在最低节点渲染的 -->
|
|
28
|
+
<button class="z-button" :class="childButtonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active' : ''" v-if="item.level !== 0 && item.children && item.children.length !== 0 && buttonIndex === 'otherThanLevel0'" v-for="(childButtonInfo, childButtonIndex) in buttonInfo" @click="clickRightBtn(item, childButtonIndex)">
|
|
29
|
+
{{childButtonInfo}}
|
|
30
|
+
</button>
|
|
31
|
+
<!-- 除课级标题以外的 -->
|
|
32
|
+
<button class="z-button" :class="childButtonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active' : ''" v-if="item.level !== 0 && buttonIndex === 'levelOtherBtn'" v-for="(childButtonInfo, childButtonIndex) in buttonInfo" @click="clickRightBtn(item, childButtonIndex)">
|
|
33
|
+
{{childButtonInfo}}
|
|
34
|
+
</button>
|
|
35
|
+
<!-- 单独在最低节点设置的按钮 -->
|
|
36
|
+
<button class="z-button" :class="childButtonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active' : ''" v-if="item.level !== 0 && (!item.children || item.children.length === 0) && buttonIndex === 'lowLevel'" v-for="(childButtonInfo, childButtonIndex) in buttonInfo" @click="clickRightBtn(item, childButtonIndex)">
|
|
37
|
+
{{childButtonInfo}}
|
|
38
|
+
</button>
|
|
39
|
+
</template>
|
|
40
|
+
<template v-else-if="buttonInfo != null && buttonInfo.constructor === String">
|
|
41
|
+
<button class="z-button" :class="buttonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active' : ''" v-if="buttonIndex !== 'level0btn' && buttonInfo != null" @click="clickRightBtn(item, buttonIndex)">
|
|
42
|
+
{{buttonInfo}}
|
|
43
|
+
</button>
|
|
44
|
+
</template>
|
|
27
45
|
</template>
|
|
28
46
|
</template>
|
|
29
47
|
</zydx-topic-dry>
|
|
@@ -64,11 +82,17 @@ export default {
|
|
|
64
82
|
type: Boolean,
|
|
65
83
|
default: false
|
|
66
84
|
},
|
|
85
|
+
// 目录树集合
|
|
67
86
|
catalogList: {
|
|
68
87
|
type: Array,
|
|
69
88
|
default: function () {
|
|
70
89
|
return []
|
|
71
90
|
}
|
|
91
|
+
},
|
|
92
|
+
// 0动作或者1资源或者2学生端
|
|
93
|
+
headerType: {
|
|
94
|
+
type: Number,
|
|
95
|
+
default: 0
|
|
72
96
|
}
|
|
73
97
|
},
|
|
74
98
|
data() {
|
|
@@ -96,6 +120,12 @@ export default {
|
|
|
96
120
|
this.selectNode(this.selectItem)
|
|
97
121
|
},
|
|
98
122
|
watch: {
|
|
123
|
+
actionId: {
|
|
124
|
+
deep: true,
|
|
125
|
+
handler: function (val) {
|
|
126
|
+
this.selectNode(this.selectItem)
|
|
127
|
+
}
|
|
128
|
+
},
|
|
99
129
|
selectItem: {
|
|
100
130
|
deep: true,
|
|
101
131
|
handler: function (val) {
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
let buttonNames = {
|
|
2
|
-
data () {
|
|
3
|
-
return {
|
|
4
|
-
}
|
|
5
|
-
},
|
|
6
2
|
methods: {
|
|
7
3
|
initConfig (item) {
|
|
8
|
-
|
|
4
|
+
if (this.headerType === 0) { // 资源
|
|
5
|
+
return this.resourceButtonList(item);
|
|
6
|
+
} else if (this.headerType === 1) { // 动作
|
|
7
|
+
return this.actionButtonList(item);
|
|
8
|
+
} else if (this.headerType === 2) { // 学生 未定
|
|
9
|
+
return {};
|
|
10
|
+
} else {
|
|
11
|
+
return {};
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
actionButtonList (item) {
|
|
15
|
+
return {
|
|
9
16
|
action_checktime: {
|
|
10
17
|
actionName: '考勤管理',
|
|
11
18
|
buttonList: {
|
|
12
19
|
0: {
|
|
13
|
-
|
|
20
|
+
prefixLevel0btn: {
|
|
14
21
|
demand: '考勤要求'
|
|
15
22
|
},
|
|
16
23
|
btnIndex1: this.getCurrentPrefix(item) + '考勤',
|
|
@@ -20,7 +27,7 @@ let buttonNames = {
|
|
|
20
27
|
power: '学习动力'
|
|
21
28
|
},
|
|
22
29
|
2: {
|
|
23
|
-
|
|
30
|
+
prefixLevel0btn: {
|
|
24
31
|
demand: null
|
|
25
32
|
},
|
|
26
33
|
btnIndex1: '考勤情况',
|
|
@@ -35,7 +42,7 @@ let buttonNames = {
|
|
|
35
42
|
actionName: '学习调查',
|
|
36
43
|
buttonList: {
|
|
37
44
|
0: {
|
|
38
|
-
|
|
45
|
+
prefixLevel0btn: {
|
|
39
46
|
demand: '调查要求'
|
|
40
47
|
},
|
|
41
48
|
btnIndex1: this.getCurrentPrefix(item) + '试题',
|
|
@@ -45,7 +52,7 @@ let buttonNames = {
|
|
|
45
52
|
power: null
|
|
46
53
|
},
|
|
47
54
|
2: {
|
|
48
|
-
|
|
55
|
+
prefixLevel0btn: {
|
|
49
56
|
demand: null
|
|
50
57
|
},
|
|
51
58
|
btnIndex1: this.getCurrentPrefix(item) + '调查',
|
|
@@ -60,17 +67,18 @@ let buttonNames = {
|
|
|
60
67
|
actionName: '学习检测',
|
|
61
68
|
buttonList: {
|
|
62
69
|
0: {
|
|
63
|
-
|
|
70
|
+
prefixLevel0btn: {
|
|
64
71
|
demand: '检测要求'
|
|
65
72
|
},
|
|
66
73
|
btnIndex1: this.getCurrentPrefix(item) + '试题',
|
|
67
74
|
btnIndex2: this.getCurrentPrefix(item) + '检测',
|
|
75
|
+
aa: null,
|
|
68
76
|
score: '检测成绩',
|
|
69
77
|
analysis: '统计分析',
|
|
70
78
|
power: '学习动力'
|
|
71
79
|
},
|
|
72
80
|
2: {
|
|
73
|
-
|
|
81
|
+
prefixLevel0btn: {
|
|
74
82
|
demand: null
|
|
75
83
|
},
|
|
76
84
|
btnIndex1: this.getCurrentPrefix(item) + '检测',
|
|
@@ -85,7 +93,7 @@ let buttonNames = {
|
|
|
85
93
|
actionName: '课程思政',
|
|
86
94
|
buttonList: {
|
|
87
95
|
0: {
|
|
88
|
-
|
|
96
|
+
prefixLevel0btn: {
|
|
89
97
|
demand: '思政要求'
|
|
90
98
|
},
|
|
91
99
|
btnIndex1: this.getCurrentPrefix(item) + '主题',
|
|
@@ -95,7 +103,7 @@ let buttonNames = {
|
|
|
95
103
|
power: '学习动力'
|
|
96
104
|
},
|
|
97
105
|
2: {
|
|
98
|
-
|
|
106
|
+
prefixLevel0btn: {
|
|
99
107
|
demand: null
|
|
100
108
|
},
|
|
101
109
|
btnIndex1: '项目操作',
|
|
@@ -110,7 +118,7 @@ let buttonNames = {
|
|
|
110
118
|
actionName: '课程笔记',
|
|
111
119
|
buttonList: {
|
|
112
120
|
0: {
|
|
113
|
-
|
|
121
|
+
prefixLevel0btn: {
|
|
114
122
|
demand: '笔记要求'
|
|
115
123
|
},
|
|
116
124
|
btnIndex1: this.getCurrentPrefix(item) + "笔记",
|
|
@@ -120,7 +128,7 @@ let buttonNames = {
|
|
|
120
128
|
power: '学习动力'
|
|
121
129
|
},
|
|
122
130
|
2: {
|
|
123
|
-
|
|
131
|
+
prefixLevel0btn: {
|
|
124
132
|
demand: null,
|
|
125
133
|
},
|
|
126
134
|
btnIndex1: null,
|
|
@@ -135,7 +143,7 @@ let buttonNames = {
|
|
|
135
143
|
actionName: '教师提问',
|
|
136
144
|
buttonList: {
|
|
137
145
|
0: {
|
|
138
|
-
|
|
146
|
+
prefixLevel0btn: {
|
|
139
147
|
demand: '回答要求'
|
|
140
148
|
},
|
|
141
149
|
btnIndex1: this.getPrefix(item) + '问题',
|
|
@@ -145,7 +153,7 @@ let buttonNames = {
|
|
|
145
153
|
power: '学习动力'
|
|
146
154
|
},
|
|
147
155
|
2: {
|
|
148
|
-
|
|
156
|
+
prefixLevel0btn: {
|
|
149
157
|
demand: null,
|
|
150
158
|
},
|
|
151
159
|
btnIndex1: null,
|
|
@@ -160,7 +168,7 @@ let buttonNames = {
|
|
|
160
168
|
actionName: '教师答疑',
|
|
161
169
|
buttonList: {
|
|
162
170
|
0: {
|
|
163
|
-
|
|
171
|
+
prefixLevel0btn: {
|
|
164
172
|
demand: '提问要求'
|
|
165
173
|
},
|
|
166
174
|
btnIndex1: '虚拟提问',
|
|
@@ -170,7 +178,7 @@ let buttonNames = {
|
|
|
170
178
|
power: '学习动力'
|
|
171
179
|
},
|
|
172
180
|
2: {
|
|
173
|
-
|
|
181
|
+
prefixLevel0btn: {
|
|
174
182
|
demand: null,
|
|
175
183
|
},
|
|
176
184
|
btnIndex1: null,
|
|
@@ -185,7 +193,7 @@ let buttonNames = {
|
|
|
185
193
|
actionName: '生问生答',
|
|
186
194
|
buttonList: {
|
|
187
195
|
0: {
|
|
188
|
-
|
|
196
|
+
prefixLevel0btn: {
|
|
189
197
|
demand: '问答要求'
|
|
190
198
|
},
|
|
191
199
|
btnIndex1: this.getCurrentPrefix(item) + '问答',
|
|
@@ -195,7 +203,7 @@ let buttonNames = {
|
|
|
195
203
|
power: '学习动力'
|
|
196
204
|
},
|
|
197
205
|
2: {
|
|
198
|
-
|
|
206
|
+
prefixLevel0btn: {
|
|
199
207
|
demand: null,
|
|
200
208
|
},
|
|
201
209
|
btnIndex1: null,
|
|
@@ -210,7 +218,7 @@ let buttonNames = {
|
|
|
210
218
|
actionName: '学习讨论',
|
|
211
219
|
buttonList: {
|
|
212
220
|
0: {
|
|
213
|
-
|
|
221
|
+
prefixLevel0btn: {
|
|
214
222
|
demand: '讨论要求'
|
|
215
223
|
},
|
|
216
224
|
btnIndex1: this.getPrefix(item) + '题目',
|
|
@@ -220,7 +228,7 @@ let buttonNames = {
|
|
|
220
228
|
power: '学习动力'
|
|
221
229
|
},
|
|
222
230
|
2: {
|
|
223
|
-
|
|
231
|
+
prefixLevel0btn: {
|
|
224
232
|
demand: null,
|
|
225
233
|
},
|
|
226
234
|
btnIndex1: null,
|
|
@@ -235,7 +243,7 @@ let buttonNames = {
|
|
|
235
243
|
actionName: '头脑风暴',
|
|
236
244
|
buttonList: {
|
|
237
245
|
0: {
|
|
238
|
-
|
|
246
|
+
prefixLevel0btn: {
|
|
239
247
|
demand: '风暴要求'
|
|
240
248
|
},
|
|
241
249
|
btnIndex1: this.getPrefix(item) + '题目',
|
|
@@ -245,7 +253,7 @@ let buttonNames = {
|
|
|
245
253
|
power: '学习动力'
|
|
246
254
|
},
|
|
247
255
|
2: {
|
|
248
|
-
|
|
256
|
+
prefixLevel0btn: {
|
|
249
257
|
demand: null,
|
|
250
258
|
},
|
|
251
259
|
btnIndex1: null,
|
|
@@ -260,7 +268,7 @@ let buttonNames = {
|
|
|
260
268
|
actionName: '思维训练',
|
|
261
269
|
buttonList: {
|
|
262
270
|
0: {
|
|
263
|
-
|
|
271
|
+
prefixLevel0btn: {
|
|
264
272
|
demand: '训练要求'
|
|
265
273
|
},
|
|
266
274
|
btnIndex1: this.getCurrentPrefix(item) + '题目',
|
|
@@ -270,7 +278,7 @@ let buttonNames = {
|
|
|
270
278
|
power: '学习动力'
|
|
271
279
|
},
|
|
272
280
|
2: {
|
|
273
|
-
|
|
281
|
+
prefixLevel0btn: {
|
|
274
282
|
demand: null,
|
|
275
283
|
},
|
|
276
284
|
btnIndex1: null,
|
|
@@ -285,7 +293,7 @@ let buttonNames = {
|
|
|
285
293
|
actionName: '案例分析',
|
|
286
294
|
buttonList: {
|
|
287
295
|
0: {
|
|
288
|
-
|
|
296
|
+
prefixLevel0btn: {
|
|
289
297
|
demand: '分析要求'
|
|
290
298
|
},
|
|
291
299
|
btnIndex1: this.getPrefix(item) + '题目',
|
|
@@ -295,7 +303,7 @@ let buttonNames = {
|
|
|
295
303
|
power: '学习动力'
|
|
296
304
|
},
|
|
297
305
|
2: {
|
|
298
|
-
|
|
306
|
+
prefixLevel0btn: {
|
|
299
307
|
demand: null,
|
|
300
308
|
},
|
|
301
309
|
btnIndex1: null,
|
|
@@ -310,7 +318,7 @@ let buttonNames = {
|
|
|
310
318
|
actionName: '虚拟学习',
|
|
311
319
|
buttonList: {
|
|
312
320
|
0: {
|
|
313
|
-
|
|
321
|
+
prefixLevel0btn: {
|
|
314
322
|
demand: '学习要求'
|
|
315
323
|
},
|
|
316
324
|
btnIndex1: '虚仿项目',
|
|
@@ -320,7 +328,7 @@ let buttonNames = {
|
|
|
320
328
|
power: '学习动力'
|
|
321
329
|
},
|
|
322
330
|
2: {
|
|
323
|
-
|
|
331
|
+
prefixLevel0btn: {
|
|
324
332
|
demand: null,
|
|
325
333
|
},
|
|
326
334
|
btnIndex1: null,
|
|
@@ -335,7 +343,7 @@ let buttonNames = {
|
|
|
335
343
|
actionName: '讲给他人',
|
|
336
344
|
buttonList: {
|
|
337
345
|
0: {
|
|
338
|
-
|
|
346
|
+
prefixLevel0btn: {
|
|
339
347
|
demand: '讲解要求'
|
|
340
348
|
},
|
|
341
349
|
btnIndex1: this.getCurrentPrefix(item) + '讲解',
|
|
@@ -345,7 +353,7 @@ let buttonNames = {
|
|
|
345
353
|
power: '学习动力'
|
|
346
354
|
},
|
|
347
355
|
2: {
|
|
348
|
-
|
|
356
|
+
prefixLevel0btn: {
|
|
349
357
|
demand: null,
|
|
350
358
|
},
|
|
351
359
|
btnIndex1: null,
|
|
@@ -360,7 +368,7 @@ let buttonNames = {
|
|
|
360
368
|
actionName: '课后作业',
|
|
361
369
|
buttonList: {
|
|
362
370
|
0: {
|
|
363
|
-
|
|
371
|
+
prefixLevel0btn: {
|
|
364
372
|
demand: '作业要求'
|
|
365
373
|
},
|
|
366
374
|
btnIndex1: this.getPrefix(item) + '题目',
|
|
@@ -370,7 +378,7 @@ let buttonNames = {
|
|
|
370
378
|
power: '学习动力'
|
|
371
379
|
},
|
|
372
380
|
2: {
|
|
373
|
-
|
|
381
|
+
prefixLevel0btn: {
|
|
374
382
|
demand: null,
|
|
375
383
|
},
|
|
376
384
|
btnIndex1: null,
|
|
@@ -385,7 +393,7 @@ let buttonNames = {
|
|
|
385
393
|
actionName: '聆听报告',
|
|
386
394
|
buttonList: {
|
|
387
395
|
0: {
|
|
388
|
-
|
|
396
|
+
prefixLevel0btn: {
|
|
389
397
|
demand: '聆听要求'
|
|
390
398
|
},
|
|
391
399
|
btnIndex1: this.getPrefix(item) + '报告',
|
|
@@ -395,7 +403,7 @@ let buttonNames = {
|
|
|
395
403
|
power: '学习动力'
|
|
396
404
|
},
|
|
397
405
|
2: {
|
|
398
|
-
|
|
406
|
+
prefixLevel0btn: {
|
|
399
407
|
demand: null,
|
|
400
408
|
},
|
|
401
409
|
btnIndex1: null,
|
|
@@ -410,7 +418,7 @@ let buttonNames = {
|
|
|
410
418
|
actionName: '课业阅读',
|
|
411
419
|
buttonList: {
|
|
412
420
|
0: {
|
|
413
|
-
|
|
421
|
+
prefixLevel0btn: {
|
|
414
422
|
demand: '阅读要求'
|
|
415
423
|
},
|
|
416
424
|
btnIndex1: this.getCurrentPrefix(item) + '阅读',
|
|
@@ -420,7 +428,7 @@ let buttonNames = {
|
|
|
420
428
|
power: '学习动力'
|
|
421
429
|
},
|
|
422
430
|
2: {
|
|
423
|
-
|
|
431
|
+
prefixLevel0btn: {
|
|
424
432
|
demand: null,
|
|
425
433
|
},
|
|
426
434
|
btnIndex1: null,
|
|
@@ -435,7 +443,7 @@ let buttonNames = {
|
|
|
435
443
|
actionName: '课业写作',
|
|
436
444
|
buttonList: {
|
|
437
445
|
0: {
|
|
438
|
-
|
|
446
|
+
prefixLevel0btn: {
|
|
439
447
|
demand: '写作要求'
|
|
440
448
|
},
|
|
441
449
|
btnIndex1: this.getCurrentPrefix(item) + '写作',
|
|
@@ -445,7 +453,7 @@ let buttonNames = {
|
|
|
445
453
|
power: '学习动力'
|
|
446
454
|
},
|
|
447
455
|
2: {
|
|
448
|
-
|
|
456
|
+
prefixLevel0btn: {
|
|
449
457
|
demand: null,
|
|
450
458
|
},
|
|
451
459
|
btnIndex1: null,
|
|
@@ -460,7 +468,7 @@ let buttonNames = {
|
|
|
460
468
|
actionName: '课业实践',
|
|
461
469
|
buttonList: {
|
|
462
470
|
0: {
|
|
463
|
-
|
|
471
|
+
prefixLevel0btn: {
|
|
464
472
|
demand: '实践要求'
|
|
465
473
|
},
|
|
466
474
|
btnIndex1: '实践项目',
|
|
@@ -470,7 +478,7 @@ let buttonNames = {
|
|
|
470
478
|
power: '学习动力'
|
|
471
479
|
},
|
|
472
480
|
2: {
|
|
473
|
-
|
|
481
|
+
prefixLevel0btn: {
|
|
474
482
|
demand: null,
|
|
475
483
|
},
|
|
476
484
|
btnIndex1: null,
|
|
@@ -485,7 +493,7 @@ let buttonNames = {
|
|
|
485
493
|
actionName: '课业创新',
|
|
486
494
|
buttonList: {
|
|
487
495
|
0: {
|
|
488
|
-
|
|
496
|
+
prefixLevel0btn: {
|
|
489
497
|
demand: '创新要求'
|
|
490
498
|
},
|
|
491
499
|
btnIndex1: '创新任务',
|
|
@@ -495,7 +503,7 @@ let buttonNames = {
|
|
|
495
503
|
power: '学习动力'
|
|
496
504
|
},
|
|
497
505
|
2: {
|
|
498
|
-
|
|
506
|
+
prefixLevel0btn: {
|
|
499
507
|
demand: null,
|
|
500
508
|
},
|
|
501
509
|
btnIndex1: null,
|
|
@@ -510,7 +518,7 @@ let buttonNames = {
|
|
|
510
518
|
actionName: '过程记录',
|
|
511
519
|
buttonList: {
|
|
512
520
|
0: {
|
|
513
|
-
|
|
521
|
+
prefixLevel0btn: {
|
|
514
522
|
demand: null,
|
|
515
523
|
},
|
|
516
524
|
btnIndex1: '全班数据',
|
|
@@ -526,7 +534,7 @@ let buttonNames = {
|
|
|
526
534
|
actionName: '考试管理',
|
|
527
535
|
buttonList: {
|
|
528
536
|
0: {
|
|
529
|
-
|
|
537
|
+
prefixLevel0btn: {
|
|
530
538
|
demand: null,
|
|
531
539
|
},
|
|
532
540
|
btnIndex1: '题库资源',
|
|
@@ -538,7 +546,7 @@ let buttonNames = {
|
|
|
538
546
|
power: null
|
|
539
547
|
},
|
|
540
548
|
2: {
|
|
541
|
-
|
|
549
|
+
prefixLevel0btn: {
|
|
542
550
|
demand: null,
|
|
543
551
|
},
|
|
544
552
|
btnIndex1: null,
|
|
@@ -555,7 +563,7 @@ let buttonNames = {
|
|
|
555
563
|
actionName: '学习表现',
|
|
556
564
|
buttonList: {
|
|
557
565
|
0: {
|
|
558
|
-
|
|
566
|
+
prefixLevel0btn: {
|
|
559
567
|
demand: '表现要求'
|
|
560
568
|
},
|
|
561
569
|
btnIndex1: '表现评价',
|
|
@@ -565,7 +573,7 @@ let buttonNames = {
|
|
|
565
573
|
power: '学习动力'
|
|
566
574
|
},
|
|
567
575
|
2: {
|
|
568
|
-
|
|
576
|
+
prefixLevel0btn: {
|
|
569
577
|
demand: null,
|
|
570
578
|
},
|
|
571
579
|
btnIndex1: null,
|
|
@@ -580,7 +588,7 @@ let buttonNames = {
|
|
|
580
588
|
actionName: '学习动力',
|
|
581
589
|
buttonList: {
|
|
582
590
|
0: {
|
|
583
|
-
|
|
591
|
+
prefixLevel0btn: {
|
|
584
592
|
demand: '动力要求'
|
|
585
593
|
},
|
|
586
594
|
btnIndex1: '学习动力',
|
|
@@ -590,7 +598,7 @@ let buttonNames = {
|
|
|
590
598
|
power: null
|
|
591
599
|
},
|
|
592
600
|
2: {
|
|
593
|
-
|
|
601
|
+
prefixLevel0btn: {
|
|
594
602
|
demand: null,
|
|
595
603
|
},
|
|
596
604
|
btnIndex1: null,
|
|
@@ -605,7 +613,7 @@ let buttonNames = {
|
|
|
605
613
|
actionName: '课业项目',
|
|
606
614
|
buttonList: {
|
|
607
615
|
0: {
|
|
608
|
-
|
|
616
|
+
prefixLevel0btn: {
|
|
609
617
|
demand: '项目要求'
|
|
610
618
|
},
|
|
611
619
|
btnIndex1: '项目主题',
|
|
@@ -615,7 +623,7 @@ let buttonNames = {
|
|
|
615
623
|
power: '学习动力'
|
|
616
624
|
},
|
|
617
625
|
2: {
|
|
618
|
-
|
|
626
|
+
prefixLevel0btn: {
|
|
619
627
|
demand: null,
|
|
620
628
|
},
|
|
621
629
|
btnIndex1: null,
|
|
@@ -630,7 +638,7 @@ let buttonNames = {
|
|
|
630
638
|
actionName: '课业实验',
|
|
631
639
|
buttonList: {
|
|
632
640
|
0: {
|
|
633
|
-
|
|
641
|
+
prefixLevel0btn: {
|
|
634
642
|
demand: '实验要求'
|
|
635
643
|
},
|
|
636
644
|
btnIndex1: '实验项目',
|
|
@@ -640,7 +648,7 @@ let buttonNames = {
|
|
|
640
648
|
power: '学习动力'
|
|
641
649
|
},
|
|
642
650
|
2: {
|
|
643
|
-
|
|
651
|
+
prefixLevel0btn: {
|
|
644
652
|
demand: null,
|
|
645
653
|
},
|
|
646
654
|
btnIndex1: null,
|
|
@@ -651,9 +659,382 @@ let buttonNames = {
|
|
|
651
659
|
}
|
|
652
660
|
}
|
|
653
661
|
}
|
|
654
|
-
};
|
|
662
|
+
}[this.actionId];
|
|
663
|
+
},
|
|
664
|
+
resourceButtonList (item) {
|
|
665
|
+
return {
|
|
666
|
+
resource_lesson051: {
|
|
667
|
+
actionName: '调查资源',
|
|
668
|
+
buttonList: {
|
|
669
|
+
0: {
|
|
670
|
+
prefixLevel0btn: { // 只存在课上
|
|
671
|
+
demand: '调查要求',
|
|
672
|
+
btnIndex1: '调查试题'
|
|
673
|
+
},
|
|
674
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
675
|
+
btnIndex2: this.getCurrentPrefix(item) + '试题',
|
|
676
|
+
},
|
|
677
|
+
otherThanLevel0: { // 除课以外
|
|
678
|
+
btnIndex3: this.getPrefix(item) + '试题',
|
|
679
|
+
},
|
|
680
|
+
suffixLevel0btn: { // 只存在课上
|
|
681
|
+
analyse: '调查分析',
|
|
682
|
+
countermeasure: '教学对策'
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
resource_lesson052: {
|
|
688
|
+
actionName: '检测资源',
|
|
689
|
+
buttonList: {
|
|
690
|
+
0: {
|
|
691
|
+
prefixLevel0btn: { // 只存在课上
|
|
692
|
+
demand: '检测要求',
|
|
693
|
+
btnIndex1: '检测试题'
|
|
694
|
+
},
|
|
695
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
696
|
+
btnIndex2: this.getCurrentPrefix(item) + '试题',
|
|
697
|
+
},
|
|
698
|
+
otherThanLevel0: { // 除课以外
|
|
699
|
+
btnIndex3: this.getPrefix(item) + '试题',
|
|
700
|
+
},
|
|
701
|
+
suffixLevel0btn: { // 只存在课上
|
|
702
|
+
analyse: '检测分析',
|
|
703
|
+
countermeasure: '教学对策'
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
resource_lesson_ideology: {
|
|
709
|
+
actionName: '课程思政',
|
|
710
|
+
buttonList: {
|
|
711
|
+
0: {
|
|
712
|
+
prefixLevel0btn: { // 只存在课上
|
|
713
|
+
demand: '检测要求',
|
|
714
|
+
btnIndex1: '思政主题'
|
|
715
|
+
},
|
|
716
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
717
|
+
btnIndex2: this.getCurrentPrefix(item) + '主题',
|
|
718
|
+
},
|
|
719
|
+
otherThanLevel0: { // 除课以外
|
|
720
|
+
btnIndex3: this.getPrefix(item) + '主题',
|
|
721
|
+
},
|
|
722
|
+
suffixLevel0btn: { // 只存在课上
|
|
723
|
+
review: '思政点评',
|
|
724
|
+
analyse: '思政分析',
|
|
725
|
+
countermeasure: '教学对策'
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
resource_notes: {
|
|
731
|
+
actionName: '笔记资源',
|
|
732
|
+
buttonList: {
|
|
733
|
+
0: {
|
|
734
|
+
prefixLevel0btn: { // 只存在课上
|
|
735
|
+
demand: '笔记要求'
|
|
736
|
+
},
|
|
737
|
+
suffixLevel0btn: { // 只存在课上
|
|
738
|
+
review: '笔记点评',
|
|
739
|
+
analyse: '笔记分析',
|
|
740
|
+
countermeasure: '教学对策'
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
resource_lesson012: {
|
|
746
|
+
actionName: '提问资源',
|
|
747
|
+
buttonList: {
|
|
748
|
+
0: {
|
|
749
|
+
prefixLevel0btn: { // 只存在课上
|
|
750
|
+
demand: '回答要求',
|
|
751
|
+
btnIndex1: '提问问题'
|
|
752
|
+
},
|
|
753
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
754
|
+
btnIndex2: this.getCurrentPrefix(item) + '提问',
|
|
755
|
+
},
|
|
756
|
+
otherThanLevel0: { // 除课以外
|
|
757
|
+
btnIndex3: this.getPrefix(item) + '问题',
|
|
758
|
+
},
|
|
759
|
+
suffixLevel0btn: { // 只存在课上
|
|
760
|
+
review: '回答点评',
|
|
761
|
+
analyse: '回答分析',
|
|
762
|
+
countermeasure: '教学对策'
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
resource_lesson013: {
|
|
768
|
+
actionName: '答疑资源',
|
|
769
|
+
buttonList: {
|
|
770
|
+
0: {
|
|
771
|
+
prefixLevel0btn: { // 只存在课上
|
|
772
|
+
demand: '提问要求',
|
|
773
|
+
btnIndex1: '虚拟提问'
|
|
774
|
+
},
|
|
775
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
776
|
+
btnIndex2: this.getCurrentPrefix(item) + '提问',
|
|
777
|
+
},
|
|
778
|
+
otherThanLevel0: { // 除课以外
|
|
779
|
+
btnIndex3: this.getPrefix(item) + '提问',
|
|
780
|
+
},
|
|
781
|
+
suffixLevel0btn: { // 只存在课上
|
|
782
|
+
review: '提问点评',
|
|
783
|
+
analyse: '提问分析',
|
|
784
|
+
countermeasure: '教学对策'
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
resource_lesson055: {
|
|
790
|
+
actionName: '生问生答',
|
|
791
|
+
buttonList: {
|
|
792
|
+
0: {
|
|
793
|
+
prefixLevel0btn: { // 只存在课上
|
|
794
|
+
demand: '问答要求',
|
|
795
|
+
review: '问答点评',
|
|
796
|
+
analyse: '问答分析',
|
|
797
|
+
countermeasure: '教学对策'
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
},
|
|
802
|
+
resource_lesson014: {
|
|
803
|
+
actionName: '讨论资源',
|
|
804
|
+
buttonList: {
|
|
805
|
+
0: {
|
|
806
|
+
prefixLevel0btn: { // 只存在课上
|
|
807
|
+
demand: '讨论要求',
|
|
808
|
+
btnIndex1: '讨论题目'
|
|
809
|
+
},
|
|
810
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
811
|
+
btnIndex2: this.getCurrentPrefix(item) + '题目',
|
|
812
|
+
},
|
|
813
|
+
otherThanLevel0: { // 除课以外
|
|
814
|
+
btnIndex3: this.getPrefix(item) + '题目',
|
|
815
|
+
},
|
|
816
|
+
suffixLevel0btn: { // 只存在课上
|
|
817
|
+
review: '讨论点评',
|
|
818
|
+
analyse: '讨论分析',
|
|
819
|
+
countermeasure: '教学对策'
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
resource_lesson015: {
|
|
825
|
+
actionName: '风暴资源',
|
|
826
|
+
buttonList: {
|
|
827
|
+
0: {
|
|
828
|
+
prefixLevel0btn: { // 只存在课上
|
|
829
|
+
demand: '风暴要求',
|
|
830
|
+
btnIndex1: '风暴题目'
|
|
831
|
+
},
|
|
832
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
833
|
+
btnIndex2: this.getCurrentPrefix(item) + '题目',
|
|
834
|
+
},
|
|
835
|
+
otherThanLevel0: { // 除课以外
|
|
836
|
+
btnIndex3: this.getPrefix(item) + '题目',
|
|
837
|
+
},
|
|
838
|
+
suffixLevel0btn: { // 只存在课上
|
|
839
|
+
review: '风暴点评',
|
|
840
|
+
analyse: '风暴分析',
|
|
841
|
+
countermeasure: '教学对策'
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
resource_lesson020: {
|
|
847
|
+
actionName: '逻辑思维',
|
|
848
|
+
buttonList: {
|
|
849
|
+
0: {
|
|
850
|
+
prefixLevel0btn: { // 只存在课上
|
|
851
|
+
demand: '训练要求',
|
|
852
|
+
btnIndex1: '训练题目'
|
|
853
|
+
},
|
|
854
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
855
|
+
},
|
|
856
|
+
otherThanLevel0: { // 除课以外
|
|
857
|
+
btnIndex2: this.getCurrentPrefix(item) + '题目',
|
|
858
|
+
btnIndex3: this.getPrefix(item) + '题目',
|
|
859
|
+
},
|
|
860
|
+
lowLevel: { // 除课以外
|
|
861
|
+
btnIndex5: '创建题目',
|
|
862
|
+
btnIndex6: '题目列表',
|
|
863
|
+
btnIndex7: '批量删除'
|
|
864
|
+
},
|
|
865
|
+
suffixLevel0btn: { // 只存在课上
|
|
866
|
+
analyse: '训练分析',
|
|
867
|
+
countermeasure: '教学对策'
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
resource_lesson065: {
|
|
873
|
+
actionName: '虚拟学习',
|
|
874
|
+
buttonList: {
|
|
875
|
+
0: {
|
|
876
|
+
prefixLevel0btn: { // 只存在课上
|
|
877
|
+
demand: '学习要求',
|
|
878
|
+
btnIndex1: '虚仿项目'
|
|
879
|
+
},
|
|
880
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
881
|
+
btnIndex2: this.getCurrentPrefix(item) + '项目',
|
|
882
|
+
},
|
|
883
|
+
otherThanLevel0: { // 除课以外
|
|
884
|
+
btnIndex3: this.getPrefix(item) + '项目',
|
|
885
|
+
},
|
|
886
|
+
suffixLevel0btn: { // 只存在课上
|
|
887
|
+
review: '学习点评',
|
|
888
|
+
analyse: '学习分析',
|
|
889
|
+
countermeasure: '教学对策'
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
resource_lesson056: {
|
|
895
|
+
actionName: '讲给他人',
|
|
896
|
+
buttonList: {
|
|
897
|
+
0: {
|
|
898
|
+
prefixLevel0btn: { // 只存在课上
|
|
899
|
+
demand: '讲解要求',
|
|
900
|
+
review: '讲解点评',
|
|
901
|
+
analyse: '讲解分析',
|
|
902
|
+
countermeasure: '教学对策'
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
resource_lesson_homework: {
|
|
908
|
+
actionName: '作业资源',
|
|
909
|
+
buttonList: {
|
|
910
|
+
0: {
|
|
911
|
+
prefixLevel0btn: { // 只存在课上
|
|
912
|
+
demand: '作业要求',
|
|
913
|
+
btnIndex1: '作业题目'
|
|
914
|
+
},
|
|
915
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
916
|
+
btnIndex2: this.getCurrentPrefix(item) + '题目',
|
|
917
|
+
},
|
|
918
|
+
otherThanLevel0: { // 除课以外
|
|
919
|
+
btnIndex3: this.getPrefix(item) + '题目',
|
|
920
|
+
},
|
|
921
|
+
suffixLevel0btn: { // 只存在课上
|
|
922
|
+
review: '作业点评',
|
|
923
|
+
analyse: '作业分析',
|
|
924
|
+
countermeasure: '教学对策'
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
resource_lesson_report: {
|
|
930
|
+
actionName: '聆听报告',
|
|
931
|
+
buttonList: {
|
|
932
|
+
0: {
|
|
933
|
+
prefixLevel0btn: { // 只存在课上
|
|
934
|
+
demand: '聆听要求',
|
|
935
|
+
btnIndex1: '报告资源'
|
|
936
|
+
},
|
|
937
|
+
otherThanLevel0: { // 除课以外
|
|
938
|
+
btnIndex2: this.getCurrentPrefix(item) + '报告',
|
|
939
|
+
btnIndex3: this.getPrefix(item) + '报告',
|
|
940
|
+
},
|
|
941
|
+
lowLevel: { // 除课以外
|
|
942
|
+
btnIndex4: '创建报告',
|
|
943
|
+
btnIndex5: '报告列表',
|
|
944
|
+
},
|
|
945
|
+
suffixLevel0btn: { // 只存在课上
|
|
946
|
+
review: '聆听点评',
|
|
947
|
+
analyse: '聆听分析',
|
|
948
|
+
countermeasure: '教学对策'
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
},
|
|
953
|
+
resource_lesson058: {
|
|
954
|
+
actionName: '阅读资源',
|
|
955
|
+
buttonList: {
|
|
956
|
+
0: {
|
|
957
|
+
prefixLevel0btn: { // 只存在课上
|
|
958
|
+
demand: '阅读要求',
|
|
959
|
+
review: '阅读点评',
|
|
960
|
+
analyse: '阅读分析',
|
|
961
|
+
countermeasure: '教学对策'
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
resource_lesson059: {
|
|
967
|
+
actionName: '写作资源',
|
|
968
|
+
buttonList: {
|
|
969
|
+
0: {
|
|
970
|
+
prefixLevel0btn: { // 只存在课上
|
|
971
|
+
demand: '写作要求',
|
|
972
|
+
btnIndex1: '指导意见',
|
|
973
|
+
review: '写作点评',
|
|
974
|
+
analyse: '写作分析',
|
|
975
|
+
countermeasure: '教学对策'
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
},
|
|
980
|
+
resource_lesson017: {
|
|
981
|
+
actionName: '实践资源',
|
|
982
|
+
buttonList: {
|
|
983
|
+
0: {
|
|
984
|
+
prefixLevel0btn: { // 只存在课上
|
|
985
|
+
demand: '实践要求',
|
|
986
|
+
btnIndex1: '实践项目'
|
|
987
|
+
},
|
|
988
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
989
|
+
btnIndex2: this.getCurrentPrefix(item) + '项目',
|
|
990
|
+
},
|
|
991
|
+
otherThanLevel0: { // 除课以外
|
|
992
|
+
btnIndex3: this.getPrefix(item) + '项目',
|
|
993
|
+
},
|
|
994
|
+
suffixLevel0btn: { // 只存在课上
|
|
995
|
+
analyse: '实践分析',
|
|
996
|
+
countermeasure: '教学对策'
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
resource_lesson016: {
|
|
1002
|
+
actionName: '创新资源',
|
|
1003
|
+
buttonList: {
|
|
1004
|
+
0: {
|
|
1005
|
+
prefixLevel0btn: { // 只存在课上
|
|
1006
|
+
demand: '创新要求',
|
|
1007
|
+
btnIndex1: '创新任务'
|
|
1008
|
+
},
|
|
1009
|
+
levelOtherBtn: { // 除课和最低节点以外
|
|
1010
|
+
btnIndex2: this.getCurrentPrefix(item) + '任务',
|
|
1011
|
+
},
|
|
1012
|
+
otherThanLevel0: { // 除课以外
|
|
1013
|
+
btnIndex3: this.getPrefix(item) + '任务',
|
|
1014
|
+
},
|
|
1015
|
+
suffixLevel0btn: { // 只存在课上
|
|
1016
|
+
analyse: '创新分析',
|
|
1017
|
+
countermeasure: '教学对策'
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
resource_lesson053: {
|
|
1023
|
+
actionName: '动力资源',
|
|
1024
|
+
buttonList: {
|
|
1025
|
+
0: {
|
|
1026
|
+
prefixLevel0btn: { // 只存在课上
|
|
1027
|
+
demand: '动力要求',
|
|
1028
|
+
btnIndex1: '学习激励',
|
|
1029
|
+
btnIndex2: '教师督学',
|
|
1030
|
+
analyse: '动力分析',
|
|
1031
|
+
countermeasure: '教学对策'
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
}[this.actionId];
|
|
655
1037
|
},
|
|
656
|
-
|
|
657
1038
|
// 获取前缀内容
|
|
658
1039
|
getCurrentPrefix (item) {
|
|
659
1040
|
if (item.level === 0) {
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ed-head">
|
|
3
|
+
<div class="ed-head-but" v-for="(item,index) in toolbar">
|
|
4
|
+
<button v-if="item.key === 'but'" class="but" @click="item.onClick">{{ item.title }}</button>
|
|
5
|
+
<label v-else-if="item.key === 'upImg' || item.key === 'uploadAtt'">
|
|
6
|
+
<input type="file" @change="upload($event,item.key)" :accept="(item.key === 'upImg')?'image/*':'application/*'" style="display: none;">
|
|
7
|
+
<span class="but">{{ item.title }}</span>
|
|
8
|
+
</label>
|
|
9
|
+
<button v-else class="but" @click="toolTap(item.key)">{{ item.title }}</button>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="ed-cont">
|
|
13
|
+
<div class="editor" :id="id" contenteditable="true"></div>
|
|
14
|
+
<div class="enclosure" v-if="uploadAttData.length > 0">
|
|
15
|
+
<p>附件列表:</p>
|
|
16
|
+
<div class="enclosure-list" v-for="(item,index) in uploadAttData">
|
|
17
|
+
<div class="enclosure-item">
|
|
18
|
+
<span>{{ index + 1 }}. {{ item.name }}</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="enclosure-item en-but">
|
|
21
|
+
<button class="but" @click="see(index)">查看</button>
|
|
22
|
+
<button class="but">下载</button>
|
|
23
|
+
<button class="but" @click="del(index)">删除</button>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
<script>
|
|
30
|
+
import { html2json, json2html } from 'html2json'
|
|
31
|
+
export default {
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
uploadAttData: [],
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
data: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: () => {}
|
|
41
|
+
},
|
|
42
|
+
ref: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'editor'
|
|
45
|
+
},
|
|
46
|
+
id: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'editor'
|
|
49
|
+
},
|
|
50
|
+
toolbar: {
|
|
51
|
+
type: Array,
|
|
52
|
+
default: []
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
mounted() {
|
|
56
|
+
if(this.data === undefined) return
|
|
57
|
+
this.uploadAttData = this.data.enclosure
|
|
58
|
+
document.getElementById(this.id).innerHTML = json2html({node: "root",child: this.data.html})
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
del(index) {
|
|
62
|
+
this.uploadAttData.splice(index, 1)
|
|
63
|
+
},
|
|
64
|
+
see(index) {
|
|
65
|
+
this.$emit('see', this.uploadAttData[index])
|
|
66
|
+
},
|
|
67
|
+
upload(e,v) {
|
|
68
|
+
const file = e.target.files[0]
|
|
69
|
+
if(v === 'uploadAtt') {
|
|
70
|
+
this.uploadAttData.push(file)
|
|
71
|
+
}else {
|
|
72
|
+
const reader = new FileReader()
|
|
73
|
+
reader.readAsDataURL(file)
|
|
74
|
+
reader.onload = (es) => {
|
|
75
|
+
const img = document.createElement('img')
|
|
76
|
+
img.style.width = '100%'
|
|
77
|
+
img.style.margin = '3px 0'
|
|
78
|
+
img.src = es.target.result
|
|
79
|
+
document.getElementById(this.id).appendChild(img)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
e.target.value = ''
|
|
83
|
+
},
|
|
84
|
+
// 获取编辑器内容
|
|
85
|
+
getContent(el) {
|
|
86
|
+
// 编辑器内容转json
|
|
87
|
+
const html = document.getElementById(this.id).innerHTML
|
|
88
|
+
const json = html2json(html)
|
|
89
|
+
json.child.map(x => {
|
|
90
|
+
if(x.tag === undefined) {
|
|
91
|
+
x.tag = 'p'
|
|
92
|
+
x.node = 'element'
|
|
93
|
+
x.child = [{ text: x.text }]
|
|
94
|
+
}
|
|
95
|
+
if(x.tag === 'div') x.tag = 'p'
|
|
96
|
+
return x
|
|
97
|
+
})
|
|
98
|
+
el({
|
|
99
|
+
html: json.child,
|
|
100
|
+
enclosure: this.uploadAttData
|
|
101
|
+
})
|
|
102
|
+
},
|
|
103
|
+
toolTap(v) {
|
|
104
|
+
document.execCommand('formatBlock', false, `<${v}>`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<style scoped>
|
|
112
|
+
.ed-head-but{
|
|
113
|
+
display: inline-block;
|
|
114
|
+
}
|
|
115
|
+
.enclosure-list{
|
|
116
|
+
display: flex;
|
|
117
|
+
justify-content: space-between;
|
|
118
|
+
align-items: center;
|
|
119
|
+
margin: 5px 20px 0 20px;
|
|
120
|
+
height: 22px;
|
|
121
|
+
line-height: 22px;
|
|
122
|
+
}
|
|
123
|
+
.enclosure-item{
|
|
124
|
+
flex: 1;
|
|
125
|
+
}
|
|
126
|
+
.en-but{
|
|
127
|
+
text-align: right;
|
|
128
|
+
}
|
|
129
|
+
.enclosure{
|
|
130
|
+
padding: 5px 0;
|
|
131
|
+
}
|
|
132
|
+
.ed-cont{
|
|
133
|
+
padding: 10px 0;
|
|
134
|
+
}
|
|
135
|
+
.editor{
|
|
136
|
+
border: 1px solid #ccc;
|
|
137
|
+
border-radius: 3px;
|
|
138
|
+
padding: 20px;
|
|
139
|
+
min-height: 200px;
|
|
140
|
+
}
|
|
141
|
+
.ed-head{
|
|
142
|
+
text-align: right;
|
|
143
|
+
}
|
|
144
|
+
.but{
|
|
145
|
+
margin-left: 5px;
|
|
146
|
+
font-size: 12px;
|
|
147
|
+
background-color: transparent;
|
|
148
|
+
border: 1px solid #000;
|
|
149
|
+
border-radius: 3px;
|
|
150
|
+
padding: 2px 5px;
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
min-width: 60px;
|
|
153
|
+
}
|
|
154
|
+
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="switch" :style="{
|
|
3
3
|
width: (text !== '')? (text.toString().length * 12) + 35 + 'px' :width + 'px',
|
|
4
4
|
height: height + 'px',
|
|
5
|
-
'background-color': (roundValue)? backColor:
|
|
5
|
+
'background-color': (roundValue)? backColor: backColorAct}">
|
|
6
6
|
<label class="round" :style="{
|
|
7
7
|
transform: 'translateX('+ trans +'px)',
|
|
8
8
|
width: (height - 4) + 'px',
|
|
@@ -32,10 +32,14 @@ export default {
|
|
|
32
32
|
type: Number,
|
|
33
33
|
default: 25
|
|
34
34
|
},
|
|
35
|
-
backColor: { //
|
|
35
|
+
backColor: { // 开背景颜色
|
|
36
36
|
type: String,
|
|
37
37
|
default: '#13ce66'
|
|
38
38
|
},
|
|
39
|
+
backColorAct: { // 关背景颜色
|
|
40
|
+
type: String,
|
|
41
|
+
default: '#ccc'
|
|
42
|
+
},
|
|
39
43
|
value: {
|
|
40
44
|
type: Boolean,
|
|
41
45
|
default: false
|