f45b3c05
LH_PC
云平台新UI界面
|
1
2
3
4
5
6
|
<template>
<el-container class="default-body">
<el-header>
<div class="default-title">{{ dataType == "1" ? '随堂问报表' : '即时测报表' }}</div>
</el-header>
<div class="default-filter">
|
6bca489d
LH_PC
云平台二期UI
|
7
8
|
<!-- <el-input v-model="query.paper" placeholder="报表名称" suffix-icon="el-icon-search" class="filter-input" type="number"
clearable /> -->
|
f45b3c05
LH_PC
云平台新UI界面
|
9
10
11
12
13
14
|
<el-select @change="_changeClass" v-model="query.class" class="filter-select" placeholder="选择班级">
<el-option v-for="item in classList " :key="item.classId" :label="item.className" :value="item.classId" />
</el-select>
<el-select v-model="query.subject" v-if="role == 'ROLE_JIAOSHI'" placeholder="选择科目" class="filter-select">
<el-option v-for=" item in subjectList" :key="item" :label="item" :value="item" />
</el-select>
|
6bca489d
LH_PC
云平台二期UI
|
15
|
<el-select v-model="query.subjects" style="width: 18%;" collapse-tags v-if="role == 'ROLE_BANZHUREN'" multiple placeholder="选择科目"
|
f45b3c05
LH_PC
云平台新UI界面
|
16
17
18
19
20
|
class="filter-select">
<el-option v-for="item in subjectList" :key="item" :label="item" :value="item">
<!-- <el-checkbox :checked="checkedSubject.indexOf(item) >= 0" @click="subjectCheck(item)">{{ item }}</el-checkbox> -->
</el-option>
</el-select>
|
6bca489d
LH_PC
云平台二期UI
|
21
22
|
<el-date-picker class="filter-datePicker" @change="_dateChange" v-model="query.dateRange" type="daterange"
range-separator="-" value-format="yyyy-MM-dd">
|
f45b3c05
LH_PC
云平台新UI界面
|
23
24
|
</el-date-picker>
<el-button type="primary" @click="_serach"> 筛选 </el-button>
|
6bca489d
LH_PC
云平台二期UI
|
25
26
27
28
29
|
<el-radio-group v-model="dateStatus" class="default-date-radio-group">
<el-radio-button label="onDay">今天</el-radio-button>
<el-radio-button label="onWeek">本周</el-radio-button>
<el-radio-button label="onMonth">本月</el-radio-button>
</el-radio-group>
|
f45b3c05
LH_PC
云平台新UI界面
|
30
31
32
33
34
35
36
37
38
|
</div>
<el-main>
<div style="position: relative">
<el-tabs v-model="tabType" v-loading="queryLoading" type="card" class="default-tabs" :key="tabIndexs">
<el-tab-pane v-if="dataType == 1 && role == 'ROLE_JIAOSHI'" :name="'0'" :label="`阶段报表`">
<askSummaryReport ref="askSummaryReport" v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds"
:queryParams="query" />
</el-tab-pane>
<el-tab-pane v-if="dataType == 1 && role == 'ROLE_JIAOSHI'" :name="'1'" :label="`单课时报表`">
|
6bca489d
LH_PC
云平台二期UI
|
39
|
<askListReport v-if="apiDatas.askReportList" :datas="apiDatas.askReportList" @opration="_serach" />
|
f45b3c05
LH_PC
云平台新UI界面
|
40
|
</el-tab-pane>
|
6bca489d
LH_PC
云平台二期UI
|
41
42
|
<el-tab-pane v-if="dataType == 1 && role == 'ROLE_BANZHUREN' && query.status == 'multi'" :name="'0'"
:label="`多科表现`" :queryParams="query">
|
f45b3c05
LH_PC
云平台新UI界面
|
43
|
<askBzrMulti v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds" :queryParams="query" />
|
6bca489d
LH_PC
云平台二期UI
|
44
45
46
47
48
|
</el-tab-pane>
<el-tab-pane v-if="dataType == 1 && role == 'ROLE_BANZHUREN' && query.status == 'single'" :name="'1'"
:label="`单科表现`" :queryParams="query">
<askSummaryReport :role="role" ref="askSummaryReport" v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds"
:queryParams="query" />
|
f45b3c05
LH_PC
云平台新UI界面
|
49
50
51
|
</el-tab-pane>
<el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'0'" :label="`阶段报表`">
<testSummaryReport v-if="apiDatas.testReportIds" :testReportIds="apiDatas.testReportIds"
|
6bca489d
LH_PC
云平台二期UI
|
52
|
@headerClick="_headerClick" :queryParams="query" />
|
f45b3c05
LH_PC
云平台新UI界面
|
53
54
|
</el-tab-pane>
<el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'1'" :label="`单卷报表`">
|
6bca489d
LH_PC
云平台二期UI
|
55
|
<testListReport :datas="apiDatas.testReportList" @opration="_serach" />
|
f45b3c05
LH_PC
云平台新UI界面
|
56
57
58
59
|
</el-tab-pane>
<el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'2'" :label="`多班对比报表`">
<testMultiClassReport :params="query" />
</el-tab-pane>
|
6bca489d
LH_PC
云平台二期UI
|
60
61
|
<el-tab-pane v-if="dataType == 2 && role == 'ROLE_BANZHUREN' && query.status == 'multi'" :name="'0'"
:label="`多科表现`">
|
f45b3c05
LH_PC
云平台新UI界面
|
62
63
|
<testBzrMulti v-if="apiDatas.testReportIds" :list="apiDatas.testReportList"
:testReportIds="apiDatas.testReportIds" :queryParams="query" />
|
6bca489d
LH_PC
云平台二期UI
|
64
65
66
67
68
|
</el-tab-pane>
<el-tab-pane v-if="dataType == 2 && role == 'ROLE_BANZHUREN' && query.status == 'single'" :name="'1'"
:label="`单科表现`">
<testSummaryReport v-if="apiDatas.testReportIds" :role="role" :list="apiDatas.testReportList"
:testReportIds="apiDatas.testReportIds" :queryParams="query" />
|
f45b3c05
LH_PC
云平台新UI界面
|
69
70
71
72
73
|
</el-tab-pane>
<div slot="tab-bar">
<el-button type="primary" icon="el-icon-plus">新增</el-button>
</div>
</el-tabs>
|
6bca489d
LH_PC
云平台二期UI
|
74
75
|
<!-- <el-button size='mini' v-if="role == 'ROLE_PERSONAL' || role == 'ROLE_JIAOSHI'" @click="_recycle"
style='position: absolute;right:40px;top:5px;'>查看回收站</el-button> -->
|
f45b3c05
LH_PC
云平台新UI界面
|
76
77
78
79
80
81
82
|
</div>
</el-main>
</el-container>
</template>
<script>
|
6bca489d
LH_PC
云平台二期UI
|
83
|
import { setDateRules } from "@/utils";
|
f45b3c05
LH_PC
云平台新UI界面
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
export default {
name: "repo",
components: {
askSummaryReport: () => import("./components/askSummaryReport.vue"),
askListReport: () => import("./components/askListReport.vue"),
testMultiClassReport: () => import("./components/testMultiClassReport.vue"),
testListReport: () => import("./components/testListReport.vue"),
testSummaryReport: () => import("./components/testSummaryReport.vue"),
testBzrMulti: () => import("./components/testBzrMulti.vue"),
askBzrMulti: () => import("./components/askBzrMulti.vue"),
},
data() {
return {
role: "",
classList: [],
subjectList: [],
tabIndexs: 0,
dataType: "1",
tabType: null,
checkedSubject: [],
listPage: {
page: 1,
size: 20,
total: 0,
},
query: {
status: "multi",
title: "",
class: null,
subject: null,
subjects: [],
dateRange: ["2022-03-01", "2026-05-01"],
classIds: null,
subjectName: null,
},
apiDatas: {
askReportIds: null,
askReportList: null,
testReportIds: null,
testReportList: null,
},
queryLoading: false,
|
6bca489d
LH_PC
云平台二期UI
|
126
|
dateStatus: "0"
|
f45b3c05
LH_PC
云平台新UI界面
|
127
128
129
|
};
},
watch: {
|
6bca489d
LH_PC
云平台二期UI
|
130
131
132
133
134
|
'dateStatus'(val) {
if (val == -1) return;
var dateRange = setDateRules(val);
this.query.dateRange = [dateRange.startDay, dateRange.endDay];
},
|
f45b3c05
LH_PC
云平台新UI界面
|
135
136
137
138
139
140
141
142
143
144
145
146
147
|
'$route'() {
this.dataType = location.href.endsWith("askReport") ? "1" : "2";
this._loadQueryDatas();
},
'dataType'() {
if (this.dataType == "1") {
this.tabType = "0"
}
else if (this.dataType == "2") {
this.tabType = "0"
}
},
async 'query.subjects'(value) {
|
f45b3c05
LH_PC
云平台新UI界面
|
148
149
150
|
if (this.role == "ROLE_BANZHUREN") {
if (value.length == 1 && value[0] != '全部科目') {
this.query.status = 'single';
|
6bca489d
LH_PC
云平台二期UI
|
151
|
this.tabType = '1';
|
f45b3c05
LH_PC
云平台新UI界面
|
152
153
154
|
await this._serach();
}
else {
|
6bca489d
LH_PC
云平台二期UI
|
155
156
157
|
this.query.status = 'multi';
this.tabType = '0';
await this._serach();
|
f45b3c05
LH_PC
云平台新UI界面
|
158
159
160
161
162
163
164
165
166
167
168
|
}
}
}
},
async created() {
this.dataType = location.href.endsWith("askReport") ? "1" : "2";
this.code = this.$store.getters.csCode;
this.role =
this.$store.getters.info.showRole ||
this.$store.getters.info.permissions[0].role;
|
6bca489d
LH_PC
云平台二期UI
|
169
|
this.dateStatus = "onWeek";
|
f45b3c05
LH_PC
云平台新UI界面
|
170
171
172
|
await this._loadQueryDatas();
},
methods: {
|
6bca489d
LH_PC
云平台二期UI
|
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
_opr() {
alert('opr');
},
_dateChange() {
this.dateStatus = -1;
},
async _ReScore() {
//重新记分
let { data, info, status } = await this.$request.reScore({
examId: this.id,
});
if (status === 0) {
this.$message.success(info);
this._serach();
this.paperModifyLog.modifiedTime = "";
this.paperModifyLog.realName = "";
} else {
this.$message.error(info);
}
},
|
f45b3c05
LH_PC
云平台新UI界面
|
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
async _changeClass() {
await this._loadSubjectData();
},
async _loadSubjectData() {
const fetchSubject =
this.role == "ROLE_BANZHUREN"
? this.$request.cTSubjectList
: this.role == "ROLE_PERSONAL"
? this.$request.pSubjectList
: this.$request.tSubjectList;
const { data, status, info } = await fetchSubject({
classId: this.query.class,
});
if (status != 0) {
this.$message.error(info);
return;
}
this.subjectList = data?.subjectNames ?? [];
if (this.role == "ROLE_BANZHUREN") {
this.subjectList.unshift("全部科目");
}
this.query.subject = data?.subjectNames[0] ?? "";
this.checkedSubject = [...this.subjectList];
this.query.subjects = this.checkedSubject;
},
async _loadClassData() {
const fetchClassList =
this.role == "ROLE_BANZHUREN"
? this.$request.cTClassList
: this.role == "ROLE_PERSONAL"
? this.$request.pClassList
: this.$request.tClassList;
const { data, status, info } = await fetchClassList();
if (status != 0) {
this.$message.error(info);
return;
}
this.classList = data?.list ?? [];
this.query.class = this.classList[0]?.classId;
},
async _loadQueryDatas() {
// this.$loading.open();
await this._loadClassData();
await this._loadSubjectData();
// this.$loading.close();
await this._serach();
},
_recycle() { },
async _serach() {
|
6bca489d
LH_PC
云平台二期UI
|
246
|
|
f45b3c05
LH_PC
云平台新UI界面
|
247
248
249
250
251
252
253
254
255
256
257
|
this.queryLoading = true;
var queryParams = {
classId: "",
classIds: [],
startDay: "",
endDay: "",
subjectNames: [],
};
queryParams.classId = this.query.class;
queryParams.classIds = [this.query.class];
|
6bca489d
LH_PC
云平台二期UI
|
258
259
|
if (this.query.subjects && this.role == 'ROLE_BANZHUREN') {
|
f45b3c05
LH_PC
云平台新UI界面
|
260
|
queryParams.subjectNames = this.query.subjects;
|
6bca489d
LH_PC
云平台二期UI
|
261
|
queryParams.subject = queryParams.subjectNames[0];
|
f45b3c05
LH_PC
云平台新UI界面
|
262
263
264
265
|
}
else {
queryParams.subjectNames = [this.query.subject];
}
|
6bca489d
LH_PC
云平台二期UI
|
266
|
console.log(queryParams, this.query.subject)
|
f45b3c05
LH_PC
云平台新UI界面
|
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
|
queryParams.startDay = this.query.dateRange
? this.query.dateRange[0]
: "";
queryParams.endDay = this.query.dateRange ? this.query.dateRange[1] : "";
if (this.dataType == "1") {
this.apiDatas.askReportList = [];
this.apiDatas.askReportIds = [];
let fetchReportList =
this.role == "ROLE_PERSONAL"
? this.$request.pExamReportList
: this.$request.periodReportList;
const askReportResponse = await fetchReportList({
...queryParams,
page: this.page,
size: 9999,
});
if (askReportResponse.status != 0) {
this.$message.error(askReportResponse.info);
return;
}
this.apiDatas.askReportList = [...askReportResponse?.data?.list ?? []];
this.apiDatas.askReportIds = [... this.apiDatas?.askReportList?.map((item) => item.id) ?? []];
if (this.$refs["askSummaryReport"]) {
this.$refs["askSummaryReport"].refresh();
}
} else if (this.dataType == "2") {
this.apiDatas.testReportList = [];
this.apiDatas.testReportIds = [];
let fetchReportList =
this.role == "ROLE_PERSONAL"
? this.$request.pExamReportList
: this.$request.examReportList;
const testReportResponse = await fetchReportList({
...queryParams,
page: this.page,
size: 9999,
});
if (testReportResponse.status != 0) {
this.$message.error(testReportResponse.info);
return;
}
|
6bca489d
LH_PC
云平台二期UI
|
313
|
|
f45b3c05
LH_PC
云平台新UI界面
|
314
|
this.apiDatas.testReportList = [...testReportResponse?.data?.list ?? []];
|
6bca489d
LH_PC
云平台二期UI
|
315
|
|
f45b3c05
LH_PC
云平台新UI界面
|
316
|
this.apiDatas.testReportIds = [...this.apiDatas.testReportList?.map((item) => item.id) ?? []];
|
6bca489d
LH_PC
云平台二期UI
|
317
|
|
f45b3c05
LH_PC
云平台新UI界面
|
318
|
}
|
6bca489d
LH_PC
云平台二期UI
|
319
|
|
f45b3c05
LH_PC
云平台新UI界面
|
320
|
this.tabIndexs += 1;
|
6bca489d
LH_PC
云平台二期UI
|
321
|
|
f45b3c05
LH_PC
云平台新UI界面
|
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
|
this.queryLoading = false;
},
_detailQ(id) {
let routerItem = {
path: "/askPreparationQuestionsDetail",
query: { id: id },
};
this.$router.push(routerItem);
},
_delete() { },
_updateQ(id) {
let routerItem = {
path: "/askPreparationQuestionsUpdate",
query: { paperId: id, paperType: 1 },
};
this.$router.push(routerItem);
},
|
6bca489d
LH_PC
云平台二期UI
|
340
341
342
343
344
345
346
347
348
349
350
|
_headerClick(row) {
this.$router.push({
path: "/testReportDetail",
query: {
dataType: 2,
classIds: this.query.class,
id: row.examId,
title: row.title
},
});
},
|
f45b3c05
LH_PC
云平台新UI界面
|
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
|
async _deleteDetermineQ(id) {
let modifyPaper =
this.role == "ROLE_PERSONAL"
? this.$request.pModifyPaper
: this.$request.modifyPaper;
const { data, status, info } = await modifyPaper({
paperId: id,
status: 2,
});
if (status != 0) {
this.$message.error(info);
}
this.page = 1;
this._serach();
}
},
};
</script>
<style lang="scss">
.el-tabs__content {
padding-left: 20px !important;
padding-right: 0px !important;
padding-top: 20px !important;
}
.el-tabs__header {
margin: 0px !important;
}
.card-content {
.descption-tag {
display: inline-block;
background: rgba(102, 127, 253, 0.1);
border-radius: 4px 4px 4px 4px;
color: #667ffd;
line-height: 32px;
padding: 0 10px;
height: 32px;
margin-right: 10px;
}
margin-bottom: 10px;
height: 180px;
border: 1px solid #e6e9f4;
border-radius: 10px 10px 10px 10px;
box-shadow: 0px 4px 14px 0px rgba(0, 0, 0, 0.08);
margin-right: 20px;
background: #ffffff;
.content {
margin-top: 15px !important;
padding-left: 10px !important;
font-size: 14px;
font-weight: 400;
.descption-tag-text {
margin-bottom: 20px;
display: flex;
justify-content: flex-start;
align-items: center;
}
.descption-text {
height: 30px;
margin-top: 10px;
.descption-text-block {
margin-right: 10px;
display: flex;
justify-content: flex-start;
.sharing-descption {
flex: 1;
color: gray;
opacity: 0.5;
text-align: right;
}
img {
height: 20px;
width: 20px;
margin-right: 5px;
}
}
}
.title-text {
font-weight: bold;
font-size: 20px;
color: #303133;
line-height: 28px;
height: 28px;
text-transform: none;
padding-bottom: 10px !important;
.dropdown-button {
.el-button {
background-color: #667ffd !important;
color: white;
}
float: right;
margin-right: 20px;
}
}
}
.left {
height: 180px;
background-color: #41cc95;
vertical-align: middle;
border-radius: 10px 0px 0px 10px;
.left-icon {
margin-top: 26px;
height: 70px;
.icon {
height: 100px;
width: 100px;
background: rgba(255, 255, 255, 0.1);
border-radius: 61px 61px 61px 61px;
margin: auto;
text-align: center;
img {
margin-top: 24px;
height: 52px;
width: 52px;
}
}
.text {
width: 100%;
text-align: center;
margin-top: 5px;
font-size: 20px;
color: #ffffff;
}
}
}
.right {
.el-button {
background-color: #667ffd;
line-height: 16px;
color: #ffffff;
margin-top: 15px;
padding: 10px 20px !important;
}
}
}
.el-popconfirm__action {
margin-top: 10px;
}
</style>
|