Browse Source

接口联调

duwendi 1 year ago
parent
commit
691b7629cb

+ 117 - 3
src/api/audit.js

@@ -212,7 +212,121 @@ export default {
212 212
   // 经营情况_列表
213 213
   jyqk(params) {
214 214
     return axios.get('/dash/business/conditions/page', {params})
215
-  }
216
-
217
-
215
+  },
216
+  // 停车热力图_当前
217
+  tcrlt1() {
218
+    return axios.post('/opt/parking/heatmap/stat1')
219
+  },
220
+  //  停车热力图_预计未来一周
221
+  tcrlt2() {
222
+    return axios.post('/opt/parking/heatmap/stat2')
223
+  },
224
+  // 停车场分析报表
225
+  tccfxbbListByPage(params) {
226
+    return axios.get('/opt/parking/analysis/report/page', {params})
227
+  },
228
+  // 停车时段分析_停车高峰时段分析
229
+  tcsdfx1() {
230
+    return axios.post('/opt/parking/period/analysis/stat1')
231
+  },
232
+  // 停车时段分析_出入场压力分析
233
+  tcsdfx2() {
234
+    return axios.post('/opt/parking/period/analysis/stat2')
235
+  },
236
+  // 停车时段分析_停车饱和度分析
237
+  tcsdfx3() {
238
+    return axios.post('/opt/parking/period/analysis/stat3')
239
+  },
240
+  // 停车实况分析_泊位占用率
241
+  tcskfx1() {
242
+    return axios.post('/opt/parking/live/stat1')
243
+  },
244
+  // 停车实况分析_在场会员车占比
245
+  tcskfx2() {
246
+    return axios.post('/opt/parking/live/stat2')
247
+  },
248
+  // 停车实况分析_进出场趋势
249
+  tcskfx3() {
250
+    return axios.post('/opt/parking/live/stat3')
251
+  },
252
+  // 泊位利用分析_泊位利用率变化趋势
253
+  bwlyfx(params) {
254
+    return axios.get('/opt/berth/use/list1', {params})
255
+  },
256
+  // 停车总分析_停车利用率
257
+  tclyl(params) {
258
+    return axios.get('/opt/access/parking/analysis/page1', {params})
259
+  },
260
+  // 停车总分析_停车记录
261
+  tcjl(params) {
262
+    return axios.get('/opt/access/parking/analysis/page', {params})
263
+  },
264
+  // 停车总分析_停车难易指数变化趋势
265
+  tczfx1(params) {
266
+    return axios.post('/opt/access/parking/analysis/stat1', params)
267
+  },
268
+  // 停车总分析_停车利用率
269
+  tczfx2(params) {
270
+    return axios.post('/opt/access/parking/analysis/stat2', params)
271
+  },
272
+  // 停车总分析_停车场总览
273
+  tczfx3(params) {
274
+    return axios.get('/opt/access/parking/analysis/view', {params})
275
+  },
276
+  // 停车时长分析
277
+  tcscfx(params) {
278
+    return axios.post('/opt/parking/time/analysis/stat1', params)
279
+  },
280
+  // 停车时长分析_周转次数排行
281
+  tcscfxList1(params) {
282
+    return axios.get('/opt/parking/time/analysis/list1', {params})
283
+  },
284
+  // 停车时长分析_停车时长排行
285
+  tcscfxList2(params) {
286
+    return axios.get('/opt/parking/time/analysis/list2', {params})
287
+  },
288
+  // 临时停车统计_临时停车统计
289
+  lstctj1(params) {
290
+    return axios.post('/opt/parking/temp/stat1', params)
291
+  },
292
+  // 临时停车统计_过去30日临时停车趋势
293
+  lstctj2(params) {
294
+    return axios.post('/opt/parking/temp/stat2', params)
295
+  },
296
+  // 泊位周转分析_车流量趋势
297
+  bwzzfx1(params) {
298
+    return axios.post('/opt/berth/turnover/stat1', params)
299
+  },
300
+  // 泊位周转分析_泊位周转率变化趋势
301
+  bwzzfx2(params) {
302
+    return axios.post('/opt/berth/turnover/stat2', params)
303
+  },
304
+  // 停车场泊位分析
305
+  tccbwfx(params) {
306
+    return axios.post('/opt/parking/lot/stat1', params)
307
+  },
308
+  // 夜间停车统计_日夜间停车总小时数
309
+  yjtctj1(params) {
310
+    return axios.post('/opt/parking/night/stat1', params)
311
+  },
312
+  // 夜间停车统计_停车时长
313
+  yjtctjListByPage(params) {
314
+    return axios.get('/opt/parking/night/page', {params})
315
+  },
316
+  // 车辆类型_新能源车占比
317
+  cllx1(params) {
318
+    return axios.post('/opt/vehicle/type/stat1', params)
319
+  },
320
+  // 车辆类型_车型分类
321
+  cllx2(params) {
322
+    return axios.post('/opt/vehicle/type/stat2', params)
323
+  },
324
+  // 车辆类型_新能源趋势
325
+  cllx3(params) {
326
+    return axios.post('/opt/vehicle/type/stat3', params)
327
+  },
328
+  // 车辆类型_新能源车排名
329
+  cllx4(params) {
330
+    return axios.post('/opt/vehicle/type/stat4', params)
331
+  },
218 332
 }

+ 22 - 125
src/pages/index/components/berth_turnover.vue

@@ -10,34 +10,33 @@
10 10
           legendIcon="react"
11 11
           v-if="activeName === '车流量趋势'"
12 12
           :bottom="30"
13
-          :xlabelFormat="xLabelFormat"
14 13
           :top="60"
15
-          yAxisName="()"
14
+          yAxisName="()"
16 15
           :tooltip="tooltipFormat"
17 16
           :dataset="bardata"
18 17
           :encode="[
19
-            {x: 'month', y: 'hs', seriesName: '入场车辆'},
20
-            {x: 'month', y: 'cs', seriesName: '出场车辆'}]"
18
+            {x: 'mouth', y: 'hs', seriesName: '入场车辆'},
19
+            {x: 'mouth', y: 'cs', seriesName: '出场车辆'}]"
21 20
           :labelSize="15"
22 21
           id="fxdqhszzt"
23 22
         />
24 23
         </div>
25 24
       </el-tab-pane>
26 25
       <el-tab-pane label="泊位周转率变化趋势" name="泊位周转率变化趋势">
27
-        <div style="width: 100%;height: 300px">
26
+        <div style="width: 100%;height: 580px">
28 27
         <linechart
29 28
           :autoStop="false"
30 29
           :top="30"
31
-          :bottom="30"
30
+          :bottom="180"
32 31
           :left="40"
33 32
           :legendTop="0"
34
-          yAxisName="辆"
33
+          yAxisName="%"
34
+          :xlabelFormat="xLabelFormat"
35 35
           v-if="activeName === '泊位周转率变化趋势'"
36 36
           :dataset="linedata"
37 37
           :tooltipFormat="lineTooltipFormat"
38 38
           :encode="[
39
-              { x: 'month', y: 'rc', seriesName: '入场',bool:'true' },
40
-              { x: 'month', y: 'cc', seriesName: '出场',bool:'true' },
39
+              { x: 'mouth', y: 'lastAmount', seriesName: '泊位周转率',bool:'true' },
41 40
             ]"
42 41
           id="sxcyfzqk"
43 42
         />
@@ -47,88 +46,25 @@
47 46
   </div>
48 47
 </template>
49 48
 <script>
50
-import piechart from "@/components/pieChart";
51 49
 import linechart from "@/components/lineChart";
52 50
 import barchart from "@/components/barChart";
51
+import api from '@/api/audit'
53 52
 
