zydx-plus 1.32.180 → 1.32.181
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 +1 -1
- package/src/components/question/src/question.vue +77 -20
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -9,52 +9,71 @@
|
|
|
9
9
|
<th>难</th>
|
|
10
10
|
<th>合计题量</th>
|
|
11
11
|
<th>合计分值</th>
|
|
12
|
-
<th v-if="!
|
|
12
|
+
<th v-if="!readOnlys&&butShows">操作</th>
|
|
13
13
|
</tr>
|
|
14
14
|
<tbody v-for="(item,index) in question" :key="index">
|
|
15
15
|
<tr>
|
|
16
|
-
<td rowspan="2">{{ toChineseNum(index + 1) }}</td>
|
|
16
|
+
<td rowspan="2">{{ empty? '-':toChineseNum(index + 1) }}</td>
|
|
17
17
|
<td rowspan="2">{{ item.quesName }}</td>
|
|
18
18
|
<td>
|
|
19
|
-
<div class="qu-input" :style="{'margin-left':
|
|
20
|
-
<span
|
|
19
|
+
<div v-if="empty" class="qu-input" :style="{'margin-left': '0px'}">
|
|
20
|
+
<span>{{ item.easy }}</span>
|
|
21
|
+
</div>
|
|
22
|
+
<div v-else class="qu-input" :style="{'margin-left': readOnlys?'0px':'-10px'}">
|
|
23
|
+
<span v-if="readOnlys">{{ item.easy }}</span>
|
|
21
24
|
<input v-else type="number" placeholder="题量" :value="item.easy" @input="totalQuestions($event,1,index)" @keypress="isNumberKey($event,1)" />
|
|
22
25
|
</div>
|
|
23
26
|
</td>
|
|
24
27
|
<td>
|
|
25
|
-
<div class="qu-input" :style="{'margin-left':
|
|
26
|
-
<span
|
|
28
|
+
<div v-if="empty" class="qu-input" :style="{'margin-left': '0px'}">
|
|
29
|
+
<span>{{ item.hard }}</span>
|
|
30
|
+
</div>
|
|
31
|
+
<div v-else class="qu-input" :style="{'margin-left': readOnlys?'0px':'-10px'}">
|
|
32
|
+
<span v-if="readOnlys">{{ item.hard }}</span>
|
|
27
33
|
<input v-else type="number" placeholder="题量" :value="item.hard" @input="totalQuestions($event,2,index)" @keypress="isNumberKey($event,1)" />
|
|
28
34
|
</div>
|
|
29
35
|
</td>
|
|
30
36
|
<td>
|
|
31
|
-
<div class="qu-input" :style="{'margin-left':
|
|
32
|
-
<span
|
|
37
|
+
<div v-if="empty" class="qu-input" :style="{'margin-left': '0px'}">
|
|
38
|
+
<span>{{ item.mid }}</span>
|
|
39
|
+
</div>
|
|
40
|
+
<div v-else class="qu-input" :style="{'margin-left': readOnlys?'0px':'-10px'}">
|
|
41
|
+
<span v-if="readOnlys">{{ item.mid }}</span>
|
|
33
42
|
<input v-else type="number" placeholder="题量" :value="item.mid" @input="totalQuestions($event,3,index)" @keypress="isNumberKey($event,1)" />
|
|
34
43
|
</div>
|
|
35
44
|
</td>
|
|
36
45
|
<td rowspan="2">{{ item.count }}</td>
|
|
37
46
|
<td rowspan="2">{{ item.allScore }}</td>
|
|
38
|
-
<td rowspan="2" v-if="!
|
|
39
|
-
<
|
|
47
|
+
<td rowspan="2" v-if="!readOnlys&&butShows">
|
|
48
|
+
<span class="buts" v-if="empty">-</span>
|
|
49
|
+
<button v-else class="but" @click="cancel(index)">撤销选择</button>
|
|
40
50
|
</td>
|
|
41
51
|
</tr>
|
|
42
52
|
<tr>
|
|
43
53
|
<td>
|
|
44
|
-
<div class="qu-input" :style="{'margin-left':
|
|
45
|
-
<span
|
|
54
|
+
<div v-if="empty" class="qu-input" :style="{'margin-left': '0px'}">
|
|
55
|
+
<span>{{ item.easyScore }}</span>
|
|
56
|
+
</div>
|
|
57
|
+
<div v-else class="qu-input" :style="{'margin-left': readOnlys?'0px':'-10px'}">
|
|
58
|
+
<span v-if="readOnlys">{{ item.easyScore }}</span>
|
|
46
59
|
<input v-else type="number" placeholder="分值" :value="item.easyScore" @input="totalQuestions($event,4,index)" @keypress="isNumberKey($event,2)" />
|
|
47
60
|
</div>
|
|
48
61
|
</td>
|
|
49
62
|
<td>
|
|
50
|
-
<div class="qu-input" :style="{'margin-left':
|
|
51
|
-
<span
|
|
63
|
+
<div v-if="empty" class="qu-input" :style="{'margin-left': '0px'}">
|
|
64
|
+
<span>{{ item.hardScore }}</span>
|
|
65
|
+
</div>
|
|
66
|
+
<div v-else class="qu-input" :style="{'margin-left': readOnlys?'0px':'-10px'}">
|
|
67
|
+
<span v-if="readOnlys">{{ item.hardScore }}</span>
|
|
52
68
|
<input v-else type="number" placeholder="分值" :value="item.hardScore" @input="totalQuestions($event,5,index)" @keypress="isNumberKey($event,2)" />
|
|
53
69
|
</div>
|
|
54
70
|
</td>
|
|
55
71
|
<td>
|
|
56
|
-
<div class="qu-input" :style="{'margin-left':
|
|
57
|
-
<span
|
|
72
|
+
<div v-if="empty" class="qu-input" :style="{'margin-left': '0px'}">
|
|
73
|
+
<span>{{ item.midScore }}</span>
|
|
74
|
+
</div>
|
|
75
|
+
<div v-else class="qu-input" :style="{'margin-left': readOnlys?'0px':'-10px'}">
|
|
76
|
+
<span v-if="readOnlys">{{ item.midScore }}</span>
|
|
58
77
|
<input v-else type="number" placeholder="分值" :value="item.midScore" @input="totalQuestions($event,6,index)" @keypress="isNumberKey($event,2)" />
|
|
59
78
|
</div>
|
|
60
79
|
</td>
|
|
@@ -66,7 +85,7 @@
|
|
|
66
85
|
<td>{{ hardNum === 0? '-': hardNum }}</td>
|
|
67
86
|
<td>{{ midNum === 0? '-': midNum }}</td>
|
|
68
87
|
<td>试卷总分</td>
|
|
69
|
-
<td :colspan="
|
|
88
|
+
<td :colspan="readOnlys&&butShows? 1: 2">{{ totalNum === 0? '-': totalNum }}</td>
|
|
70
89
|
</tr>
|
|
71
90
|
</table>
|
|
72
91
|
</div>
|
|
@@ -82,7 +101,10 @@ export default {
|
|
|
82
101
|
easyNum: 0,
|
|
83
102
|
hardNum: 0,
|
|
84
103
|
midNum: 0,
|
|
85
|
-
totalNum: 0
|
|
104
|
+
totalNum: 0,
|
|
105
|
+
readOnlys: this.readOnly,
|
|
106
|
+
butShows: this.butShow,
|
|
107
|
+
empty: false
|
|
86
108
|
}
|
|
87
109
|
},
|
|
88
110
|
props: {
|
|
@@ -96,13 +118,36 @@ export default {
|
|
|
96
118
|
},
|
|
97
119
|
butShow: {
|
|
98
120
|
type: Boolean,
|
|
99
|
-
default:
|
|
121
|
+
default: true
|
|
100
122
|
}
|
|
101
123
|
},
|
|
102
124
|
watch: {
|
|
125
|
+
readOnly: {
|
|
126
|
+
handler(val) {
|
|
127
|
+
this.readOnlys = val
|
|
128
|
+
},
|
|
129
|
+
deep: true
|
|
130
|
+
},
|
|
103
131
|
data: {
|
|
104
132
|
handler(val) {
|
|
105
|
-
|
|
133
|
+
if(val.length === 0) {
|
|
134
|
+
this.question = [{
|
|
135
|
+
quesType: '-',
|
|
136
|
+
quesName: '-',
|
|
137
|
+
easyScore: '-',
|
|
138
|
+
hardScore: '-',
|
|
139
|
+
midScore: '-',
|
|
140
|
+
easy: '-',
|
|
141
|
+
hard: '-',
|
|
142
|
+
mid: '-',
|
|
143
|
+
allScore: '-',
|
|
144
|
+
count: '-',
|
|
145
|
+
}]
|
|
146
|
+
this.empty = true
|
|
147
|
+
}else {
|
|
148
|
+
this.empty = false
|
|
149
|
+
this.getQuestionReadOnly(val)
|
|
150
|
+
}
|
|
106
151
|
},
|
|
107
152
|
immediate: true
|
|
108
153
|
}
|
|
@@ -261,4 +306,16 @@ export default {
|
|
|
261
306
|
min-width: 60px;
|
|
262
307
|
height: 21px;
|
|
263
308
|
}
|
|
309
|
+
.buts{
|
|
310
|
+
margin-left: 1px;
|
|
311
|
+
font-size: 12px;
|
|
312
|
+
background-color: transparent;
|
|
313
|
+
border-radius: 3px;
|
|
314
|
+
padding: 2px 5px;
|
|
315
|
+
cursor: pointer;
|
|
316
|
+
min-width: 60px;
|
|
317
|
+
height: 21px;
|
|
318
|
+
display: inline-block;
|
|
319
|
+
font-weight: bold;
|
|
320
|
+
}
|
|
264
321
|
</style>
|