zydx-plus 1.32.276 → 1.32.278
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
|
@@ -241,3 +241,25 @@ input[name='check'] {
|
|
|
241
241
|
font-weight: 700;
|
|
242
242
|
flex: 1;
|
|
243
243
|
}
|
|
244
|
+
.choice-ico{
|
|
245
|
+
width: 15px;
|
|
246
|
+
height: 15px;
|
|
247
|
+
display: inline-block;
|
|
248
|
+
border: 1px solid #666;
|
|
249
|
+
border-radius: 3px;
|
|
250
|
+
position: absolute;
|
|
251
|
+
top: 4px;
|
|
252
|
+
left: 2em;
|
|
253
|
+
z-index: 1;
|
|
254
|
+
}
|
|
255
|
+
.check-active{
|
|
256
|
+
background-color: #007acc;
|
|
257
|
+
border: 1px solid #007acc;
|
|
258
|
+
}
|
|
259
|
+
.check-dis{
|
|
260
|
+
background-color: #d0d0d0;
|
|
261
|
+
border: 1px solid #d0d0d0;
|
|
262
|
+
}
|
|
263
|
+
.check-dis-bor{
|
|
264
|
+
border: 1px solid #d0d0d0;
|
|
265
|
+
}
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
@click="review(index)">{{ item.review ? reasoningBut[1].startName : reasoningBut[1].endName }}</button>
|
|
56
56
|
</b>
|
|
57
57
|
<b :style="{right: -item.right + 'px', top: item.top + 'px'}" v-if="customBut.length > 0" ref="b">
|
|
58
|
-
<button class="but" v-for="(
|
|
58
|
+
<button class="but" v-for="(it,ind) in customBut" :class="{'buts-actives': it.active}" @click="customButTap(it,item)">{{ it.name }}</button>
|
|
59
59
|
</b>
|
|
60
60
|
</i>
|
|
61
61
|
</span>
|
|
@@ -71,15 +71,25 @@
|
|
|
71
71
|
</div>
|
|
72
72
|
<div class="choice" v-if="item.testKey" v-show="item.open">
|
|
73
73
|
<div class="choice-box" v-for="(ts,ind) in item.testKey">
|
|
74
|
-
<label>
|
|
74
|
+
<label v-if="ques(item.quesType)">
|
|
75
75
|
<input class="choice-input" v-if="chooseAnswer" :disabled="disabled" :checked="ts.checked"
|
|
76
|
-
@change="answerChange($event,item,`${id}${index}
|
|
76
|
+
@change="answerChange($event,item,`${id}${index}`,null)" type="radio"
|
|
77
77
|
:name="`${id}${index}`"/>
|
|
78
78
|
<span
|
|
79
79
|
:class="{'choice-span': chooseAnswer,'choice-color': disabled&&ts.checked&&!item.error&&!nothing,'choice-red': disabled&&ts.checked&&item.error&&!nothing}">{{
|
|
80
80
|
ts.index
|
|
81
81
|
}}. {{ ts.content[0] }}</span>
|
|
82
82
|
</label>
|
|
83
|
+
<label v-else>
|
|
84
|
+
<input class="choice-input" style="display: none;" v-if="chooseAnswer" :disabled="disabled" :checked="ts.checked"
|
|
85
|
+
@change="answerChange($event,item,`${id}${index}`,ts)" type="checkbox"
|
|
86
|
+
:name="`${id}${index}`"/>
|
|
87
|
+
<i class="choice-ico" :class="{'check-active': ts.checked, 'check-dis': disabled&&ts.checked,'check-dis-bor': disabled&&!ts.checked}"></i>
|
|
88
|
+
<span
|
|
89
|
+
:class="{'choice-span': chooseAnswer,'choice-color': disabled&&ts.checked&&!item.error&&!nothing,'choice-red': disabled&&ts.checked&&item.error&&!nothing}">{{
|
|
90
|
+
ts.index
|
|
91
|
+
}}. {{ ts.content[0] }}</span>
|
|
92
|
+
</label>
|
|
83
93
|
</div>
|
|
84
94
|
</div>
|
|
85
95
|
<div class="table" v-if="item.replace&&item.itemList&&collapse&&item.quesType === '102_1'">
|
|
@@ -122,6 +132,7 @@
|
|
|
122
132
|
</tr>
|
|
123
133
|
</table>
|
|
124
134
|
</div>
|
|
135
|
+
<slot></slot>
|
|
125
136
|
</div>
|
|
126
137
|
</div>
|
|
127
138
|
</div>
|
|
@@ -254,6 +265,18 @@ export default {
|
|
|
254
265
|
},
|
|
255
266
|
emits: ['change', 'modify', 'del', 'changeAll', 'replaceData', 'choiceData', 'judgeAnswer', 'openReasoning', 'review', 'subject'],
|
|
256
267
|
methods: {
|
|
268
|
+
customButTap(e,d) {
|
|
269
|
+
if(e.key === 'option') d.open = !d.open
|
|
270
|
+
if(e.key === 'modify') {
|
|
271
|
+
this.$emit('modify', d)
|
|
272
|
+
return
|
|
273
|
+
}
|
|
274
|
+
if(e.key === 'del') {
|
|
275
|
+
this.$emit('del', d)
|
|
276
|
+
return
|
|
277
|
+
}
|
|
278
|
+
e.onClick(e)
|
|
279
|
+
},
|
|
257
280
|
init() {
|
|
258
281
|
this.value = JSON.parse(JSON.stringify(this.data))
|
|
259
282
|
this.value.map((item, index) => { // 转换html
|
|
@@ -330,7 +353,8 @@ export default {
|
|
|
330
353
|
statistics(i) {
|
|
331
354
|
this.value[i].replace = !this.value[i].replace
|
|
332
355
|
},
|
|
333
|
-
answerChange(e, v, id) {
|
|
356
|
+
answerChange(e, v, id, check) {
|
|
357
|
+
if(check !== null) check.checked = e.target.checked
|
|
334
358
|
let answerArr = []
|
|
335
359
|
const ids = document.getElementsByName(id)
|
|
336
360
|
ids.forEach((x, index) => {
|