Commit 2e5b8deaa2b764895a190aabe9175d6e75ab8dc9
1 parent
50c1482f
分数设置修改,
Showing
6 changed files
with
129 additions
and
46 deletions
src/views/basic/ask/components/answerQustion.vue
@@ -35,27 +35,31 @@ | @@ -35,27 +35,31 @@ | ||
35 | label="参与度" | 35 | label="参与度" |
36 | sortable | 36 | sortable |
37 | align="center" | 37 | align="center" |
38 | - ><template slot-scope="scoped" | ||
39 | - >{{ scoped.row.participationRate }}%</template | ||
40 | - ></el-table-column | 38 | + ><template slot-scope="scoped">{{ |
39 | + `${scoped.row.participationRate}${ | ||
40 | + scoped.row.participationRate ? "%" : "" | ||
41 | + }` | ||
42 | + }}</template></el-table-column | ||
41 | > | 43 | > |
42 | <el-table-column | 44 | <el-table-column |
43 | prop="correctRate" | 45 | prop="correctRate" |
44 | label="正确率" | 46 | label="正确率" |
45 | sortable | 47 | sortable |
46 | align="center" | 48 | align="center" |
47 | - ><template slot-scope="scoped" | ||
48 | - >{{ scoped.row.correctRate }}%</template | ||
49 | - ></el-table-column | 49 | + ><template slot-scope="scoped">{{ |
50 | + `${scoped.row.correctRate}${scoped.row.correctRate ? "%" : ""}` | ||
51 | + }}</template></el-table-column | ||
50 | > | 52 | > |
51 | <el-table-column | 53 | <el-table-column |
52 | prop="answerCorrectRate" | 54 | prop="answerCorrectRate" |
53 | label="已答正确率" | 55 | label="已答正确率" |
54 | sortable | 56 | sortable |
55 | align="center" | 57 | align="center" |
56 | - ><template slot-scope="scoped" | ||
57 | - >{{ scoped.row.answerCorrectRate }}%</template | ||
58 | - ></el-table-column | 58 | + ><template slot-scope="scoped">{{ |
59 | + `${scoped.row.answerCorrectRate}${ | ||
60 | + scoped.row.answerCorrectRate ? "%" : "" | ||
61 | + }` | ||
62 | + }}</template></el-table-column | ||
59 | > | 63 | > |
60 | <el-table-column | 64 | <el-table-column |
61 | v-for="(item, index) in optionsList" | 65 | v-for="(item, index) in optionsList" |
@@ -84,9 +88,11 @@ | @@ -84,9 +88,11 @@ | ||
84 | prop="participationRate" | 88 | prop="participationRate" |
85 | label="总参与度" | 89 | label="总参与度" |
86 | align="center" | 90 | align="center" |
87 | - ><template slot-scope="scoped" | ||
88 | - >{{ scoped.row.participationRate }}%</template | ||
89 | - ></el-table-column | 91 | + ><template slot-scope="scoped">{{ |
92 | + `${scoped.row.participationRate}${ | ||
93 | + scoped.row.participationRate ? "%" : "" | ||
94 | + }` | ||
95 | + }}</template></el-table-column | ||
90 | > | 96 | > |
91 | 97 | ||
92 | <el-table-column | 98 | <el-table-column |
@@ -95,9 +101,9 @@ | @@ -95,9 +101,9 @@ | ||
95 | align="center" | 101 | align="center" |
96 | ></el-table-column> | 102 | ></el-table-column> |
97 | <el-table-column prop="correctRate" label="总正确率" align="center" | 103 | <el-table-column prop="correctRate" label="总正确率" align="center" |
98 | - ><template slot-scope="scoped" | ||
99 | - >{{ scoped.row.correctRate }}%</template | ||
100 | - ></el-table-column | 104 | + ><template slot-scope="scoped">{{ |
105 | + `${scoped.row.correctRate}${scoped.row.correctRate ? "%" : ""}` | ||
106 | + }}</template></el-table-column | ||
101 | > | 107 | > |
102 | <el-table-column | 108 | <el-table-column |
103 | prop="correctRateRank" | 109 | prop="correctRateRank" |
@@ -109,9 +115,11 @@ | @@ -109,9 +115,11 @@ | ||
109 | prop="answerCorrectRate" | 115 | prop="answerCorrectRate" |
110 | label="已答正确率" | 116 | label="已答正确率" |
111 | align="center" | 117 | align="center" |
112 | - ><template slot-scope="scoped" | ||
113 | - >{{ scoped.row.answerCorrectRate }}%</template | ||
114 | - ></el-table-column | 118 | + ><template slot-scope="scoped">{{ |
119 | + `${scoped.row.answerCorrectRate}${ | ||
120 | + scoped.row.answerCorrectRate ? "%" : "" | ||
121 | + }` | ||
122 | + }}</template></el-table-column | ||
115 | > | 123 | > |
116 | <el-table-column label="查看折线图" align="center"> | 124 | <el-table-column label="查看折线图" align="center"> |
117 | <template slot-scope="scoped"> | 125 | <template slot-scope="scoped"> |
@@ -149,16 +157,27 @@ | @@ -149,16 +157,27 @@ | ||
149 | :label="index == 0 ? '总参与度' : '参与度'" | 157 | :label="index == 0 ? '总参与度' : '参与度'" |
150 | :prop="'participationRate' + item" | 158 | :prop="'participationRate' + item" |
151 | ><template slot-scope="scoped" | 159 | ><template slot-scope="scoped" |
152 | - >{{ scoped.row["participationRate" + item] }}%</template | ||
153 | - > | 160 | + >{{ |
161 | + `${ | ||
162 | + scoped.row["participationRate" + item] | ||
163 | + ? scoped.row["participationRate" + item] + "%" | ||
164 | + : "" | ||
165 | + } | ||
166 | + ` | ||
167 | + }}{{ | ||
168 | + }}</template> | ||
154 | </el-table-column> | 169 | </el-table-column> |
155 | <el-table-column | 170 | <el-table-column |
156 | align="center" | 171 | align="center" |
157 | :label="index == 0 ? '总正确率' : '正确率'" | 172 | :label="index == 0 ? '总正确率' : '正确率'" |
158 | :prop="'correctRate' + item" | 173 | :prop="'correctRate' + item" |
159 | - ><template slot-scope="scoped" | ||
160 | - >{{ scoped.row["correctRate" + item] }}%</template | ||
161 | - > | 174 | + ><template slot-scope="scoped">{{ |
175 | + `${ | ||
176 | + scoped.row["correctRate" + item] | ||
177 | + ? scoped.row["correctRate" + item] + "%" | ||
178 | + : "" | ||
179 | + }` | ||
180 | + }}</template> | ||
162 | </el-table-column> | 181 | </el-table-column> |
163 | </el-table-column> | 182 | </el-table-column> |
164 | <el-table-column label="查看雷达图" align="center"> | 183 | <el-table-column label="查看雷达图" align="center"> |
@@ -188,7 +207,12 @@ | @@ -188,7 +207,12 @@ | ||
188 | :xAxis="xAxis" | 207 | :xAxis="xAxis" |
189 | :tooltipFormatter="true" | 208 | :tooltipFormatter="true" |
190 | /> | 209 | /> |
191 | - <RadarChart v-if="types == 3" id="askRadarChart" :params="chartData" :tooltipFormatter="true"/> | 210 | + <RadarChart |
211 | + v-if="types == 3" | ||
212 | + id="askRadarChart" | ||
213 | + :params="chartData" | ||
214 | + :tooltipFormatter="true" | ||
215 | + /> | ||
192 | </div> | 216 | </div> |
193 | </el-dialog> | 217 | </el-dialog> |
194 | </div> | 218 | </div> |
src/views/basic/device/index.vue
@@ -654,7 +654,7 @@ | @@ -654,7 +654,7 @@ | ||
654 | </div> | 654 | </div> |
655 | </div> | 655 | </div> |
656 | <div class="dialog-footer" slot="footer"> | 656 | <div class="dialog-footer" slot="footer"> |
657 | - <el-button @click="diaUp = false">取 消</el-button> | 657 | + <el-button @click="diaLog = false">取 消</el-button> |
658 | </div> | 658 | </div> |
659 | </el-dialog> | 659 | </el-dialog> |
660 | </div> | 660 | </div> |
src/views/basic/setUp/archived.vue
@@ -25,12 +25,12 @@ | @@ -25,12 +25,12 @@ | ||
25 | <span class="s-txt">确定班级:</span> | 25 | <span class="s-txt">确定班级:</span> |
26 | <i class="el-icon-loading" v-show="loadingClass"></i> | 26 | <i class="el-icon-loading" v-show="loadingClass"></i> |
27 | <div class="check-box" v-if="classList.length && !loadingClass"> | 27 | <div class="check-box" v-if="classList.length && !loadingClass"> |
28 | - <p class="all-check"> | 28 | + <!-- <p class="all-check"> |
29 | <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | 29 | <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" |
30 | @change="handleCheckAllChange">全选</el-checkbox> | 30 | @change="handleCheckAllChange">全选</el-checkbox> |
31 | - </p> | 31 | + </p> --> |
32 | <el-checkbox-group v-model="classIds" @change="handleCheckedChange"> | 32 | <el-checkbox-group v-model="classIds" @change="handleCheckedChange"> |
33 | - <el-checkbox v-for="item in classList" :key="item.id" :label="item.id">{{ | 33 | + <el-checkbox disabled v-for="item in classList" :key="item.id" :label="item.id">{{ |
34 | item.className | 34 | item.className |
35 | }}</el-checkbox> | 35 | }}</el-checkbox> |
36 | </el-checkbox-group> | 36 | </el-checkbox-group> |
src/views/basic/setUp/student.vue
@@ -604,10 +604,14 @@ export default { | @@ -604,10 +604,14 @@ export default { | ||
604 | } | 604 | } |
605 | }, | 605 | }, |
606 | async removeStu(obj, index, $event) { | 606 | async removeStu(obj, index, $event) { |
607 | + let query = {}; | ||
608 | + if (obj.classList.length) { | ||
609 | + query.classId = obj.classList[0].id; | ||
610 | + } | ||
607 | const { data, status, info } = await this.$request.delStudent({ | 611 | const { data, status, info } = await this.$request.delStudent({ |
608 | type: this.query.classType, | 612 | type: this.query.classType, |
609 | studentId: obj.id, | 613 | studentId: obj.id, |
610 | - classId: this.query.classId, | 614 | + ...query, |
611 | }); | 615 | }); |
612 | if (status === 0) { | 616 | if (status === 0) { |
613 | this.$message.success("删除成功"); | 617 | this.$message.success("删除成功"); |
src/views/basic/test/components/scoreSet.vue
@@ -43,26 +43,32 @@ | @@ -43,26 +43,32 @@ | ||
43 | <el-table-column prop="score" label="总得分" align="center" fixed | 43 | <el-table-column prop="score" label="总得分" align="center" fixed |
44 | ><template slot-scope="scoped"> | 44 | ><template slot-scope="scoped"> |
45 | <el-input | 45 | <el-input |
46 | + v-if="isSetScore" | ||
46 | type="number" | 47 | type="number" |
47 | :min="0" | 48 | :min="0" |
48 | v-model="scoped.row.all" | 49 | v-model="scoped.row.all" |
49 | - ></el-input> </template | ||
50 | - ></el-table-column> | 50 | + ></el-input> |
51 | + <template v-else>{{ scoped.row.all }}</template> | ||
52 | + </template></el-table-column | ||
53 | + > | ||
51 | <el-table-column prop="objectiveScore" label="客观题分" align="center" | 54 | <el-table-column prop="objectiveScore" label="客观题分" align="center" |
52 | ><template slot-scope="scoped"> | 55 | ><template slot-scope="scoped"> |
53 | - <el-input | 56 | + <!-- <el-input |
54 | type="number" | 57 | type="number" |
55 | :min="0" | 58 | :min="0" |
56 | v-model="scoped.row.object" | 59 | v-model="scoped.row.object" |
57 | - ></el-input> </template | ||
58 | - ></el-table-column> | 60 | + ></el-input> --> |
61 | + {{ scoped.row.object }} | ||
62 | + </template></el-table-column | ||
63 | + > | ||
59 | <el-table-column prop="subjectiveScore" label="主观题分" align="center"> | 64 | <el-table-column prop="subjectiveScore" label="主观题分" align="center"> |
60 | <template slot-scope="scoped"> | 65 | <template slot-scope="scoped"> |
61 | - <el-input | 66 | + <!-- <el-input |
62 | type="number" | 67 | type="number" |
63 | :min="0" | 68 | :min="0" |
64 | v-model="scoped.row.subject" | 69 | v-model="scoped.row.subject" |
65 | - ></el-input> | 70 | + ></el-input> --> |
71 | + {{ scoped.row.subject }} | ||
66 | </template> | 72 | </template> |
67 | </el-table-column> | 73 | </el-table-column> |
68 | <!-- <el-table-column v-for="(item, index) in questionList" :key="index" :label="'第' + cNum[index] + '大题'" --> | 74 | <!-- <el-table-column v-for="(item, index) in questionList" :key="index" :label="'第' + cNum[index] + '大题'" --> |
@@ -82,7 +88,8 @@ | @@ -82,7 +88,8 @@ | ||
82 | $event, | 88 | $event, |
83 | question.questionScore, | 89 | question.questionScore, |
84 | scoped.row.scoreMap, | 90 | scoped.row.scoreMap, |
85 | - question.questionId | 91 | + question.questionId, |
92 | + scoped.row | ||
86 | ) | 93 | ) |
87 | " | 94 | " |
88 | v-model="scoped.row.scoreMap[question.questionId]" | 95 | v-model="scoped.row.scoreMap[question.questionId]" |
@@ -145,22 +152,73 @@ export default { | @@ -145,22 +152,73 @@ export default { | ||
145 | questionList: [], | 152 | questionList: [], |
146 | cNum: cNum, | 153 | cNum: cNum, |
147 | tableMaxHeight: 300, | 154 | tableMaxHeight: 300, |
155 | + isSetScore: true, | ||
148 | }; | 156 | }; |
149 | }, | 157 | }, |
150 | watch: { | 158 | watch: { |
151 | diaScoreSet: { | 159 | diaScoreSet: { |
152 | handler: function (nVal) { | 160 | handler: function (nVal) { |
153 | if (nVal) { | 161 | if (nVal) { |
162 | + this.isSetScore = true; | ||
154 | this._QueryData(); | 163 | this._QueryData(); |
155 | } | 164 | } |
156 | }, | 165 | }, |
157 | }, | 166 | }, |
158 | }, | 167 | }, |
159 | methods: { | 168 | methods: { |
160 | - setScore(val, max, obj, questionId) { | 169 | + setScore(val, max, obj, questionId, rowData) { |
161 | if (max && Number(val) > Number(max)) { | 170 | if (max && Number(val) > Number(max)) { |
162 | obj[questionId] = max; | 171 | obj[questionId] = max; |
163 | } | 172 | } |
173 | + if (!this.isSetScore) { | ||
174 | + let { score, object, subject } = this.getScore(rowData); | ||
175 | + rowData.all = score; | ||
176 | + rowData.object = object; | ||
177 | + rowData.subject = subject; | ||
178 | + } | ||
179 | + }, | ||
180 | + //计算总分 | ||
181 | + setAllScore(obj) { | ||
182 | + let { score } = this.getScore(obj); | ||
183 | + return score; | ||
184 | + }, | ||
185 | + //计算客观总分 | ||
186 | + setObjectScore(obj) { | ||
187 | + let { object } = this.getScore(obj); | ||
188 | + return object; | ||
189 | + }, | ||
190 | + //计算主观总分 | ||
191 | + setSubjectScore(obj) { | ||
192 | + let { subject } = this.getScore(obj); | ||
193 | + return subject; | ||
194 | + }, | ||
195 | + getScore(obj) { | ||
196 | + let score = 0; | ||
197 | + let subject = 0; | ||
198 | + let object = 0; | ||
199 | + this.questionList.map((question) => { | ||
200 | + let keys = question.questionId; | ||
201 | + if (!obj.scoreMap[keys]) { | ||
202 | + if (obj.scoreMap[keys] == 0) { | ||
203 | + obj.scoreMap[keys] = 0; | ||
204 | + } else { | ||
205 | + obj.scoreMap[keys] = ""; | ||
206 | + } | ||
207 | + } else { | ||
208 | + let num = Number(obj.scoreMap[keys]); | ||
209 | + obj.scoreMap[keys] = num; | ||
210 | + if (num > 0) { | ||
211 | + this.isSetScore = false; | ||
212 | + } | ||
213 | + score += num; | ||
214 | + if (question.questionType == 5) { | ||
215 | + subject += num; | ||
216 | + } else { | ||
217 | + object += num; | ||
218 | + } | ||
219 | + } | ||
220 | + }); | ||
221 | + return { score, subject, object }; | ||
164 | }, | 222 | }, |
165 | closeScoreSet() { | 223 | closeScoreSet() { |
166 | this.$emit("closeScoreSet"); | 224 | this.$emit("closeScoreSet"); |
@@ -205,12 +263,9 @@ export default { | @@ -205,12 +263,9 @@ export default { | ||
205 | } else { | 263 | } else { |
206 | let num = Number(item.scoreMap[keys]); | 264 | let num = Number(item.scoreMap[keys]); |
207 | item.scoreMap[keys] = num; | 265 | item.scoreMap[keys] = num; |
208 | - // item.score += num | ||
209 | - // if (question.questionType == 5) { | ||
210 | - // item.subjectiveScore += num | ||
211 | - // } else { | ||
212 | - // item.objectiveScore += num | ||
213 | - // } | 266 | + if (num > 0) { |
267 | + this.isSetScore = false; | ||
268 | + } | ||
214 | } | 269 | } |
215 | }); | 270 | }); |
216 | 271 |
vue.config.js
@@ -23,8 +23,8 @@ module.exports = { | @@ -23,8 +23,8 @@ module.exports = { | ||
23 | proxy: { | 23 | proxy: { |
24 | "/": { | 24 | "/": { |
25 | // target:"http://ezquiz.sunvotecloud.cn", | 25 | // target:"http://ezquiz.sunvotecloud.cn", |
26 | - // target:"http://121.40.127.171", | ||
27 | - target:"http://192.168.3.221:8080", | 26 | + // target:"http://192.168.3.221:8080", |
27 | + target:"http://121.40.127.171", | ||
28 | changeOrigin: true, | 28 | changeOrigin: true, |
29 | ws:true, | 29 | ws:true, |
30 | }, | 30 | }, |