index.vue
5.22 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<template>
<div class="home">
<div class="home-left bgbk">
<div class="header titlebg">
汉中市接入概括
</div>
<!-- 地图 -->
<CenterLeft2Chart class="map" />
</div>
<div class="home-right">
<!-- 陕西省接入概括 -->
<div class="jrgk homebk">
<div class="header titlebg">
陕西省接入概括
</div>
<!-- 陕西省接入概括列表 -->
<el-row>
<el-col :span="9">
<ul class="gkList">
<li>总数量</li>
<div class="zsl">
<dv-digital-flop :config="config" style="height:70px;" />
<p></p>
</div>
</ul>
</el-col>
<el-col :span="5">
<ul class="jrl">
<div class="jrlList jrllsit1">
<p v-for="(item, index) in jrlList" :key="index">{{ item }}</p>
</div>
<li>日均接入量</li>
</ul>
</el-col>
<el-col :span="5">
<ul class="jrl">
<div class="jrlList jrllsit2">
<p v-for="(item, index) in dtjrlList" :key="index">{{ item }}</p>
</div>
<li>日均接入量</li>
</ul>
</el-col>
<el-col :span="5">
<ul class="jrl">
<div class="jrlList jrllsit3">
<p v-for="(item, index) in ztzlList" :key="index">{{ item }}</p>
</div>
<li>总体质量</li>
</ul>
</el-col>
</el-row>
</div>
<div class="jrdgk">
<!-- 接入点概括 -->
<div class="sxsjr homebk">
<div class="header titlebg">
接入点概括
</div>
<el-row>
<el-col :span="8" class="jrdList" v-for="(item, index) in jrdList" :key="index">
<ul>
<li>{{ item.value }}</li>
<li>{{ item.title }}</li>
</ul>
</el-col>
</el-row>
</div>
<!-- 上报情况概括 -->
<div class="sbqkgk homebk">
<div class="header titlebg">
上报情况概括
</div>
<ul class="sbqkgs">
<div class="sbqkgsList">
<p v-for="(item, index) in sbqkgsList" :key="index"
:class="{ 'active': (typeof (item - 0) === 'number' && !isNaN(item - 0)) }">
{{ item }}
</p>
</div>
<li>总数量</li>
</ul>
</div>
</div>
<!-- 底部表格 -->
<div class="jrxxlb tableClass bgbk">
<div class="title titlebg">陕西省平台接入情况</div>
<!-- 陕西省平台接入情况table -->
<lb-table ref="table" :pagination="false" :heightNum="515" :column="tableData.columns" :data="tableData.data">
</lb-table>
</div>
</div>
</div>
</template>
<script>
// 上报首页
import wgsl from "./wgsl.vue";
import CenterLeft2Chart from "@/components/echart/centerLeft/centerLeft2Chart";
// 引入表格数据
import data from "./data"
export default {
name: "home",
components: { wgsl, CenterLeft2Chart },
data () {
function formatter (number) {
const numbers = number.toString().split('').reverse()
const segs = []
while (numbers.length) segs.push(numbers.splice(0, 3).join(''))
return segs.join(',').split('').reverse().join('')
}
return {
// 总数量
config: {
number: [6523],
content: '{nt}',
formatter,
style: {
fontSize: 50,
fontWeight: 700,
fill: '#FFDD00'
}
},
// 日均接入量
jjrl: 300,
// 当天接入量
dtjrl: 100,
// 总体质量
ztzl: 3620,
// 上报情况概括
sbqkgs: 6296,
// 接入点概括
jrdList: [
{
value: 60,
title: '总数量'
},
{
value: 60,
title: '正常'
},
{
value: 60,
title: '异常'
}
],
// 表格数据
tableData: {
// 表格头部信息
columns: data.columns(),
// 表格列表数据
data: [{
xzqmc: '咸阳市',
xzqzs: 100,
jrl: 300,
jscgl: 20,
dk: 60,
wjrqx: '长安县',
jrdf: 50
},
{
xzqmc: '咸阳市',
xzqzs: 100,
jrl: 300,
jscgl: 20,
dk: 60,
wjrqx: '长安县',
jrdf: 50
}]
}
}
},
computed: {
jrlList: function () {
return this.jjrl.toString().split('')
},
dtjrlList: function () {
return this.dtjrl.toString().split('')
},
ztzlList: function () {
return this.ztzl.toString().split('')
},
sbqkgsList: function () {
const numbers = this.sbqkgs.toString().split('').reverse()
const segs = []
while (numbers.length) segs.push(numbers.splice(0, 3).join(''))
return segs.join(',').split('').reverse().join('')
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
@import "./home.scss";
</style>