Selaa lähdekoodia

Merge branch 'master' of https://e.coding.net/g-mklx3272/luohe/luohe_fronted

烬玊 1 vuosi sitten
vanhempi
commit
484b9c8cd3

+ 0 - 1
src/pages/index/components/access_data_analysis.vue

@@ -74,7 +74,6 @@ export default {
74 74
       districtOptions: options.districtOptions,
75 75
       value: '',
76 76
       modelPieColor: ["#4382f6", "#9078f8", "#79a7db", "#FF9800", "#9C27B0"],
77
-      modelPieColor1: ["#4382f6", "#9078f8", "#6aa1e1", "#FF9800", "#9C27B0"],
78 77
       modelData: {
79 78
         list: []
80 79
       },

+ 154 - 0
src/pages/index/components/berth_use.vue

@@ -0,0 +1,154 @@
1
+<template>
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;">
18
+      <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
19
+      </el-table-column>
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>
26
+  </div>
27
+</template>
28
+<script>
29
+import api from "@/api/audit.js";
30
+
31
+export default {
32
+  components: {},
33
+  data() {
34
+    return {
35
+      columns: [
36
+        {
37
+          label: '停车场名称',
38
+          key: 'parkingName'
39
+        },
40
+        {
41
+          label: '星期一',
42
+          key: ''
43
+        },
44
+        {
45
+          label: '星期二',
46
+          key: ''
47
+        },
48
+        {
49
+          label: '星期三',
50
+          key: ''
51
+        },
52
+        {
53
+          label: '星期四',
54
+          key: ''
55
+        },
56
+        {
57
+          label: '星期五',
58
+          key: ''
59
+        },
60
+        {
61
+          label: '星期六',
62
+          key: ''
63
+        },
64
+        {
65
+          label: '星期天',
66
+          key: ''
67
+        },
68
+      ],
69
+      tableData: [],
70
+      total: 0,
71
+      pageSize: 10,
72
+      pageNum: 1,
73
+      dialogVisible: false,
74
+      formInline: {
75
+        parkingName: '',
76
+      },
77
+    }
78
+  },
79
+  mounted() {
80
+    // this.getTableData()
81
+  },
82
+  watch: {
83
+  },
84
+  methods: {
85
+    getTableData() {
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
90
+      })
91
+    },
92
+    onSubmit () {
93
+      this.getTableData()
94
+    },
95
+    handlePageChange() {
96
+      this.getTableData()
97
+    },
98
+  }
99
+}
100
+</script>
101
+<style  lang="scss" scoped>
102
+
103
+.form-wrapper {
104
+  margin-bottom: 20px;
105
+}
106
+/deep/ .el-input__inner {
107
+  background: #2d3744;
108
+  border: none;
109
+  border-radius: 0;
110
+}
111
+/deep/ .el-input__prefix{
112
+  top: 8px;
113
+}
114
+/deep/ .el-select {
115
+  height: 40px;
116
+  .el-input__inner {
117
+    height: 40px;
118
+  }
119
+  .el-input__prefix, .el-input__suffix {
120
+    height: 40px;
121
+  }
122
+
123
+  /* 下面设置右侧按钮居中 */
124
+  .el-input__suffix {
125
+    top: 0px;
126
+    display: flex;
127
+    justify-content: center;
128
+    align-items: center;
129
+    flex-wrap: nowrap;
130
+    flex-direction: row;
131
+    align-content: flex-start;
132
+  }
133
+  /* 输入框加上上下边是 32px + 2px =34px */
134
+  .el-input__icon {
135
+    line-height: 0px;
136
+  }
137
+}
138
+/deep/ .form-wrapper .el-button {
139
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
140
+  width: 100px;
141
+  height: 40px;
142
+}
143
+.body-wrapper {
144
+  padding: 20px;
145
+  background: #0c0c0c;
146
+  .button-block{
147
+    text-align: right;
148
+    margin-bottom: 20px;
149
+  }
150
+  .table-pagination{
151
+    text-align: right;
152
+  }
153
+}
154
+</style>

+ 129 - 0
src/pages/index/components/parking_live.vue

