|
@@ -0,0 +1,186 @@
|
|
1
|
+<template xmlns:piechart="http://www.w3.org/1999/html">
|
|
2
|
+ <div class="body-wrapper">
|
|
3
|
+ <div style="display: flex;justify-content: space-around;">
|
|
4
|
+ <div style="width: 25%;display: flex;">
|
|
5
|
+ <h4 class="h4font">泊位数量:</h4><h3 class="h4font">{{viewData.totalParkingNumber}}</h3>
|
|
6
|
+ </div>
|
|
7
|
+ <div style="width: 25%;display: flex;">
|
|
8
|
+ <h4 class="h4font">实时余位:</h4><h3 class="h4font">{{viewData.remainParkingNumber}}</h3>
|
|
9
|
+ </div>
|
|
10
|
+ <div style="width: 25%;display: flex;">
|
|
11
|
+ <h4 class="h4font">实时进场:</h4><h3 class="h4font">{{viewData.inNumber}}</h3>
|
|
12
|
+ </div>
|
|
13
|
+ <div style="width: 25%;display: flex;">
|
|
14
|
+ <h4 class="h4font">实时出场:</h4><h3 class="h4font">{{viewData.outNumber}}</h3>
|
|
15
|
+ </div>
|
|
16
|
+ </div>
|
|
17
|
+ <br>
|
|
18
|
+ <br>
|
|
19
|
+ <div class="charts">
|
|
20
|
+ <div style="width: 50%;height: 500px;">
|
|
21
|
+ <h4 style="color: white">收费趋势</h4>
|
|
22
|
+ <linechart
|
|
23
|
+ :autoStop="false"
|
|
24
|
+ :top="30"
|
|
25
|
+ :bottom="30"
|
|
26
|
+ :left="40"
|
|
27
|
+ :legendTop="0"
|
|
28
|
+ yAxisName="元"
|
|
29
|
+ :dataset="linedata"
|
|
30
|
+ :tooltipFormat="lineTooltipFormat"
|
|
31
|
+ :encode="[
|
|
32
|
+ { x: 'month', y: 'lastAmount', seriesName: '收费金额',bool:'true' },
|
|
33
|
+ ]"
|
|
34
|
+ id="sfqfqs"
|
|
35
|
+ />
|
|
36
|
+ </div>
|
|
37
|
+ <div style="width: 50%;height: 500px;">
|
|
38
|
+ <h4 style="color: white">车辆类型</h4>
|
|
39
|
+ <piechart
|
|
40
|
+ class="model-pie-body"
|
|
41
|
+ id="chart3"
|
|
42
|
+ :radiusArr="['30%', '70%']"
|
|
43
|
+ :roseType = "false"
|
|
44
|
+ :colorArr="pieColor"
|
|
45
|
+ :labelFormat="['{name|{b}}', '{sub|{@value} {d}%}', '{hr|}']"
|
|
46
|
+ :dataset="modelData"
|
|
47
|
+ :encode="{ itemName: 'name', value: 'value' }"
|
|
48
|
+ />
|
|
49
|
+ </div>
|
|
50
|
+ <br>
|
|
51
|
+ </div>
|
|
52
|
+ <br>
|
|
53
|
+ <br>
|
|
54
|
+ <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
|
|
55
|
+ <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
|
|
56
|
+ </el-table-column>
|
|
57
|
+ </el-table>
|
|
58
|
+ <div class="table-pagination">
|
|
59
|
+ <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
|
|
60
|
+ :current-page.sync="pageNum" :page-size.sync="pageSize">
|
|
61
|
+ </el-pagination>
|
|
62
|
+ </div>
|
|
63
|
+ </div>
|
|
64
|
+</template>
|
|
65
|
+<script>
|
|
66
|
+ import api from "@/api/audit.js";
|
|
67
|
+ import piechart from "@/components/pieChart";
|
|
68
|
+ import linechart from "@/components/lineChart";
|
|
69
|
+ import api1 from '@/api/article_liao.js'
|
|
70
|
+
|
|
71
|
+ export default {
|
|
72
|
+ components: {
|
|
73
|
+ piechart,
|
|
74
|
+ linechart
|
|
75
|
+ },
|
|
76
|
+ data() {
|
|
77
|
+ return {
|
|
78
|
+ viewData: {
|
|
79
|
+ outNumber: "0",
|
|
80
|
+ inNumber: "0",
|
|
81
|
+ totalParkingNumber: "0",
|
|
82
|
+ remainParkingNumber: "0"
|
|
83
|
+ },
|
|
84
|
+ linedata: [],
|
|
85
|
+ modelData: [],
|
|
86
|
+ columns: [
|
|
87
|
+ {
|
|
88
|
+ label: '停车场名称',
|
|
89
|
+ key: 'carParkName'
|
|
90
|
+ },
|
|
91
|
+ {
|
|
92
|
+ label: '待结算',
|
|
93
|
+ key: 'settled'
|
|
94
|
+ },
|
|
95
|
+ {
|
|
96
|
+ label: '停入车次',
|
|
97
|
+ key: 'parkNum'
|
|
98
|
+ },
|
|
99
|
+ {
|
|
100
|
+ label: '当日停泊时长',
|
|
101
|
+ key: 'parkingduration'
|
|
102
|
+ }
|
|
103
|
+ ],
|
|
104
|
+ pieColor: ["rgb(0, 143, 251)","rgb(0, 227, 150)"],
|
|
105
|
+ tableData: [],
|
|
106
|
+ total: 0,
|
|
107
|
+ pageSize: 5,
|
|
108
|
+ pageNum: 1,
|
|
109
|
+ }
|
|
110
|
+ },
|
|
111
|
+ mounted() {
|
|
112
|
+ const {pageNum, pageSize} = this
|
|
113
|
+ let that = this
|
|
114
|
+ let params4 = {current: pageNum, size: pageSize}
|
|
115
|
+ // todo 添加对应页面接口
|
|
116
|
+ let requestList = [api.tccqkView(), api.sfqs(),api.cllx(), api.tccqkListByPage(params4)];
|
|
117
|
+ Promise.all(requestList).then(res => {
|
|
118
|
+ that.viewData = res[0].data
|
|
119
|
+ that.linedata = res[1].data || []
|
|
120
|
+ that.modelData = res[2].data || []
|
|
121
|
+ this.tableData = res[3].data.records || []
|
|
122
|
+ this.total = res[3].data.total || 0
|
|
123
|
+ })
|
|
124
|
+ },
|
|
125
|
+ watch: {
|
|
126
|
+ },
|
|
127
|
+ methods: {
|
|
128
|
+ lineTooltipFormat(params) {
|
|
129
|
+ return `<div class="line-tooltip">
|
|
130
|
+ <div style="color: ${params[0].color}">${params[0].seriesName}: ${
|
|
131
|
+ params[0].data.lastAmount || "--"
|
|
132
|
+ }</div>
|
|
133
|
+ </div>`;
|
|
134
|
+ },
|
|
135
|
+ handlePageChange() {
|
|
136
|
+ this.getTableData()
|
|
137
|
+ },
|
|
138
|
+ getTableData() {
|
|
139
|
+ const {pageNum, pageSize} = this
|
|
140
|
+ api.tccqkListByPage({current: pageNum, size: pageSize}).then(res => {
|
|
141
|
+ this.tableData = res.data.records || []
|
|
142
|
+ this.total = res.data.total || 0
|
|
143
|
+ })
|
|
144
|
+ },
|
|
145
|
+ }
|
|
146
|
+ }
|
|
147
|
+</script>
|
|
148
|
+<style lang="scss" scoped>
|
|
149
|
+.body-wrapper {
|
|
150
|
+ padding: 20px;
|
|
151
|
+ background: #0c0c0c;
|
|
152
|
+ .button-block{
|
|
153
|
+ text-align: right;
|
|
154
|
+ margin-bottom: 20px;
|
|
155
|
+ }
|
|
156
|
+ .table-pagination{
|
|
157
|
+ text-align: right;
|
|
158
|
+ }
|
|
159
|
+ .search-card{
|
|
160
|
+ font-size: 24px;
|
|
161
|
+ font-weight: bold;
|
|
162
|
+ color: #3498db;
|
|
163
|
+ margin-bottom: 20px;
|
|
164
|
+ .input-wrapper{
|
|
165
|
+ width: 36%;
|
|
166
|
+ }
|
|
167
|
+ }
|
|
168
|
+}
|
|
169
|
+
|
|
170
|
+.charts{
|
|
171
|
+ width: 100%;
|
|
172
|
+ display: flex;
|
|
173
|
+ justify-content: space-between;
|
|
174
|
+}
|
|
175
|
+.h4font{
|
|
176
|
+ color: #FFFFFF;
|
|
177
|
+}
|
|
178
|
+.audit-dialog{
|
|
179
|
+ .mg-bt{
|
|
180
|
+ margin-bottom: 24px;
|
|
181
|
+ }
|
|
182
|
+ .label{
|
|
183
|
+ text-align: right;
|
|
184
|
+ }
|
|
185
|
+}
|
|
186
|
+</style>
|