zydx-plus 1.32.227 → 1.32.228
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
|
@@ -1252,6 +1252,23 @@ let buttonNames = {
|
|
|
1252
1252
|
analysis: '统计分析',
|
|
1253
1253
|
power: '学习动力'
|
|
1254
1254
|
}
|
|
1255
|
+
},
|
|
1256
|
+
1: {
|
|
1257
|
+
headLevel: {
|
|
1258
|
+
default: "allClass",
|
|
1259
|
+
allClass: this.getPrefix(item) + '检测',
|
|
1260
|
+
wrongItem: '错误试题',
|
|
1261
|
+
},
|
|
1262
|
+
otherLevel: {
|
|
1263
|
+
default: "allClass",
|
|
1264
|
+
allClass: this.getPrefix(item) + '检测',
|
|
1265
|
+
wrongItem: '错误试题',
|
|
1266
|
+
},
|
|
1267
|
+
lowLevel: {
|
|
1268
|
+
default: "allClass",
|
|
1269
|
+
allClass: this.getPrefix(item) + '检测',
|
|
1270
|
+
wrongItem: '错误试题',
|
|
1271
|
+
}
|
|
1255
1272
|
}
|
|
1256
1273
|
}
|
|
1257
1274
|
},
|
|
@@ -1488,6 +1505,23 @@ let buttonNames = {
|
|
|
1488
1505
|
analysis: '统计分析',
|
|
1489
1506
|
power: '学习动力'
|
|
1490
1507
|
},
|
|
1508
|
+
},
|
|
1509
|
+
1: {
|
|
1510
|
+
headLevel: {
|
|
1511
|
+
default: "allClass",
|
|
1512
|
+
allClass: this.getPrefix(item) + '训练',
|
|
1513
|
+
wrongItem: '错误题目',
|
|
1514
|
+
},
|
|
1515
|
+
otherLevel: {
|
|
1516
|
+
default: "allClass",
|
|
1517
|
+
allClass: this.getPrefix(item) + '训练',
|
|
1518
|
+
wrongItem: '错误题目',
|
|
1519
|
+
},
|
|
1520
|
+
lowLevel: {
|
|
1521
|
+
default: "allClass",
|
|
1522
|
+
allClass: this.getPrefix(item) + '训练',
|
|
1523
|
+
wrongItem: '错误题目',
|
|
1524
|
+
},
|
|
1491
1525
|
}
|
|
1492
1526
|
}
|
|
1493
1527
|
},
|
|
@@ -238,52 +238,6 @@ input[name='check'] {
|
|
|
238
238
|
border: 0;
|
|
239
239
|
text-align: center;
|
|
240
240
|
}
|
|
241
|
-
.
|
|
242
|
-
|
|
243
|
-
box-sizing: border-box;
|
|
244
|
-
}
|
|
245
|
-
.enclosure>p{
|
|
246
|
-
font-size: 16px;
|
|
247
|
-
font-weight: 700;
|
|
248
|
-
}
|
|
249
|
-
.enclosure-list{
|
|
250
|
-
margin: 5px 0 0 0;
|
|
251
|
-
height: 22px;
|
|
252
|
-
line-height: 22px;
|
|
253
|
-
}
|
|
254
|
-
.enclosure-list:after{
|
|
255
|
-
content: "";
|
|
256
|
-
clear: left;
|
|
257
|
-
display: block;
|
|
258
|
-
}
|
|
259
|
-
.enclosure-item:first-child{
|
|
260
|
-
width: calc(100% - 210px);
|
|
261
|
-
}
|
|
262
|
-
.enclosure-item:last-child{
|
|
263
|
-
width: 210px;
|
|
264
|
-
}
|
|
265
|
-
.enclosure-item{
|
|
266
|
-
height: 22px;
|
|
267
|
-
float: left;
|
|
268
|
-
}
|
|
269
|
-
.enclosure-item>span{
|
|
270
|
-
display: inline-block;
|
|
271
|
-
overflow: hidden;
|
|
272
|
-
text-overflow: ellipsis;
|
|
273
|
-
white-space: nowrap;
|
|
274
|
-
max-width: 100%;
|
|
275
|
-
box-sizing: border-box;
|
|
276
|
-
padding-right: 20px;
|
|
277
|
-
}
|
|
278
|
-
.en-but{
|
|
279
|
-
text-align: right;
|
|
280
|
-
}
|
|
281
|
-
.task{
|
|
282
|
-
display: flex;
|
|
283
|
-
justify-content: center;
|
|
284
|
-
font-size: 16px;
|
|
285
|
-
font-weight: 700;
|
|
286
|
-
}
|
|
287
|
-
.task span{
|
|
288
|
-
flex: 1;
|
|
241
|
+
.choice-red{
|
|
242
|
+
color: red;
|
|
289
243
|
}
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
<div class="choice" v-if="item.testKey" v-show="item.open">
|
|
52
52
|
<div class="choice-box" v-for="(ts,ind) in item.testKey">
|
|
53
53
|
<label>
|
|
54
|
-
<input class="choice-input" v-if="chooseAnswer" :disabled="disabled" :checked="ts.checked" @change="answerChange($event,item
|
|
55
|
-
<span :class="{'choice-span': chooseAnswer,'choice-color': disabled&&ts.checked}">{{ ts.index }}. {{ ts.content[0] }}</span>
|
|
54
|
+
<input class="choice-input" v-if="chooseAnswer" :disabled="disabled" :checked="ts.checked" @change="answerChange($event,item,`${id}${index}`)" :type="ques(item.quesType)?'radio':'checkbox'" :name="`${id}${index}`" />
|
|
55
|
+
<span :class="{'choice-span': chooseAnswer,'choice-color': disabled&&ts.checked&&!item.red,'choice-red': disabled&&ts.checked&&item.red}">{{ ts.index }}. {{ ts.content[0] }}</span>
|
|
56
56
|
</label>
|
|
57
57
|
</div>
|
|
58
58
|
</div>
|
|
@@ -111,7 +111,8 @@ export default {
|
|
|
111
111
|
multipleShow: this.multiple,
|
|
112
112
|
choiceState: true,
|
|
113
113
|
replaceShow: this.replace,
|
|
114
|
-
replaceOpen: false
|
|
114
|
+
replaceOpen: false,
|
|
115
|
+
id: null
|
|
115
116
|
}
|
|
116
117
|
},
|
|
117
118
|
props: {
|
|
@@ -184,21 +185,27 @@ export default {
|
|
|
184
185
|
task: {
|
|
185
186
|
type: Boolean,
|
|
186
187
|
default: false
|
|
188
|
+
},
|
|
189
|
+
state: {
|
|
190
|
+
type: Boolean,
|
|
191
|
+
default: false
|
|
187
192
|
}
|
|
188
193
|
},
|
|
189
194
|
watch: {
|
|
190
195
|
data: {
|
|
191
196
|
handler: function (val, oldVal) {
|
|
192
|
-
this.
|
|
197
|
+
if(this.state) return
|
|
198
|
+
this.value = JSON.parse(JSON.stringify(val))
|
|
193
199
|
this.value.map((item,index) => { // 转换html
|
|
194
200
|
item.choice = true
|
|
195
201
|
item.right = 0
|
|
196
202
|
item.top = 0
|
|
197
|
-
item.open = true
|
|
198
|
-
item.replace = true
|
|
199
|
-
item.reasoning = true
|
|
200
|
-
item.review = true
|
|
201
|
-
item.subject = true
|
|
203
|
+
item.open = item.open? item.open: true
|
|
204
|
+
item.replace = item.replace? item.replace: true
|
|
205
|
+
item.reasoning = item.reasoning? item.reasoning: true
|
|
206
|
+
item.review = item.review? item.review: true
|
|
207
|
+
item.subject = item.subject? item.subject: true
|
|
208
|
+
item.red = item.red? item.red: false
|
|
202
209
|
if(item.alist) {
|
|
203
210
|
item.alist.map(x => {
|
|
204
211
|
x.annexContent = json2html({node: "root",child: JSON.parse(x.annexContent)})
|
|
@@ -223,12 +230,7 @@ export default {
|
|
|
223
230
|
return x
|
|
224
231
|
})
|
|
225
232
|
}
|
|
226
|
-
|
|
227
|
-
item.stuAnswer.answer = item.stuAnswer.answer.map(x => {
|
|
228
|
-
x = json2html(x)
|
|
229
|
-
return x
|
|
230
|
-
})
|
|
231
|
-
}
|
|
233
|
+
console.log(item)
|
|
232
234
|
return item
|
|
233
235
|
})
|
|
234
236
|
this.$nextTick(() => { // 保证所有的数据都渲染完毕
|
|
@@ -256,10 +258,64 @@ export default {
|
|
|
256
258
|
deep: true
|
|
257
259
|
}
|
|
258
260
|
},
|
|
261
|
+
mounted() {
|
|
262
|
+
this.id = this.randomId()
|
|
263
|
+
if(!this.state) return
|
|
264
|
+
this.value = JSON.parse(JSON.stringify(this.data))
|
|
265
|
+
this.value.map((item,index) => { // 转换html
|
|
266
|
+
item.choice = true
|
|
267
|
+
item.right = 0
|
|
268
|
+
item.top = 0
|
|
269
|
+
item.open = item.open? item.open: true
|
|
270
|
+
item.replace = item.replace? item.replace: true
|
|
271
|
+
item.reasoning = item.reasoning? item.reasoning: true
|
|
272
|
+
item.review = item.review? item.review: true
|
|
273
|
+
item.subject = item.subject? item.subject: true
|
|
274
|
+
item.red = item.red? item.red: false
|
|
275
|
+
if(item.alist) {
|
|
276
|
+
item.alist.map(x => {
|
|
277
|
+
x.annexContent = json2html({node: "root",child: JSON.parse(x.annexContent)})
|
|
278
|
+
return x
|
|
279
|
+
})
|
|
280
|
+
}
|
|
281
|
+
if(item.testKey) {
|
|
282
|
+
item.testKey = typeof item.testKey === 'string'? JSON.parse(item.testKey): item.testKey
|
|
283
|
+
item.testKey = item.testKey.map(x => {
|
|
284
|
+
if(this.ques(item.quesType)) { // 判断是否单选
|
|
285
|
+
x.checked = x.index === item?.judgeAnswer; //答案
|
|
286
|
+
}else {
|
|
287
|
+
for(let i=0; i<item?.judgeAnswer?.length; i++) {
|
|
288
|
+
if(x.index === item.judgeAnswer[i]) {
|
|
289
|
+
x.checked = true
|
|
290
|
+
break
|
|
291
|
+
}else {
|
|
292
|
+
x.checked = false
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return x
|
|
297
|
+
})
|
|
298
|
+
}
|
|
299
|
+
return item
|
|
300
|
+
})
|
|
301
|
+
this.$nextTick(() => { // 保证所有的数据都渲染完毕
|
|
302
|
+
const w = this.$refs.parer.offsetWidth // 获取父级宽度
|
|
303
|
+
for(let i = 0; i< this.$refs?.subject?.length; i++) {
|
|
304
|
+
this.value[i].right = w - this.$refs.subject[i].offsetLeft
|
|
305
|
+
if(this.$refs.b && this.$refs.b.length > 0) {
|
|
306
|
+
if(this.value[i].right < this.$refs.b[i].offsetWidth) this.value[i].top = 25 // 判断是否换行
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
})
|
|
310
|
+
},
|
|
259
311
|
emits: ['change','modify','del','changeAll','replaceData','choiceData','judgeAnswer','openReasoning','review','subject'],
|
|
260
312
|
methods: {
|
|
313
|
+
randomId() { // 生成随机id
|
|
314
|
+
const id = Math.random().toString(36).substr(2)
|
|
315
|
+
return id.replace(/[0-9]/g, '')
|
|
316
|
+
},
|
|
261
317
|
subject(i) {
|
|
262
|
-
this.
|
|
318
|
+
this.value[i].subject = !this.value[i].subject
|
|
263
319
|
},
|
|
264
320
|
diffLeveNum(v) {
|
|
265
321
|
if(v === '1') return '简单'
|
|
@@ -267,18 +323,18 @@ export default {
|
|
|
267
323
|
if(v === '3') return '困难'
|
|
268
324
|
},
|
|
269
325
|
openReasoning(i) {
|
|
270
|
-
this.$emit('openReasoning', this.
|
|
271
|
-
this.
|
|
326
|
+
this.$emit('openReasoning', this.value[i].reasoning)
|
|
327
|
+
this.value[i].reasoning = !this.value[i].reasoning
|
|
272
328
|
},
|
|
273
329
|
review(i) {
|
|
274
|
-
this.$emit('review', this.
|
|
275
|
-
this.
|
|
330
|
+
this.$emit('review', this.value[i].review )
|
|
331
|
+
this.value[i].review = !this.value[i].review
|
|
276
332
|
},
|
|
277
333
|
openOption(i) {
|
|
278
|
-
this.
|
|
334
|
+
this.value[i].open = !this.value[i].open
|
|
279
335
|
},
|
|
280
336
|
statistics(i) {
|
|
281
|
-
this.
|
|
337
|
+
this.value[i].replace = !this.value[i].replace
|
|
282
338
|
},
|
|
283
339
|
answerChange(e,v,id) {
|
|
284
340
|
let answerArr = []
|