@@ -0,0 +1,129 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <el-tabs  v-model="activeName">
4
+      <el-tab-pane label="泊位占用率" name="泊位占用率">
5
+        <div style="height: 350px">
6
+          <linechart
7
+            v-if="activeName === '泊位占用率'"
8
+            :autoStop="false"
9
+            :top="30"
10
+            :bottom="30"
11
+            :left="40"
12
+            :legendTop="0"
13
+            yAxisName="(%)"
14
+            :dataset="linedata"
15
+            :tooltipFormat="lineTooltipFormat"
16
+            :encode="[
17
+              { x: 'month', y: 'lastYearAmount', seriesName: '泊位利用率',bool:'true' },
18
+            ]"
19
+            id="sxcyfzqk"
20
+          />
21
+        </div>
22
+      </el-tab-pane>
23
+      <el-tab-pane label="在场会员车占比/进出场趋势" name="在场会员车占比/进出场趋势">
24
+        <div style="display: flex; justify-content: space-between;">
25
+          <div style="width: 50%; height: 400px">
26
+            <piechart
27
+              v-if="activeName === '在场会员车占比/进出场趋势'"
28
+              class="model-pie-body"
29
+              id="chart1"
30
+              :radiusArr="['30%', '70%']"
31
+              :colorArr="modelPieColor"
32
+              :labelFormat="['{name|{b}}', '{sub|{@value}万元 {d}%}', '{hr|}']"
33
+              :dataset="modelData.list"
34
+              :encode="{ itemName: 'name', value: 'value' }"
35
+            />
36
+          </div>
37
+          <div style="width: 50%; height: 400px">
38
+            <linechart
39
+              v-if="activeName === '在场会员车占比/进出场趋势'"
40
+              :autoStop="false"
41
+              :top="30"
42
+              :bottom="30"
43
+              :left="40"
44
+              :legendTop="0"
45
+              yAxisName="(辆)"
46
+              :dataset="linedata1"
47
+              :tooltipFormat="lineTooltipFormat1"
48
+              :encode="[
49
+              { x: 'month', y: 'lastYearAmount', seriesName: '入场',bool:'true' },
50
+              { x: 'month', y: 'thisYearAmount', seriesName: '出场',bool:'true' },
51
+            ]"
52
+              id="sxcyfzqk"
53
+            />
54
+          </div>
55
+        </div>
56
+      </el-tab-pane>
57
+    </el-tabs>
58
+  </div>
59
+</template>
60
+<script>
61
+import linechart from "@/components/lineChart";
62
+import piechart from "@/components/pieChart";
63
+
64
+export default {
65
+  components: {
66
+    linechart,
67
+    piechart,
68
+  },
69
+  data() {
70
+    return {
71
+      activeName: '泊位占用率',
72
+      linedata: [{month: '建业智慧港停车场', lastYearAmount: 52}
73
+        , {month: '长申玉购物广场(螺湾店)', lastYearAmount: 20}
74
+        , {month: '昌建东外滩西南停车场', lastYearAmount: 60}
75
+        , {month: '漯河长申玉停车场', lastYearAmount: 12}
76
+        , {month: '万宝手机城新西店', lastYearAmount: 40}],
77
+
78
+      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}],
90
+    }
91
+  },
92
+  mounted() {
93
+  },
94
+  watch: {
95
+  },
96
+  methods: {
97
+
98
+    lineTooltipFormat(params) {
99
+      const data = params[0].data;
100
+      return `<div class="line-tooltip">
101
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
102
+        params[0].data.lastYearAmount || "--"
103
+      }(%)</div>
104
+      </div>`;
105
+    },
106
+    lineTooltipFormat1(params) {
107
+      const data = params[0].data;
108
+      return `<div class="line-tooltip">
109
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
110
+        params[0].data.lastYearAmount || "--"
111
+      }(辆)</div>
112
+        <div style="color: ${params[1].color}">${params[1].seriesName}: ${
113
+        params[0].data.thisYearAmount || "--"
114
+      }(辆)</div>
115
+      </div>`;
116
+    },
117
+  }
118
+}
119
+</script>
120
+<style  lang="scss" scoped>
121
+.body-wrapper {
122
+  padding: 20px;
123
+
124
+  .model-pie-body {
125
+    width: 100%;
126
+    height: 100%;
127
+  }
128
+}
129
+</style>

+ 178 - 0
src/pages/index/components/parking_period_analysis.vue

