zydx-plus 1.35.550 → 1.35.552

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.35.550",
3
+ "version": "1.35.552",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -732,46 +732,6 @@ let buttonNames = {
732
732
  }
733
733
  }
734
734
  },
735
- resource_lesson023: {
736
- actionName: '经典文章',
737
- buttonList: {
738
- 0: {
739
- headLevel: {
740
- default: "btnIndex1",
741
- btnIndex1: this.getCurrentPrefix(item) + '文章',
742
- btnIndex2: this.getPrefix(item) + '文章'
743
- },
744
- otherLevel: {
745
- default: "btnIndex1",
746
- btnIndex1: this.getCurrentPrefix(item) + '文章',
747
- btnIndex2: this.getPrefix(item) + '文章'
748
- },
749
- lowLevel: {
750
- default: "viewResource",
751
- // createResource: '创建文章',
752
- viewResource: '文章列表',
753
- // selectResource: '查找资源',
754
- }
755
- },
756
- 2: {
757
- headLevel: {
758
- default: "btnIndex1",
759
- btnIndex1: this.getCurrentPrefix(item) + '文章',
760
- btnIndex2: this.getPrefix(item) + '文章'
761
- },
762
- otherLevel: {
763
- default: "btnIndex1",
764
- btnIndex1: this.getCurrentPrefix(item) + '文章',
765
- btnIndex2: this.getPrefix(item) + '文章'
766
- },
767
- lowLevel: {
768
- default: "viewResource",
769
- viewResource: '文章列表',
770
- // selectResource: '查找资源',
771
- }
772
- }
773
- }
774
- },
775
735
  action_lesson056: {
776
736
  actionName: '讲给他人',
777
737
  buttonList: {
@@ -2852,8 +2812,19 @@ let buttonNames = {
2852
2812
  // qualityAnalysis: '素养评析'
2853
2813
  // }
2854
2814
  headLevel: {
2855
- default: 'pipeGuideAnalysis',
2815
+ default: "resourceIndex",
2816
+ resourceIndex: '写作任务',
2856
2817
  pipeGuideAnalysis: '管导评析'
2818
+ },
2819
+ otherLevel: {
2820
+ default: "singletonClass",
2821
+ singletonClass: this.getCurrentPrefix(item) + '任务',
2822
+ allClass: this.getPrefix(item) + '任务'
2823
+ },
2824
+ lowLevel: {
2825
+ default: "viewResource",
2826
+ createResource: '创建任务',
2827
+ viewResource: '任务列表',
2857
2828
  }
2858
2829
  }
2859
2830
  }
@@ -3656,6 +3627,47 @@ let buttonNames = {
3656
3627
  }
3657
3628
  }
3658
3629
  },
3630
+
3631
+ resource_lesson023: {
3632
+ actionName: '经典文章',
3633
+ buttonList: {
3634
+ 0: {
3635
+ headLevel: {
3636
+ default: "btnIndex1",
3637
+ btnIndex1: this.getCurrentPrefix(item) + '文章',
3638
+ btnIndex2: this.getPrefix(item) + '文章'
3639
+ },
3640
+ otherLevel: {
3641
+ default: "btnIndex1",
3642
+ btnIndex1: this.getCurrentPrefix(item) + '文章',
3643
+ btnIndex2: this.getPrefix(item) + '文章'
3644
+ },
3645
+ lowLevel: {
3646
+ default: "viewResource",
3647
+ // createResource: '创建文章',
3648
+ viewResource: '文章列表',
3649
+ // selectResource: '查找资源',
3650
+ }
3651
+ },
3652
+ 2: {
3653
+ headLevel: {
3654
+ default: "btnIndex1",
3655
+ btnIndex1: this.getCurrentPrefix(item) + '文章',
3656
+ btnIndex2: this.getPrefix(item) + '文章'
3657
+ },
3658
+ otherLevel: {
3659
+ default: "btnIndex1",
3660
+ btnIndex1: this.getCurrentPrefix(item) + '文章',
3661
+ btnIndex2: this.getPrefix(item) + '文章'
3662
+ },
3663
+ lowLevel: {
3664
+ default: "viewResource",
3665
+ viewResource: '文章列表',
3666
+ // selectResource: '查找资源',
3667
+ }
3668
+ }
3669
+ }
3670
+ },
3659
3671
  resource_lesson024: {
3660
3672
  actionName: '思想宝库',
3661
3673
  buttonList: {
@@ -344,18 +344,17 @@ export default defineComponent({
344
344
  opacity: 1;
345
345
  overflow: scroll;
346
346
  border-top: 1px solid #cccccc;
347
- border-left: 1px solid #cccccc;
348
347
  }
349
348
 
350
349
  .table_wrapper::-webkit-scrollbar {
351
350
  display: none;
352
- /* or add it to the track */
353
351
  }
354
352
 
355
353
  .table_root {
356
354
  table-layout: fixed;
357
355
  display: table;
358
356
  max-width: 100%;
357
+ border-left: 1px solid #cccccc;
359
358
  margin: 0 auto;
360
359
  border-spacing: 0;
361
360
  }
@@ -11,10 +11,10 @@
11
11
  </div>
12
12
  </div>
13
13
  <div v-if="fileType === 'mp4'" class="mp4">
14
- <video id="video" :src="url" controls></video>
14
+ <video ref="videoRef" id="video" :src="url" controls controlsList="nodownload noremote footbar"></video>
15
15
  </div>
16
16
  <div v-if="fileType === 'mp3'" class="mp3">
17
- <audio :src="url" controls></audio>
17
+ <audio ref="audioRef" id="audio" :src="url" controls controlsList="nodownload noremote footbar"></audio>
18
18
  </div>
19
19
  <div v-if="loading" class="loading-back">
20
20
  <div class="loading-cont">
@@ -40,6 +40,7 @@ import '@vue-office/excel/lib/index.css'
40
40
  import Mess from '../../tipBox/index'
41
41
  import {debounce} from "../../utils";
42
42
 
43
+
43
44
  let pdfs = {}
44
45
  export default {
45
46
  name: "zydx-read",
@@ -65,6 +66,7 @@ export default {
65
66
  resizeObserver: {},
66
67
  loadingTask: {},
67
68
  // pdfs:null
69
+ player: null
68
70
  }
69
71
  },
70
72
  props: {
@@ -148,6 +150,30 @@ export default {
148
150
  this.resizeObserver[`${this.refSrc}`].observe(el);
149
151
  }, 300)
150
152
  }
153
+ if (this.fileType === 'mp4') {
154
+ this.$nextTick(() => {
155
+ if (this.$refs.videoRef) {
156
+ this.$refs.videoRef.addEventListener('play', (res) => {
157
+ this.$emit('playingEvent',this.$refs.videoRef?.currentTime)
158
+ });
159
+ this.$refs.videoRef.addEventListener('pause', (res) => {
160
+ this.$emit('pausedEvent',this.$refs.videoRef?.currentTime)
161
+ });
162
+ }
163
+ })
164
+ }
165
+ if (this.fileType === 'mp3') {
166
+ this.$nextTick(() => {
167
+ if (this.$refs.audioRef) {
168
+ this.$refs.audioRef.addEventListener('play', () => {
169
+ this.$emit('playingEvent')
170
+ });
171
+ this.$refs.audioRef.addEventListener('pause', () => {
172
+ this.$emit('pausedEvent')
173
+ });
174
+ }
175
+ })
176
+ }
151
177
  setTimeout(() => {
152
178
  this.repeat = false
153
179
  }, 1000)
@@ -161,6 +187,38 @@ export default {
161
187
  console.log(video);
162
188
  });
163
189
  },
