f45b3c05
LH_PC
云平台新UI界面
|
1
2
3
4
5
6
7
8
9
10
|
<template>
<div style="margin-right: 20px;width: 100%">
<el-row class="row-type">
<label>阶段报表类型</label>
<el-select class="opration-select" v-model="currentType" style="margin-left: 10px;">
<el-option v-for="(item, index) in types" :lable="item" :key="index" :value="item" />
</el-select>
</el-row>
<el-row class="row-type" style="margin-top: 10px;">
<el-table v-if="$props.params" class="default-table" :data="listReport">
|
6bca489d
LH_PC
云平台二期UI
|
11
12
|
<el-table-column prop="subjectName" label="科目" width="100" />
<el-table-column prop="paperName" label="试卷名称" />
|
f45b3c05
LH_PC
云平台新UI界面
|
13
14
15
|
<el-table-column prop="classCorrectRate" label="已考班级">
<template slot-scope="scoped">
<el-checkbox-group v-model="scoped.row.checkedClassList">
|
6bca489d
LH_PC
云平台二期UI
|
16
|
<el-checkbox :key="index" v-for="(item, index) in scoped.row.classInfos" :label="item.classId">
|
f45b3c05
LH_PC
云平台新UI界面
|
17
18
19
20
21
|
{{ item.className }}
</el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
|
6bca489d
LH_PC
云平台二期UI
|
22
23
|
<el-table-column prop="score" label="卷面分" width="100" />
<el-table-column label="操作" width="100">
|
f45b3c05
LH_PC
云平台新UI界面
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
<template slot-scope="scoped">
<el-button type="text" @click="_linkToDetail(scoped.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</div>
</template>
<script>
export default {
name: "testMultiClassReport",
props: {
params: null
},
async created() {
this.role =
this.$store.getters.info.showRole ||
this.$store.getters.info.permissions[0].role;
await this._loadDatas();
},
watch: {
async 'currentType'(value) {
await this._loadDatas();
}
},
methods: {
|
6bca489d
LH_PC
云平台二期UI
|
51
|
_linkToDetail(dataRow) {
|
f45b3c05
LH_PC
云平台新UI界面
|
52
53
54
55
56
57
58
59
|
this.$router.push({
path: "/testReportDetail",
query: {
dataType: 3,
classIds: dataRow.checkedClassList.join(","),
id: dataRow.paperId,
title: dataRow.paperName,
subjectName: dataRow.subjectName,
|
6bca489d
LH_PC
云平台二期UI
|
60
|
diffType: this.currentType,
|
f45b3c05
LH_PC
云平台新UI界面
|
61
62
63
64
|
},
});
},
async _loadDatas() {
|
6bca489d
LH_PC
云平台二期UI
|
65
|
|
f45b3c05
LH_PC
云平台新UI界面
|
66
67
68
|
var dataRequestParams = {
classIds: this.$props.params.class ? [this.$props.params.class] :
this.$props.params.classIds ? [...this.$props.params.classIds] : null,
|
6bca489d
LH_PC
云平台二期UI
|
69
|
diffType: this.currentType == "任课班级对比" ? "1" : "0",
|
f45b3c05
LH_PC
云平台新UI界面
|
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
end: this.$props.params.dataRange ? this.$props.params.dataRange[1] : null,
start: this.$props.params.dataRange ? this.$props.params.dataRange[0] : null,
subjects: this.$props.params.subject ? [this.$props.params.subject] :
this.$props.params.subjects ? [...this.$props.params.subjects] : null
};
var dataRequest = this.$request.tListExamReport;
var dataResponse = await dataRequest({ ...dataRequestParams });
if (dataResponse.status != 0) {
this.$message.error(response.info);
return;
}
this.listReport = dataResponse.data.map(item => {
item.checkedClassList = item.classInfos.map(item => item.classId);
return item;
})
},
},
data() {
return {
listReport: [],
role: "",
types: ["任课班级对比", "年级对比"],
currentType: "任课班级对比",
};
},
};
</script>
<style scoped></style>
|