Commit 7222c2ebc78a72bab40813722fa60bf5f3c0ff4a
1 parent
109a6161
汇总前置条件修改,教学,行政可汇总
Showing
8 changed files
with
53 additions
and
81 deletions
src/views/basic/ask/analysis.vue
... | ... | @@ -112,7 +112,7 @@ export default { |
112 | 112 | return { |
113 | 113 | role: "", |
114 | 114 | loading: false, |
115 | - classId: "", | |
115 | + classIds: [], | |
116 | 116 | className: "", |
117 | 117 | subjectNames: "", |
118 | 118 | id: [], |
... | ... | @@ -136,7 +136,7 @@ export default { |
136 | 136 | this.types = Number(this.$route.query.types); |
137 | 137 | // this.className = this.$route.query.className; |
138 | 138 | const queryData = JSON.parse(this.$route.query.params); |
139 | - this.classId = this.$route.query.classId; | |
139 | + this.classIds = this.$route.query.classIds; | |
140 | 140 | console.log(this.$route.query); |
141 | 141 | this.subjectNames = this.$route.query.subjectNames.split(","); |
142 | 142 | if (this.types == 1) { |
... | ... | @@ -279,13 +279,13 @@ export default { |
279 | 279 | query.type = this.type - 1; |
280 | 280 | } else { |
281 | 281 | query.periodIds = this.id; |
282 | + query.classIds = this.classIds; | |
282 | 283 | if (this.types == 3) { |
283 | 284 | query.subjectNames = this.subjectNames; |
284 | 285 | } |
285 | 286 | } |
286 | 287 | this.loading = true; |
287 | 288 | let { data, info, status } = await queryData({ |
288 | - classId: this.classId, | |
289 | 289 | ...query, |
290 | 290 | }); |
291 | 291 | this.loading = false; |
... | ... | @@ -307,7 +307,7 @@ export default { |
307 | 307 | queryData = this.$request.cTPhaseAnswerReport; |
308 | 308 | } |
309 | 309 | if (this.types != 1) { |
310 | - query.classId = this.classId; | |
310 | + query.classIds = this.classIds; | |
311 | 311 | } |
312 | 312 | this.loading = true; |
313 | 313 | let { data, info, status } = await queryData({ |
... | ... | @@ -351,16 +351,17 @@ export default { |
351 | 351 | : this.$request.exportPeriodReport; |
352 | 352 | } else if (this.types == 2) { |
353 | 353 | query.periodIds = this.id; |
354 | + query.classIds = this.classIds; | |
354 | 355 | exportPeriodReport = |
355 | 356 | this.role == "ROLE_PERSONAL" |
356 | 357 | ? this.$request.pExportPhaseAnswerReport |
357 | 358 | : this.$request.exportPhaseAnswerReport; |
358 | 359 | } else { |
359 | 360 | query.periodIds = this.id; |
361 | + query.classIds = this.classIds; | |
360 | 362 | exportPeriodReport = this.$request.cTExportPhaseAnswerReport; |
361 | 363 | } |
362 | 364 | const data = await exportPeriodReport({ |
363 | - classId: this.classId, | |
364 | 365 | ...query, |
365 | 366 | }); |
366 | 367 | this.exportLoading = false; | ... | ... |
src/views/basic/ask/list.vue
... | ... | @@ -38,11 +38,14 @@ |
38 | 38 | > |
39 | 39 | <el-table-column align="center" width="48"> |
40 | 40 | <template slot-scope="scope"> |
41 | - <el-checkbox | |
41 | + <!-- <el-checkbox | |
42 | 42 | v-model="multipleSelection" |
43 | 43 | :label="scope.row.id" |
44 | 44 | :disabled="checkboxDisabled(scope.row)" |
45 | 45 | ><span></span |
46 | + ></el-checkbox> --> | |
47 | + <el-checkbox v-model="multipleSelection" :label="scope.row.id" | |
48 | + ><span></span | |
46 | 49 | ></el-checkbox> |
47 | 50 | </template> |
48 | 51 | </el-table-column> |
... | ... | @@ -267,7 +270,7 @@ export default { |
267 | 270 | return; |
268 | 271 | } |
269 | 272 | let subjectArr = []; |
270 | - let classId = ""; | |
273 | + let classIds = []; | |
271 | 274 | let multipleData = []; |
272 | 275 | let multipleSelectionData = []; |
273 | 276 | Object.keys(this.multipleSelectionObj).map((keys) => { |
... | ... | @@ -279,10 +282,11 @@ export default { |
279 | 282 | if (this.multipleSelection.includes(item.id)) { |
280 | 283 | subjectArr.push(item.subjectName); |
281 | 284 | multipleData.push(item); |
282 | - classId = item.classId; | |
285 | + classIds.push(item.classId); | |
283 | 286 | } |
284 | 287 | }); |
285 | 288 | subjectArr = [...new Set(subjectArr)]; |
289 | + classIds = [...new Set(classIds)]; | |
286 | 290 | if (this.multipleSelection.length == 1) { |
287 | 291 | this.$router.push({ |
288 | 292 | path: "/askAnalysis", |
... | ... | @@ -290,6 +294,7 @@ export default { |
290 | 294 | id: JSON.stringify(this.multipleSelection), |
291 | 295 | types: 1, |
292 | 296 | subjectNames: subjectArr[0], |
297 | + classIds: classIds, | |
293 | 298 | params: this.$route.query.params, |
294 | 299 | }, |
295 | 300 | }); |
... | ... | @@ -306,7 +311,8 @@ export default { |
306 | 311 | : 3, |
307 | 312 | subjectNames: subjectArr.join(","), |
308 | 313 | params: this.$route.query.params, |
309 | - classId: classId, | |
314 | + // classId: classId, | |
315 | + classIds: classIds, | |
310 | 316 | }, |
311 | 317 | }); |
312 | 318 | } | ... | ... |
src/views/basic/test/analysis.vue
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | v-if="type == 1" |
18 | 18 | :role="role" |
19 | 19 | :id="id" |
20 | - :classId="classId" | |
20 | + :classIds="classIds" | |
21 | 21 | :subjectName="subjectName" |
22 | 22 | :title="title" |
23 | 23 | :score="score" |
... | ... | @@ -27,14 +27,14 @@ |
27 | 27 | v-else-if="type == 2" |
28 | 28 | :role="role" |
29 | 29 | :ids="ids" |
30 | - :classId="classId" | |
30 | + :classIds="classIds" | |
31 | 31 | :subjectName="subjectName" |
32 | 32 | /> |
33 | 33 | <MultipleSubTest |
34 | 34 | v-else-if="type == 3" |
35 | 35 | :role="role" |
36 | 36 | :ids="ids" |
37 | - :classId="classId" | |
37 | + :classIds="classIds" | |
38 | 38 | :subjectName="subjectName" |
39 | 39 | /> |
40 | 40 | <Contrast |
... | ... | @@ -65,7 +65,7 @@ export default { |
65 | 65 | id: "", |
66 | 66 | ids: [], |
67 | 67 | type: 0, |
68 | - classId: "", | |
68 | + classIds: [], | |
69 | 69 | subjectName: "", |
70 | 70 | title: "", |
71 | 71 | score: 0, |
... | ... | @@ -82,7 +82,7 @@ export default { |
82 | 82 | this.ids = |
83 | 83 | (this.$route.query.ids && this.$route.query.ids.split(",")) || []; |
84 | 84 | this.type = this.$route.query.type; |
85 | - this.classId = this.$route.query.classId || ""; | |
85 | + this.classIds = this.$route.query.classIds || []; | |
86 | 86 | this.title = this.$route.query.title || ""; |
87 | 87 | this.subjectName = this.$route.query.subjectName || ""; |
88 | 88 | }, | ... | ... |
src/views/basic/test/components/multipleSubTest.vue
... | ... | @@ -116,7 +116,7 @@ export default { |
116 | 116 | props: { |
117 | 117 | role: "", |
118 | 118 | ids: Array, |
119 | - classId: String, | |
119 | + classIds: Array, | |
120 | 120 | subjectName: String, |
121 | 121 | }, |
122 | 122 | data() { |
... | ... | @@ -259,7 +259,7 @@ export default { |
259 | 259 | async phaseExamReport() { |
260 | 260 | this.loading = true; |
261 | 261 | const { data, status, info } = await this.$request.cTPhaseExamReport({ |
262 | - classId: this.classId, | |
262 | + classIds: this.classIds, | |
263 | 263 | examIds: this.ids, |
264 | 264 | subjectNames: this.subjectList, |
265 | 265 | }); |
... | ... | @@ -311,7 +311,7 @@ export default { |
311 | 311 | } |
312 | 312 | |
313 | 313 | const data = await this.$request.cTExportPhaseExamReport({ |
314 | - classId: this.classId, | |
314 | + classIds: this.classIds, | |
315 | 315 | examIds: this.ids, |
316 | 316 | ...query, |
317 | 317 | }); | ... | ... |
src/views/basic/test/components/multipleTest.vue
... | ... | @@ -14,11 +14,9 @@ |
14 | 14 | fixed |
15 | 15 | ></el-table-column> |
16 | 16 | <el-table-column prop="studentName" label="姓名" fixed align="center"> |
17 | - <template slot-scope="scoped" | |
18 | - ><span class="click-b" @click="toPortrait(scoped.row)"> | |
19 | - {{ scoped.row.studentName }} | |
20 | - </span></template | |
21 | - ></el-table-column | |
17 | + <template slot-scope="scoped"> | |
18 | + {{ scoped.row.studentName }} | |
19 | + </template></el-table-column | |
22 | 20 | > |
23 | 21 | <el-table-column |
24 | 22 | align="center" |
... | ... | @@ -105,7 +103,7 @@ export default { |
105 | 103 | props: { |
106 | 104 | role: "", |
107 | 105 | ids: Array, |
108 | - classId: String, | |
106 | + classIds: Array, | |
109 | 107 | subjectName: String, |
110 | 108 | }, |
111 | 109 | data() { |
... | ... | @@ -140,42 +138,6 @@ export default { |
140 | 138 | print() { |
141 | 139 | tablePrint("print-content", this.subjectName + "汇总报表"); |
142 | 140 | }, |
143 | - toPortrait(obj) { | |
144 | - //暂时不上线 | |
145 | - return; | |
146 | - if (this.$store.getters.code) { | |
147 | - return; | |
148 | - } | |
149 | - let subjectNames = []; | |
150 | - subjectNames = | |
151 | - this.role == "ROLE_BANZHUREN" | |
152 | - ? [...this.query["subjectNames"]] | |
153 | - : [this.query["subjectNames"]]; | |
154 | - if ( | |
155 | - this.query["subjectNames"] && | |
156 | - this.query["subjectNames"]?.length == 1 && | |
157 | - this.query["subjectNames"][0] == "全部" | |
158 | - ) { | |
159 | - subjectNames = this.subjectList.map((item) => { | |
160 | - return item.value; | |
161 | - }); | |
162 | - subjectNames?.shift(); | |
163 | - } | |
164 | - //去学生画像 | |
165 | - this.$router.push({ | |
166 | - path: "/portraitDetail", | |
167 | - query: { | |
168 | - id: obj.studentId, | |
169 | - classId: this.query.classId, | |
170 | - subjectNames: subjectNames.join(","), | |
171 | - studentName: obj.studentName, | |
172 | - studentCode: obj.studentCode, | |
173 | - startDay: this.query.startDay, | |
174 | - endDay: this.query.endDay, | |
175 | - date: this.date, | |
176 | - }, | |
177 | - }); | |
178 | - }, | |
179 | 141 | //查看折线图 |
180 | 142 | openChart(obj) { |
181 | 143 | this.studentName = obj.studentName; |
... | ... | @@ -212,7 +174,7 @@ export default { |
212 | 174 | ? this.$request.pPhaseExamReport |
213 | 175 | : this.$request.phaseExamReport; |
214 | 176 | const { data, status, info } = await phaseExamReport({ |
215 | - classId: this.classId, | |
177 | + classIds: this.classIds, | |
216 | 178 | examIds: this.ids, |
217 | 179 | subjectName: this.subjectName, |
218 | 180 | }); |
... | ... | @@ -277,7 +239,7 @@ export default { |
277 | 239 | ? this.$request.pExportPhaseExamReport |
278 | 240 | : this.$request.exportPhaseExamReport; |
279 | 241 | const data = await exportPhaseExamReport({ |
280 | - classId: this.classId, | |
242 | + classIds: this.classIds, | |
281 | 243 | examIds: this.ids, |
282 | 244 | ...query, |
283 | 245 | }); | ... | ... |
src/views/basic/test/components/test.vue
... | ... | @@ -518,7 +518,7 @@ export default { |
518 | 518 | role: "", |
519 | 519 | id: "", |
520 | 520 | title: String, |
521 | - classId: String, | |
521 | + classIds: Array, | |
522 | 522 | subjectName: String, |
523 | 523 | examType: String, |
524 | 524 | score: { |
... | ... | @@ -666,7 +666,7 @@ export default { |
666 | 666 | } |
667 | 667 | this.loadingTange = true; |
668 | 668 | let { data, status, info } = await this.$request.setLowRange({ |
669 | - classId: this.classId, | |
669 | + classId: this.classIds[0], | |
670 | 670 | subjectName: this.subjectName, |
671 | 671 | ...this.lowRange, |
672 | 672 | }); | ... | ... |
src/views/basic/test/list.vue
... | ... | @@ -327,7 +327,7 @@ export default { |
327 | 327 | return; |
328 | 328 | } |
329 | 329 | let subjectArr = []; |
330 | - let classIds = ""; | |
330 | + let classIds = []; | |
331 | 331 | let multipleData = []; |
332 | 332 | let multipleSelectionData = []; |
333 | 333 | Object.keys(this.multipleSelectionObj).map((keys) => { |
... | ... | @@ -339,10 +339,11 @@ export default { |
339 | 339 | if (this.multipleSelection.includes(item.id)) { |
340 | 340 | subjectArr.push(item.subjectName); |
341 | 341 | multipleData.push(item); |
342 | - classIds = item.classId; | |
342 | + classIds.push(item.classId); | |
343 | 343 | } |
344 | 344 | }); |
345 | 345 | subjectArr = [...new Set(subjectArr)]; |
346 | + classIds = [...new Set(classIds)]; | |
346 | 347 | console.log(subjectArr); |
347 | 348 | if (this.multipleSelection.length == 1) { |
348 | 349 | this.$router.push({ |
... | ... | @@ -353,7 +354,7 @@ export default { |
353 | 354 | score: multipleData[0].examPaperScore || 0, |
354 | 355 | type: 1, |
355 | 356 | subjectName: subjectArr.join(), |
356 | - classId: classIds, | |
357 | + classIds: classIds, | |
357 | 358 | params: this.$route.query.params, |
358 | 359 | }, |
359 | 360 | }); |
... | ... | @@ -363,7 +364,7 @@ export default { |
363 | 364 | path: "/testAnalysis", |
364 | 365 | query: { |
365 | 366 | ids: this.multipleSelection.join(), |
366 | - classId: classIds, | |
367 | + classIds: classIds, | |
367 | 368 | type: subjectArr.length == 1 ? 2 : 3, |
368 | 369 | subjectName: subjectArr.join(), |
369 | 370 | params: this.$route.query.params, |
... | ... | @@ -390,19 +391,20 @@ export default { |
390 | 391 | // 班主任教学班不能与行政班汇总 |
391 | 392 | checkboxDisabled(obj) { |
392 | 393 | if (obj.examStartTime) { |
393 | - if (this.role == "ROLE_BANZHUREN") { | |
394 | - let classId = | |
395 | - (this.multipleSelectionObj[1] && | |
396 | - this.multipleSelectionObj[1][0]?.classId) || | |
397 | - ""; | |
398 | - if (classId) { | |
399 | - return obj.classId == classId ? false : true; | |
400 | - } else { | |
401 | - return false; | |
402 | - } | |
403 | - } else { | |
404 | - return false; | |
405 | - } | |
394 | + // if (this.role == "ROLE_BANZHUREN") { | |
395 | + // let classId = | |
396 | + // (this.multipleSelectionObj[1] && | |
397 | + // this.multipleSelectionObj[1][0]?.classId) || | |
398 | + // ""; | |
399 | + // if (classId) { | |
400 | + // return obj.classId == classId ? false : true; | |
401 | + // } else { | |
402 | + // return false; | |
403 | + // } | |
404 | + // } else { | |
405 | + // return false; | |
406 | + // } | |
407 | + return false; | |
406 | 408 | } else { |
407 | 409 | return true; |
408 | 410 | } | ... | ... |
vue.config.js
... | ... | @@ -22,8 +22,9 @@ module.exports = { |
22 | 22 | }, |
23 | 23 | proxy: { |
24 | 24 | "/": { |
25 | - target:"http://121.40.127.171", | |
26 | 25 | // target:"http://ezquiz.sunvotecloud.cn", |
26 | + // target:"http://121.40.127.171", | |
27 | + target:"http://192.168.3.221:8080", | |
27 | 28 | changeOrigin: true, |
28 | 29 | ws:true, |
29 | 30 | }, | ... | ... |