index.vue
3.52 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
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
148
149
150
151
152
<template>
<div class="dashboard-container">
<el-alert type="warning" :closable="false" :show-icon="true">
<div slot="title">
<span>服务即将到期</span>
<a href="javascript:void(0)">立即处理</a>
</div>
</el-alert>
<!-- 中间内容 开始 -->
<el-row :gutter="20" class="box_row">
<el-col :span="8">
<el-card class="box_card" shadow="hover">
<div class="card_inner">
<h2 class="h2">新增用户数</h2>
<span class="sp1">25</span>
<h2 class="h2">合计用户总数</h2>
<span class="sp1">1280</span>
</div>
</el-card>
</el-col>
<el-col :span="8">
<el-card class="box_card" shadow="hover">
<div class="card_inner">
<h2 class="h2">新激活设备数</h2>
<span class="sp1">25</span>
<h2 class="h2">合计激活设备数</h2>
<span class="sp1">680</span>
</div>
</el-card>
</el-col>
<el-col :span="8">
<el-card class="box_card" shadow="hover">
<div class="card_inner">
<h2 class="h2">新增报警记录</h2>
<span class="sp1">25</span>
<h2 class="h2">待续费订单</h2>
<span class="sp1">8</span>
</div>
</el-card>
</el-col>
</el-row>
<!-- 中间内容 end -->
<!-- 底部 内容 开始 -->
<div class="b_bottom">
<el-card class="box_card" shadow="hover">
<div class="">
<div class="b_title">
<h2 class="h2">设备激活统计</h2>
<el-select v-model="value" placeholder="请选择">
<el-option value="7" label="最近7天设备激活排行">最近7天设备激活排行</el-option>
<el-option value="30" label="最近1个月设备激活排行">最近1个月设备激活排行</el-option>
<el-option value="90" label="最近3个月设备激活排行">最近3个月设备激活排行</el-option>
</el-select>
</div>
<div class="">
<ve-line :data="chartData" />
</div>
</div>
</el-card>
</div>
<!-- 底部 内容 end -->
</div>
</template>
<script>
import VCharts from 'v-charts'
import Vue from 'vue'
Vue.use(VCharts)
export default {
name: 'Dashboard',
data() {
return {
value: 7,
chartData: {
columns: ['日期', '设备激活数'],
rows: [{
'日期': '1/1',
'设备激活数': 1393
},
{
'日期': '1/2',
'设备激活数': 3530
},
{
'日期': '1/3',
'设备激活数': 2923
},
{
'日期': '1/4',
'设备激活数': 0.49
},
{
'日期': '1/5',
'设备激活数': 3792
},
{
'日期': '1/6',
'设备激活数': 4593
}
]
}
}
},
computed: {
}
}
</script>
<style lang="scss" scoped>
.dashboard-container {
padding: 20px;
.box_row {
padding: 20px 0;
}
.card_inner {
text-align: center;
.h2 {
font-size: 12px;
font-weight: normal;
}
.sp1 {
font-size: 30px;
font-weight: blod;
}
}
.b_bottom {
.b_title {
display: flex;
.h2 {
width: 120px;
font-size: 14px;
font-weight: normal;
}
.b_select {
flex: 1;
}
}
}
}
</style>