zydx-plus 1.13.55 → 1.14.56

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.13.55",
3
+ "version": "1.14.56",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -27,8 +27,8 @@
27
27
  "@wangeditor/plugin-upload-attachment": "^1.1.0",
28
28
  "snabbdom": "^3.5.1",
29
29
  "@wangeditor/plugin-formula": "^1.0.11",
30
- "katex": "^0.16.6",
31
- "simple-mind-map": "^0.5.5"
30
+ "katex": "^0.15.6",
31
+ "simple-mind-map": "^0.5.8"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "vue": "^3.2.13"
@@ -0,0 +1,6 @@
1
+ import main from './src/bizHeader.vue';
2
+
3
+ main.install = function(Vue) {
4
+ Vue.component(main.name, main);
5
+ };
6
+ export default main;
@@ -0,0 +1,170 @@
1
+ /**
2
+ * @描述: 动作资源统一右侧header
3
+ * @创建时间: 2023-05-05 11:19:00
4
+ * @内容:
5
+ * @必传值:名字/类型/默认值/作用
6
+ * @非必传值:actionId: 动作ID
7
+ selectItem: 选中节点
8
+ tabType: 0班级 2 个人
9
+ selectBtnIndex: 选中按钮标识
10
+ catalogList: 目录集合。 需要带 children
11
+ * @回调事件:clickRightBtn: 按钮点击事件 回参有 选中节点,选中标识,当前点击节点结合
12
+ * @组件内方法:
13
+ */
14
+ <template>
15
+ <div class="headLevel">
16
+ <div v-for="(item, index) in nodeList" :key="index" class="borderBottom1cccccc padding0_10">
17
+ <zydx-topic-dry>
18
+ <template v-slot:title_slot><span class="fontSize16">{{item.name}}</span></template>
19
+ <template v-slot:button_slot v-show="isShowBtn">
20
+ <template v-for="(buttonInfo, buttonIndex) in initConfig(item)[actionId].buttonList[tabType]">
21
+ <button class="z-button" :class="demandButtonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active' : ''" v-if="item.level == 0 && buttonIndex === 'level0btn' && demandButtonInfo != null" v-for="(demandButtonInfo, demandButtonIndex) in buttonInfo" @click="clickRightBtn(item, demandButtonIndex)">
22
+ {{demandButtonInfo}}
23
+ </button>
24
+ <button class="z-button" :class="buttonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active' : ''" v-if="buttonIndex !== 'level0btn' && buttonInfo != null" @click="clickRightBtn(item, buttonIndex)">
25
+ {{buttonInfo}}
26
+ </button>
27
+ </template>
28
+ </template>
29
+ </zydx-topic-dry>
30
+ </div>
31
+ </div>
32
+ </template>
33
+
34
+ <script>
35
+ import zydxTopicDry from "../../titleBox/src/zydxTopicDry"
36
+ import buttonName from "./button_name"
37
+ export default {
38
+ name: "zydx-head-level",
39
+ mixins: [buttonName],
40
+ props: {
41
+ actionId: {
42
+ type: String,
43
+ default: "action_checktime"
44
+ },
45
+ // 选中的节点
46
+ selectItem: {
47
+ type: Object,
48
+ default () {
49
+ return {}
50
+ }
51
+ },
52
+ // 班级还是个人
53
+ tabType: {
54
+ type: Number,
55
+ default: 0
56
+ },
57
+ // 选中的按钮标识
58
+ selectBtnIndex: {
59
+ type: String,
60
+ default: ''
61
+ },
62
+ // 是否显示操作按钮
63
+ isShowBtn: {
64
+ type: Boolean,
65
+ default: false
66
+ },
67
+ catalogList: {
68
+ type: Array,
69
+ default: function () {
70
+ return []
71
+ }
72
+ }
73
+ },
74
+ data() {
75
+ return {
76
+ nodeList: []
77
+ }
78
+ },
79
+ computed: {
80
+ getSelectBtnIndex () {
81
+ if (this.selectBtnIndex === '') {
82
+ let buttonIndex = '';
83
+ if (this.selectItem.level == 0 && this.tabType === 0) {
84
+ buttonIndex = 'demand';
85
+ } else {
86
+ buttonIndex = 'btnIndex1';
87
+ }
88
+ this.clickRightBtn(this.selectItem, buttonIndex);
89
+ return buttonIndex;
90
+ } else {
91
+ return this.selectBtnIndex;
92
+ }
93
+ }
94
+ },
95
+ mounted: function () {
96
+ this.selectNode(this.selectItem)
97
+ },
98
+ watch: {
99
+ selectItem: {
100
+ deep: true,
101
+ handler: function (val) {
102
+ this.selectNode(this.selectItem)
103
+ }
104
+ }
105
+ },
106
+ methods: {
107
+ // 选择节点
108
+ selectNode: function (node) {
109
+ this.nodeList = []
110
+ this.recursionNode(node.catalogId)
111
+ this.nodeList = this.nodeList.reverse()
112
+ },
113
+ // 递归节点
114
+ recursionNode: function (catalogId) {
115
+ let node = this.getNode(catalogId)
116
+ if (node) {
117
+ this.nodeList.push(node)
118
+ if (node.pcatalogId && node.pcatalogId !== -1) {
119
+ this.recursionNode(node.pcatalogId)
120
+ }
121
+ }
122
+ },
123
+ // 获取节点
124
+ getNode: function (catalogId) {
125
+ let node = null
126
+ this.catalogList.forEach(item => {
127
+ if (item.catalogId === catalogId) {
128
+ node = item
129
+ }
130
+ })
131
+ return node
132
+ },
133
+ clickRightBtn (selectItem, selectBtnIndex) {
134
+ this.$emit('clickRightBtn', {selectItem, selectBtnIndex, 'nodeList': this.nodeList})
135
+ }
136
+ },
137
+ components: {zydxTopicDry}
138
+ }
139
+ </script>
140
+
141
+ <style scoped>
142
+ .borderBottom1cccccc {
143
+ border-bottom: 1px #cccccc solid !important;
144
+ }
145
+ .z-button {
146
+ margin: 1px;
147
+ width: auto;
148
+ min-width: 60px;
149
+ max-width: 60px;
150
+ text-overflow: ellipsis;
151
+ white-space: nowrap;
152
+ overflow: hidden;
153
+ height: 20px;
154
+ background-color: #FFFFFF;
155
+ color: #000000;
156
+ border: #000000 1px solid;
157
+ line-height: 18px;
158
+ border-radius: 3px;
159
+ font-size: 12px !important;
160
+ letter-spacing: 0px !important;
161
+ text-align: center;
162
+ cursor: pointer;
163
+ padding: 0 5px;
164
+ font-weight: normal;
165
+ box-sizing: border-box;
166
+ }
167
+ .active{
168
+ color: rgba(0, 204, 126, 1) !important;
169
+ }
170
+ </style>
@@ -0,0 +1,687 @@
1
+ let buttonNames = {
2
+ data () {
3
+ return {
4
+ }
5
+ },
6
+ methods: {
7
+ initConfig (item) {
8
+ return {
9
+ action_checktime: {
10
+ actionName: '考勤管理',
11
+ buttonList: {
12
+ 0: {
13
+ level0btn: {
14
+ demand: '考勤要求'
15
+ },
16
+ btnIndex1: this.getCurrentPrefix(item) + '考勤',
17
+ btnIndex2: null,
18
+ score: '考勤成绩',
19
+ analysis: '统计分析',
20
+ power: '学习动力'
21
+ },
22
+ 2: {
23
+ level0btn: {
24
+ demand: null
25
+ },
26
+ btnIndex1: '考勤情况',
27
+ btnIndex2: null,
28
+ score: '考勤成绩',
29
+ analysis: null,
30
+ power: '学习动力'
31
+ }
32
+ }
33
+ },
34
+ action_lesson051: {
35
+ actionName: '学习调查',
36
+ buttonList: {
37
+ 0: {
38
+ level0btn: {
39
+ demand: '调查要求'
40
+ },
41
+ btnIndex1: this.getCurrentPrefix(item) + '试题',
42
+ btnIndex2: this.getCurrentPrefix(item) + '调查',
43
+ score: null,
44
+ analysis: null,
45
+ power: null
46
+ },
47
+ 2: {
48
+ level0btn: {
49
+ demand: null
50
+ },
51
+ btnIndex1: this.getCurrentPrefix(item) + '调查',
52
+ btnIndex2: null,
53
+ score: null,
54
+ analysis: null,
55
+ power: null
56
+ }
57
+ }
58
+ },
59
+ action_lesson052: {
60
+ actionName: '学习检测',
61
+ buttonList: {
62
+ 0: {
63
+ level0btn: {
64
+ demand: '检测要求'
65
+ },
66
+ btnIndex1: this.getCurrentPrefix(item) + '试题',
67
+ btnIndex2: this.getCurrentPrefix(item) + '检测',
68
+ score: '检测成绩',
69
+ analysis: '统计分析',
70
+ power: '学习动力'
71
+ },
72
+ 2: {
73
+ level0btn: {
74
+ demand: null
75
+ },
76
+ btnIndex1: this.getCurrentPrefix(item) + '检测',
77
+ btnIndex2: null,
78
+ score: null,
79
+ analysis: null,
80
+ power: null
81
+ }
82
+ }
83
+ },
84
+ action_lesson_ideology: {
85
+ actionName: '课程思政',
86
+ buttonList: {
87
+ 0: {
88
+ level0btn: {
89
+ demand: '思政要求'
90
+ },
91
+ btnIndex1: this.getCurrentPrefix(item) + '主题',
92
+ btnIndex2: this.getCurrentPrefix(item) + '思政',
93
+ score: '思政成绩',
94
+ analysis: '统计分析',
95
+ power: '学习动力'
96
+ },
97
+ 2: {
98
+ level0btn: {
99
+ demand: null
100
+ },
101
+ btnIndex1: '项目操作',
102
+ btnIndex2: null,
103
+ score: null,
104
+ analysis: null,
105
+ power: null
106
+ }
107
+ }
108
+ },
109
+ action_notes: {
110
+ actionName: '课程笔记',
111
+ buttonList: {
112
+ 0: {
113
+ level0btn: {
114
+ demand: '笔记要求'
115
+ },
116
+ btnIndex1: this.getCurrentPrefix(item) + "笔记",
117
+ btnIndex2: null,
118
+ score: '笔记成绩',
119
+ analysis: '统计分析',
120
+ power: '学习动力'
121
+ },
122
+ 2: {
123
+ level0btn: {
124
+ demand: null,
125
+ },
126
+ btnIndex1: null,
127
+ btnIndex2: null,
128
+ score: null,
129
+ analysis: null,
130
+ power: null
131
+ }
132
+ }
133
+ },
134
+ action_lesson012: {
135
+ actionName: '教师提问',
136
+ buttonList: {
137
+ 0: {
138
+ level0btn: {
139
+ demand: '回答要求'
140
+ },
141
+ btnIndex1: this.getPrefix(item) + '问题',
142
+ btnIndex2: this.getCurrentPrefix(item) + '提问',
143
+ score: '回答成绩',
144
+ analysis: '统计分析',
145
+ power: '学习动力'
146
+ },
147
+ 2: {
148
+ level0btn: {
149
+ demand: null,
150
+ },
151
+ btnIndex1: null,
152
+ btnIndex2: null,
153
+ score: null,
154
+ analysis: null,
155
+ power: null
156
+ }
157
+ }
158
+ },
159
+ action_lesson013: {
160
+ actionName: '教师答疑',
161
+ buttonList: {
162
+ 0: {
163
+ level0btn: {
164
+ demand: '提问要求'
165
+ },
166
+ btnIndex1: '虚拟提问',
167
+ btnIndex2: this.getCurrentPrefix(item) + '答疑',
168
+ score: '提问成绩',
169
+ analysis: '统计分析',
170
+ power: '学习动力'
171
+ },
172
+ 2: {
173
+ level0btn: {
174
+ demand: null,
175
+ },
176
+ btnIndex1: null,
177
+ btnIndex2: null,
178
+ score: null,
179
+ analysis: null,
180
+ power: null
181
+ }
182
+ }
183
+ },
184
+ action_lesson055: {
185
+ actionName: '生问生答',
186
+ buttonList: {
187
+ 0: {
188
+ level0btn: {
189
+ demand: '问答要求'
190
+ },
191
+ btnIndex1: this.getCurrentPrefix(item) + '问答',
192
+ btnIndex2: null,
193
+ score: '问答成绩',
194
+ analysis: '统计分析',
195
+ power: '学习动力'
196
+ },
197
+ 2: {
198
+ level0btn: {
199
+ demand: null,
200
+ },
201
+ btnIndex1: null,
202
+ btnIndex2: null,
203
+ score: null,
204
+ analysis: null,
205
+ power: null
206
+ }
207
+ }
208
+ },
209
+ action_lesson014: {
210
+ actionName: '学习讨论',
211
+ buttonList: {
212
+ 0: {
213
+ level0btn: {
214
+ demand: '讨论要求'
215
+ },
216
+ btnIndex1: this.getPrefix(item) + '题目',
217
+ btnIndex2: this.getCurrentPrefix(item) + '讨论',
218
+ score: '讨论成绩',
219
+ analysis: '统计分析',
220
+ power: '学习动力'
221
+ },
222
+ 2: {
223
+ level0btn: {
224
+ demand: null,
225
+ },
226
+ btnIndex1: null,
227
+ btnIndex2: null,
228
+ score: null,
229
+ analysis: null,
230
+ power: null
231
+ }
232
+ }
233
+ },
234
+ action_lesson015: {
235
+ actionName: '头脑风暴',
236
+ buttonList: {
237
+ 0: {
238
+ level0btn: {
239
+ demand: '风暴要求'
240
+ },
241
+ btnIndex1: this.getPrefix(item) + '题目',
242
+ btnIndex2: this.getCurrentPrefix(item) + '风暴',
243
+ score: '风暴成绩',
244
+ analysis: '统计分析',
245
+ power: '学习动力'
246
+ },
247
+ 2: {
248
+ level0btn: {
249
+ demand: null,
250
+ },
251
+ btnIndex1: null,
252
+ btnIndex2: null,
253
+ score: null,
254
+ analysis: null,
255
+ power: null
256
+ }
257
+ }
258
+ },
259
+ action_lesson020: {
260
+ actionName: '思维训练',
261
+ buttonList: {
262
+ 0: {
263
+ level0btn: {
264
+ demand: '训练要求'
265
+ },
266
+ btnIndex1: this.getCurrentPrefix(item) + '题目',
267
+ btnIndex2: this.getCurrentPrefix(item) + '训练',
268
+ score: '训练成绩',
269
+ analysis: '统计分析',
270
+ power: '学习动力'
271
+ },
272
+ 2: {
273
+ level0btn: {
274
+ demand: null,
275
+ },
276
+ btnIndex1: null,
277
+ btnIndex2: null,
278
+ score: null,
279
+ analysis: null,
280
+ power: null
281
+ }
282
+ }
283
+ },
284
+ action_lesson029: {
285
+ actionName: '案例分析',
286
+ buttonList: {
287
+ 0: {
288
+ level0btn: {
289
+ demand: '分析要求'
290
+ },
291
+ btnIndex1: this.getPrefix(item) + '题目',
292
+ btnIndex2: this.getCurrentPrefix(item) + '题目',
293
+ score: '分析成绩',
294
+ analysis: '统计分析',
295
+ power: '学习动力'
296
+ },
297
+ 2: {
298
+ level0btn: {
299
+ demand: null,
300
+ },
301
+ btnIndex1: null,
302
+ btnIndex2: null,
303
+ score: null,
304
+ analysis: null,
305
+ power: null
306
+ }
307
+ }
308
+ },
309
+ action_lesson065: {
310
+ actionName: '虚拟学习',
311
+ buttonList: {
312
+ 0: {
313
+ level0btn: {
314
+ demand: '学习要求'
315
+ },
316
+ btnIndex1: '虚仿项目',
317
+ btnIndex2: this.getCurrentPrefix(item) + '学习',
318
+ score: '学习成绩',
319
+ analysis: '统计分析',
320
+ power: '学习动力'
321
+ },
322
+ 2: {
323
+ level0btn: {
324
+ demand: null,
325
+ },
326
+ btnIndex1: null,
327
+ btnIndex2: null,
328
+ score: null,
329
+ analysis: null,
330
+ power: null
331
+ }
332
+ }
333
+ },
334
+ action_lesson056: {
335
+ actionName: '讲给他人',
336
+ buttonList: {
337
+ 0: {
338
+ level0btn: {
339
+ demand: '讲解要求'
340
+ },
341
+ btnIndex1: this.getCurrentPrefix(item) + '讲解',
342
+ btnIndex2:null,
343
+ score: '讲解成绩',
344
+ analysis: '统计分析',
345
+ power: '学习动力'
346
+ },
347
+ 2: {
348
+ level0btn: {
349
+ demand: null,
350
+ },
351
+ btnIndex1: null,
352
+ btnIndex2: null,
353
+ score: null,
354
+ analysis: null,
355
+ power: null
356
+ }
357
+ }
358
+ },
359
+ action_lesson_homework: {
360
+ actionName: '课后作业',
361
+ buttonList: {
362
+ 0: {
363
+ level0btn: {
364
+ demand: '作业要求'
365
+ },
366
+ btnIndex1: this.getPrefix(item) + '题目',
367
+ btnIndex2: this.getPrefix(item) + '作业',
368
+ score: '作业成绩',
369
+ analysis: '统计分析',
370
+ power: '学习动力'
371
+ },
372
+ 2: {
373
+ level0btn: {
374
+ demand: null,
375
+ },
376
+ btnIndex1: null,
377
+ btnIndex2: null,
378
+ score: null,
379
+ analysis: null,
380
+ power: null
381
+ }
382
+ }
383
+ },
384
+ action_lesson_report: {
385
+ actionName: '聆听报告',
386
+ buttonList: {
387
+ 0: {
388
+ level0btn: {
389
+ demand: '聆听要求'
390
+ },
391
+ btnIndex1: this.getPrefix(item) + '报告',
392
+ btnIndex2: this.getCurrentPrefix(item) + '聆听',
393
+ score: '聆听成绩',
394
+ analysis: '统计分析',
395
+ power: '学习动力'
396
+ },
397
+ 2: {
398
+ level0btn: {
399
+ demand: null,
400
+ },
401
+ btnIndex1: null,
402
+ btnIndex2: null,
403
+ score: null,
404
+ analysis: null,
405
+ power: null
406
+ }
407
+ }
408
+ },
409
+ action_lesson058: {
410
+ actionName: '课业阅读',
411
+ buttonList: {
412
+ 0: {
413
+ level0btn: {
414
+ demand: '阅读要求'
415
+ },
416
+ btnIndex1: this.getCurrentPrefix(item) + '阅读',
417
+ btnIndex2: null,
418
+ score: '阅读成绩',
419
+ analysis: '统计分析',
420
+ power: '学习动力'
421
+ },
422
+ 2: {
423
+ level0btn: {
424
+ demand: null,
425
+ },
426
+ btnIndex1: null,
427
+ btnIndex2: null,
428
+ score: null,
429
+ analysis: null,
430
+ power: null
431
+ }
432
+ }
433
+ },
434
+ action_lesson059: {
435
+ actionName: '课业写作',
436
+ buttonList: {
437
+ 0: {
438
+ level0btn: {
439
+ demand: '写作要求'
440
+ },
441
+ btnIndex1: this.getCurrentPrefix(item) + '写作',
442
+ btnIndex2: null,
443
+ score: '写作成绩',
444
+ analysis: '统计分析',
445
+ power: '学习动力'
446
+ },
447
+ 2: {
448
+ level0btn: {
449
+ demand: null,
450
+ },
451
+ btnIndex1: null,
452
+ btnIndex2: null,
453
+ score: null,
454
+ analysis: null,
455
+ power: null
456
+ }
457
+ }
458
+ },
459
+ action_lesson017: {
460
+ actionName: '课业实践',
461
+ buttonList: {
462
+ 0: {
463
+ level0btn: {
464
+ demand: '实践要求'
465
+ },
466
+ btnIndex1: '实践项目',
467
+ btnIndex2: this.getCurrentPrefix(item) + '实践',
468
+ score: '实践成绩',
469
+ analysis: '统计分析',
470
+ power: '学习动力'
471
+ },
472
+ 2: {
473
+ level0btn: {
474
+ demand: null,
475
+ },
476
+ btnIndex1: null,
477
+ btnIndex2: null,
478
+ score: null,
479
+ analysis: null,
480
+ power: null
481
+ }
482
+ }
483
+ },
484
+ action_lesson016: {
485
+ actionName: '课业创新',
486
+ buttonList: {
487
+ 0: {
488
+ level0btn: {
489
+ demand: '创新要求'
490
+ },
491
+ btnIndex1: '创新任务',
492
+ btnIndex2: this.getCurrentPrefix(item) + '创新',
493
+ score: '创新成绩',
494
+ analysis: '统计分析',
495
+ power: '学习动力'
496
+ },
497
+ 2: {
498
+ level0btn: {
499
+ demand: null,
500
+ },
501
+ btnIndex1: null,
502
+ btnIndex2: null,
503
+ score: null,
504
+ analysis: null,
505
+ power: null
506
+ }
507
+ }
508
+ },
509
+ action_process: {
510
+ actionName: '过程记录',
511
+ buttonList: {
512
+ 0: {
513
+ level0btn: {
514
+ demand: null,
515
+ },
516
+ btnIndex1: '全班数据',
517
+ btnIndex2: '个人数据',
518
+ score: null,
519
+ analysis: null,
520
+ power: null
521
+ },
522
+ 2: {}
523
+ }
524
+ },
525
+ action_lesson021: {
526
+ actionName: '考试管理',
527
+ buttonList: {
528
+ 0: {
529
+ level0btn: {
530
+ demand: null,
531
+ },
532
+ btnIndex1: '题库资源',
533
+ btnIndex2: '过程考试',
534
+ btnIndex3: '期中考试',
535
+ btnIndex4: '期末考试',
536
+ score: null,
537
+ analysis: null,
538
+ power: null
539
+ },
540
+ 2: {
541
+ level0btn: {
542
+ demand: null,
543
+ },
544
+ btnIndex1: null,
545
+ btnIndex2: null,
546
+ btnIndex3: null,
547
+ btnIndex4: null,
548
+ score: null,
549
+ analysis: null,
550
+ power: null
551
+ }
552
+ }
553
+ },
554
+ action_study_show: {
555
+ actionName: '学习表现',
556
+ buttonList: {
557
+ 0: {
558
+ level0btn: {
559
+ demand: '表现要求'
560
+ },
561
+ btnIndex1: '表现评价',
562
+ btnIndex2: null,
563
+ score: '创新成绩',
564
+ analysis: '统计分析',
565
+ power: '学习动力'
566
+ },
567
+ 2: {
568
+ level0btn: {
569
+ demand: null,
570
+ },
571
+ btnIndex1: null,
572
+ btnIndex2: null,
573
+ score: null,
574
+ analysis: null,
575
+ power: null
576
+ }
577
+ }
578
+ },
579
+ action_lesson053: {
580
+ actionName: '学习动力',
581
+ buttonList: {
582
+ 0: {
583
+ level0btn: {
584
+ demand: '动力要求'
585
+ },
586
+ btnIndex1: '学习动力',
587
+ btnIndex2: null,
588
+ score: null,
589
+ analysis: '统计分析',
590
+ power: null
591
+ },
592
+ 2: {
593
+ level0btn: {
594
+ demand: null,
595
+ },
596
+ btnIndex1: null,
597
+ btnIndex2: null,
598
+ score: null,
599
+ analysis: null,
600
+ power: null
601
+ }
602
+ }
603
+ },
604
+ action_project: {
605
+ actionName: '课业项目',
606
+ buttonList: {
607
+ 0: {
608
+ level0btn: {
609
+ demand: '项目要求'
610
+ },
611
+ btnIndex1: '项目主题',
612
+ btnIndex2: this.getCurrentPrefix(item) + '项目',
613
+ score: '项目成绩',
614
+ analysis: '统计分析',
615
+ power: '学习动力'
616
+ },
617
+ 2: {
618
+ level0btn: {
619
+ demand: null,
620
+ },
621
+ btnIndex1: null,
622
+ btnIndex2: null,
623
+ score: null,
624
+ analysis: null,
625
+ power: null
626
+ }
627
+ }
628
+ },
629
+ action_experiment: {
630
+ actionName: '课业实验',
631
+ buttonList: {
632
+ 0: {
633
+ level0btn: {
634
+ demand: '实验要求'
635
+ },
636
+ btnIndex1: '实验项目',
637
+ btnIndex2: this.getCurrentPrefix(item) + '实验',
638
+ score: '实验成绩',
639
+ analysis: '统计分析',
640
+ power: '学习动力'
641
+ },
642
+ 2: {
643
+ level0btn: {
644
+ demand: null,
645
+ },
646
+ btnIndex1: null,
647
+ btnIndex2: null,
648
+ score: null,
649
+ analysis: null,
650
+ power: null
651
+ }
652
+ }
653
+ }
654
+ };
655
+ },
656
+
657
+ // 获取前缀内容
658
+ getCurrentPrefix (item) {
659
+ if (item.level === 0) {
660
+ return '课级'
661
+ } else if (item.level === 1) {
662
+ return '章级'
663
+ } else if (item.level === 2) {
664
+ return '节级'
665
+ } else if (item.level === 3) {
666
+ return '目级'
667
+ } else {
668
+ return '其他'
669
+ }
670
+ },
671
+ // 获取前缀内容
672
+ getPrefix (item) {
673
+ if (item.level === 0) {
674
+ return '全课'
675
+ } else if (item.level === 1) {
676
+ return '全章'
677
+ } else if (item.level === 2) {
678
+ return '全节'
679
+ } else if (item.level === 3) {
680
+ return '全目'
681
+ } else {
682
+ return '其他'
683
+ }
684
+ },
685
+ }
686
+ }
687
+ export default buttonNames
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <we-toolbar v-if="!readOnly && toolbar.length > 0" class="toolbar" :handle="handle" />
3
- <we-editable class="editable" :style="{'min-height': height + 'px'}" :handle="handle" v-model:html="formData.html" />
3
+ <we-editable class="editable" :style="{'min-height': height + 'px'}" :handle="handle" v-model:json="formData.html" />
4
4
  <div class="but" v-if="!readOnly && toolbar.length > 0">