54 53
 export default {
55 54
     components: {
56
-      piechart,
57 55
       linechart,
58 56
       barchart
59 57
     },
60 58
     data() {
61 59
       return {
62
-        linedata: [{"month":"周一","rc":50,"cc":30}],
60
+        linedata: [],
63 61
         activeName: '车流量趋势',
64
-        bardata: [],
65
-        tableData1: [],
66
-        total1: 0,
67
-        pageSize1: 10,
68
-        pageNum1: 1,
69
-        formInline1: {
70
-          plateNo: ''
71
-        },
72
-        columns2: [
73
-          {
74
-            label: '车牌号',
75
-            key: 'plateNo'
76
-          },
77
-          {
78
-            label: '停车场',
79
-            key: 'carParkName'
80
-          },
81
-          {
82
-            label: '行为',
83
-            key: 'behavior'
84
-          },
85
-          {
86
-            label: '时间',
87
-            key: 'behaviorTime'
88
-          }
89
-        ],
90
-        tableData2: [],
91
-        total2: 0,
92
-        pageSize2: 10,
93
-        pageNum2: 1,
94
-        formInline2: {
95
-          plateNo: ''
96
-        },
97
-        columns3: [
98
-          {
99
-            label: '车牌号',
100
-            key: 'plateNo'
101
-          },
102
-          {
103
-            label: '停车场',
104
-            key: 'carParkName'
105
-          },
106
-          {
107
-            label: '泊位号',
108
-            key: 'parkingNo'
109
-          },
110
-          {
111
-            label: '入场时间',
112
-            key: 'inTime'
113
-          },
114
-          {
115
-            label: '出场时间',
116
-            key: 'outTime'
117
-          }
118
-        ],
119
-        tableData3: [],
120
-        total3: 0,
121
-        pageSize3: 10,
122
-        pageNum3: 1,
123
-        formInline3: {
124
-          plateNo: ''
125
-        }
62
+        bardata: []
126 63
       }
127 64
     },
128 65
     mounted() {
129
-      this.getTableData1()
130
-      this.getTableData2()
131
-      this.getTableData3()
66
+      this.getBarData()
67
+      this.getLineData()
132 68
     },
133 69
     watch: {
134 70
     },
@@ -136,10 +72,7 @@ export default {
136 72
       lineTooltipFormat(params) {
137 73
         return `<div class="line-tooltip">
138 74
         <div style="color: ${params[0].color}">${params[0].seriesName}: ${
139
-          params[0].data.lastYearAmount || "--"
140
-        }</div>
141
-        <div style="color: ${params[1].color}">${params[1].seriesName}: ${
142
-          params[1].data.thisYearAmount || "--"
75
+          params[0].data.lastAmount || "--"
143 76
         }</div>
144 77
       </div>`;
145 78
       },
@@ -154,55 +87,19 @@ export default {
154 87
 </div>`;
155 88
       },
156 89
       xLabelFormat(name) {
157
-        const nameArr = []
158
-        for(let i=0; i<name.length; i+=7) {
159
-          nameArr.push(name.substring(i, i+7))
160
-        }
161
-        return nameArr.join('\n');
90
+        var str = name.split("");
91
+        return str.join("\n");
162 92
       },
163
-      onSubmit1() {
164
-        this.pageNum1 = 1
165
-        this.getTableData1()
166
-      },
167
-      onSubmit2() {
168
-        this.pageNum2 = 1
169
-        this.getTableData2()
170
-      },
171
-
172
-      onSubmit3() {
173
-        this.pageNum3 = 1
174
-        this.getTableData3()
175
-      },
176
-      handlePageChange1() {
177
-        this.getTableData1()
178
-      },
179
-      getTableData1() {
180
-        const {pageNum1, pageSize1} = this
181
-        api.carListByPage({current: pageNum1, size: pageSize1, ...this.formInline1}).then(res => {
182
-          this.tableData1 = (res.data.records || []).map(item => ({...item, carType: item.plateNo.length === 7 ? '燃油汽车' : '新能源车', }))
183
-          this.total1 = res.data.total
93
+      getBarData() {
94
+        api.bwzzfx1().then(res => {
95
+          this.bardata = res.data || []
184 96
         })
185 97
       },
186
-      handlePageChange2() {
187
-        this.getTableData2()
188
-      },
189
-      getTableData2() {
190
-        const {pageNum2, pageSize2} = this
191
-        api.gjListByPage({current: pageNum2, size: pageSize2, ...this.formInline2}).then(res => {
192
-          this.tableData2 = res.data.records || []
193
-          this.total2 = res.data.total
98
+      getLineData() {
99
+        api.bwzzfx2().then(res => {
100
+          this.linedata = res.data || []
194 101
         })
195 102
       },
196
-      handlePageChange3() {
197
-        this.getTableData3()
198
-      },
199
-      getTableData3() {
200
-        const {pageNum3, pageSize3} = this
201
-        api.tcjlListByPage({current: pageNum3, size: pageSize3, ...this.formInline3}).then(res => {
202
-          this.tableData3 = res.data.records || []
203
-          this.total3 = res.data.total
204
-        })
205
-      }
206 103
     }
207 104
 }
208 105
 </script>

+ 38 - 38
src/pages/index/components/berth_use.vue

@@ -1,28 +1,28 @@
1 1
 <template>
2 2
   <div class="body-wrapper">
3
-    <el-form class="form-wrapper" :inline="true" :model="formInline">
4
-      <el-row>
5
-        <el-col :span="8">
6
-          <el-form-item label="停车场名称:">
7
-            <el-input v-model="formInline.parkingName" placeholder="请输入"></el-input>
8
-          </el-form-item>
9
-        </el-col>
10
-        <el-col :span="8">
11
-          <el-form-item>
12
-            <el-button type="primary" class="query-btn" @click="onSubmit">查询</el-button>
13
-          </el-form-item>
14
-        </el-col>
15
-      </el-row>
16
-    </el-form>
17
-    <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
3
+<!--    <el-form class="form-wrapper" :inline="true" :model="formInline">-->
4
+<!--      <el-row>-->
5
+<!--        <el-col :span="8">-->
6
+<!--          <el-form-item label="停车场名称:">-->
7
+<!--            <el-input v-model="formInline.parkingName" placeholder="请输入"></el-input>-->
8
+<!--          </el-form-item>-->
9
+<!--        </el-col>-->
10
+<!--        <el-col :span="8">-->
11
+<!--          <el-form-item>-->
12
+<!--            <el-button type="primary" class="query-btn" @click="onSubmit">查询</el-button>-->
13
+<!--          </el-form-item>-->
14
+<!--        </el-col>-->
15
+<!--      </el-row>-->
16
+<!--    </el-form>-->
17
+    <el-table :data="tableData" height="800" style="background: #2a2a2a;border-color: #333;">
18 18
       <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
19 19
       </el-table-column>
20 20
     </el-table>
21
-    <div class="table-pagination">
22
-      <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
23
-                     :current-page.sync="pageNum" :page-size.sync="pageSize">
24
-      </el-pagination>
25
-    </div>
21
+<!--    <div class="table-pagination">-->
22
+<!--      <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"-->
23
+<!--                     :current-page.sync="pageNum" :page-size.sync="pageSize">-->
24
+<!--      </el-pagination>-->
25
+<!--    </div>-->
26 26
   </div>
27 27
 </template>
28 28
 <script>
@@ -35,35 +35,35 @@ export default {
35 35
       columns: [
36 36
         {
37 37
           label: '停车场名称',
38
-          key: 'parkingName'
38
+          key: 'carParkName'
39 39
         },
40 40
         {
41 41
           label: '星期一',
42
-          key: ''
42
+          key: 'day1Rate'
43 43
         },
44 44
         {
45 45
           label: '星期二',
46
-          key: ''
46
+          key: 'day2Rate'
47 47
         },
48 48
         {
49 49
           label: '星期三',
50
-          key: ''
50
+          key: 'day3Rate'
51 51
         },
52 52
         {
53 53
           label: '星期四',
54
-          key: ''
54
+          key: 'day4Rate'
55 55
         },
56 56
         {
57 57
           label: '星期五',
58
-          key: ''
58
+          key: 'day5Rate'
59 59
         },
60 60
         {
61 61
           label: '星期六',
62
-          key: ''
62
+          key: 'day6Rate'
63 63
         },
64 64
         {
65 65
           label: '星期天',
66
-          key: ''
66
+          key: 'day7Rate'
67 67
         },
68 68
       ],
69 69
       tableData: [],
@@ -77,24 +77,24 @@ export default {
77 77
     }
78 78
   },
79 79
   mounted() {
80
-    // this.getTableData()
80
+    this.getTableData()
81 81
   },
82 82
   watch: {
83 83
   },
84 84
   methods: {
85 85
     getTableData() {
86 86
       const {pageNum, pageSize} = this
87
-      api.ipListByPage({current: pageNum, size: pageSize, ipAddr: this.formInline.ipAddr}).then(res => {
88
-        this.tableData = res.data.records || []
89
-        this.total = res.data.total
87
+      api.bwlyfx({current: pageNum, size: pageSize, ...this.formInline}).then(res => {
88
+        this.tableData = res.data || []
89
+        // this.total = res.data.total
90 90
       })
91 91
     },
92
-    onSubmit () {
93
-      this.getTableData()
94
-    },
95
-    handlePageChange() {
96
-      this.getTableData()
97
-    },
92
+    // onSubmit () {
93
+    //   this.getTableData()
94
+    // },
95
+    // handlePageChange() {
96
+    //   this.getTableData()
97
+    // },
98 98
   }
99 99
 }
100 100
 </script>

+ 16 - 12
src/pages/index/components/night_parking_statistics.vue

@@ -11,10 +11,11 @@
11 11
           :legendTop="0"
12 12
           yAxisName="(小时)"
13 13
           :dataset="linedata"
14
-          :xlabelFormat="taskFinishXFormat"
14
+          :xlabelFormat="xLabelFormat"
15 15
           :tooltipFormat="lineTooltipFormat"
16 16
           :encode="[
17
-              { x: 'month', y: 'lastAmount', seriesName: '泊位盈余情况',bool:'true' },
17
+              { x: 'month', y: 'lastYearAmount', seriesName: '夜间',bool:'true' },
18
+              { x: 'month', y: 'thisYearAmount', seriesName: '日间',bool:'true' },
18 19
             ]"
19 20
           id="sxcyfzqk"
20 21
         />
@@ -41,7 +42,7 @@
41 42
 </template>
42 43
 <script>
43 44
 import linechart from "@/components/lineChart";
44
-import api from "@/api/article_z";
45
+import api from "@/api/audit";
45 46
 
46 47
 
47 48
 export default {
@@ -65,11 +66,11 @@ export default {
65 66
         },
66 67
         {
67 68
           label: '日间停车总时长',
68
-          key: 'dayTime'
69
+          key: 'light'
69 70
         },
70 71
         {
71 72
           label: '夜间停车总时长',
72
-          key: 'nightTime'
73
+          key: 'night'
73 74
         }
74 75
       ],
75 76
     }
@@ -82,26 +83,29 @@ export default {
82 83
 
83 84
   },
84 85
   methods: {
85
-    taskFinishXFormat(name) {
86
+    xLabelFormat(name) {
86 87
       var str = name.split("");
87 88
       return str.join("\n");
88 89
     },
89 90
     getLinedata(){
90
-      api.queryBerthPerationNalysis_Bwyyqk().then(res=>{
91
-        this.linedata=res.data;
91
+      api.yjtctj1().then(res=>{
92
+        this.linedata=res.data || [];
92 93
       })
93 94
     },
94 95
     lineTooltipFormat(params) {
95 96
       const data = params[0].data;
96 97
       return `<div class="line-tooltip">
97 98
         <div style="color: ${params[0].color}">${params[0].seriesName}: ${
98
-        params[0].data.lastAmount || "--"
99
-      }</div>`;
99
+        params[0].data.lastYearAmount || "--"
100
+      }</div>
101
+        <div style="color: ${params[1].color}">${params[1].seriesName}: ${
102
+        params[0].data.thisYearAmount || "--"
103
+      }</div>
104
+    </div>`;
100 105
     },
101 106
     getTabledata() {
102 107
       const {pageNum, pageSize} = this;
103
-      // todo
104
-      api.queryList({current: pageNum, size: pageSize, ...this.formInline}).then(res => {
108
+      api.yjtctjListByPage({current: pageNum, size: pageSize, ...this.formInline}).then(res => {
105 109
         this.tableData = res.data.records || []
106 110
         this.total = res.data.total || 0
107 111
       })

+ 89 - 97
src/pages/index/components/parking_analysis.vue

@@ -1,13 +1,22 @@
1
-@ -0,0 +1,257 @@
2 1
 <template>
3 2
   <div class="body-wrapper">
4 3
     <div>
5 4
       <h2 style="color: #3498db;margin-bottom: 20px;display: inline-block;width: 90%">停车总分析</h2>
6 5
     </div>
7
-    <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
8
-      <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
9
-      </el-table-column>
10
-    </el-table>
6
+    <div style="display: flex;justify-content: space-around;color: #fff;">
7
+      <div style="width: 25%;display: flex;">
8
+        <h4 class="h4font">车场总数:</h4><h3 class="h4font">{{viewData.totalPark}}</h3>
9
+      </div>
10
+      <div style="width: 25%;display: flex;">
11
+        <h4 class="h4font">本月新增车场:</h4><h3 class="h4font">{{viewData.monthPark}}</h3>
12
+      </div>
13
+      <div style="width: 25%;display: flex;">
14
+        <h4 class="h4font">车位总数:</h4><h3 class="h4font">{{viewData.totalBerth}}</h3>
15
+      </div>
16
+      <div style="width: 25%;display: flex;">
17
+        <h4 class="h4font">本月新增车位:</h4><h3 class="h4font">{{viewData.monthBerth}}</h3>
18
+      </div>
19
+    </div>
11 20
     <br>
12 21
     <br>
13 22
     <div align="center" style="color: #3498db;font-size: 23px;margin-bottom: 20px">停车难易指数变化趋势</div>
@@ -21,8 +30,8 @@
21 30
         :dataset="linedata"
22 31
         :tooltipFormat="lineTooltipFormat"
23 32
         :encode="[
24
-              { x: 'mouth', y: 'in', seriesName: '入场',bool:'true' },
25
-              { x: 'mouth', y: 'out', seriesName: '出场',bool:'true' },
33
+              { x: 'mouth', y: 'lastYearAmount', seriesName: '入场',bool:'true' },
34
+              { x: 'mouth', y: 'thisYearAmount', seriesName: '出场',bool:'true' },
26 35
             ]"
27 36
         id="sxcyfzqk"
28 37
       />
@@ -30,18 +39,19 @@
30 39
     <br>
31 40
     <br>
32 41
     <div align="center" style="color: #3498db;font-size: 23px;margin-bottom: 20px">停车利用率</div>
33
-    <div style="height: 300px">
42
+    <div style="height: 580px">
34 43
       <linechart
35 44
         :autoStop="false"
36 45
         :top="30"
37
-        :bottom="30"
46
+        :bottom="180"
38 47
         :left="40"
39 48
         :legendTop="0"
40 49
         :dataset="linedata2"
41 50
         :tooltipFormat="lineTooltipFormat"
51
+        :xlabelFormat="xLabelFormat"
42 52
         :encode="[
43
-              { x: 'mouth', y: 'in', seriesName: '占用中',bool:'true' },
44
-              { x: 'mouth', y: 'out', seriesName: '车位总数',bool:'true' },
53
+              { x: 'mouth', y: 'lastYearAmount', seriesName: '占用中',bool:'true' },
54
+              { x: 'mouth', y: 'thisYearAmount', seriesName: '车位总数',bool:'true' },
45 55
             ]"
46 56
         id="tclyl"
47 57
       />
@@ -51,12 +61,22 @@
51 61
       <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
52 62
       </el-table-column>
53 63
     </el-table>
64
+    <div class="table-pagination">
65
+      <el-pagination :background="false" layout="total, prev, pager, next" :total="total2" @current-change="handlePageChange2"
66
+                     :current-page.sync="pageNum2" :page-size.sync="pageSize2">
67
+      </el-pagination>
68
+    </div>
54 69
     <br>
55 70
     <br>
56 71
     <el-table :data="tableData3" style="background: #2a2a2a;border-color: #333;">
57 72
       <el-table-column v-for="(item, index) in columns3" :key="index" :label="item.label" :prop="item.key">
58 73
       </el-table-column>
59 74
     </el-table>
75
+    <div class="table-pagination">
76
+      <el-pagination :background="false" layout="total, prev, pager, next" :total="total3" @current-change="handlePageChange3"
77
+                     :current-page.sync="pageNum3" :page-size.sync="pageSize3">
78
+      </el-pagination>
79
+    </div>
60 80
   </div>
61 81
 </template>
62 82
 <script>
@@ -71,74 +91,48 @@ export default {
71 91
     return {
72 92
       linedata: [],
73 93
       linedata2: [],
74
-      columns: [
75
-        {
76
-          label: '车场总数',
77
-          key: 'noticeTitle'
78
-        },
79
-        {
80
-          label: '本月新增车场',
81
-          key: 'createTime'
82
-        },
83
-        {
84
-          label: '车位总数',
85
-          key: 'noticeTitle'
86
-        },
87
-        {
88
-          label: '本月新增车位',
89
-          key: 'createTime'
90
-        }
91
-      ],
92 94
       columns2: [
93 95
         {
94 96
           label: '停车场名称',
95
-          key: 'noticeTitle'
96
-        },
97
-        {
98
-          label: '占用率',
99
-          key: 'createTime'
97
+          key: 'carParkName'
100 98
         },
101 99
         {
102
-          label: '百分比',
103
-          key: 'noticeTitle2'
100
+          label: '利用率',
101
+          key: 'used'
104 102
         }
105 103
       ],
106 104
       columns3: [
107
-        {
108
-          label: '用户姓名',
109
-          key: 'noticeTitle'
110
-        },
111 105
         {
112 106
           label: '车牌号',
113
-          key: 'createTime'
107
+          key: 'plateNo'
114 108
         },
115 109
         {
116 110
           label: '行为',
117
-          key: 'noticeTitle2'
118
-        },
119
-        {
120
-          label: '日期',
121
-          key: 'noticeTitle2'
111
+          key: 'action'
122 112
         },
123 113
       ],
124
-      formInline1: {
125
-        plateNo: ''
126
-      },
127
-      tableData: [{"publicTitle":'预警提示',"publicTime":'2023-12-29 10:00:00',"publicPerson":'李玉'},
128
-        {"publicTitle":'停车时限',"publicTime":'2023-12-31 11:00:00',"publicPerson":'张玮'},
129
-        {"publicTitle":'设备故障',"publicTime":'2023-12-30 10:00:00',"publicPerson":'李玉'},],
130
-      tableData2:[{"noticeTitle":'预警提示',"createTime":'2023-12-29 10:00:00',"noticeTitle2":'李玉'}],
114
+      tableData2:[],
131 115
       tableData3:[],
132
-      total: 3,
133
-      pageSize: 10,
134
-      pageNum: 1,
135
-      dialogVisible: false,
136
-      formLabelAlign: {},
137
-      title: ''
116
+      pageNum2: 1,
117
+      pageSize2: 5,
118
+      total2: 0,
119
+      pageNum3: 1,
120
+      pageSize3: 5,
121
+      total3: 0,
122
+      viewData: {
123
+        totalPark: 0,
124
+        monthPark: 0,
125
+        totalBerth: 0,
126
+        monthBerth: 0
127
+      }
138 128
     }
139 129
   },
140 130
   mounted() {
141
-    this.getTableData()
131
+    this.getView()
132
+    this.getLineData1()
133
+    this.getLineData2()
134
+    this.getTableData2()
135
+    this.getTableData3()
142 136
   },
143 137
   watch: {
144 138
   },
@@ -151,50 +145,48 @@ export default {
151 145
       }</div>
152 146
       </div>`;
153 147
     },
154
-    handlePageChange() {
155
-      this.getTableData()
148
+    getView() {
149
+      api.tczfx3().then(res => {
150
+        this.viewData = res.data
151
+      })
156 152
     },
157
-    handleDetail(row) {
158
-      this.title = '查看详情'
159
-      this.formLabelAlign = row
160
-      this.dialogVisible = true
153
+    getTableData2() {
154
+      const {pageNum2, pageSize2} = this
155
+      api.tclyl({current: pageNum2, size: pageSize2}).then(res => {
156
+        this.tableData2 = res.data.records || []
157
+        this.total2 = res.data.total
158
+      })
161 159
     },
162
-    handleAdd () {
163
-      this.title = '发布公告'
164
-      this.formLabelAlign.publicTitle = ''
165
-      // this.formLabelAlign.publicTime = ''
166
-      this.formLabelAlign.publicPerson = ''
167
-      this.dialogVisible = true
160
+    getTableData3() {
161
+      const {pageNum3, pageSize3} = this
162
+      api.tcjl({current: pageNum3, size: pageSize3}).then(res => {
163
+        this.tableData3 = res.data.records || []
164
+        this.total3 = res.data.total
165
+      })
168 166
     },
169
-    handleConfirm(formName) {
170
-      this.$refs[formName].validate((valid) => {
171
-        if (valid) {
172
-          if (this.title === '发布公告') {
173
-            api.announcementSave(this.formLabelAlign).then(res => {
174
-              if(res.code === 200) {
175
-                this.dialogVisible = false
176
-                this.$message({
177
-                  message: '发布成功!',
178
-                  type: 'success'
179
-                })
180
-                this.getTableData()
181
-              }
182
-            })
183
-          } else {
184
-            this.dialogVisible = false;
185
-          }
186
-        } else {
187
-          return false
188
-        }
167
+    getLineData1() {
168
+      api.tczfx1().then(res => {
169
+        this.linedata = res.data || []
189 170
       })
190 171
     },
191
-    getTableData() {
192
-      const {pageNum, pageSize, searchWords} = this
193
-      api.announcementListByPage({current: pageNum, size: pageSize}).then(res => {
194
-        this.tableData = res.data.records || []
195
-        this.total = res.data.total
172
+    getLineData2() {
173
+      api.tczfx2().then(res => {
174
+        this.linedata2 = res.data || []
196 175
       })
197 176
     },
177
+    xLabelFormat(name) {
178
+      var str = name.split("");
179
+      return str.join("\n");
180
+    },
181
+    handlePageChange2() {
182
+      this.getTableData2()
183
+    },
184
+    handlePageChange3() {
185
+      this.getTableData3()
186
+    },
187
+    handlePageChange() {
188
+      this.getTableData()
189
+    }
198 190
   }
199 191
 }
200 192
 </script>

+ 28 - 30
src/pages/index/components/parking_analysis_report.vue

@@ -2,31 +2,27 @@
2 2
   <div class="body-wrapper">
3 3
     <el-form class="form-wrapper" :inline="true" :model="formInline">
4 4
       <el-row>
5
-        <el-col :span="5">
5
+        <el-col :span="6">
6 6
           <el-form-item label="停车场名称:">
7
-            <el-input v-model="formInline.parkingName" placeholder="请输入"></el-input>
7
+            <el-input v-model="formInline.carParkName" placeholder="请输入"></el-input>
8 8
           </el-form-item>
9 9
         </el-col>
10
-        <el-col :span="5">
11
-          <el-form-item label="停车状态:">
12
-            <el-select clearable v-model="formInline.parkingType" placeholder="停车状态" popper-class="cur-select">
13
-              <el-option label="全部" value=""></el-option>
14
-              <el-option label="空闲" value="空闲"></el-option>
15
-              <el-option label="占用" value="占用"></el-option>
16
-            </el-select>
17
-          </el-form-item>
18
-        </el-col>
19
-        <el-col :span="5">
10
+        <el-col :span="6">
20 11
           <el-form-item label="车牌号:">
21 12
             <el-input v-model="formInline.plateNo" placeholder="请输入"></el-input>
22 13
           </el-form-item>
23 14
         </el-col>
24
-        <el-col :span="5">
15
+        <el-col :span="8">
25 16
           <el-form-item label="入场时间:">
26 17
             <el-date-picker
27 18
               v-model="formInline.inTime"
28
-              type="date"
29
-              placeholder="选择日期">
19
+              type="daterange"
20
+              align="right"
21
+              unlink-panels
22
+              range-separator="-"
23
+              value-format="yyyy-MM-dd HH:mm:ss"
24
+              start-placeholder="开始日期"
25
+              end-placeholder="结束日期">
30 26
             </el-date-picker>
31 27
           </el-form-item>
32 28
         </el-col>
@@ -56,25 +52,17 @@ export default {
56 52
   data() {
57 53
     return {
58 54
       columns: [
59
-        {
60
-          label: '会员姓名',
61
-          key: ''
62
-        },
63 55
         {
64 56
           label: '车牌号',
65
-          key: ''
57
+          key: 'plateNo'
66 58
         },
67 59
         {
68 60
           label: '停车场',
69
-          key: ''
61
+          key: 'carParkName'
70 62
         },
71 63
         {
72 64
           label: '入场日期',
73
-          key: ''
74
-        },
75
-        {
76
-          label: '状态',
77
-          key: ''
65
+          key: 'inTime'
78 66
         },
79 67
       ],
80 68
       tableData: [],
@@ -83,27 +71,37 @@ export default {
83 71
       pageNum: 1,
84 72
       dialogVisible: false,
85 73
       formInline: {
86
-        parkingName: '',
87
-        parkingType: '',
74
+        carParkName: '',
88 75
         plateNo: '',
89 76
         inTime: '',
90 77
       },
91 78
     }
92 79
   },
93 80
   mounted() {
94
-    // this.getTableData()
81
+    this.getTableData()
95 82
   },
96 83
   watch: {
97 84
   },
98 85
   methods: {
99 86
     getTableData() {
100 87
       const {pageNum, pageSize} = this
101
-      api.ipListByPage({current: pageNum, size: pageSize, ipAddr: this.formInline.ipAddr}).then(res => {
88
+      let params = {...this.formInline}
89
+      if (
90
+        this.formInline.inTime && this.formInline.inTime.length === 2 &&
91
+        this.formInline.inTime[1] !== ""
92
+      ) {
93
+        this.formInline.inTime[1] = this.formInline.inTime[1].substring(0, 10) + " 23:59:59";
94
+        params.startInTime = this.formInline.inTime[0]
95
+        params.endInTime = this.formInline.inTime[1]
96
+      }
97
+      delete params.inTime
98
+      api.tccfxbbListByPage({current: pageNum, size: pageSize, ...params}).then(res => {
102 99
         this.tableData = res.data.records || []
103 100
         this.total = res.data.total
104 101
       })
105 102
     },
106 103
     onSubmit () {
104
+      this.pageNum = 1
107 105
       this.getTableData()
108 106
     },
109 107
     handlePageChange() {

+ 4 - 4
src/pages/index/components/parking_heatmap.vue

@@ -34,7 +34,7 @@ export default {
34 34
           textStyle: {
35 35
             color: "white",
36 36
           },
37
-          text: ["(%)"],
37
+          text: ["()"],
38 38
           min: 0,
39 39
           max: 100,
40 40
           inRange: {
@@ -106,7 +106,7 @@ export default {
106 106
 
107 107
   mounted() {
108 108
     this.zxt()
109
-    api.dtnyzs().then(res => {
109
+    api.tcrlt1().then(res => {
110 110
       let arr = []
111 111
       let dataSoure = res.data
112 112
       for (const key in dataSoure) {
@@ -147,7 +147,7 @@ export default {
147 147
         this.setIntervalMap(chart);
148 148
       });
149 149
     })
150
-    api.dtnyzs().then(res => {
150
+    api.tcrlt2().then(res => {
151 151
       let arr = []
152 152
       let dataSoure = res.data
153 153
       for (const key in dataSoure) {
@@ -218,7 +218,7 @@ export default {
218 218
     },
219 219
     mapTooltip(data) {
220 220
       return `<div class="map-tooltip">
221
-        <div class="map-tooltip-name">${data.name}:<span class="map-tooltip-value">${data.value}%</span></div>
221
+        <div class="map-tooltip-name">${data.name}:<span class="map-tooltip-value">${data.value}</span></div>
222 222
       </div>`;
223 223
     },
224 224
   },

+ 27 - 22
src/pages/index/components/parking_live.vue

@@ -14,9 +14,9 @@
14 14
             :dataset="linedata"
15 15
             :tooltipFormat="lineTooltipFormat"
16 16
             :encode="[
17
-              { x: 'month', y: 'lastYearAmount', seriesName: '泊位利用率',bool:'true' },
17
+              { x: 'mouth', y: 'lastAmount', seriesName: '泊位利用率',bool:'true' },
18 18
             ]"
19
-            id="sxcyfzqk"
19
+            id="sxcyfzqk1"
20 20
           />
21 21
         </div>
22 22
       </el-tab-pane>
@@ -30,7 +30,7 @@
30 30
               :radiusArr="['30%', '70%']"
31 31
               :colorArr="modelPieColor"
32 32
               :labelFormat="['{name|{b}}', '{sub|{@value}万元 {d}%}', '{hr|}']"
33
-              :dataset="modelData.list"
33
+              :dataset="modelData"
34 34
               :encode="{ itemName: 'name', value: 'value' }"
35 35
             />
36 36
           </div>
@@ -49,7 +49,7 @@
49 49
               { x: 'month', y: 'lastYearAmount', seriesName: '入场',bool:'true' },
50 50
               { x: 'month', y: 'thisYearAmount', seriesName: '出场',bool:'true' },
51 51
             ]"
52
-              id="sxcyfzqk"
52
+              id="sxcyfzqk2"
53 53
             />
54 54
           </div>
55 55
         </div>
@@ -60,6 +60,7 @@
60 60
 <script>
61 61
 import linechart from "@/components/lineChart";
62 62
 import piechart from "@/components/pieChart";
63
+import api from '@/api/audit'
63 64
 
64 65
 export default {
65 66
   components: {
@@ -69,37 +70,41 @@ export default {
69 70
   data() {
70 71
     return {
71 72
       activeName: '泊位占用率',
72
-      linedata: [{month: '建业智慧港停车场', lastYearAmount: 52}
73
-        , {month: '长申玉购物广场(螺湾店)', lastYearAmount: 20}
74
-        , {month: '昌建东外滩西南停车场', lastYearAmount: 60}
75
-        , {month: '漯河长申玉停车场', lastYearAmount: 12}
76
-        , {month: '万宝手机城新西店', lastYearAmount: 40}],
73
+      linedata: [],
77 74
 
78 75
       modelPieColor: ["#db6749", "#f8cd55", "#3c97d6", "#989bf8"],
79
-      modelData: {
80
-        list: [{name: '长期车', value: 100}, {name: '临停车', value: 100}, {name: '会员车', value: 100}]
81
-      },
82
-      linedata1: [{month: '0:00-3:00', lastYearAmount: 2, thisYearAmount: 1}
83
-        , {month: '3:00-6:00', lastYearAmount: 6, thisYearAmount: 8}
84
-        , {month: '6:00-9:00', lastYearAmount: 20, thisYearAmount: 60}
85
-        , {month: '9:00-12:00', lastYearAmount: 60, thisYearAmount: 22}
86
-        , {month: '12:00-15:00', lastYearAmount: 12, thisYearAmount: 34}
87
-        , {month: '15:00-18:00', lastYearAmount: 40, thisYearAmount: 60}
88
-        , {month: '18:00-21:00', lastYearAmount: 100, thisYearAmount: 91}
89
-        , {month: '21:00-0:00', lastYearAmount: 60, thisYearAmount: 20}],
76
+      modelData: [],
77
+      linedata1: [],
90 78
     }
91 79
   },
92 80
   mounted() {
81
+    this.getLineData()
82
+    this.getModelData()
83
+    this.getLineData1()
93 84
   },
94 85
   watch: {
95 86
   },
96 87
   methods: {
97
-
88
+    getLineData() {
89
+      api.tcskfx1().then(res => {
90
+        this.linedata = res.data || []
91
+      })
92
+    },
93
+    getModelData() {
94
+      api.tcskfx2().then(res => {
95
+        this.modelData = res.data || []
96
+      })
97
+    },
98
+    getLineData1() {
99
+      api.tcskfx3().then(res => {
100
+        this.linedata1 = res.data || []
101
+      })
102
+    },
98 103
     lineTooltipFormat(params) {
99 104
       const data = params[0].data;
100 105
       return `<div class="line-tooltip">
101 106
         <div style="color: ${params[0].color}">${params[0].seriesName}: ${
102
-        params[0].data.lastYearAmount || "--"
107
+        params[0].data.lastAmount || "--"
103 108
       }(%)</div>
104 109
       </div>`;
105 110
     },

+ 22 - 5
src/pages/index/components/parking_lot.vue

@@ -2,18 +2,19 @@
2 2
   <div class="body-wrapper">
3 3
 
4 4
     <div style="width: 100%;">
5
-      <div style="width: 100%;height: 400px;">
5
+      <div style="width: 100%;height: 580px;">
6 6
         <h4 style="color: white">停车场泊位分析</h4>
7 7
         <br>
8 8
         <linechart
9 9
           :autoStop="false"
10 10
           :top="30"
11
-          :bottom="30"
11
+          :bottom="180"
12 12
           :left="40"
13 13
           :legendTop="0"
14 14
           yAxisName="(%)"
15 15
           :dataset="linedata"
16 16
           :tooltipFormat="lineTooltipFormat"
17
+          :xlabelFormat="xLabelFormat"
17 18
           :encode="[
18 19
               { x: 'mouth', y: 'lastYearAmount', seriesName: '利用率',bool:'true' },
19 20
             ]"
@@ -26,7 +27,7 @@
26 27
   </div>
27 28
 </template>
28 29
 <script>
29
-import api from "@/api/article_liao";
30
+import api from "@/api/audit";
30 31
 import linechart from "@/components/lineChart";
31 32
 import options from '@/util/options'
32 33
 
@@ -53,12 +54,28 @@ export default {
53 54
     }
54 55
   },
55 56
   mounted() {
56
-
57
+    this.getLineData()
57 58
   },
58 59
   watch: {
59 60
   },
60 61
   methods: {
61
-
62
+    xLabelFormat(name) {
63
+      var str = name.split("");
64
+      return str.join("\n");
65
+    },
66
+    lineTooltipFormat(params) {
67
+      const data = params[0].data;
68
+      return `<div class="line-tooltip">
69
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
70
+        params[0].data.lastAmount || "--"
71
+      }%</div>
72
+      </div>`;
73
+    },
74
+    getLineData() {
75
+      api.tccbwfx().then(res => {
76
+        this.linedata = res.data || []
77
+      })
78
+    }
62 79
   }
63 80
 }
64 81
 </script>

+ 42 - 65
src/pages/index/components/parking_period_analysis.vue

@@ -1,7 +1,8 @@
1 1
 <template>
2 2
   <div class="body-wrapper">
3
-    <div style="display: flex; justify-content: space-between;height: 300px">
4
-      <h5 style="color: white">停车高峰时段分析</h5>
3
+    <h4 style="color: white">停车高峰时段分析</h4>
4
+    <br>
5
+    <div style="width: 100%; height: 400px">
5 6
       <linechart
6 7
         :autoStop="false"
7 8
         :top="30"
@@ -12,25 +13,26 @@
12 13
         :dataset="linedata"
13 14
         :tooltipFormat="lineTooltipFormat"
14 15
         :encode="[
15
-              { x: 'month', y: 'lastYearAmount', seriesName: '入场',bool:'true' },
16
-              { x: 'month', y: 'thisYearAmount', seriesName: '出场',bool:'true' },
16
+              { x: 'mouth', y: 'lastYearAmount', seriesName: '入场',bool:'true' },
17
+              { x: 'mouth', y: 'thisYearAmount', seriesName: '出场',bool:'true' },
17 18
             ]"
18 19
         id="sxcyfzqk"
19 20
       />
20 21
     </div>
21
-    <div style="display: flex; justify-content: space-between;height: 300px">
22
-      <h5 style="color: white">出入场压力分析</h5>
22
+    <h4 style="color: white">出入场压力分析</h4>
23
+    <br>
24
+    <div style="width: 100%; height: 580px">
23 25
       <barchart
24 26
         class="side-chart"
25 27
         :autoStop="false"
26 28
         :colorArr="['#ffd201', '#00eacb', '#01b4ff', '#5d78ff']"
27 29
         legendIcon="react"
28
-        :bottom="30"
30
+        :bottom="180"
29 31
         :xlabelFormat="xLabelFormat"
30 32
         :top="60"
31 33
         yAxisName="(辆)"
32 34
         :tooltip="tooltipFormat"
33
-        :dataset="modelData"
35
+        :dataset="bardata1"
34 36
         :encode="[
35 37
             {x: 'month', y: 'hs', seriesName: '入场'},
36 38
             {x: 'month', y: 'cs', seriesName: '出场'}]"
@@ -38,19 +40,20 @@
38 40
         id="fxdqhszzt"
39 41
       />
40 42
     </div>
41
-    <div style="display: flex; justify-content: space-between;height: 300px">
42
-      <h5 style="color: white">停车饱和度分析</h5>
43
+    <h4 style="color: white">停车饱和度分析</h4>
44
+    <br/>
45
+    <div  style="width: 100%; height: 580px">
43 46
       <barchart
44 47
         class="side-chart"
45 48
         :autoStop="false"
46 49
         :colorArr="['#ffd201', '#00eacb', '#01b4ff', '#5d78ff']"
47 50
         legendIcon="react"
48
-        :bottom="30"
49
-        :xlabelFormat="xLabelFormat1"
51
+        :bottom="180"
52
+        :xlabelFormat="xLabelFormat"
50 53
         :top="60"
51
-        yAxisName="()"
54
+        yAxisName="()"
52 55
         :tooltip="tooltipFormat1"
53
-        :dataset="modelData1"
56
+        :dataset="bardata2"
54 57
         :encode="[
55 58
             {x: 'month', y: 'hs', seriesName: '占用'},
56 59
             {x: 'month', y: 'cs', seriesName: '空闲'}]"
@@ -63,6 +66,7 @@
63 66
 <script>
64 67
 import linechart from "@/components/lineChart";
65 68
 import barchart from "@/components/barChart";
69
+import api from '@/api/audit'
66 70
 
67 71
 export default {
68 72
   components: {
@@ -71,50 +75,33 @@ export default {
71 75
   },
72 76
   data() {
73 77
     return {
74
-      modelData: [{
75
-        "mouth": "市图书馆停车场",
76
-        "hs": 6053,
77
-        "cs": 1921
78
-      },
79
-        {
80
-          "mouth": "中山公园停车场",
81
-          "hs": 6033,
82
-          "cs": 3766
83
-        },
84
-        {
85
-          "mouth": "天地广场停车场",
86
-          "hs": 2258,
87
-          "cs": 2513
88
-        }],
89
-      modelData1: [{
90
-        "mouth": "市图书馆停车场",
91
-        "hs": 6053,
92
-        "cs": 1921
93
-      },
94
-        {
95
-          "mouth": "中山公园停车场",
96
-          "hs": 6033,
97
-          "cs": 3766
98
-        },
99
-        {
100
-          "mouth": "天地广场停车场",
101
-          "hs": 2258,
102
-          "cs": 2513
103
-        }],
104
-      linedata: [{month: '0:00-3:00', lastYearAmount: 2, thisYearAmount: 1}
105
-        , {month: '3:00-6:00', lastYearAmount: 6, thisYearAmount: 8}
106
-        , {month: '6:00-9:00', lastYearAmount: 20, thisYearAmount: 60}
107
-        , {month: '9:00-12:00', lastYearAmount: 60, thisYearAmount: 22}
108
-        , {month: '12:00-15:00', lastYearAmount: 12, thisYearAmount: 34}
109
-        , {month: '15:00-18:00', lastYearAmount: 40, thisYearAmount: 60}
110
-        , {month: '18:00-21:00', lastYearAmount: 100, thisYearAmount: 91}
111
-        , {month: '21:00-0:00', lastYearAmount: 60, thisYearAmount: 20}],
78
+      linedata: [],
79
+      bardata1: [],
80
+      bardata2: []
112 81
     }
113 82
   },
114 83
   mounted() {
84
+    this.getLineData()
85
+    this.getBarData1()
86
+    this.getBarData2()
115 87
   },
116 88
   watch: {},
117 89
   methods: {
90
+    getLineData() {
91
+      api.tcsdfx1().then(res => {
92
+        this.linedata = res.data || []
93
+      })
94
+    },
95
+    getBarData1() {
96
+      api.tcsdfx2().then(res => {
97
+        this.bardata1 = res.data || []
98
+      })
99
+    },
100
+    getBarData2() {
101
+      api.tcsdfx2().then(res => {
102
+        this.bardata2 = res.data || []
103
+      })
104
+    },
118 105
     lineTooltipFormat(params) {
119 106
       const data = params[0].data;
120 107
       return `<div class="line-tooltip">
@@ -137,13 +124,6 @@ export default {
137 124
         params[0].data.cs || "--"}辆</div>
138 125
 </div>`;
139 126
     },
140
-    xLabelFormat(name) {
141
-      const nameArr = []
142
-      for (let i = 0; i < name.length; i += 7) {
143
-        nameArr.push(name.substring(i, i + 7))
144
-      }
145
-      return nameArr.join('\n');
146
-    },
147 127
     tooltipFormat1(params) {
148 128
       const type = params[0].seriesType;
149 129
       const data = params[0].data;
@@ -155,12 +135,9 @@ export default {
155 135
         params[0].data.cs || "--"}个</div>
156 136
 </div>`;
157 137
     },
158
-    xLabelFormat1(name) {
159
-      const nameArr = []
160
-      for (let i = 0; i < name.length; i += 7) {
161
-        nameArr.push(name.substring(i, i + 7))
162
-      }
163
-      return nameArr.join('\n');
138
+    xLabelFormat(name) {
139
+      var str = name.split("");
140
+      return str.join("\n");
164 141
     },
165 142
   }
166 143
 }

