zbb 1 year ago
parent
commit
07797e489a

+ 168 - 0
src/pages/index/components/parking_analysis_report.vue

@@ -0,0 +1,168 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <el-form class="form-wrapper" :inline="true" :model="formInline">
4
+      <el-row>
5
+        <el-col :span="5">
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="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">
20
+          <el-form-item label="车牌号:">
21
+            <el-input v-model="formInline.plateNo" placeholder="请输入"></el-input>
22
+          </el-form-item>
23
+        </el-col>
24
+        <el-col :span="5">
25
+          <el-form-item label="入场时间:">
26
+            <el-date-picker
27
+              v-model="formInline.inTime"
28
+              type="date"
29
+              placeholder="选择日期">
30
+            </el-date-picker>
31
+          </el-form-item>
32
+        </el-col>
33
+        <el-col :span="4">
34
+          <el-form-item>
35
+            <el-button type="primary" class="query-btn" @click="onSubmit">查询</el-button>
36
+          </el-form-item>
37
+        </el-col>
38
+      </el-row>
39
+    </el-form>
40
+    <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
41
+      <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
42
+      </el-table-column>
43
+    </el-table>
44
+    <div class="table-pagination">
45
+      <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
46
+                     :current-page.sync="pageNum" :page-size.sync="pageSize">
47
+      </el-pagination>
48
+    </div>
49
+  </div>
50
+</template>
51
+<script>
52
+import api from "@/api/audit.js";
53
+
54
+export default {
55
+  components: {},
56
+  data() {
57
+    return {
58
+      columns: [
59
+        {
60
+          label: '会员姓名',
61
+          key: ''
62
+        },
63
+        {
64
+          label: '车牌号',
65
+          key: ''
66
+        },
67
+        {
68
+          label: '停车场',
69
+          key: ''
70
+        },
71
+        {
72
+          label: '入场日期',
73
+          key: ''
74
+        },
75
+        {
76
+          label: '状态',
77
+          key: ''
78
+        },
79
+      ],
80
+      tableData: [],
81
+      total: 0,
82
+      pageSize: 10,
83
+      pageNum: 1,
84
+      dialogVisible: false,
85
+      formInline: {
86
+        parkingName: '',
87
+        parkingType: '',
88
+        plateNo: '',
89
+        inTime: '',
90
+      },
91
+    }
92
+  },
93
+  mounted() {
94
+    // this.getTableData()
95
+  },
96
+  watch: {
97
+  },
98
+  methods: {
99
+    getTableData() {
100
+      const {pageNum, pageSize} = this
101
+      api.ipListByPage({current: pageNum, size: pageSize, ipAddr: this.formInline.ipAddr}).then(res => {
102
+        this.tableData = res.data.records || []
103
+        this.total = res.data.total
104
+      })
105
+    },
106
+    onSubmit () {
107
+      this.getTableData()
108
+    },
109
+    handlePageChange() {
110
+      this.getTableData()
111
+    },
112
+  }
113
+}
114
+</script>
115
+<style  lang="scss" scoped>
116
+
117
+.form-wrapper {
118
+  margin-bottom: 20px;
119
+}
120
+/deep/ .el-input__inner {
121
+  background: #2d3744;
122
+  border: none;
123
+  border-radius: 0;
124
+}
125
+/deep/ .el-input__prefix{
126
+  top: 8px;
127
+}
128
+/deep/ .el-select {
129
+  height: 40px;
130
+  .el-input__inner {
131
+    height: 40px;
132
+  }
133
+  .el-input__prefix, .el-input__suffix {
134
+    height: 40px;
135
+  }
136
+
137
+  /* 下面设置右侧按钮居中 */
138
+  .el-input__suffix {
139
+    top: 0px;
140
+    display: flex;
141
+    justify-content: center;
142
+    align-items: center;
143
+    flex-wrap: nowrap;
144
+    flex-direction: row;
145
+    align-content: flex-start;
146
+  }
147
+  /* 输入框加上上下边是 32px + 2px =34px */
148
+  .el-input__icon {
149
+    line-height: 0px;
150
+  }
151
+}
152
+/deep/ .form-wrapper .el-button {
153
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
154
+  width: 100px;
155
+  height: 40px;
156
+}
157
+.body-wrapper {
158
+  padding: 20px;
159
+  background: #0c0c0c;
160
+  .button-block{
161
+    text-align: right;
162
+    margin-bottom: 20px;
163
+  }
164
+  .table-pagination{
165
+    text-align: right;
166
+  }
167
+}
168
+</style>

+ 1 - 0
src/pages/index/layouts/indexLayout.vue

@@ -90,6 +90,7 @@ export default {
90 90
         {name: '资源接入', url: '/resource_access'},
91 91
         // 以下为运营管理平台
92 92
         {name: '停车场热力图', url: '/parking_heatmap'},
93
+        {name: '停车场分析报表', url: '/parking_analysis_report'},
93 94
       ]
94 95
     }
95 96
   },

+ 5 - 0
src/router/index.js

@@ -288,6 +288,11 @@ export default new Router({
288 288
           path: "/parking_heatmap",
289 289
           component: () => import("../pages/index/components/parking_heatmap.vue")
290 290
         },
291
+        {
292
+          name: "parking_analysis_report",
293
+          path: "/parking_analysis_report",
294
+          component: () => import("../pages/index/components/parking_analysis_report.vue")
295
+        },
291 296
       ]
292 297
     }
293 298
   ]