analysis.vue
2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<template>
<div ref="main" class="page-container">
<back-box>
<template slot="title">
<span>{{
type == 1
? "单卷测练报表"
: type == 2
? subjectName + "汇总报表"
: type == 3
? "多科汇总报表"
: `多班_${subjectName}_${title}_测练成绩对比分析`
}}</span>
</template>
</back-box>
<Test
v-if="type == 1"
:role="role"
:id="id"
:classIds="classIds"
:subjectName="subjectName"
:title="title"
:score="score"
:examType="examType"
/>
<MultipleTest
v-else-if="type == 2"
:role="role"
:ids="ids"
:classIds="classIds"
:subjectName="subjectName"
/>
<MultipleSubTest
v-else-if="type == 3"
:role="role"
:ids="ids"
:classIds="classIds"
:subjectName="subjectName"
/>
<Contrast
v-else-if="type == 4"
:role="role"
:ids="ids"
:subjectName="subjectName"
:title="title"
/>
</div>
</template>
<script>
import Test from "./components/test.vue";
import MultipleTest from "./components/multipleTest.vue";
import MultipleSubTest from "./components/multipleSubTest.vue";
import Contrast from "./components/contrast.vue";
export default {
components: {
Test,
MultipleTest,
MultipleSubTest,
Contrast,
},
data() {
return {
role: "",
id: "",
ids: [],
type: 0,
classIds: [],
subjectName: "",
title: "",
score: 0,
examType: 2,
};
},
created() {
this.role =
this.$store.getters.info.showRole ||
this.$store.getters.info.permissions[0].role;
this.id = this.$route.query.id || "";
this.examType = this.$route.query.examType || 2;
this.score = Number(this.$route.query.score) || 0;
this.ids =
(this.$route.query.ids && this.$route.query.ids.split(",")) || [];
this.type = this.$route.query.type;
this.classIds = this.$route.query.classIds || [];
this.title = this.$route.query.title || "";
this.subjectName = this.$route.query.subjectName || "";
console.log(this.classIds)
},
methods: {},
};
</script>
<style lang="scss" scoped>
.page-container {
position: relative;
height: 100%;
.table-box {
min-height: 100%;
}
&.active {
overflow: hidden;
}
}
.error {
color: #f30;
}
.page-content {
padding: 20px 20px 0;
}
.down {
padding-top: 20px;
width: 100%;
display: flex;
justify-content: space-between;
}
</style>