zydx-plus 1.32.226 → 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
|
},
|
|
@@ -221,7 +221,7 @@ input[name='check'] {
|
|
|
221
221
|
}
|
|
222
222
|
.review{
|
|
223
223
|
padding-left: 2em;
|
|
224
|
-
|
|
224
|
+
box-sizing: border-box;
|
|
225
225
|
}
|
|
226
226
|
.review-title{
|
|
227
227
|
padding: 6px 0 4px 0;
|
|
@@ -238,3 +238,6 @@ input[name='check'] {
|
|
|
238
238
|
border: 0;
|
|
239
239
|
text-align: center;
|
|
240
240
|
}
|
|
241
|
+
.choice-red{
|
|
242
|
+
color: red;
|
|
243
|
+
}
|
|
@@ -2,8 +2,16 @@
|
|
|
2
2
|
<div :class="{paper: borderShow}">
|
|
3
3
|
<div class="parer-cont" ref="parer">
|
|
4
4
|
<div class="paper-choice" :class="{'array-ch': !styleText(item.testKey)}" v-for="(item,index) in value">
|
|
5
|
+
<div v-if="task" class="task">
|
|
6
|
+
<span>作业题目1:</span>
|
|
7
|
+
<div class="task-but">
|
|
8
|
+
<button class="but" :class="{'buts-actives': item.subject}" @click="subject(index)">{{ item.subject?'收起题目':'展开题目'}}</button>
|
|
9
|
+
<button class="but" :class="{'buts-actives': item.reasoning}" @click="openReasoning(index)">{{ item.reasoning?'收起回答':'展开回答'}}</button>
|
|
10
|
+
<button class="but" :class="{'buts-actives': item.review}" @click="review(index)">{{ item.review?'收起批阅':'展开批阅'}}</button>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
5
13
|
<div class="subject">
|
|
6
|
-
<div class="subject-title">
|
|
14
|
+
<div class="subject-title" v-if="item.subject">
|
|
7
15
|
<input v-if="multipleShow" type="checkbox" :checked="item.checked" @change="checkboxChange($event,index)" name="check" />
|
|
8
16
|
<span>{{ item.order? item.order: index + 1 }}.<em v-html="item.title"></em><em v-if="scoreShow">({{ item.score }}分)</em>
|
|
9
17
|
<i class="subject-but" ref="subject">
|
|
@@ -27,8 +35,8 @@
|
|
|
27
35
|
<button class="but" :class="{'buts-actives': item.replace}" @click="statistics(index)">{{ item.replace?'收统计表':'统计表'}}</button>
|
|
28
36
|
</b>
|
|
29
37
|
<b :style="{right: -item.right + 'px', top: item.top + 'px'}" v-if="reasoning" ref="b">
|
|
30
|
-
<button class="but" :class="{'buts-actives': item.reasoning}" @click="openReasoning(index)">{{ item.reasoning?
|
|
31
|
-
<button class="but" :class="{'buts-actives': item.review}" @click="review(index)">{{ item.review?
|
|
38
|
+
<button class="but" :class="{'buts-actives': item.reasoning}" @click="openReasoning(index)">{{ item.reasoning?reasoningBut[0].startName:reasoningBut[0].endName}}</button>
|
|
39
|
+
<button class="but" :class="{'buts-actives': item.review}" @click="review(index)">{{ item.review?reasoningBut[1].startName:reasoningBut[1].endName}}</button>
|
|
32
40
|
</b>
|
|
33
41
|
</i>
|
|
34
42
|
</span>
|
|
@@ -39,41 +47,15 @@
|
|
|
39
47
|
<div class="subject-html-title">{{ titleText }}{{ ind + 1 }}</div>
|
|
40
48
|
<div class="subject-html-cont" v-html="it.annexContent"></div>
|
|
41
49
|
</div>
|
|
42
|
-
<div class="subject-student" v-if="item.reasoning&&item.stuAnswer">
|
|
43
|
-
<div class="reasoning">学生推理:</div>
|
|
44
|
-
<div class="subject-student-edi" v-for="(it,ind) in item.stuAnswer.answer" v-html="it"></div>
|
|
45
|
-
</div>
|
|
46
50
|
</div>
|
|
47
51
|
<div class="choice" v-if="item.testKey" v-show="item.open">
|
|
48
52
|
<div class="choice-box" v-for="(ts,ind) in item.testKey">
|
|
49
53
|
<label>
|
|
50
|
-
<input class="choice-input" v-if="chooseAnswer" :disabled="disabled" :checked="ts.checked" @change="answerChange($event,item
|
|
51
|
-
<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>
|
|
52
56
|
</label>
|
|
53
57
|
</div>
|
|
54
58
|
</div>
|
|
55
|
-
<div class="table review" v-if="item.review&&item.scoreList">
|
|
56
|
-
<div class="review-title">
|
|
57
|
-
<span>训练批阅:</span>
|
|
58
|
-
<button class="but" @click="completeReview(item.scoreList)">完成批阅</button>
|
|
59
|
-
</div>
|
|
60
|
-
<table border="0" cellspacing="0" cellpadding="0">
|
|
61
|
-
<tr>
|
|
62
|
-
<td class="tab-title">序号</td>
|
|
63
|
-
<td class="tab-title">批阅人</td>
|
|
64
|
-
<td class="tab-title">批阅得分</td>
|
|
65
|
-
<td class="tab-title">矫正得分</td>
|
|
66
|
-
<td class="tab-title">合计得分</td>
|
|
67
|
-
</tr>
|
|
68
|
-
<tr v-for="(it,ind) in item.scoreList">
|
|
69
|
-
<td>{{ ind + 1 }}</td>
|
|
70
|
-
<td>{{ it.stuName }}</td>
|
|
71
|
-
<td>{{ it.studentScore }}</td>
|
|
72
|
-
<td><input type="text" v-model="it.correctScore" placeholder="请输入分值" /> </td>
|
|
73
|
-
<td>{{ it.correctTeacher }}</td>
|
|
74
|
-
</tr>
|
|
75
|
-
</table>
|
|
76
|
-
</div>
|
|
77
59
|
<div class="table" v-if="item.replace&&item.itemList&&collapse&&item.quesType === '102_1'">
|
|
78
60
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
79
61
|
<tr>
|
|
@@ -129,7 +111,8 @@ export default {
|
|
|
129
111
|
multipleShow: this.multiple,
|
|
130
112
|
choiceState: true,
|
|
131
113
|
replaceShow: this.replace,
|
|
132
|
-
replaceOpen: false
|
|
114
|
+
replaceOpen: false,
|
|
115
|
+
id: null
|
|
133
116
|
}
|
|
134
117
|
},
|
|
135
118
|
props: {
|
|
@@ -191,20 +174,38 @@ export default {
|
|
|
191
174
|
reasoning: {
|
|
192
175
|
type: Boolean,
|
|
193
176
|
default: false
|
|
177
|
+
},
|
|
178
|
+
reasoningBut: {
|
|
179
|
+
type: Array,
|
|
180
|
+
default: [
|
|
181
|
+
{startName: '收起推理',endName: '展开推理'},
|
|
182
|
+
{startName: '收起批阅',endName: '展开批阅'}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
task: {
|
|
186
|
+
type: Boolean,
|
|
187
|
+
default: false
|
|
188
|
+
},
|
|
189
|
+
state: {
|
|
190
|
+
type: Boolean,
|
|
191
|
+
default: false
|
|
194
192
|
}
|
|
195
193
|
},
|
|
196
194
|
watch: {
|
|
197
195
|
data: {
|
|
198
196
|
handler: function (val, oldVal) {
|
|
199
|
-
this.
|
|
197
|
+
if(this.state) return
|
|
198
|
+
this.value = JSON.parse(JSON.stringify(val))
|
|
200
199
|
this.value.map((item,index) => { // 转换html
|
|
201
200
|
item.choice = true
|
|
202
201
|
item.right = 0
|
|
203
202
|
item.top = 0
|
|
204
|
-
item.open = true
|
|
205
|
-
item.replace = true
|
|
206
|
-
item.reasoning = true
|
|
207
|
-
item.review = 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
|
|
208
209
|
if(item.alist) {
|
|
209
210
|
item.alist.map(x => {
|
|
210
211
|
x.annexContent = json2html({node: "root",child: JSON.parse(x.annexContent)})
|
|
@@ -229,12 +230,7 @@ export default {
|
|
|
229
230
|
return x
|
|
230
231
|
})
|
|
231
232
|
}
|
|
232
|
-
|
|
233
|
-
item.stuAnswer.answer = item.stuAnswer.answer.map(x => {
|
|
234
|
-
x = json2html(x)
|
|
235
|
-
return x
|
|
236
|
-
})
|
|
237
|
-
}
|
|
233
|
+
console.log(item)
|
|
238
234
|
return item
|
|
239
235
|
})
|
|
240
236
|
this.$nextTick(() => { // 保证所有的数据都渲染完毕
|
|
@@ -262,10 +258,64 @@ export default {
|
|
|
262
258
|
deep: true
|
|
263
259
|
}
|
|
264
260
|
},
|
|
265
|
-
|
|
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
|
+
},
|
|
311
|
+
emits: ['change','modify','del','changeAll','replaceData','choiceData','judgeAnswer','openReasoning','review','subject'],
|
|
266
312
|
methods: {
|
|
267
|
-
|
|
268
|
-
|
|
313
|
+
randomId() { // 生成随机id
|
|
314
|
+
const id = Math.random().toString(36).substr(2)
|
|
315
|
+
return id.replace(/[0-9]/g, '')
|
|
316
|
+
},
|
|
317
|
+
subject(i) {
|
|
318
|
+
this.value[i].subject = !this.value[i].subject
|
|
269
319
|
},
|
|
270
320
|
diffLeveNum(v) {
|
|
271
321
|
if(v === '1') return '简单'
|
|
@@ -273,16 +323,18 @@ export default {
|
|
|
273
323
|
if(v === '3') return '困难'
|
|
274
324
|
},
|
|
275
325
|
openReasoning(i) {
|
|
276
|
-
this
|
|
326
|
+
this.$emit('openReasoning', this.value[i].reasoning)
|
|
327
|
+
this.value[i].reasoning = !this.value[i].reasoning
|
|
277
328
|
},
|
|
278
329
|
review(i) {
|
|
279
|
-
this
|
|
330
|
+
this.$emit('review', this.value[i].review )
|
|
331
|
+
this.value[i].review = !this.value[i].review
|
|
280
332
|
},
|
|
281
333
|
openOption(i) {
|
|
282
|
-
this.
|
|
334
|
+
this.value[i].open = !this.value[i].open
|
|
283
335
|
},
|
|
284
336
|
statistics(i) {
|
|
285
|
-
this.
|
|
337
|
+
this.value[i].replace = !this.value[i].replace
|
|
286
338
|
},
|
|
287
339
|
answerChange(e,v,id) {
|
|
288
340
|
let answerArr = []
|