@@ -0,0 +1,178 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <div style="display: flex; justify-content: space-between;height: 300px">
4
+      <h5 style="color: white">停车高峰时段分析</h5>
5
+      <linechart
6
+        :autoStop="false"
7
+        :top="30"
8
+        :bottom="30"
9
+        :left="40"
10
+        :legendTop="0"
11
+        yAxisName="(辆)"
12
+        :dataset="linedata"
13
+        :tooltipFormat="lineTooltipFormat"
14
+        :encode="[
15
+              { x: 'month', y: 'lastYearAmount', seriesName: '入场',bool:'true' },
16
+              { x: 'month', y: 'thisYearAmount', seriesName: '出场',bool:'true' },
17
+            ]"
18
+        id="sxcyfzqk"
19
+      />
20
+    </div>
21
+    <div style="display: flex; justify-content: space-between;height: 300px">
22
+      <h5 style="color: white">出入场压力分析</h5>
23
+      <barchart
24
+        class="side-chart"
25
+        :autoStop="false"
26
+        :colorArr="['#ffd201', '#00eacb', '#01b4ff', '#5d78ff']"
27
+        legendIcon="react"
28
+        :bottom="30"
29
+        :xlabelFormat="xLabelFormat"
30
+        :top="60"
31
+        yAxisName="(辆)"
32
+        :tooltip="tooltipFormat"
33
+        :dataset="modelData"
34
+        :encode="[
35
+            {x: 'month', y: 'hs', seriesName: '入场'},
36
+            {x: 'month', y: 'cs', seriesName: '出场'}]"
37
+        :labelSize="15"
38
+        id="fxdqhszzt"
39
+      />
40
+    </div>
41
+    <div style="display: flex; justify-content: space-between;height: 300px">
42
+      <h5 style="color: white">停车饱和度分析</h5>
43
+      <barchart
44
+        class="side-chart"
45
+        :autoStop="false"
46
+        :colorArr="['#ffd201', '#00eacb', '#01b4ff', '#5d78ff']"
47
+        legendIcon="react"
48
+        :bottom="30"
49
+        :xlabelFormat="xLabelFormat1"
50
+        :top="60"
51
+        yAxisName="(个)"
52
+        :tooltip="tooltipFormat1"
53
+        :dataset="modelData1"
54
+        :encode="[
55
+            {x: 'month', y: 'hs', seriesName: '占用'},
56
+            {x: 'month', y: 'cs', seriesName: '空闲'}]"
57
+        :labelSize="15"
58
+        id="fxdqhszzt1"
59
+      />
60
+    </div>
61
+  </div>
62
+</template>
63
+<script>
64
+import linechart from "@/components/lineChart";
65
+import barchart from "@/components/barChart";
66
+
67
+export default {
68
+  components: {
69
+    linechart,
70
+    barchart
71
+  },
72
+  data() {
73
+    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}],
112
+    }
113
+  },
114
+  mounted() {
115
+  },
116
+  watch: {},
117
+  methods: {
118
+    lineTooltipFormat(params) {
119
+      const data = params[0].data;
120
+      return `<div class="line-tooltip">
121
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
122
+        params[0].data.lastYearAmount || "--"
123
+      }(辆)</div>
124
+        <div style="color: ${params[1].color}">${params[1].seriesName}: ${
125
+        params[0].data.thisYearAmount || "--"
126
+      }(辆)</div>
127
+      </div>`;
128
+    },
129
+    tooltipFormat(params) {
130
+      const type = params[0].seriesType;
131
+      const data = params[0].data;
132
+      // ${params[0].name || "--"}月:
133
+      return `<div class="line-tooltip">
134
+<div>${params[0].seriesName}: ${
135
+        params[0].data.hs || "--"}辆</div>
136
+<div>${params[1].seriesName}: ${
137
+        params[0].data.cs || "--"}辆</div>
138
+</div>`;
139
+    },
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
+    tooltipFormat1(params) {
148
+      const type = params[0].seriesType;
149
+      const data = params[0].data;
150
+      // ${params[0].name || "--"}月:
151
+      return `<div class="line-tooltip">
152
+<div>${params[0].seriesName}: ${
153
+        params[0].data.hs || "--"}个</div>
154
+<div>${params[1].seriesName}: ${
155
+        params[0].data.cs || "--"}个</div>
156
+</div>`;
157
+    },
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');
164
+    },
165
+  }
166
+}
167
+</script>
168
+
169
+<style lang="scss" scoped>
170
+.body-wrapper {
171
+  padding: 20px;
172
+  width: 100%;
173
+  height: 100%;
174
+  box-sizing: border-box;
175
+  background: #0c0c0c;
176
+
177
+}
178
+</style>

+ 1 - 18
src/pages/index/components/record_query.vue

@@ -264,24 +264,7 @@ export default {
264 264
   width: 100px;
265 265
   height: 40px;
266 266
 }
267
-.body-wrapper {
268
-  padding: 20px;
269
-  background: #0c0c0c;
270
-  .button-block{
271
-    text-align: right;
272
-    margin-bottom: 20px;
273
-  }
274
-  .table-pagination{
275
-    text-align: right;
276
-  }
277
-  .search-card{
278
-    margin-bottom: 20px;
279
-    text-align: center;
280
-    .input-wrapper{
281
-      width: 36%;
282
-    }
283
-  }
284
-}
267
+
285 268
 .body-wrapper {
286 269
   padding: 20px;
287 270
   .button-block{

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

@@ -91,6 +91,9 @@ export default {
91 91
         // 以下为运营管理平台
92 92
         {name: '停车场热力图', url: '/parking_heatmap'},
93 93
         {name: '停车场分析报表', url: '/parking_analysis_report'},
94
+        {name: '停车时段分析', url: '/parking_period_analysis'},
95
+        {name: '停车实况数据', url: '/parking_live'},
96
+        {name: '泊位利用分析', url: '/berth_use'},
94 97
       ]
95 98
     }
96 99
   },