190
+ readPlay(currentTime) {
191
+ if (this.fileType === 'mp4') {
192
+ this.$nextTick(() => {
193
+ this.$refs.videoRef.play()
194
+ this.$refs.videoRef.currentTime = currentTime
195
+ })
196
+ }
197
+ if (this.fileType === 'mp3') {
198
+ this.$nextTick(() => {
199
+ if (this.$refs.audioRef) {
200
+ this.$refs.audioRef.play();
201
+ this.$refs.audioRef.currentTime = currentTime
202
+ }
203
+ })
204
+ }
205
+ },
206
+ readPause(currentTime) {
207
+ if (this.fileType === 'mp4') {
208
+ this.$nextTick(() => {
209
+ this.$refs.videoRef.pause()
210
+ this.$refs.videoRef.currentTime = currentTime
211
+ })
212
+ }
213
+ if (this.fileType === 'mp3') {
214
+ this.$nextTick(() => {
215
+ if (this.$refs.audioRef) {
216
+ this.$refs.audioRef.pause();
217
+ this.$refs.audioRef.currentTime = currentTime
218
+ }
219
+ })
220
+ }
221
+ },
164
222
  init() {
165
223
  let that = this
166
224
  this.canvasArr[`${this.refSrc}`] = []
@@ -224,9 +282,9 @@ export default {
224
282
  let boxWidth = that.$refs['view-pdf'].offsetWidth
225
283
  const boxHeight = boxWidth / sc1
226
284
  let scales = 1
227
- if(boxHeight<boxWidth){
285
+ if (boxHeight < boxWidth) {
228
286
  scales = (boxWidth / 846) * (boxWidth / (boxWidth + (boxWidth * 0.0115 * 2)))
229
- }else{
287
+ } else {
230
288
  scales = (boxWidth / 846) * (boxWidth / (boxWidth - (boxWidth * 0.115 * 2)))
231
289
  }
232
290
  let viewport = pdfPage.getViewport({scale: scales})
@@ -262,9 +320,9 @@ export default {
262
320
  let boxWidth = that.$refs['view-pdf'].offsetWidth
263
321
  const boxHeight = boxWidth / sc1
264
322
  let scales = 1
265
- if(boxHeight<boxWidth){
323
+ if (boxHeight < boxWidth) {
266
324
  scales = (boxWidth / 846) * (boxWidth / (boxWidth + (boxWidth * 0.0115 * 2)))
267
- }else{
325
+ } else {
268
326
  scales = (boxWidth / 846) * (boxWidth / (boxWidth - (boxWidth * 0.115 * 2)))
269
327
  }
270
328
  let viewport = page.getViewport({scale: scales})
@@ -193,10 +193,10 @@ export default {
193
193
  },
194
194
  //
195
195
  editorCreateShape(myShape){
196
- editorAPP.createShape(myShape)
196
+ editorAPP?.createShape(myShape)
197
197
  },
198
198
  editorDeleteShape(shapeId){
199
- editorAPP.deleteShape(shapeId)
199
+ editorAPP?.deleteShape(shapeId)
200
200
  },
201
201
  // 添加快照
202
202
  setSnapshot(v) {
@@ -142,6 +142,7 @@ export default {
142
142
  background-position: center;
143
143
  border-right: 2px solid #dcdfe6;
144
144
  border-left: 2px solid #dcdfe6;
145
+ z-index: 999;
145
146
  }
146
147
  .resize:hover {
147
148
  background-color: white;
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ function install(app) {
89
89
  }
90
90
 
91
91
  export default {
92
- version: '1.35.550',
92
+ version: '1.35.552',
93
93
  install,
94
94
  Calendar,
95
95
  Message,