b89c8760
wangming
项目初始化
|
1
2
3
4
5
6
7
8
9
|
<template>
<div class="dashboard-container">
<div class="dashboard-text"
style="background-color: #334056;border-radius: 5px;color: #FFF;font-size: 16px;padding: 5px 5px 5px 15px;">
<div style="font-size: 20px;">欢迎使用安第斯答题软件</div>
</div>
<el-row :gutter="20">
<el-col :span="6">
<div class="grid-content bg-purple">
|
1de913cf
ren
sdf
|
10
11
|
<label class="grid-content-number">{{total.PriceNumber/100}}<span style="font-size: 16px;">元</span></label>
<div>总收益</div>
|
b89c8760
wangming
项目初始化
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<label class="grid-content-number">{{total.questiontotal}}</label>
<div>题目数量</div>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<label class="grid-content-number">{{total.testpapertotal}}</label>
<div>试卷数量</div>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
|
1de913cf
ren
sdf
|
28
|
<label class="grid-content-number">{{total.Count}}</label>
|
b89c8760
wangming
项目初始化
|
29
30
31
32
33
34
35
36
37
38
39
40
|
<div>总人数</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import {
GetQuestionTotal,
GetTestPaperTotal
} from '@/api/index'
|
1de913cf
ren
sdf
|
41
42
43
|
import {
OrderGetPriceNumber
} from '@/api/order.js'
|
b89c8760
wangming
项目初始化
|
44
45
46
|
import {
mapGetters
} from 'vuex'
|
1de913cf
ren
sdf
|
47
48
49
|
import {
GetUserList
} from '@/api/user'
|
b89c8760
wangming
项目初始化
|
50
51
52
53
54
55
|
export default {
name: '安第斯考试系统',
data() {
return {
total: {
questiontotal: 0,
|
1de913cf
ren
sdf
|
56
57
58
59
60
61
62
63
64
65
|
testpapertotal:0,
PriceNumber:0,
Count:0,
},
query: {
UserTypeEnum: 1, //0:管理员,1普通用户
PageIndex: 1,
PageSize: 10,
}
|
b89c8760
wangming
项目初始化
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
}
},
computed: {
...mapGetters([
'name'
])
},
created() {
},
mounted() {
this.GetTotalHeadler();
},
methods: {
GetTotalHeadler() {
GetQuestionTotal().then(res => {
this.total.questiontotal = res.data.data;
});
GetTestPaperTotal().then(res=>{
this.total.testpapertotal = res.data.data;
});
|
1de913cf
ren
sdf
|
87
88
89
90
91
92
|
OrderGetPriceNumber().then(res=>{
this.total.PriceNumber = res.data.data;
})
GetUserList(this.query).then(res => {
this.total.Count = res.data.data.total
})
|
b89c8760
wangming
项目初始化
|
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
}
}
}
</script>
<style lang="scss" scoped>
.dashboard {
&-container {
margin: 30px;
}
&-text {
font-size: 30px;
line-height: 46px;
}
}
.el-row {
margin-bottom: 20px;
margin-top: 20px;
&:last-child {
margin-bottom: 0;
}
}
.el-col {
border-radius: 5px;
}
.bg-purple-dark {
background: #99a9bf;
}
.bg-purple {
background: #d3dce6;
box-shadow: 0 0 10px #cdcdcd;
}
.bg-purple-light {
background: #e5e9f2;
}
.grid-content {
border-radius: 5px;
min-height: 36px;
text-align: center;
padding-top: 20px;
padding-bottom: 20px;
.grid-content-number {
font-size: 40px;
color: red;
}
div {
font-size: 20px;
margin-top: 10px;
}
}
.row-bg {
padding: 10px 0;
background-color: #f9fafc;
}
</style>
|