5
5
  <button class="def-but" v-if="butShow" @click="confirm">完成</button>
6
6
  </div>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="switch" :style="{
3
- width: width + 'px',
3
+ width: (text !== '')? (text.toString().length * 12) + 35 + 'px' :width + 'px',
4
4
  height: height + 'px',
5
5
  'background-color': (roundValue)? backColor: '#ccc'}">
6
6
  <label class="round" :style="{
@@ -10,6 +10,7 @@
10
10
  <input type="checkbox" name="box" @click="submit" v-model="roundValue" />
11
11
  <span></span>
12
12
  </label>
13
+ <span v-if="text !==''" :style="{'line-height': height+'px','padding': (roundValue)? '0 25px 0 10px': '0 0 0 25px'}" class="round-text">{{ text }}</span>
13
14
  </div>
14
15
  </template>
15
16
 
@@ -38,13 +39,18 @@ export default {
38
39
  value: {
39
40
  type: Boolean,
40
41
  default: false
42
+ },
43
+ text: {
44
+ type: String,
45
+ default: ''
41
46
  }
42
47
  },
43
48
  mounted() {
44
49
  if(!this.roundValue) {
45
50
  this.trans = 0
46
51
  }else {
47
- this.trans = this.width - this.height
52
+ let wi = (this.text !== '')? (this.text.toString().length * 12) + 35 : this.width
53
+ this.trans = wi - this.height
48
54
  }
49
55
  },