+ 45 - 103
src/pages/index/components/parking_time_analysis.vue

@@ -8,7 +8,7 @@
8 8
       <piechart
9 9
         class="model-pie-body"
10 10
         id="chart1"
11
-        :radiusArr="['30%', '70%']"
11
+        :radiusArr="['30%', '60%']"
12 12
         :roseType = "false"
13 13
         :colorArr="modelPieColor"
14 14
         :labelFormat="['{name|{b}}', '{sub|{@value}辆 {d}%}', '{hr|}']"
@@ -18,27 +18,29 @@
18 18
     </div>
19 19
     <br>
20 20
     <br>
21
-
22
-
23 21
     <br>
24
-    <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
22
+    <div>
23
+      <h2 style="color: #3498db;margin-bottom: 20px;display: inline-block;width: 90%">周转次数排行</h2>
24
+    </div>
25
+    <el-table :data="tableData2" style="background: #2a2a2a;border-color: #333;">
25 26
       <el-table-column
26 27
         label="日均周转次数排行"
27 28
         type="index"
28
-        width="300"
29
-        :index="indexMethod">
29
+        width="300">
30 30
       </el-table-column>
31 31
       <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
32 32
       </el-table-column>
33 33
     </el-table>
34 34
     <br>
35 35
     <br>
