zydx-plus 1.32.199 → 1.32.201
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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<span @mousedown.stop="mousedown"
|
|
5
5
|
@mousemove.stop="mousemove"
|
|
6
6
|
@mouseup.stop="mouseup"
|
|
7
|
-
@mouseleave.stop="mousemove" :style="{'text-align': title === ''? 'center':'left'}">{{ title
|
|
7
|
+
@mouseleave.stop="mousemove" :style="{'text-align': title === ''? 'center':'left'}">{{ title }}</span>
|
|
8
8
|
<div class="drag-i">
|
|
9
9
|
<i class="disconnect" v-if="disconnectShow" @click.stop="disconnect"></i>
|
|
10
10
|
<i class="enlarge" v-if="enlargeShow" @click.stop="enlarge"></i>
|
|
@@ -79,7 +79,7 @@ export default {
|
|
|
79
79
|
},
|
|
80
80
|
dragTextShow: {
|
|
81
81
|
type: Boolean,
|
|
82
|
-
default:
|
|
82
|
+
default: false
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
85
|
watch: {
|
|
@@ -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 = ''
|
|
@@ -722,17 +723,13 @@ export default {
|
|
|
722
723
|
// 文献
|
|
723
724
|
if (data.key === 'literatureMenu') {
|
|
724
725
|
const html = butJson(this.editor, this.menusText)[data.key].html
|
|
725
|
-
const
|
|
726
|
-
const
|
|
726
|
+
const b = await this.signIdData('paragraph')
|
|
727
|
+
const last = this.editor.state.selection.$anchor.path[0].content.size
|
|
727
728
|
const r = await this.signIdData('literature')
|
|
728
729
|
if (b === -1) {
|
|
729
|
-
if (
|
|
730
|
-
if (r === -1) this.editor.chain().focus().insertContentAt(this.selection(), html).run()
|
|
731
|
-
} else {
|
|
732
|
-
if (r === -1) this.editor.chain().focus().insertContentAt(this.selectionPath('subject'), html).run()
|
|
733
|
-
}
|
|
730
|
+
if (r === -1) this.editor.chain().focus().insertContentAt(last, html).run()
|
|
734
731
|
} else {
|
|
735
|
-
if (r === -1) this.editor.chain().focus().insertContentAt(this.selectionPath('
|
|
732
|
+
if (r === -1) this.editor.chain().focus().insertContentAt(this.selectionPath('paragraph',b - 1), html).run()
|
|
736
733
|
}
|
|
737
734
|
}
|
|
738
735
|
// 添加标注
|
|
@@ -1034,6 +1031,20 @@ li {
|
|
|
1034
1031
|
.editor-content {
|
|
1035
1032
|
margin: 10px;
|
|
1036
1033
|
border: 1px solid rgba(204, 204, 204, 1);
|
|
1034
|
+
max-height: 900px;
|
|
1035
|
+
overflow: auto;
|
|
1036
|
+
}
|
|
1037
|
+
.editor-content::-webkit-scrollbar {
|
|
1038
|
+
display: none;
|
|
1039
|
+
}
|
|
1040
|
+
/** 火狐浏览器 **/
|
|
1041
|
+
.editor-content {
|
|
1042
|
+
scrollbar-width: none;
|
|
1043
|
+
}
|
|
1044
|
+
/** IE 与微软浏览器 **/
|
|
1045
|
+
.editor-content {
|
|
1046
|
+
-ms-overflow-style: none;
|
|
1047
|
+
overflow: -moz-scrollbars-none;
|
|
1037
1048
|
}
|
|
1038
1049
|
.editor-content-show{
|
|
1039
1050
|
position: fixed;
|
|
@@ -1044,7 +1055,7 @@ li {
|
|
|
1044
1055
|
|
|
1045
1056
|
.editing {
|
|
1046
1057
|
width: 794px;
|
|
1047
|
-
min-height:
|
|
1058
|
+
min-height: 700px;
|
|
1048
1059
|
margin: 0 auto;
|
|
1049
1060
|
position: relative;
|
|
1050
1061
|
}
|
|
@@ -1053,7 +1064,7 @@ li {
|
|
|
1053
1064
|
padding: 100px;
|
|
1054
1065
|
box-sizing: border-box;
|
|
1055
1066
|
width: 794px;
|
|
1056
|
-
min-height:
|
|
1067
|
+
min-height: 700px;
|
|
1057
1068
|
}
|
|
1058
1069
|
.loading-back{
|
|
1059
1070
|
position: absolute;
|
|
@@ -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
|