zydx-plus 1.29.141 → 1.29.143

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.29.141",
3
+ "version": "1.29.143",
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.8",
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(this.isEmpty(item[key])) {
641
+ if(!that.keysArr.includes(key)) {
631
642
  delete item[key];
632
643
  }
633
644
  })
@@ -6,7 +6,7 @@
6
6
  <em>({{ text }})</em>
7
7
  </div>
8
8
  <div class="choice-title-right">
9
- <button class="but" @click="add('correct')">增正确项</button>
9
+ <button class="but" @click="add('correct')" v-if="!single">增正确项</button>
10
10
  <button class="but" @click="add('interfere')">增干扰项</button>
11
11
  </div>
12
12
  </div>
@@ -67,9 +67,13 @@ export default {
67
67
  type: String,
68
68
  default: '每道多选题至少有两个正确项, 所有选项需给出至少一个答案'
69
69
  },
70
- isShow: {
70
+ isShow: { // 是否显示答案
71
71
  type: Boolean,
72
72
  default: true
73
+ },
74
+ single: { // 是否单选
75
+ type: Boolean,
76
+ default: false
73
77
  }
74
78
  },
75
79
  watch: {
@@ -96,20 +100,45 @@ export default {
96
100
  // 整理数据
97
101
  organize(v) {
98
102
  let arr = []
99
- v.forEach(x => {
100
- arr.push({
101
- type: (x.isRight)? 'correct' : 'disturb',
102
- letter: x.index,
103
- title: (x.isRight)? '正确选项' : '干扰选项',
104
- list: x.content.map(y => ({value: y}))
103
+ if(v.length === 0) {
104
+ if(this.single) {
105
+ arr.push({
106
+ type: 'correct',
107
+ letter: this.letter[0],
108
+ title: '正确选项',
109
+ list: [{value: ''}]
110
+ })
111
+ }
112
+ }else {
113
+ v.forEach(x => {
114
+ arr.push({
115
+ type: (x.isRight)? 'correct' : 'interfere',
116
+ letter: x.index,
117
+ title: (x.isRight)? '正确选项' : '干扰选项',
118
+ list: x.content.map(y => ({value: y}))
119
+ })
105
120
  })
106
- })
121
+ }
107
122
  return arr
108
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
+ // 获取数据
109
136
  getContent() {
110
137
  let arr = []
138
+ let prompt = false
111
139
  if(this.isShow) {
112
140
  this.list.forEach(x => {
141
+ prompt = this.isAllEmpty(x.list)
113
142
  arr.push({
114
143
  index: x.letter,
115
144
  isRight: x.title === '正确选项',
@@ -118,19 +147,20 @@ export default {
118
147
  })
119
148
  return {
120
149
  testKey: arr,
121
- 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
122
152
  }
123
153
  }else {
124
154
  this.list.forEach(x => {
125
155
  arr.push({
126
156
  index: x.letter,
127
- content: x.value
157
+ content: [x.value? x.value : '']
128
158
  })
129
159
  })
130
160
  return arr
131
161
  }
132
162
  },
133
- add(str) {
163
+ add(str) { // 添加选项
134
164
  const index = this.list.length
135
165
  if(index === 8) return
136
166
  this.list.push({
@@ -140,13 +170,13 @@ export default {
140
170
  list: [{value: ''}]
141
171
  })
142
172
  },
143
- alternative(index) {
173
+ alternative(index) { // 切换选项
144
174
  this.list[index].list.push({value: ''})
145
175
  },
146
- del(index,ins) {
176
+ del(index,ins) { // 删除选项
147
177
  this.list[index].list.splice(ins, 1)
148
178
  },
149
- delOption(index) {
179
+ delOption(index) { // 删除选项
150
180
  this.list.splice(index, 1)
151
181
  }
152
182
  }
@@ -203,7 +233,7 @@ export default {
203
233
  }
204
234
  .list-title span{
205
235
  font-size: 14px;
206
- font-weight: 400;
236
+ font-weight: bold;
207
237
  flex: 1;
208
238
  }
209
239
  .choice-title{
@@ -390,6 +390,9 @@ export default {
390
390
  html += '<p style="text-align: right;"><span style="color: #999;">请填来源</span></p>'
391
391
  this.editor.commands.setContent(html)
392
392
  }
393
+ if(v === 'centerH2') this.editor.chain().focus().toggleHeading({level:2}).setTextAlign('center').run()
394
+ if(v === 'leftH2') this.editor.chain().focus().toggleHeading({level:2}).setTextAlign('left').run()
395
+ if(v === 'rightH2') this.editor.chain().focus().toggleHeading({level:2}).setTextAlign('right').run()
393
396
  }
394
397
  }
395
398
  }
@@ -250,6 +250,8 @@ export default {
250
250
  enableFreeDrag: false, // 是否开启自由拖拽
251
251
  enableNodeTransitionMove: false, // 是否开启节点过渡动画
252
252
  layout: 'logicalStructure', // 节点布局方式
253
+ maxHistoryCount: 100, // 最大历史记录数
254
+ maxNodeCacheCount: 100, // 最大节点缓存数
253
255
  data: this.data
254
256
  });
255
257
  this.mindMap.setMode(this.readOnly ? 'readonly':'edit')
@@ -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%;
package/src/index.js CHANGED
@@ -69,7 +69,7 @@ function install(app) {
69
69
  }
70
70
 
71
71
  export default {
72
- version: '1.29.141',
72
+ version: '1.29.143',
73
73
  install,
74
74
  Calendar,
75
75
  Message,