50
56
  methods: {
@@ -52,7 +58,8 @@ export default {
52
58
  if(this.roundValue) {
53
59
  this.trans = 0
54
60
  }else {
55
- this.trans = this.width - this.height
61
+ let wi = (this.text !== '')? (this.text.toString().length * 12) + 35 : this.width
62
+ this.trans = wi - this.height
56
63
  }
57
64
  this.$emit('submit', !this.roundValue)
58
65
  },
@@ -61,6 +68,10 @@ export default {
61
68
  </script>
62
69
 
63
70
  <style>
71
+ .round-text{
72
+ color: #fff;
73
+ font-size: 12px;
74
+ }
64
75
  .switch{
65
76
  border-radius: 20px;
66
77
  background-color: #ccc;
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <div class="tabs cl">
3
3
  <div class="tabs-li" :class="{'tab-active': active === index}" @click="listTap(index)" v-for="(item,index) in list" :key="index">{{ item[column[0]] }}</div>
4
+ <div v-if="addShow" @click="addTap" class="tabs-li tab-add">+</div>
4
5
  </div>
5
6
  </template>
6
7
 
@@ -13,6 +14,10 @@ export default {
13
14
  }
14
15
  },
15
16
  props: {
17
+ addShow: {
18
+ type: Boolean,
19
+ default: false
20
+ },
16
21
  list: { // 数据列表
17
22
  type: Array,
18
23
  default: () => []
@@ -29,12 +34,19 @@ export default {
29
34
  data: this.list[index],
30
35
  index: index
31
36
  })
37
+ },
38
+ addTap() {
39
+ this.$emit('addTab')
32
40
  }
33
41
  }
34
42
  }