36
-    <el-table :data="tableData2" style="background: #2a2a2a;border-color: #333;">
36
+    <div>
37
+      <h2 style="color: #3498db;margin-bottom: 20px;display: inline-block;width: 90%">停车时长排行</h2>
38
+    </div>
39
+    <el-table :data="tableData3" style="background: #2a2a2a;border-color: #333;">
37 40
       <el-table-column
38 41
         label="平均停车时长排行"
39 42
         width="300"
40
-        type="index"
41
-        :index="indexMethod">
43
+        type="index">
42 44
       </el-table-column>
43 45
       <el-table-column v-for="(item, index) in columns3" :key="index" :label="item.label" :prop="item.key">
44 46
       </el-table-column>
@@ -57,129 +59,69 @@ export default {
57 59
   },
58 60
   data() {
59 61
     return {
60
-      linedata: [],
61
-      linedata2: [],
62
-      columns: [
63
-        {
64
-          label: '停车场名称',
65
-          key: 'noticeTitle'
66
-        },
67
-        {
68
-          label: '日均周转次数',
69
-          key: 'createTime'
70
-        },
71
-        {
72
-          label: '车位总数',
73
-          key: 'noticeTitle'
74
-        }
75
-      ],
76 62
       columns2: [
77 63
         {
78
-          label: '车牌号',
79
-          key: 'noticeTitle'
64
+          label: '停车场',
65
+          key: 'carParkName'
80 66
         },
81 67
         {
82
-          label: '停车时长(小时)',
83
-          key: 'createTime'
68
+          label: '日均泊位周转次数',
69
+          key: 'number'
84 70
         }
85 71
       ],
86 72
       columns3: [
87
-        {
88
-          label: '用户姓名',
89
-          key: 'noticeTitle'
90
-        },
91 73
         {
92 74
           label: '车牌号',
93
-          key: 'createTime'
94
-        },
95
-        {
96
-          label: '行为',
97
-          key: 'noticeTitle2'
75
+          key: 'plateNo'
98 76
         },
99 77
         {
100
-          label: '日期',
101
-          key: 'noticeTitle2'
78
+          label: '总停车时长',
79
+          key: 'avgTime'
102 80
         },
103 81
       ],
104
-      formInline1: {
105
-        plateNo: ''
106
-      },
107
-      tableData: [{"publicTitle":'预警提示',"publicTime":'2023-12-29 10:00:00',"publicPerson":'李玉'},
108
-        {"publicTitle":'停车时限',"publicTime":'2023-12-31 11:00:00',"publicPerson":'张玮'},
109
-        {"publicTitle":'设备故障',"publicTime":'2023-12-30 10:00:00',"publicPerson":'李玉'},],
110
-      tableData2:[{"noticeTitle":'预警提示',"createTime":'2023-12-29 10:00:00',"noticeTitle2":'李玉'}],
82
+      tableData2:[],
111 83
       tableData3:[],
112 84
       modelData:[],
113 85
       modelPieColor: ["#4382f6","#9078f8","#DAA520","#2E8B57"],
114
-      total: 3,
115
-      pageSize: 10,
116
-      pageNum: 1,
117
-      dialogVisible: false,
118
-      formLabelAlign: {},
119
-      title: ''
86
+      total2: 0,
87
+      pageSize2: 10,
88
+      pageNum2: 1,
89
+      total3: 0,
90
+      pageSize3: 10,
91
+      pageNum3: 1
120 92
     }
121 93
   },
