zydx-plus 1.29.142 → 1.29.144
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 +2 -2
- package/src/components/biz_taskInfo/src/bizTaskInfo.vue +12 -1
- package/src/components/choice/src/choice.vue +35 -11
- package/src/components/mind/src/mind.vue +54 -24
- package/src/components/read/src/read.vue +12 -0
- package/src/components/tipBox/src/main.vue +2 -1
- package/src/components/tipBox/src/zydxStyle.css +12 -0
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zydx-plus",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.144",
|
|
4
4
|
"description": "Vue.js",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"snabbdom": "^3.5.1",
|
|
27
27
|
"@wangeditor/plugin-formula": "^1.0.11",
|
|
28
28
|
"katex": "^0.15.6",
|
|
29
|
-
"simple-mind-map": "^0.5.
|
|
29
|
+
"simple-mind-map": "^0.5.11",
|
|
30
30
|
"html2json": "^1.0.2",
|
|
31
31
|
"@tiptap/extension-image": "^2.0.3",
|
|
32
32
|
"@tiptap/starter-kit": "^2.0.3",
|
|
@@ -121,6 +121,16 @@
|
|
|
121
121
|
},
|
|
122
122
|
data() {
|
|
123
123
|
return {
|
|
124
|
+
keysArr: [
|
|
125
|
+
'reviewObj',
|
|
126
|
+
'reviewDemand',
|
|
127
|
+
'finishState',
|
|
128
|
+
'laterScore',
|
|
129
|
+
'examJoinTime',
|
|
130
|
+
'endTime',
|
|
131
|
+
'screenLimit',
|
|
132
|
+
'funDisable',
|
|
133
|
+
'round'],
|
|
124
134
|
actionConfig: {
|
|
125
135
|
action_lesson051: {
|
|
126
136
|
actionName: '学习调查',
|
|
@@ -625,9 +635,10 @@
|
|
|
625
635
|
}
|
|
626
636
|
},
|
|
627
637
|
confirm () {
|
|
638
|
+
let that = this
|
|
628
639
|
this.taskInfoList.forEach(item => {
|
|
629
640
|
Object.keys(item).forEach(key=>{
|
|
630
|
-
if(
|
|
641
|
+
if(!that.keysArr.includes(key)) {
|
|
631
642
|
delete item[key];
|
|
632
643
|
}
|
|
633
644
|
})
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<div v-else>
|
|
30
30
|
<div class="choice-list">
|
|
31
31
|
<div class="list-title">
|
|
32
|
-
<span>试题选项:</span>
|
|
32
|
+
<span><i>*</i>试题选项:</span>
|
|
33
33
|
<button class="but" @click="addOption">增加选项</button>
|
|
34
34
|
</div>
|
|
35
35
|
<div class="list-cont">
|
|
@@ -67,11 +67,11 @@ export default {
|
|
|
67
67
|
type: String,
|
|
68
68
|
default: '每道多选题至少有两个正确项, 所有选项需给出至少一个答案'
|
|
69
69
|
},
|
|
70
|
-
isShow: {
|
|
70
|
+
isShow: { // 是否显示答案
|
|
71
71
|
type: Boolean,
|
|
72
72
|
default: true
|
|
73
73
|
},
|
|
74
|
-
single: {
|
|
74
|
+
single: { // 是否单选
|
|
75
75
|
type: Boolean,
|
|
76
76
|
default: false
|
|
77
77
|
}
|
|
@@ -121,10 +121,24 @@ export default {
|
|
|
121
121
|
}
|
|
122
122
|
return arr
|
|
123
123
|
},
|
|
124
|
+
// 判断数组是否全是空
|
|
125
|
+
isAllEmpty(arr) {
|
|
126
|
+
let flag = true
|
|
127
|
+
for(let i=0; i< arr.length; i++) {
|
|
128
|
+
if(arr[i].value !== '') {
|
|
129
|
+
flag = false
|
|
130
|
+
break
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return flag
|
|
134
|
+
},
|
|
135
|
+
// 获取数据
|
|
124
136
|
getContent() {
|
|
125
137
|
let arr = []
|
|
138
|
+
let prompt = false
|
|
126
139
|
if(this.isShow) {
|
|
127
140
|
this.list.forEach(x => {
|
|
141
|
+
prompt = this.isAllEmpty(x.list)
|
|
128
142
|
arr.push({
|
|
129
143
|
index: x.letter,
|
|
130
144
|
isRight: x.title === '正确选项',
|
|
@@ -133,19 +147,24 @@ export default {
|
|
|
133
147
|
})
|
|
134
148
|
return {
|
|
135
149
|
testKey: arr,
|
|
136
|
-
answer: arr.filter(x => x.isRight).map(x => x.index).join(',')
|
|
150
|
+
answer: arr.filter(x => x.isRight).map(x => x.index).join(','),
|
|
151
|
+
prompt: (this.single)? prompt : arr.filter(x => x.isRight).length < 2 || prompt
|
|
137
152
|
}
|
|
138
153
|
}else {
|
|
139
154
|
this.list.forEach(x => {
|
|
155
|
+
console.log(x.value)
|
|
140
156
|
arr.push({
|
|
141
157
|
index: x.letter,
|
|
142
|
-
content: [x.value
|
|
158
|
+
content: [x.value]
|
|
143
159
|
})
|
|
144
160
|
})
|
|
145
|
-
return
|
|
161
|
+
return {
|
|
162
|
+
testKey: arr,
|
|
163
|
+
prompt: arr.filter(x => x.content[0] === '').length > 0
|
|
164
|
+
}
|
|
146
165
|
}
|
|
147
166
|
},
|
|
148
|
-
add(str) {
|
|
167
|
+
add(str) { // 添加选项
|
|
149
168
|
const index = this.list.length
|
|
150
169
|
if(index === 8) return
|
|
151
170
|
this.list.push({
|
|
@@ -155,13 +174,13 @@ export default {
|
|
|
155
174
|
list: [{value: ''}]
|
|
156
175
|
})
|
|
157
176
|
},
|
|
158
|
-
alternative(index) {
|
|
177
|
+
alternative(index) { // 切换选项
|
|
159
178
|
this.list[index].list.push({value: ''})
|
|
160
179
|
},
|
|
161
|
-
del(index,ins) {
|
|
180
|
+
del(index,ins) { // 删除选项
|
|
162
181
|
this.list[index].list.splice(ins, 1)
|
|
163
182
|
},
|
|
164
|
-
delOption(index) {
|
|
183
|
+
delOption(index) { // 删除选项
|
|
165
184
|
this.list.splice(index, 1)
|
|
166
185
|
}
|
|
167
186
|
}
|
|
@@ -218,9 +237,14 @@ export default {
|
|
|
218
237
|
}
|
|
219
238
|
.list-title span{
|
|
220
239
|
font-size: 14px;
|
|
221
|
-
font-weight:
|
|
240
|
+
font-weight: bold;
|
|
222
241
|
flex: 1;
|
|
223
242
|
}
|
|
243
|
+
.list-title i{
|
|
244
|
+
color: red;
|
|
245
|
+
margin-right: 2px;
|
|
246
|
+
font-style: normal;
|
|
247
|
+
}
|
|
224
248
|
.choice-title{
|
|
225
249
|
display: flex;
|
|
226
250
|
justify-content: center;
|
|
@@ -183,7 +183,13 @@ export default {
|
|
|
183
183
|
color: 'rgba(84,150,136,1)',
|
|
184
184
|
boldAct: false,
|
|
185
185
|
italicAct: false,
|
|
186
|
-
scribeAct: false
|
|
186
|
+
scribeAct: false,
|
|
187
|
+
defaultData: {
|
|
188
|
+
"data": {
|
|
189
|
+
"text": "根节点"
|
|
190
|
+
},
|
|
191
|
+
"children": []
|
|
192
|
+
}
|
|
187
193
|
}
|
|
188
194
|
},
|
|
189
195
|
props: {
|
|
@@ -202,6 +208,18 @@ export default {
|
|
|
202
208
|
},
|
|
203
209
|
},
|
|
204
210
|
watch: {
|
|
211
|
+
readOnly: {
|
|
212
|
+
handler: function (val, oldVal) {
|
|
213
|
+
this.mindMap?.setMode(val? 'readonly':'edit')
|
|
214
|
+
},
|
|
215
|
+
immediate: true
|
|
216
|
+
},
|
|
217
|
+
data: {
|
|
218
|
+
handler: function (val, oldVal) {
|
|
219
|
+
this.mindMap?.setData(val)
|
|
220
|
+
},
|
|
221
|
+
immediate: true
|
|
222
|
+
},
|
|
205
223
|
sizeValue(e) { // 字号
|
|
206
224
|
this.activeNodes.forEach(node => {
|
|
207
225
|
node.setStyle('fontSize',e)
|
|
@@ -244,30 +262,31 @@ export default {
|
|
|
244
262
|
},
|
|
245
263
|
},
|
|
246
264
|
mounted() {
|
|
247
|
-
|
|
248
|
-
this.mindMap = new MindMap({
|
|
249
|
-
el: document.getElementById('mindMapContainer'),
|
|
250
|
-
enableFreeDrag: false, // 是否开启自由拖拽
|
|
251
|
-
enableNodeTransitionMove: false, // 是否开启节点过渡动画
|
|
252
|
-
layout: 'logicalStructure', // 节点布局方式
|
|
253
|
-
data: this.data
|
|
254
|
-
});
|
|
255
|
-
this.mindMap.setMode(this.readOnly ? 'readonly':'edit')
|
|
256
|
-
this.mindMap.on('node_active', (node, activeNodeList) => {
|
|
257
|
-
this.mindShow = node === null;
|
|
258
|
-
})
|
|
259
|
-
this.mindMap.on('back_forward', (index, len) => {
|
|
260
|
-
this.retShow = index <= 0;
|
|
261
|
-
this.forwardShow = index >= len - 1
|
|
262
|
-
})
|
|
263
|
-
this.mindMap.on('node_active', (node, activeNodeList) => {
|
|
264
|
-
this.activeNodes = activeNodeList
|
|
265
|
-
})
|
|
265
|
+
this.init()
|
|
266
266
|
},
|
|
267
267
|
methods: {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
268
|
+
init() {
|
|
269
|
+
this.mindMap = new MindMap({
|
|
270
|
+
el: document.getElementById('mindMapContainer'),
|
|
271
|
+
enableFreeDrag: false, // 是否开启自由拖拽
|
|
272
|
+
enableNodeTransitionMove: false, // 是否开启节点过渡动画
|
|
273
|
+
layout: 'logicalStructure', // 节点布局方式
|
|
274
|
+
maxHistoryCount: 100, // 最大历史记录数
|
|
275
|
+
maxNodeCacheCount: 100, // 最大节点缓存数
|
|
276
|
+
data: Object.keys(this.data).length === 0? this.defaultData: this.data
|
|
277
|
+
});
|
|
278
|
+
this.mindMap.setMode(this.readOnly ? 'readonly':'edit')
|
|
279
|
+
this.mindMap.on('node_active', (node, activeNodeList) => {
|
|
280
|
+
this.mindShow = node === null;
|
|
281
|
+
})
|
|
282
|
+
this.mindMap.on('back_forward', (index, len) => {
|
|
283
|
+
this.retShow = index <= 0;
|
|
284
|
+
this.forwardShow = index >= len - 1
|
|
285
|
+
})
|
|
286
|
+
this.mindMap.on('node_active', (node, activeNodeList) => {
|
|
287
|
+
this.activeNodes = activeNodeList
|
|
288
|
+
})
|
|
289
|
+
},
|
|
271
290
|
scribes() {
|
|
272
291
|
this.scribeAct = !this.scribeAct
|
|
273
292
|
this.activeNodes.forEach(node => {
|
|
@@ -318,11 +337,22 @@ export default {
|
|
|
318
337
|
}
|
|
319
338
|
this.mindMap.setLayout(layoutList)
|
|
320
339
|
},
|
|
340
|
+
removeNode(data) {
|
|
341
|
+
if(data._node) {
|
|
342
|
+
delete data._node
|
|
343
|
+
}
|
|
344
|
+
if(data.children && data.children.length > 0) {
|
|
345
|
+
data.children.forEach(item => {
|
|
346
|
+
this.removeNode(item)
|
|
347
|
+
})
|
|
348
|
+
}
|
|
349
|
+
return data
|
|
350
|
+
},
|
|
321
351
|
preservation() {
|
|
322
352
|
let that = this
|
|
323
353
|
that.mindMap.export('png',false,'123213', true).then(r => {
|
|
324
354
|
that.$emit('preservation', {
|
|
325
|
-
data: that.data,
|
|
355
|
+
data: that.removeNode(that.data),
|
|
326
356
|
url: r
|
|
327
357
|
})
|
|
328
358
|
})
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
<div class="view-pdf" v-if="fileType === 'pdf'">
|
|
6
6
|
<div class="pageContainer" v-for="(item,index) in idArr">
|
|
7
7
|
<canvas :id="item"></canvas>
|
|
8
|
+
<div class="pdfPage">{{ index + 1 }}/{{ pdfPages }}</div>
|
|
8
9
|
</div>
|
|
9
10
|
</div>
|
|
10
11
|
<div class="mp4" v-if="fileType === 'mp4'">
|
|
@@ -116,10 +117,21 @@ export default {
|
|
|
116
117
|
</script>
|
|
117
118
|
|
|
118
119
|
<style scoped>
|
|
120
|
+
.pdfPage{
|
|
121
|
+
position: absolute;
|
|
122
|
+
bottom: 20px;
|
|
123
|
+
left: 0;
|
|
124
|
+
z-index: 1;
|
|
125
|
+
text-align: center;
|
|
126
|
+
font-size: 14px;
|
|
127
|
+
color: #666;
|
|
128
|
+
width: 100%;
|
|
129
|
+
}
|
|
119
130
|
.pageContainer{
|
|
120
131
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
|
|
121
132
|
margin-bottom: 10px;
|
|
122
133
|
display: inline-block;
|
|
134
|
+
position: relative;
|
|
123
135
|
}
|
|
124
136
|
.mp4,.mp3{
|
|
125
137
|
width: 100%;
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<input class="file" :accept="item.accept" @change="fileTap($event,index)" type="file" />
|
|
32
32
|
</label>
|
|
33
33
|
</div>
|
|
34
|
-
<div
|
|
34
|
+
<div class="input-name" v-if="item.type === 'input'">
|
|
35
35
|
<div v-if="item.number" class="number-input">
|
|
36
36
|
<input type="number" @keypress="isNumberKey($event,index)"
|
|
37
37
|
:placeholder="item.placeholder"
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
</div>
|
|
41
41
|
<input v-else type="text" :placeholder="item.placeholder" :maxlength="item.maxlength"
|
|
42
42
|
v-model="item.value" :disabled="item.disabled"/>
|
|
43
|
+
<b>{{ item.tail }}</b>
|
|
43
44
|
</div>
|
|
44
45
|
<div style="display: inline-block;">
|
|
45
46
|
<Select v-if="item.type === 'select'" :options="item.option"
|
|
@@ -251,4 +251,16 @@ font-size: 12px;
|
|
|
251
251
|
cursor: pointer;
|
|
252
252
|
min-width: 60px;
|
|
253
253
|
display: inline-block;
|
|
254
|
+
}
|
|
255
|
+
.input-name{
|
|
256
|
+
display: inline-block;
|
|
257
|
+
position: relative;
|
|
258
|
+
}
|
|
259
|
+
.input-name b{
|
|
260
|
+
position: absolute;
|
|
261
|
+
top: 5px;
|
|
262
|
+
right: 10px;
|
|
263
|
+
z-index: 1;
|
|
264
|
+
font-size: 16px;
|
|
265
|
+
font-weight: normal;
|
|
254
266
|
}
|