zydx-plus 1.32.199 → 1.32.200
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
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<div class="complete" v-if="!readOnly && toolbar.length > 0">
|
|
42
42
|
<button class="but" v-if="butShow" @click="confirm">完成</button>
|
|
43
43
|
</div>
|
|
44
|
-
<div class="read-only" v-if="page&&readOnly">
|
|
44
|
+
<div class="read-only" v-if="page&&readOnly" :style="{width: (wit + 20) + 'px'}">
|
|
45
45
|
<div class="editing-header" v-if="signMenuShow">
|
|
46
46
|
<img :src="menusData('signMenu')?.ico" alt=""/>
|
|
47
47
|
<span>{{ menusData('signMenu')?.text }}</span>
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
166
166
|
this.editableShow = false
|
|
167
167
|
this.readOnlyPage()
|
|
168
168
|
}
|
|
169
|
-
},
|
|
169
|
+
}, 300)
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
172
|
deep: true,
|
|
@@ -355,6 +355,7 @@ export default {
|
|
|
355
355
|
this.htmlArr = []
|
|
356
356
|
const data = document.querySelectorAll('.editing-cont')[0].childNodes[0].childNodes
|
|
357
357
|
this.wit = document.getElementsByClassName('editor-content')[0].offsetWidth
|
|
358
|
+
if(this.wit > 900) this.wit = 900
|
|
358
359
|
let max = this.wit * 1.4
|
|
359
360
|
let pHeight = 0
|
|
360
361
|
let html = ''
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
11
11
|
<div class="mp4" v-if="fileType === 'mp4'">
|
|
12
|
-
<video :src="url" controls></video>
|
|
12
|
+
<video id="video" :src="url" controls></video>
|
|
13
13
|
</div>
|
|
14
14
|
<div class="mp3" v-if="fileType === 'mp3'">
|
|
15
15
|
<audio :src="url" controls></audio>
|
|
@@ -43,7 +43,7 @@ export default {
|
|
|
43
43
|
svgArr: [],
|
|
44
44
|
container: null,
|
|
45
45
|
pdfPages: 0,
|
|
46
|
-
loading:
|
|
46
|
+
loading: false,
|
|
47
47
|
repeat: false,
|
|
48
48
|
idArr: []
|
|
49
49
|
}
|
|
@@ -66,15 +66,15 @@ export default {
|
|
|
66
66
|
immediate: true
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
mounted() {
|
|
70
|
-
this.repeatInit()
|
|
71
|
-
},
|
|
72
69
|
methods: {
|
|
73
70
|
repeatInit() {
|
|
74
71
|
if (this.repeat) return // 防止重复加载
|
|
75
72
|
this.repeat = true
|
|
76
|
-
this.loading = true
|
|
77
73
|
this.fileType = this.url.split('.').pop()
|
|
74
|
+
if(this.fileType === 'pdf' || this.fileType === 'docx' || this.fileType === 'xlsx') {
|
|
75
|
+
this.loading = true
|
|
76
|
+
}
|
|
77
|
+
// if(this.fileType === 'mp4') this.videoFun()
|
|
78
78
|
if (this.fileType === 'pdf') this.init()
|
|
79
79
|
setTimeout(() => {
|
|
80
80
|
this.repeat = false
|
|
@@ -83,6 +83,12 @@ export default {
|
|
|
83
83
|
renderedHandler() {
|
|
84
84
|
this.loading = false
|
|
85
85
|
},
|
|
86
|
+
videoFun() {
|
|
87
|
+
const video = document.getElementById('video')
|
|
88
|
+
video.addEventListener('loadeddata', function() {
|
|
89
|
+
console.log(video);
|
|
90
|
+
});
|
|
91
|
+
},
|
|
86
92
|
init() {
|
|
87
93
|
let that = this
|
|
88
94
|
const loadingTask = PdfJs.getDocument(this.url)
|
|
@@ -138,10 +144,18 @@ export default {
|
|
|
138
144
|
position: relative;
|
|
139
145
|
}
|
|
140
146
|
.mp4,.mp3{
|
|
141
|
-
width: 100%;
|
|
147
|
+
max-width: 100%;
|
|
148
|
+
height: 100%;
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
142
151
|
}
|
|
143
152
|
.mp4 video,.mp3 audio{
|
|
144
153
|
width: 100%;
|
|
154
|
+
max-height: 100%;
|
|
155
|
+
}
|
|
156
|
+
.ppt{
|
|
157
|
+
width: 100%;
|
|
158
|
+
height: 100%;
|
|
145
159
|
}
|
|
146
160
|
.view-pdf{
|
|
147
161
|
text-align: center;
|
|
@@ -113,9 +113,9 @@ export default {
|
|
|
113
113
|
if(item.testKey) {
|
|
114
114
|
item.testKey = JSON.parse(item.testKey).map(x => {
|
|
115
115
|
if(this.ques(item.quesType)) { // 判断是否单选
|
|
116
|
-
x.checked = x.index === item
|
|
116
|
+
x.checked = x.index === item?.answer;
|
|
117
117
|
}else {
|
|
118
|
-
for(let i=0; i<item
|
|
118
|
+
for(let i=0; i<item?.answer?.length; i++) {
|
|
119
119
|
if(x.index === item.answer[i]) {
|
|
120
120
|
x.checked = true
|
|
121
121
|
break
|