zydx-plus 1.32.212 → 1.32.214

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.32.212",
3
+ "version": "1.32.214",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -141,7 +141,7 @@ export default {
141
141
  hard: '-',
142
142
  mid: '-',
143
143
  allScore: '-',
144
- count: '-',
144
+ count: '-'
145
145
  }]
146
146
  this.empty = true
147
147
  }else {
@@ -345,4 +345,4 @@ export default {
345
345
  display: inline-block;
346
346
  font-weight: bold;
347
347
  }
348
- </style>
348
+ </style>
@@ -33,7 +33,7 @@
33
33
  <div class="annotation-list" @click="guidance(item.id,index)" :id="item.id" v-for="(item, index) in annotationsArr">
34
34
  <div class="list-title">
35
35
  <div class="list-left">
36
- <span>刘秀芮老师</span>
36
+ <span>{{ teacher }}</span>
37
37
  <em>{{ item.time === '' ? '' : '(' + item.time + ')' }}</em>
38
38
  </div>
39
39
  <div class="list-right">
@@ -91,6 +91,10 @@ export default {
91
91
  html: '',
92
92
  annotations: []
93
93
  }
94
+ },
95
+ teacher: {
96
+ type: String,
97
+ default: ''
94
98
  }
95
99
  },
96
100
  watch: {
@@ -108,6 +112,7 @@ export default {
108
112
  immediate: true
109
113
  }
110
114
  },
115
+ emits: ["del","preservation"],
111
116
  methods: {
112
117
  last() {
113
118
  if (this.page <= 0) return
@@ -214,11 +219,17 @@ export default {
214
219
  },
215
220
  // 保存批注
216
221
  preservation(id,index) {
222
+ let html = ''
217
223
  const text = this.$refs[`${id}ref`][0].getContent()
218
224
  this.annotationsArr[index].readable = false
219
225
  this.annotationsArr[index].more = true
220
226
  this.annotationsArr[index].text = text
221
227
  this.linkFor()
228
+ this.htmlArr.forEach(item => html += item)
229
+ this.$emit('preservation', {
230
+ html: html2json(html),
231
+ annotations: this.annotationsData
232
+ })
222
233
  },
223
234
  // 取消批注
224
235
  cancel(id,index) {
@@ -233,6 +244,7 @@ export default {
233
244
  // 删除批注
234
245
  del(id,index) {
235
246
  // 删除数组
247
+ let html = ''
236
248
  const className2 = document.getElementsByClassName(`${id}s`)
237
249
  this.annotationsArr.splice(index,1) // 删除批注
238
250
  this.annotationsData.forEach((item,index2) => {
@@ -241,6 +253,11 @@ export default {
241
253
  this.classBackDel(className2) // 删除批注对应的样式
242
254
  this.linkFor()
243
255
  this.htmlArr[this.page] = this.$refs.tagging.innerHTML
256
+ this.htmlArr.forEach(item => html += item)
257
+ this.$emit('del', {
258
+ html: html2json(html),
259
+ annotations: this.annotationsData
260
+ })
244
261
  },
245
262
  linkFor() { // 计算线的位置
246
263
  this.linkData = []
package/src/index.js CHANGED
@@ -32,6 +32,7 @@ import pictureViewer from './components/pictureViewer/index';
32
32
  import lessonTemplate from './components/lesson_template/index';
33
33
  import paper from './components/word2/index';
34
34
  import question from './components/question/index';
35
+ import tagging from './components/tagging/index';
35
36
 
36
37
  const components = [
37
38
  Calendar,
@@ -65,7 +66,8 @@ const components = [
65
66
  pictureViewer,
66
67
  lessonTemplate,
67
68
  paper,
68
- question
69
+ question,
70
+ tagging
69
71
  ];
70
72
 
71
73
  function install(app) {
@@ -77,7 +79,7 @@ function install(app) {
77
79
  }
78
80
 
79
81
  export default {
80
- version: '1.32.212',
82
+ version: '1.32.214',
81
83
  install,
82
84
  Calendar,
83
85
  Message,
@@ -112,6 +114,7 @@ export default {
112
114
  pictureViewer,
113
115
  lessonTemplate,
114
116
  paper,
115
- question
117
+ question,
118
+ tagging
116
119
  };
117
120