analysis.vue
2.06 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
<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" :classId="classId" :subjectName="subjectName" :title="title" />
<MultipleTest v-else-if="type == 2" :role="role" :ids="ids" :classId="classId" :subjectName="subjectName" />
<MultipleSubTest v-else-if="type == 3" :role="role" :ids="ids" :classId="classId" :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,
classId: "",
subjectName: '',
title: ''
};
},
created() {
this.role =
this.$store.getters.info.showRole ||
this.$store.getters.info.permissions[0].role;
this.id = this.$route.query.id || "";
this.ids = this.$route.query.ids && this.$route.query.ids.split(",") || "";
this.type = this.$route.query.type
this.classId = this.$route.query.classId || "";
this.title = this.$route.query.title || ""
this.subjectName = this.$route.query.subjectName || ""
},
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>