35
43
  </script>
36
44
 
37
45
  <style scoped>
46
+ .tab-add{
47
+ font-size: 18px !important;
48
+ line-height: 24px !important;
49
+ }
38
50
  .cl:after {
39
51
  content: "";
40
52
  clear: left;
package/src/index.js CHANGED
@@ -16,6 +16,7 @@ import editor from './components/editor/index';
16
16
  import tab from './components/tab/index';
17
17
  import word from './components/word/index';
18
18
  import mind from './components/mind/index';
19
+ import bizHeader from './components/biz_header/index';
19
20
 
20
21
  const components = [
21
22
  Calendar,
@@ -33,7 +34,8 @@ const components = [
33
34
  editor,
34
35
  tab,
35
36
  word,
36
- mind
37
+ mind,
38
+ bizHeader
37
39
  ];
38
40
 
39
41
  function install(app) {
@@ -45,7 +47,7 @@ function install(app) {
45
47
  }
46
48
 
47
49
  export default {
48
- version: '1.13.55',
50
+ version: '1.14.56',
49
51
  install,
50
52
  Calendar,
51
53
  Message,
@@ -64,6 +66,7 @@ export default {
64
66
  editor,
65
67
  tab,
66
68
  word,
67
- mind
69
+ mind,
70
+ bizHeader
68
71
  };
69
72