zydx-plus 1.32.227 → 1.32.229
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,15 @@ 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);
|
|
241
|
+
.choice-red{
|
|
242
|
+
color: red;
|
|
261
243
|
}
|
|
262
|
-
.
|
|
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{
|
|
244
|
+
.task {
|
|
282
245
|
display: flex;
|
|
283
246
|
justify-content: center;
|
|
247
|
+
}
|
|
248
|
+
.task>span{
|
|
284
249
|
font-size: 16px;
|
|
285
250
|
font-weight: 700;
|
|
286
|
-
}
|
|
287
|
-
.task span{
|
|
288
251
|
flex: 1;
|
|
289
252
|
}
|
|
@@ -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.error,'choice-red': disabled&&ts.checked&&item.error}">{{ 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,62 +185,17 @@ 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.
|
|
193
|
-
this.
|
|
194
|
-
item.choice = true
|
|
195
|
-
item.right = 0
|
|
196
|
-
item.top = 0
|
|
197
|
-
item.open = true
|
|
198
|
-
item.replace = true
|
|
199
|
-
item.reasoning = true
|
|
200
|
-
item.review = true
|
|
201
|
-
item.subject = true
|
|
202
|
-
if(item.alist) {
|
|
203
|
-
item.alist.map(x => {
|
|
204
|
-
x.annexContent = json2html({node: "root",child: JSON.parse(x.annexContent)})
|
|
205
|
-
return x
|
|
206
|
-
})
|
|
207
|
-
}
|
|
208
|
-
if(item.testKey) {
|
|
209
|
-
item.testKey = typeof item.testKey === 'string'? JSON.parse(item.testKey): item.testKey
|
|
210
|
-
item.testKey = item.testKey.map(x => {
|
|
211
|
-
if(this.ques(item.quesType)) { // 判断是否单选
|
|
212
|
-
x.checked = x.index === item?.judgeAnswer; //答案
|
|
213
|
-
}else {
|
|
214
|
-
for(let i=0; i<item?.judgeAnswer?.length; i++) {
|
|
215
|
-
if(x.index === item.judgeAnswer[i]) {
|
|
216
|
-
x.checked = true
|
|
217
|
-
break
|
|
218
|
-
}else {
|
|
219
|
-
x.checked = false
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
return x
|
|
224
|
-
})
|
|
225
|
-
}
|
|
226
|
-
if(item.stuAnswer) {
|
|
227
|
-
item.stuAnswer.answer = item.stuAnswer.answer.map(x => {
|
|
228
|
-
x = json2html(x)
|
|
229
|
-
return x
|
|
230
|
-
})
|
|
231
|
-
}
|
|
232
|
-
return item
|
|
233
|
-
})
|
|
234
|
-
this.$nextTick(() => { // 保证所有的数据都渲染完毕
|
|
235
|
-
const w = this.$refs.parer.offsetWidth // 获取父级宽度
|
|
236
|
-
for(let i = 0; i< this.$refs?.subject?.length; i++) {
|
|
237
|
-
this.value[i].right = w - this.$refs.subject[i].offsetLeft
|
|
238
|
-
if(this.$refs.b && this.$refs.b.length > 0) {
|
|
239
|
-
if(this.value[i].right < this.$refs.b[i].offsetWidth) this.value[i].top = 25 // 判断是否换行
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
})
|
|
197
|
+
if(this.state) return
|
|
198
|
+
this.init()
|
|
243
199
|
},
|
|
244
200
|
immediate: true,
|
|
245
201
|
},
|
|
@@ -256,10 +212,69 @@ export default {
|
|
|
256
212
|
deep: true
|
|
257
213
|
}
|
|
258
214
|
},
|
|
215
|
+
mounted() {
|
|
216
|
+
this.id = this.randomId()
|
|
217
|
+
if(!this.state) return
|
|
218
|
+
this.init()
|
|
219
|
+
},
|
|
259
220
|
emits: ['change','modify','del','changeAll','replaceData','choiceData','judgeAnswer','openReasoning','review','subject'],
|
|
260
221
|
methods: {
|
|
222
|
+
init() {
|
|
223
|
+
this.value = JSON.parse(JSON.stringify(this.data))
|
|
224
|
+
this.value.map((item,index) => { // 转换html
|
|
225
|
+
item.choice = true
|
|
226
|
+
item.right = 0
|
|
227
|
+
item.top = 0
|
|
228
|
+
item.open = item.open !== undefined? item.open: true
|
|
229
|
+
item.replace = item.replace !== undefined? item.replace: true
|
|
230
|
+
item.reasoning = item.reasoning !== undefined? item.reasoning: true
|
|
231
|
+
item.review = item.review !== undefined? item.review: true
|
|
232
|
+
item.subject = item.subject !== undefined? item.subject: true
|
|
233
|
+
item.error = item.error !== undefined? item.error: false
|
|
234
|
+
if(item.alist) {
|
|
235
|
+
item.alist.map(x => {
|
|
236
|
+
x.annexContent = json2html({node: "root",child: JSON.parse(x.annexContent)})
|
|
237
|
+
return x
|
|
238
|
+
})
|
|
239
|
+
}
|
|
240
|
+
if(item.testKey) {
|
|
241
|
+
item.testKey = typeof item.testKey === 'string'? JSON.parse(item.testKey): item.testKey
|
|
242
|
+
let judge = item?.judgeAnswer
|
|
243
|
+
if(item.stuAnswer) judge = item.stuAnswer?.answer
|
|
244
|
+
item.testKey = item.testKey.map(x => {
|
|
245
|
+
if(this.ques(item.quesType)) { // 判断是否单选
|
|
246
|
+
x.checked = x.index === judge; //答案
|
|
247
|
+
}else {
|
|
248
|
+
for(let i=0; i<judge?.length; i++) {
|
|
249
|
+
if(x.index === judge[i]) {
|
|
250
|
+
x.checked = true
|
|
251
|
+
break
|
|
252
|
+
}else {
|
|
253
|
+
x.checked = false
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return x
|
|
258
|
+
})
|
|
259
|
+
}
|
|
260
|
+
return item
|
|
261
|
+
})
|
|
262
|
+
this.$nextTick(() => { // 保证所有的数据都渲染完毕
|
|
263
|
+
const w = this.$refs.parer.offsetWidth // 获取父级宽度
|
|
264
|
+
for(let i = 0; i< this.$refs?.subject?.length; i++) {
|
|
265
|
+
this.value[i].right = w - this.$refs.subject[i].offsetLeft
|
|
266
|
+
if(this.$refs.b && this.$refs.b.length > 0) {
|
|
267
|
+
if(this.value[i].right < this.$refs.b[i].offsetWidth) this.value[i].top = 25 // 判断是否换行
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
})
|
|
271
|
+
},
|
|
272
|
+
randomId() { // 生成随机id
|
|
273
|
+
const id = Math.random().toString(36).substr(2)
|
|
274
|
+
return id.replace(/[0-9]/g, '')
|
|
275
|
+
},
|
|
261
276
|
subject(i) {
|
|
262
|
-
this.
|
|
277
|
+
this.value[i].subject = !this.value[i].subject
|
|
263
278
|
},
|
|
264
279
|
diffLeveNum(v) {
|
|
265
280
|
if(v === '1') return '简单'
|
|
@@ -267,18 +282,18 @@ export default {
|
|
|
267
282
|
if(v === '3') return '困难'
|
|
268
283
|
},
|
|
269
284
|
openReasoning(i) {
|
|
270
|
-
this.$emit('openReasoning', this.
|
|
271
|
-
this.
|
|
285
|
+
this.$emit('openReasoning', this.value[i].reasoning)
|
|
286
|
+
this.value[i].reasoning = !this.value[i].reasoning
|
|
272
287
|
},
|
|
273
288
|
review(i) {
|
|
274
|
-
this.$emit('review', this.
|
|
275
|
-
this.
|
|
289
|
+
this.$emit('review', this.value[i].review )
|
|
290
|
+
this.value[i].review = !this.value[i].review
|
|
276
291
|
},
|
|
277
292
|
openOption(i) {
|
|
278
|
-
this.
|
|
293
|
+
this.value[i].open = !this.value[i].open
|
|
279
294
|
},
|
|
280
295
|
statistics(i) {
|
|
281
|
-
this.
|
|
296
|
+
this.value[i].replace = !this.value[i].replace
|
|
282
297
|
},
|
|
283
298
|
answerChange(e,v,id) {
|
|
284
299
|
let answerArr = []
|