zydx-plus 1.33.400 → 1.33.402

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.33.400",
3
+ "version": "1.33.402",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -155,13 +155,13 @@ let buttonNames = {
155
155
  default: "demand",
156
156
  demand: '检测要求',
157
157
  quest:'全课试题',
158
- singletonClass: this.getCurrentPrefix(item) + '检测',
158
+ singletonClass: '课级检测',
159
159
  allClass: this.getPrefix(item) + '情况',
160
160
  },
161
161
  otherLevel: {
162
162
  default: "singletonClass",
163
163
  quest:'全章试题',
164
- singletonClass: this.getCurrentPrefix(item) + '检测',
164
+ singletonClass: '章级检测',
165
165
  allClass: this.getPrefix(item) + '情况',
166
166
  },
167
167
  lowLevel: {
@@ -578,13 +578,13 @@ let buttonNames = {
578
578
  default: "demand",
579
579
  demand: '训练要求',
580
580
  quest:'全课试题',
581
- singletonClass: this.getCurrentPrefix(item) + '训练',
581
+ singletonClass: '课级训练',
582
582
  allClass: this.getPrefix(item) + '情况',
583
583
  },
584
584
  otherLevel: {
585
585
  default: "singletonClass",
586
586
  quest:'全章试题',
587
- singletonClass: this.getCurrentPrefix(item) + '训练',
587
+ singletonClass: '章级训练',
588
588
  allClass: this.getPrefix(item) + '情况',
589
589
  },
590
590
  lowLevel: {
@@ -826,7 +826,7 @@ let buttonNames = {
826
826
  },
827
827
  lowLevel: {
828
828
  default: "singletonClass",
829
- singletonClass: '聆听题目',
829
+ singletonClass: '聆听任务',
830
830
  score: '聆听成绩',
831
831
  analysis: '统计分析',
832
832
  assessment: '素养评估',
@@ -917,7 +917,7 @@ let buttonNames = {
917
917
  },
918
918
  lowLevel: {
919
919
  default: "singletonClass",
920
- singletonClass: '写作主题',
920
+ singletonClass: '写作任务',
921
921
  score: '写作成绩',
922
922
  analysis: '统计分析',
923
923
  assessment: '素养评估',
@@ -1340,12 +1340,12 @@ let buttonNames = {
1340
1340
  headLevel: {
1341
1341
  default: "demand",
1342
1342
  demand: '检测要求',
1343
- singletonClass: this.getCurrentPrefix(item) + '检测',
1343
+ singletonClass: '课级检测',
1344
1344
  allClass: this.getPrefix(item) + '情况',
1345
1345
  },
1346
1346
  otherLevel: {
1347
1347
  default: "singletonClass",
1348
- singletonClass: this.getCurrentPrefix(item) + '检测',
1348
+ singletonClass: '章级检测',
1349
1349
  allClass: this.getPrefix(item) + '情况',
1350
1350
  },
1351
1351
  lowLevel: {
@@ -710,7 +710,7 @@ export default {
710
710
  if (v === 'uploadAtt') {
711
711
  r.data.annex.active = true
712
712
  this.uploadAttData.push(r.data.annex)
713
- this.$emit('enclosureSuccess', r.data.annex)
713
+ this.$emit('enclosureSuccess', r.data.annex, html2json(this.editor.getHTML()).child)
714
714
  } else {
715
715
  this.imgHtml(r.data)
716
716
  }
package/src/index.js CHANGED
@@ -83,7 +83,7 @@ function install(app) {
83
83
  }
84
84
 
85
85
  export default {
86
- version: '1.33.400',
86
+ version: '1.33.402',
87
87
  install,
88
88
  Calendar,
89
89
  Message,
@@ -1,655 +0,0 @@
1
- <template>
2
- <div class="padding20">
3
- <div class="fontSize20 height30 lineHeight30">代码示例:</div>
4
- <div style="border: 1px solid #cccccc; padding: 30px;min-height: 500px; position: relative; z-index: 20;">
5
- <zydx-xiao-editor :enclosureButton="enclosureButton" v-for="(item) in htmlData" :uploadType="true" @del="del" title="标题" butText="完成" :uploadImage="uploadImage" :uploadAttachment="uploadAttachment" ref="editors" @complete="complete" :data="item.datas" :toolbar="item.tab"></zydx-xiao-editor>
6
- <button @click="confirm">完成</button>
7
- </div>
8
- <div>
9
- <div>
10
- <div class="fontSize20 height30 lineHeight30">代码片段:</div>
11
- <pre class="language-xml" v-html="content"></pre>
12
- </div>
13
- </div>
14
- <div class="margin30_0">
15
- <div>
16
- <div class="fontSize20 height30 lineHeight30">参数说明:</div>
17
- <div>
18
- <el-table
19
- :data="paramTableData"
20
- border
21
- style="width: 100%">
22
- <el-table-column
23
- prop="field_key"
24
- label="参数字段"
25
- width="180">
26
- </el-table-column>
27
- <el-table-column
28
- prop="field_title"
29
- label="参数名称"
30
- width="180">
31
- </el-table-column>
32
- <el-table-column
33
- prop="field_value"
34
- label="示例值">
35
- </el-table-column>
36
- <el-table-column
37
- prop="field_type"
38
- label="类型"
39
- width="100">
40
- </el-table-column>
41
- <el-table-column
42
- prop="field_default"
43
- label="默认值"
44
- width="80">
45
- </el-table-column>
46
- <el-table-column
47
- prop="field_remarks"
48
- label="备注">
49
- </el-table-column>
50
- </el-table>
51
- </div>
52
- </div>
53
- </div>
54
- <div class="margin30_0">
55
- <div class="fontSize20 height30 lineHeight30">回调说明:</div>
56
- <div>
57
- <el-table
58
- :data="methodTableData2"
59
- border
60
- style="width: 100%">
61
- <el-table-column
62
- prop="method_key"
63
- label="回调方法"
64
- width="180">
65
- </el-table-column>
66
- <el-table-column
67
- prop="method_title"
68
- label="回调名称"
69
- width="180">
70
- </el-table-column>
71
- <el-table-column
72
- prop="method_describe"
73
- label="回调说明"
74
- width="360">
75
- </el-table-column>
76
- <el-table-column
77
- prop="method_remarks"
78
- label="备注">
79
- </el-table-column>
80
- </el-table>
81
- </div>
82
- </div>
83
- </div>
84
- </template>
85
-
86
- <script>
87
- import zydxXiaoEditor from "../../components/editor2/src/editor";
88
- export default {
89
- name: "editor",
90
- components: {zydxXiaoEditor},
91
- mounted() {
92
- /**
93
- * 转换高亮显示代码 代码片段用的
94
- */
95
- const htmlContent = this.$Prism.highlight(this.content, this.$Prism.languages.xml, 'xml');
96
- this.content = htmlContent
97
- setTimeout(() => {
98
- this.htmlData = this.htmlDatas
99
- },1000)
100
- },
101
- data() {
102
- return {
103
- enclosureButton: {
104
- name: '确定使用',
105
- onClick: (e,i) => {
106
- console.log(e)
107
- }
108
- },
109
- uploadImage: {
110
- server: '/zydx/lessonResource/upload/img',
111
- meta: {},
112
- headers: {
113
- Authorization: '869b6d75-5dbc-4a8a-a67a-92c38c5199d2'
114
- },
115
- url: 'http://192.168.5.213:8888',
116
- },
117
- uploadAttachment: {
118
- server: 'http://192.168.15.124:8888/zydx/lessonResource/upload/img2',
119
- meta: {},
120
- headers: {
121
- Authorization: '3c8ebf7d-ccfd-46b1-8a79-4924074cb34b'
122
- },
123
- url: 'http://192.168.5.213:8888'
124
- },
125
- datas: {
126
- html: [
127
- {
128
- node: "element",
129
- tag: "p",
130
- child: [
131
- {
132
- node: "text",
133
- text: "这是一段测试文字"
134
- }
135
- ]
136
- }
137
- ],
138
- enclosure: [],
139
- },
140
- htmlData: [],
141
- htmlDatas: [
142
- {
143
- datas: {
144
- html: [
145
- {
146
- node: "element",
147
- tag: "p",
148
- attr: {'data-sid': 'prohibit','contenteditable': 'false'},
149
- child: [
150
- {
151
- node: "text",
152
- text: "这是一段测试文字"
153
- }
154
- ]
155
- },
156
- {
157
- node: "element",
158
- tag: "p",
159
- child: [
160
- {
161
- node: "text",
162
- text: ""
163
- }
164
- ]
165
- },
166
- {
167
- node: "element",
168
- tag: "p",
169
- attr: {'data-sid': 'prohibit','contenteditable': 'false'},
170
- child: [
171
- {
172
- node: "text",
173
- text: "这是一段测试文字"
174
- }
175
- ]
176
- },
177
- {
178
- node: "element",
179
- tag: "p",
180
- child: [
181
- {
182
- node: "text",
183
- text: ""
184
- }
185
- ]
186
- }
187
- ],
188
- enclosure: [
189
- {
190
- bizId: "0d5542ae948f4288b1c4b7f8694bd468",
191
- fileName: "15_人脸核身插件使用.pdf",
192
- filePath: "/group1/M00/02/C4/wKgF1WNpsDOAPofNACj0f6j1rlE79.pptx"
193
- },
194
- {
195
- bizId: "0d5542ae948f4288b1c4b7f8694bd468",
196
- annexName: "15_人脸核身插件使用.pdf",
197
- filePath: "/group1/M00/02/C4/wKgF1WNpsDOAPofNACj0f6j1rlE79.pptx"
198
- }
199
- ],
200
- },
201
- tab: [
202
- {
203
- key: 'h2',
204
- title: '一级标题'
205
- },
206
- {
207
- key: 'h3',
208
- title: '二级标题'
209
- },
210
- {
211
- key: 'p',
212
- title: '正文'
213
- },
214
- {
215
- key: 'uploadAtt',
216
- title: '上传附件'
217
- },
218
- {
219
- key: 'but',
220
- title: '自定义',
221
- onClick: this.colc
222
- },
223
- {
224
- key: 'center',
225
- title: '文字居中'
226
- },
227
- {
228
- key: 'centerH2',
229
- title: '居中标题'
230
- },
231
- {
232
- key: 'left',
233
- title: '文字居左'
234
- },
235
- {
236
- key: 'bold',
237
- title: '文字加粗'
238
- }
239
- ]
240
- },
241
- {
242
- datas: {},
243
- tab: [
244
- {
245
- key: 'h1',
246
- title: '标题'
247
- },
248
- {
249
- key: 'p',
250
- title: '正文'
251
- },
252
- {
253
- key: 'add',
254
- title: '添加来源'
255
- },
256
- {
257
- key: 'upImg',
258
- title: '上传图片'
259
- },
260
- {
261
- key: 'uploadAtt',
262
- title: '上传附件'
263
- },
264
- {
265
- key: 'but',
266
- title: '自定义',
267
- onClick: this.colc
268
- }
269
- ]
270
- }
271
- ],
272
- toolbar: [
273
- {
274
- key: 'h1',
275
- title: '标题'
276
- },
277
- {
278
- key: 'p',
279
- title: '正文'
280
- },
281
- {
282
- key: 'upImg',
283
- title: '上传图片'
284
- },
285
- {
286
- key: 'uploadAtt',
287
- title: '上传附件'
288
- },
289
- {
290
- key: 'center',
291
- title: '文字居中'
292
- },
293
- {
294
- key: 'but',
295
- title: '自定义',
296
- onClick: this.colc
297
- }
298
- ],
299
- // 模拟数据
300
- content:`<zydx-xiao-editor ref="editors" :data="datas" :toolbar="toolbar"></zydx-xiao-editor>`,
301
- // 参数说明
302
- paramTableData: [{
303
- field_key: 'data',
304
- field_title: '',
305
- field_value: `datas: {
306
- html: [
307
- {
308
- node: "element",
309
- tag: "p",
310
- child: [
311
- {
312
- node: "text",
313
- text: "这是一段测试文字"
314
- }
315
- ]
316
- }
317
- ],
318
- enclosure: [],
319
- },`,
320
- field_type: 'Array',
321
- field_default: '',
322
- field_remarks: ''
323
- },{
324
- field_key: 'toolbar',
325
- field_title: '',
326
- field_value: `toolbar: [
327
- {
328
- key: 'h1',
329
- title: '标题'
330
- },
331
- {
332
- key: 'p',
333
- title: '正文'
334
- },
335
- {
336
- key: 'upImg',
337
- title: '上传图片'
338
- },
339
- {
340
- key: 'uploadAtt',
341
- title: '上传附件'
342
- },
343
- {
344
- key: 'but',
345
- title: '自定义',
346
- active: true,
347
- onClick: (e,n) => {
348
- e.title = '完成'
349
- e.active = true
350
- }
351
- },
352
- {
353
- key: 'speech',
354
- title: '语音输入',
355
- active: false,
356
- onClick: (e) => {
357
- e.active = true
358
- }
359
- }
360
- ],`,
361
- field_type: 'Array',
362
- field_default: '',
363
- field_remarks: ''
364
- },{
365
- field_key: 'title',
366
- field_title: '标题',
367
- field_value: ``,
368
- field_type: 'String',
369
- field_default: '',
370
- field_remarks: ''
371
- },{
372
- field_key: 'readOnly',
373
- field_title: '是否只读',
374
- field_value: ``,
375
- field_type: 'Boolean',
376
- field_default: 'true',
377
- field_remarks: ''
378
- },{
379
- field_key: 'butText',
380
- field_title: '底部按钮名字(不设置不显示)',
381
- field_value: ``,
382
- field_type: 'String',
383
- field_default: '',
384
- field_remarks: ''
385
- },{
386
- field_key: 'height',
387
- field_title: '编辑器高度',
388
- field_value: ``,
389
- field_type: 'String',
390
- field_default: '200px',
391
- field_remarks: ''
392
- },{
393
- field_key: 'uploadImage',
394
- field_title: '图片上传配置',
395
- field_value: `uploadImage: {
396
- server: 'http://192.168.15.124:8888/zydx/fileanex/uploadfile',
397
- meta: {
398
- bizId: 'b5063ffdac7047f6ba27d198ffb5b847'
399
- },
400
- headers: {
401
- Authorization: 'b4626a29-ed73-490e-aae1-851422b5bf5e'
402
- },
403
- url: 'http://192.168.5.213:8888'
404
- },`,
405
- field_type: 'Object',
406
- field_default: '',
407
- field_remarks: 'url是图片的访问地址,server是上传图片的地址,meta是上传图片的参数,headers是请求头'
408
- },{
409
- field_key: 'uploadAttachment',
410
- field_title: '附件上传配置',
411
- field_value: `和图片上传配置一样`,
412
- field_type: 'Object',
413
- field_default: '',
414
- field_remarks: ''
415
- },{
416
- field_key: 'delShow',
417
- field_title: '是否显示删除按钮',
418
- field_value: ``,
419
- field_type: 'Boolean',
420
- field_default: 'true',
421
- field_remarks: ''
422
- },{
423
- field_key: 'titleShow',
424
- field_title: '是否显示标题',
425
- field_value: ``,
426
- field_type: 'Boolean',
427
- field_default: 'true',
428
- field_remarks: ''
429
- },{
430
- field_key: 'borderShow',
431
- field_title: '是否显示边框',
432
- field_value: ``,
433
- field_type: 'Boolean',
434
- field_default: 'true',
435
- field_remarks: ''
436
- },{
437
- field_key: 'titleStyle',
438
- field_title: '标题样式',
439
- field_value: `{
440
- 'font-size': '16px',
441
- 'font-weight': 'bold',
442
- 'color': '#000'
443
- }`,
444
- field_type: 'Object',
445
- field_default: '',
446
- field_remarks: ''
447
- },{
448
- field_key: 'enclosureStyle',
449
- field_title: '附件标题样式',
450
- field_value: `{
451
- 'font-size': '16px',
452
- 'font-weight': 'bold',
453
- 'color': '#000'
454
- }`,
455
- field_type: 'Object',
456
- field_default: '',
457
- field_remarks: ''
458
- },{
459
- field_key: 'enclosureText',
460
- field_title: '附件标题',
461
- field_value: ``,
462
- field_type: 'String',
463
- field_default: '附件列表:',
464
- field_remarks: ''
465
- },{
466
- field_key: 'uploadType',
467
- field_title: '上传附件形式(地址或者file)',
468
- field_value: ``,
469
- field_type: 'Boolean',
470
- field_default: 'false',
471
- field_remarks: ''
472
- },{
473
- field_key: 'editorShow',
474
- field_title: '是否显示编辑器',
475
- field_value: ``,
476
- field_type: 'Boolean',
477
- field_default: 'true',
478
- field_remarks: ''
479
- },{
480
- field_key: 'enclosureShow',
481
- field_title: '是否显示附件',
482
- field_value: ``,
483
- field_type: 'Boolean',
484
- field_default: 'true',
485
- field_remarks: ''
486
- },{
487
- field_key: 'downloadShow',
488
- field_title: '是否显示下载按钮',
489
- field_value: ``,
490
- field_type: 'Boolean',
491
- field_default: 'true',
492
- field_remarks: ''
493
- },{
494
- field_key: 'placeholder',
495
- field_title: '占位符',
496
- field_value: ``,
497
- field_type: 'string',
498
- field_default: '',
499
- field_remarks: ''
500
- },{
501
- field_key: 'voiceShow',
502
- field_title: '是否显示语音输入',
503
- field_value: ``,
504
- field_type: 'Boolean',
505
- field_default: 'true',
506
- field_remarks: ''
507
- },{
508
- field_key: 'numberStyle',
509
- field_title: '序号样式',
510
- field_value: ``,
511
- field_type: 'Boolean',
512
- field_default: 'false',
513
- field_remarks: ''
514
- },{
515
- field_key: 'enclosureButton',
516
- field_title: '附件自定义按钮',
517
- field_value: `name: 按钮名字, onClick: (e,i) => {} 回调e: 附件数据 i: 附件索引`,
518
- field_type: 'Object',
519
- field_default: '{}',
520
- field_remarks: ''
521
- }],
522
- methodTableData2: [{
523
- method_key: 'getContent',
524
- method_title: '获取内容',
525
- method_describe: `this.$refs.editors.getContent(e => {
526
- console.log(e)
527
- })`,
528
- method_remarks: ''
529
- },{
530
- method_key: 'insertContent',
531
- method_title: '光标后边插入内容',
532
- method_describe: `this.$refs.editors.insertContent([])`,
533
- method_remarks: '内容是一个数组'
534
- },{
535
- method_key: 'enclosureContent',
536
- method_title: '插入附件',
537
- method_describe: `this.$refs.editors.enclosureContent([])`,
538
- method_remarks: '内容是一个数组'
539
- },{
540
- method_key: '@complete',
541
- method_title: '完成按钮回调',
542
- method_describe: ``,
543
- method_remarks: ''
544
- },{
545
- method_key: '@see',
546
- method_title: '查看按钮回调',
547
- method_describe: ``,
548
- method_remarks: ''
549
- },{
550
- method_key: '@download',
551
- method_title: '下载按钮回调',
552
- method_describe: ``,
553
- method_remarks: ''
554
- },{
555
- method_key: '@enclosureSuccess',
556
- method_title: '上传附件成功回调',
557
- method_describe: ``,
558
- method_remarks: ''
559
- },{
560
- method_key: '@del',
561
- method_title: '删除回调',
562
- method_describe: `del(e,next) {
563
- console.log(e)
564
- setTimeout(() => {
565
- next()
566
- },1000)
567
- },`,
568
- method_remarks: 'next() 删除后的回调'
569
- },{
570
- method_key: '@updateData',
571
- method_title: '实时监听数据变化',
572
- method_describe: ``,
573
- method_remarks: ''
574
- }]
575
- }
576
- },
577
- methods: {
578
- speech(e) {
579
- const act = e.active === undefined? false : JSON.parse(JSON.stringify(e.active))
580
- this.htmlDatas.map(x => {
581
- x.tab.map(y => {
582
- y.active = false
583
- return y
584
- })
585
- return x
586
- })
587
- if(!act) e.active = true
588
- },
589
- del(e,next) {
590
- console.log(e)
591
- setTimeout(() => {
592
- next()
593
- },1000)
594
- },
595
- colc(e,n) {
596
- e.title = '完成'
597
- e.active = !e.active
598
- },
599
- complete(e) {
600
- console.log(e)
601
- },
602
- confirm(e) {
603
- // const hs = [
604
- // {
605
- // bizId: "0d5542ae948f4288b1c4b7f8694bd468",
606
- // fileName: "15_人脸核身插件使用.pdf",
607
- // filePath: "/group1/M00/02/C4/wKgF1WNpsDOAPofNACj0f6j1rlE79.pptx"
608
- // },
609
- // {
610
- // bizId: "0d5542ae948f4288b1c4b7f8694bd468",
611
- // annexName: "15_人脸核身插件使用.pdf",
612
- // filePath: "/group1/M00/02/C4/wKgF1WNpsDOAPofNACj0f6j1rlE79.pptx"
613
- // }
614
- // ]
615
- // this.$refs.editors[0].enclosureContent(hs)
616
- let arr = [
617
- {
618
- node: "element",
619
- tag: "p",
620
- child: [
621
- {
622
- node: "text",
623
- text: "这是一段测试文字"
624
- }
625
- ]
626
- }
627
- ]
628
- this.$refs.editors[0].insertContent(arr)
629
- // this.datas = {
630
- // html: [
631
- // {
632
- // node: "element",
633
- // tag: "p",
634
- // child: [
635
- // {
636
- // node: "text",
637
- // text: "这是一段测试文字11111"
638
- // }
639
- // ]
640
- // }
641
- // ],
642
- // enclosure: [],
643
- // }
644
- // this.$refs.editors.getContent(e => {
645
- // console.log(e)
646
- // })
647
- },
648
- }
649
- }
650
- </script>
651
-
652
- <style scoped>
653
-
654
- </style>
655
-