122 94
   mounted() {
123
-    this.getTableData()
95
+    this.getPieData()
96
+    this.getTableData2()
97
+    this.getTableData3()
124 98
   },
125 99
   watch: {
126 100
   },
127 101
   methods: {
128
-    lineTooltipFormat(params) {
129
-      const data = params[0].data;
130
-      return `<div class="line-tooltip">
131
-        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
132
-        params[0].data.lastAmount || "--"
133
-      }</div>
134
-      </div>`;
135
-    },
136
-    indexMethod(index) {
137
-      return this.pageSize * (this.pageNum - 1) + index + 1
138
-    },
139
-    handlePageChange() {
140
-      this.getTableData()
102
+    getPieData() {
103
+      api.tcscfx().then(res => {
104
+        this.modelData = res.data || []
105
+      })
141 106
     },
142
-    handleDetail(row) {
143
-      this.title = '查看详情'
144
-      this.formLabelAlign = row
145
-      this.dialogVisible = true
107
+    handlePageChange2() {
108
+      this.getTableData2()
146 109
     },
147
-    handleAdd () {
148
-      this.title = '发布公告'
149
-      this.formLabelAlign.publicTitle = ''
150
-      // this.formLabelAlign.publicTime = ''
151
-      this.formLabelAlign.publicPerson = ''
152
-      this.dialogVisible = true
110
+    handlePageChange3() {
111
+      this.getTableData3()
153 112
     },
154
-    handleConfirm(formName) {
155
-      this.$refs[formName].validate((valid) => {
156
-        if (valid) {
157
-          if (this.title === '发布公告') {
158
-            api.announcementSave(this.formLabelAlign).then(res => {
159
-              if(res.code === 200) {
160
-                this.dialogVisible = false
161
-                this.$message({
162
-                  message: '发布成功!',
163
-                  type: 'success'
164
-                })
165
-                this.getTableData()
166
-              }
167
-            })
168
-          } else {
169
-            this.dialogVisible = false;
170
-          }
171
-        } else {
172
-          return false
173
-        }
113
+    getTableData2() {
114
+      const {pageNum2, pageSize2} = this
115
+      api.tcscfxList1({current: pageNum2, size: pageSize2}).then(res => {
116
+        this.tableData2 = res.data || []
174 117
       })
175 118
     },
176
-    getTableData() {
177
-      const {pageNum, pageSize, searchWords} = this
178
-      api.announcementListByPage({current: pageNum, size: pageSize}).then(res => {
179
-        this.tableData = res.data.records || []
180
-        this.total = res.data.total
119
+    getTableData3() {
120
+      const {pageNum3, pageSize3} = this
121
+      api.tcscfxList2({current: pageNum3, size: pageSize3}).then(res => {
122
+        this.tableData3 = res.data || []
181 123
       })
182
-    },
124
+    }
183 125
   }
184 126
 }
185 127
 </script>

+ 21 - 37
src/pages/index/components/temp_parking-statistics.vue

@@ -17,9 +17,10 @@
17 17
     </div>
18 18
     <br>
19 19
     <br>
20
-
21
-
22 20
     <br>
21
+    <div>
22
+      <h2 style="color: #3498db;margin-bottom: 20px;display: inline-block;width: 90%">过去30天临时停车趋势</h2>
23
+    </div>
23 24
     <div style="height: 400px;width: 100%">
24 25
       <linechart
25 26
         :autoStop="false"
@@ -27,12 +28,12 @@
27 28
         :bottom="30"
28 29
         :left="40"
29 30
         :legendTop="0"
30
-        yAxisName="(过去30日临时停车趋势)"
31
+        yAxisName="()"
31 32
         :dataset="linedata"
32 33
         :tooltipFormat="lineTooltipFormat"
33 34
         :encode="[
34
-              { x: 'month', y: 'cq', seriesName: '长期',bool:'true' },
35
-              { x: 'month', y: 'ls', seriesName: '临时',bool:'true' },
35
+              { x: 'mouth', y: 'lastYearAmount', seriesName: '临期',bool:'true' },
36
+              { x: 'mouth', y: 'thisYearAmount', seriesName: '长期',bool:'true' },
36 37
             ]"
37 38
         id="sxcyfzqk"
38 39
       />
@@ -41,7 +42,7 @@
41 42
   </div>
42 43
 </template>
43 44
 <script>
44
-import api from "@/api/audit.js";
45
+import api from "@/api/audit";
45 46
 import linechart from "@/components/lineChart";
46 47
 import piechart from "@/components/pieChart";
47 48
 
@@ -57,17 +58,12 @@ export default {
57 58
         plateNo: ''
58 59
       },
59 60
       modelData:[],
60
-      modelPieColor: ["#4382f6","#9078f8"],
61
-      total: 3,
62
-      pageSize: 10,
63
-      pageNum: 1,
64
-      dialogVisible: false,
65
-      formLabelAlign: {},
66
-      title: ''
61
+      modelPieColor: ["#4382f6","#9078f8"]
67 62
     }
68 63
   },
69 64
   mounted() {
70
-    this.getTableData()
65
+    this.getPieData()
66
+    this.getLineData()
71 67
   },
72 68
   watch: {
73 69
   },
@@ -76,33 +72,21 @@ export default {
76 72
       const data = params[0].data;
77 73
       return `<div class="line-tooltip">
78 74
         <div style="color: ${params[0].color}">${params[0].seriesName}: ${
79
-        params[0].data.lastAmount || "--"
75
+        params[0].data.lastYearAmount || "--"
76
+      }</div>
77
+        <div style="color: ${params[1].color}">${params[1].seriesName}: ${
78
+        params[0].data.thisYearAmount || "--"
80 79
       }</div>
81 80
       </div>`;
82 81
     },
83
-    indexMethod(index) {
84
-      return this.pageSize * (this.pageNum - 1) + index + 1
85
-    },
86
-    handlePageChange() {
87
-      this.getTableData()
88
-    },
89
-    handleDetail(row) {
90
-      this.title = '查看详情'
91
-      this.formLabelAlign = row
92
-      this.dialogVisible = true
93
-    },
94
-    handleAdd () {
95
-      this.title = '发布公告'
96
-      this.formLabelAlign.publicTitle = ''
97
-      // this.formLabelAlign.publicTime = ''
98
-      this.formLabelAlign.publicPerson = ''
99
-      this.dialogVisible = true
82
+    getPieData() {
83
+      api.lstctj1().then(res => {
84
+        this.modelData = res.data || []
85
+      })
100 86
     },
101
-    getTableData() {
102
-      const {pageNum, pageSize, searchWords} = this
103
-      api.announcementListByPage({current: pageNum, size: pageSize}).then(res => {
104
-        this.tableData = res.data.records || []
105
-        this.total = res.data.total
87
+    getLineData() {
88
+      api.lstctj2().then(res => {
89
+        this.linedata = res.data || []
106 90
       })
107 91
     },
108 92
   }

+ 26 - 37
src/pages/index/components/vehicle_type.vue

@@ -13,9 +13,9 @@
13 13
           :radiusArr="['30%', '70%']"
14 14
           :roseType = "false"
15 15
           :colorArr="modelPieColor"
16
-          :labelFormat="['{name|{b}}', '{sub|{@value}辆 {d}%}', '{hr|}']"
16
+          :labelFormat="['{mouth|{b}}', '{sub|{@lastAmount}辆 {d}%}', '{hr|}']"
17 17
           :dataset="modelData"
18
-          :encode="{ itemName: 'name', value: 'value' }"
18
+          :encode="{ itemName: 'mouth', value: 'lastAmount' }"
19 19
         />
20 20
       </div>
21 21
       <div style="width: 50%;height: 500px;">
@@ -25,10 +25,10 @@
25 25
           id="chart3"
26 26
           :radiusArr="['30%', '70%']"
27 27
           :roseType = "false"
28
-          :colorArr="modelPieColor4"
29
-          :labelFormat="['{name|{b}}', '{sub|{@value}辆 {d}%}', '{hr|}']"
30
-          :dataset="modelData4"
31
-          :encode="{ itemName: 'name', value: 'value' }"
28
+          :colorArr="modelPieColor2"
29
+          :labelFormat="['{mouth|{b}}', '{sub|{@lastAmount}辆 {d}%}', '{hr|}']"
30
+          :dataset="modelData2"
31
+          :encode="{ itemName: 'mouth', value: 'lastAmount' }"
32 32
         />
33 33
       </div>
34 34
       <br>
@@ -69,7 +69,7 @@
69 69
 <script>
70 70
 import piechart from "@/components/pieChart";
71 71
 import linechart from "@/components/lineChart";
72
-import api from "@/api/article_liao";
72
+import api from "@/api/audit";
73 73
 export default {
74 74
   components: {
75 75
     piechart,
@@ -80,27 +80,16 @@ export default {
80 80
       linedata: [],
81 81
       modelPieColor: ["#4382f6","#9078f8","#DAA520","#2E8B57"],
82 82
       modelData: [],
83
-      modelPieColor4: ["#4382f6","#9078f8"],
84
-      modelData4: [],
85
-      modelPieColor5: ["#4382f6","#9078f8"],
86
-      modelData5: [],
87
-      progresslist: [{
88
-        label: '比亚迪',
89
-        value: 30
90
-      },{
91
-        label: '特斯拉',
92
-        value: 50
93
-      },{
94
-        label: '特斯拉',
95
-        value: 70
96
-      }]
83
+      modelPieColor2: ["#4382f6","#9078f8"],
84
+      modelData2: [],
85
+      progresslist: []
97 86
     }
98 87
   },
99 88
   mounted() {
100
-    this.parkBehaviorDuration()
101
-    this.parkBehaviorRange()
102
-    this.parkBehaviorTemporary()
103
-    this.parkBehaviorNight()
89
+    this.getPieData1()
90
+    this.getPieData2()
91
+    this.getLineData()
92
+    this.getProgresslist()
104 93
   },
105 94
   watch: {
106 95
   },
@@ -112,26 +101,26 @@ export default {
112 101
       }</div>
113 102
       </div>`;
114 103
     },
115
-    parkBehaviorDuration() {
116
-      api.parkBehaviorDuration().then(res =>{
104
+    getPieData1() {
105
+      api.cllx1().then(res =>{
117 106
         this.modelData = res.data
118 107
       })
119 108
     },
120
-    parkBehaviorRange(){
121
-      api.parkBehaviorRange().then(res =>{
122
-        this.linedata = res.data
109
+    getPieData2(){
110
+      api.cllx2().then(res =>{
111
+        this.modelData2 = res.data || []
123 112
       })
124 113
     },
125
-    parkBehaviorTemporary(){
126
-      api.parkBehaviorTemporary().then(res =>{
127
-        this.modelData4 = res.data
114
+    getLineData() {
115
+      api.cllx3().then(res => {
116
+        this.linedata = res.data || []
128 117
       })
129 118
     },
130
-    parkBehaviorNight(){
131
-      api.parkBehaviorNight().then(res =>{
132
-        this.modelData5 = res.data
119
+    getProgressList() {
120
+      api.cllx4().then(res => {
121
+        this.progresslist = res.data || []
133 122
       })
134
-    },
123
+    }
135 124
   }
136 125
 }
137 126
 </script>

+ 3 - 3
src/util/dictionary.js

@@ -25,8 +25,8 @@ export default {
25 25
     '411104': '召陵区',
26 26
     '411121': '舞阳县',
27 27
     '411122': '临颍县',
28
-    '462003': '经济技术开发区',
29
-    '462033': '西城区',
30
-    '462300': '城乡一体化示范区'
28
+    '411171"': '经济技术开发区',
29
+    '411123': '西城区',
30
+    '411124': '城乡一体化示范区'
31 31
   }
32 32
 }