Browse Source

上传

上传
烬玊 1 year ago
parent
commit
a99a281a7e

+ 291 - 0
src/pages/index/components/berth_turnover.vue

@@ -0,0 +1,291 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <el-tabs  v-model="activeName">
4
+      <el-tab-pane label="车流量趋势" name="车流量趋势">
5
+        <div style="height: 300px;width: 100%">
6
+        <barchart
7
+          class="side-chart"
8
+          :autoStop="false"
9
+          :colorArr="['#ffd201', '#00eacb']"
10
+          legendIcon="react"
11
+          v-if="activeName === '车流量趋势'"
12
+          :bottom="30"
13
+          :xlabelFormat="xLabelFormat"
14
+          :top="60"
15
+          yAxisName="(元)"
16
+          :tooltip="tooltipFormat"
17
+          :dataset="bardata"
18
+          :encode="[
19
+            {x: 'month', y: 'hs', seriesName: '入场车辆'},
20
+            {x: 'month', y: 'cs', seriesName: '出场车辆'}]"
21
+          :labelSize="15"
22
+          id="fxdqhszzt"
23
+        />
24
+        </div>
25
+      </el-tab-pane>
26
+      <el-tab-pane label="泊位周转率变化趋势" name="泊位周转率变化趋势">
27
+        <div style="width: 100%;height: 300px">
28
+        <linechart
29
+          :autoStop="false"
30
+          :top="30"
31
+          :bottom="30"
32
+          :left="40"
33
+          :legendTop="0"
34
+          yAxisName="辆"
35
+          v-if="activeName === '泊位周转率变化趋势'"
36
+          :dataset="linedata"
37
+          :tooltipFormat="lineTooltipFormat"
38
+          :encode="[
39
+              { x: 'month', y: 'rc', seriesName: '入场',bool:'true' },
40
+              { x: 'month', y: 'cc', seriesName: '出场',bool:'true' },
41
+            ]"
42
+          id="sxcyfzqk"
43
+        />
44
+        </div>
45
+      </el-tab-pane>
46
+    </el-tabs>
47
+  </div>
48
+</template>
49
+<script>
50
+import piechart from "@/components/pieChart";
51
+import linechart from "@/components/lineChart";
52
+import barchart from "@/components/barChart";
53
+
54
+export default {
55
+    components: {
56
+      piechart,
57
+      linechart,
58
+      barchart
59
+    },
60
+    data() {
61
+      return {
62
+        linedata: [{"month":"周一","rc":50,"cc":30}],
63
+        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
+        }
126
+      }
127
+    },
128
+    mounted() {
129
+      this.getTableData1()
130
+      this.getTableData2()
131
+      this.getTableData3()
132
+    },
133
+    watch: {
134
+    },
135
+    methods: {
136
+      lineTooltipFormat(params) {
137
+        return `<div class="line-tooltip">
138
+        <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 || "--"
143
+        }</div>
144
+      </div>`;
145
+      },
146
+      tooltipFormat(params) {
147
+        const type = params[0].seriesType;
148
+        const data = params[0].data;
149
+        return `<div class="line-tooltip">
150
+<div>${params[0].seriesName}: ${
151
+          params[0].data.hs || "--"}元</div>
152
+<div>${params[1].seriesName}: ${
153
+          params[0].data.cs || "--"}元</div>
154
+</div>`;
155
+      },
156
+      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');
162
+      },
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
184
+        })
185
+      },
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
194
+        })
195
+      },
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
+    }
207
+}
208
+</script>
209
+<style  lang="scss" scoped>
210
+
211
+.form-wrapper {
212
+  margin-bottom: 20px;
213
+}
214
+/deep/ .el-input__inner {
215
+  background: #2d3744;
216
+  border: none;
217
+  border-radius: 0;
218
+}
219
+/deep/ .el-select {
220
+  height: 40px;
221
+  .el-input__inner {
222
+    height: 40px;
223
+  }
224
+  .el-input__prefix, .el-input__suffix {
225
+    height: 40px;
226
+  }
227
+
228
+  /* 下面设置右侧按钮居中 */
229
+  .el-input__suffix {
230
+    top: 0px;
231
+    display: flex;
232
+    justify-content: center;
233
+    align-items: center;
234
+    flex-wrap: nowrap;
235
+    flex-direction: row;
236
+    align-content: flex-start;
237
+  }
238
+  /* 输入框加上上下边是 32px + 2px =34px */
239
+  .el-input__icon {
240
+    line-height: 0px;
241
+  }
242
+}
243
+/deep/ .form-wrapper .el-button {
244
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
245
+  width: 100px;
246
+  height: 40px;
247
+}
248
+.body-wrapper {
249
+  padding: 20px;
250
+  background: #0c0c0c;
251
+  .button-block{
252
+    text-align: right;
253
+    margin-bottom: 20px;
254
+  }
255
+  .table-pagination{
256
+    text-align: right;
257
+  }
258
+  .search-card{
259
+    margin-bottom: 20px;
260
+    text-align: center;
261
+    .input-wrapper{
262
+      width: 36%;
263
+    }
264
+  }
265
+}
266
+.body-wrapper {
267
+  padding: 20px;
268
+  .button-block{
269
+    text-align: right;
270
+    margin-bottom: 20px;
271
+  }
272
+  .table-pagination{
273
+    text-align: right;
274
+  }
275
+  .search-card{
276
+    margin-bottom: 20px;
277
+    text-align: center;
278
+    .input-wrapper{
279
+        width: 36%;
280
+    }
281
+  }
282
+}
283
+.audit-dialog{
284
+    .mg-bt{
285
+        margin-bottom: 24px;
286
+    }
287
+    .label{
288
+        text-align: right;
289
+    }
290
+}
291
+</style>

+ 258 - 0
src/pages/index/components/parking_analysis.vue

@@ -0,0 +1,258 @@
1
+@ -0,0 +1,257 @@
2
+<template>
3
+  <div class="body-wrapper">
4
+    <div>
5
+      <h2 style="color: #3498db;margin-bottom: 20px;display: inline-block;width: 90%">停车总分析</h2>
6
+    </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>
11
+    <br>
12
+    <br>
13
+    <div align="center" style="color: #3498db;font-size: 23px;margin-bottom: 20px">停车难易指数变化趋势</div>
14
+    <div style="height: 300px">
15
+      <linechart
16
+        :autoStop="false"
17
+        :top="30"
18
+        :bottom="30"
19
+        :left="40"
20
+        :legendTop="0"
21
+        :dataset="linedata"
22
+        :tooltipFormat="lineTooltipFormat"
23
+        :encode="[
24
+              { x: 'mouth', y: 'in', seriesName: '入场',bool:'true' },
25
+              { x: 'mouth', y: 'out', seriesName: '出场',bool:'true' },
26
+            ]"
27
+        id="sxcyfzqk"
28
+      />
29
+    </div>
30
+    <br>
31
+    <br>
32
+    <div align="center" style="color: #3498db;font-size: 23px;margin-bottom: 20px">停车利用率</div>
33
+    <div style="height: 300px">
34
+      <linechart
35
+        :autoStop="false"
36
+        :top="30"
37
+        :bottom="30"
38
+        :left="40"
39
+        :legendTop="0"
40
+        :dataset="linedata2"
41
+        :tooltipFormat="lineTooltipFormat"
42
+        :encode="[
43
+              { x: 'mouth', y: 'in', seriesName: '占用中',bool:'true' },
44
+              { x: 'mouth', y: 'out', seriesName: '车位总数',bool:'true' },
45
+            ]"
46
+        id="tclyl"
47
+      />
48
+    </div>
49
+    <br>
50
+    <el-table :data="tableData2" style="background: #2a2a2a;border-color: #333;">
51
+      <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
52
+      </el-table-column>
53
+    </el-table>
54
+    <br>
55
+    <br>
56
+    <el-table :data="tableData3" style="background: #2a2a2a;border-color: #333;">
57
+      <el-table-column v-for="(item, index) in columns3" :key="index" :label="item.label" :prop="item.key">
58
+      </el-table-column>
59
+    </el-table>
60
+  </div>
61
+</template>
62
+<script>
63
+import api from "@/api/audit.js";
64
+import linechart from "@/components/lineChart";
65
+
66
+export default {
67
+  components: {
68
+    linechart
69
+  },
70
+  data() {
71
+    return {
72
+      linedata: [],
73
+      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
+      columns2: [
93
+        {
94
+          label: '停车场名称',
95
+          key: 'noticeTitle'
96
+        },
97
+        {
98
+          label: '占用率',
99
+          key: 'createTime'
100
+        },
101
+        {
102
+          label: '百分比',
103
+          key: 'noticeTitle2'
104
+        }
105
+      ],
106
+      columns3: [
107
+        {
108
+          label: '用户姓名',
109
+          key: 'noticeTitle'
110
+        },
111
+        {
112
+          label: '车牌号',
113
+          key: 'createTime'
114
+        },
115
+        {
116
+          label: '行为',
117
+          key: 'noticeTitle2'
118
+        },
119
+        {
120
+          label: '日期',
121
+          key: 'noticeTitle2'
122
+        },
123
+      ],
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":'李玉'}],
131
+      tableData3:[],
132
+      total: 3,
133
+      pageSize: 10,
134
+      pageNum: 1,
135
+      dialogVisible: false,
136
+      formLabelAlign: {},
137
+      title: ''
138
+    }
139
+  },
140
+  mounted() {
141
+    this.getTableData()
142
+  },
143
+  watch: {
144
+  },
145
+  methods: {
146
+    lineTooltipFormat(params) {
147
+      const data = params[0].data;
148
+      return `<div class="line-tooltip">
149
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
150
+        params[0].data.lastAmount || "--"
151
+      }</div>
152
+      </div>`;
153
+    },
154
+    handlePageChange() {
155
+      this.getTableData()
156
+    },
157
+    handleDetail(row) {
158
+      this.title = '查看详情'
159
+      this.formLabelAlign = row
160
+      this.dialogVisible = true
161
+    },
162
+    handleAdd () {
163
+      this.title = '发布公告'
164
+      this.formLabelAlign.publicTitle = ''
165
+      // this.formLabelAlign.publicTime = ''
166
+      this.formLabelAlign.publicPerson = ''
167
+      this.dialogVisible = true
168
+    },
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
+        }
189
+      })
190
+    },
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
196
+      })
197
+    },
198
+  }
199
+}
200
+</script>
201
+<style  lang="scss" scoped>
202
+.form-wrapper {
203
+  margin-bottom: 20px;
204
+}
205
+/deep/ .el-input__inner {
206
+  background: #2d3744;
207
+  border: none;
208
+  border-radius: 0;
209
+}
210
+/deep/ .el-select {
211
+  height: 40px;
212
+  .el-input__inner {
213
+    height: 40px;
214
+  }
215
+  .el-input__prefix, .el-input__suffix {
216
+    height: 40px;
217
+  }
218
+
219
+  /* 下面设置右侧按钮居中 */
220
+  .el-input__suffix {
221
+    top: 0px;
222
+    display: flex;
223
+    justify-content: center;
224
+    align-items: center;
225
+    flex-wrap: nowrap;
226
+    flex-direction: row;
227
+    align-content: flex-start;
228
+  }
229
+  /* 输入框加上上下边是 32px + 2px =34px */
230
+  .el-input__icon {
231
+    line-height: 0px;
232
+  }
233
+}
234
+.body-wrapper {
235
+  padding: 20px;
236
+  background: #0c0c0c;
237
+  .table-pagination{
238
+    text-align: right;
239
+  }
240
+}
241
+.audit-dialog{
242
+  .mg-bt{
243
+    margin-bottom: 24px;
244
+  }
245
+  .label{
246
+    text-align: right;
247
+  }
248
+  .form-div{
249
+    /deep/ .el-input__inner{
250
+      height: 35px;
251
+      width: 90%;
252
+      border: 1px solid #a6a5a5;
253
+      color: #fff;
254
+      background: #2d3744;
255
+    }
256
+  }
257
+}
258
+</style>

+ 126 - 0
src/pages/index/components/parking_lot.vue

@@ -0,0 +1,126 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+
4
+    <div style="width: 100%;">
5
+      <div style="width: 100%;height: 400px;">
6
+        <h4 style="color: white">停车场泊位分析</h4>
7
+        <br>
8
+        <linechart
9
+          :autoStop="false"
10
+          :top="30"
11
+          :bottom="30"
12
+          :left="40"
13
+          :legendTop="0"
14
+          yAxisName="(%)"
15
+          :dataset="linedata"
16
+          :tooltipFormat="lineTooltipFormat"
17
+          :encode="[
18
+              { x: 'mouth', y: 'lastYearAmount', seriesName: '利用率',bool:'true' },
19
+            ]"
20
+          id="axstj"
21
+        />
22
+      </div>
23
+
24
+    </div>
25
+
26
+  </div>
27
+</template>
28
+<script>
29
+import api from "@/api/article_liao";
30
+import linechart from "@/components/lineChart";
31
+import options from '@/util/options'
32
+
33
+export default {
34
+  components: {
35
+    linechart
36
+  },
37
+  data() {
38
+    return {
39
+      districtOptions: options.districtOptions,
40
+      keyAreaOptions: options.keyAreaOptions,
41
+      linedata: [],
42
+      total: 0,
43
+      pageSize: 10,
44
+      pageNum: 1,
45
+      radio: '2',
46
+      dialogVisible: false,
47
+      selRow: {},
48
+      formInline: {
49
+        regionCode: '',
50
+        keyAreas: '',
51
+        streetName: ''
52
+      }
53
+    }
54
+  },
55
+  mounted() {
56
+
57
+  },
58
+  watch: {
59
+  },
60
+  methods: {
61
+
62
+  }
63
+}
64
+</script>
65
+<style  lang="scss" scoped>
66
+.form-wrapper {
67
+  margin-bottom: 20px;
68
+}
69
+/deep/ .el-input__inner {
70
+  background: #2d3744;
71
+  border: none;
72
+  border-radius: 0;
73
+}
74
+/deep/ .el-select {
75
+  height: 40px;
76
+  .el-input__inner {
77
+    height: 40px;
78
+  }
79
+  .el-input__prefix, .el-input__suffix {
80
+    height: 40px;
81
+  }
82
+
83
+  /* 下面设置右侧按钮居中 */
84
+  .el-input__suffix {
85
+    top: 0px;
86
+    display: flex;
87
+    justify-content: center;
88
+    align-items: center;
89
+    flex-wrap: nowrap;
90
+    flex-direction: row;
91
+    align-content: flex-start;
92
+  }
93
+  /* 输入框加上上下边是 32px + 2px =34px */
94
+  .el-input__icon {
95
+    line-height: 0px;
96
+  }
97
+}
98
+/deep/ .form-wrapper .el-button {
99
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
100
+  width: 100px;
101
+  height: 40px;
102
+}
103
+.body-wrapper {
104
+  padding: 20px;
105
+  background: #0c0c0c;
106
+  .button-block{
107
+    text-align: right;
108
+    margin-bottom: 20px;
109
+  }
110
+  .table-pagination{
111
+    text-align: right;
112
+  }
113
+}
114
+.audit-dialog{
115
+  .mg-bt{
116
+    margin-bottom: 24px;
117
+  }
118
+  .label{
119
+    text-align: right;
120
+  }
121
+}
122
+/deep/ .el-textarea.is-disabled .el-textarea__inner {
123
+  background: #2a2a2a;
124
+  color: #fff;
125
+}
126
+</style>

+ 243 - 0
src/pages/index/components/parking_time_analysis.vue

@@ -0,0 +1,243 @@
1
+@ -0,0 +1,257 @@
2
+<template>
3
+  <div class="body-wrapper">
4
+    <div>
5
+      <h2 style="color: #3498db;margin-bottom: 20px;display: inline-block;width: 90%">停车时长分析</h2>
6
+    </div>
7
+    <div style="height: 300px;width:100%">
8
+      <piechart
9
+        class="model-pie-body"
10
+        id="chart1"
11
+        :radiusArr="['30%', '70%']"
12
+        :roseType = "false"
13
+        :colorArr="modelPieColor"
14
+        :labelFormat="['{name|{b}}', '{sub|{@value}辆 {d}%}', '{hr|}']"
15
+        :dataset="modelData"
16
+        :encode="{ itemName: 'name', value: 'value' }"
17
+      />
18
+    </div>
19
+    <br>
20
+    <br>
21
+
22
+
23
+    <br>
24
+    <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
25
+      <el-table-column
26
+        label="日均周转次数排行"
27
+        type="index"
28
+        width="300"
29
+        :index="indexMethod">
30
+      </el-table-column>
31
+      <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
32
+      </el-table-column>
33
+    </el-table>
34
+    <br>
35
+    <br>
36
+    <el-table :data="tableData2" style="background: #2a2a2a;border-color: #333;">
37
+      <el-table-column
38
+        label="平均停车时长排行"
39
+        width="300"
40
+        type="index"
41
+        :index="indexMethod">
42
+      </el-table-column>
43
+      <el-table-column v-for="(item, index) in columns3" :key="index" :label="item.label" :prop="item.key">
44
+      </el-table-column>
45
+    </el-table>
46
+  </div>
47
+</template>
48
+<script>
49
+import api from "@/api/audit.js";
50
+import linechart from "@/components/lineChart";
51
+import piechart from "@/components/pieChart";
52
+
53
+export default {
54
+  components: {
55
+    linechart,
56
+    piechart
57
+  },
58
+  data() {
59
+    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
+      columns2: [
77
+        {
78
+          label: '车牌号',
79
+          key: 'noticeTitle'
80
+        },
81
+        {
82
+          label: '停车时长(小时)',
83
+          key: 'createTime'
84
+        }
85
+      ],
86
+      columns3: [
87
+        {
88
+          label: '用户姓名',
89
+          key: 'noticeTitle'
90
+        },
91
+        {
92
+          label: '车牌号',
93
+          key: 'createTime'
94
+        },
95
+        {
96
+          label: '行为',
97
+          key: 'noticeTitle2'
98
+        },
99
+        {
100
+          label: '日期',
101
+          key: 'noticeTitle2'
102
+        },
103
+      ],
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":'李玉'}],
111
+      tableData3:[],
112
+      modelData:[],
113
+      modelPieColor: ["#4382f6","#9078f8","#DAA520","#2E8B57"],
114
+      total: 3,
115
+      pageSize: 10,
116
+      pageNum: 1,
117
+      dialogVisible: false,
118
+      formLabelAlign: {},
119
+      title: ''
120
+    }
121
+  },
122
+  mounted() {
123
+    this.getTableData()
124
+  },
125
+  watch: {
126
+  },
127
+  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()
141
+    },
142
+    handleDetail(row) {
143
+      this.title = '查看详情'
144
+      this.formLabelAlign = row
145
+      this.dialogVisible = true
146
+    },
147
+    handleAdd () {
148
+      this.title = '发布公告'
149
+      this.formLabelAlign.publicTitle = ''
150
+      // this.formLabelAlign.publicTime = ''
151
+      this.formLabelAlign.publicPerson = ''
152
+      this.dialogVisible = true
153
+    },
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
+        }
174
+      })
175
+    },
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
181
+      })
182
+    },
183
+  }
184
+}
185
+</script>
186
+<style  lang="scss" scoped>
187
+.form-wrapper {
188
+  margin-bottom: 20px;
189
+}
190
+/deep/ .el-input__inner {
191
+  background: #2d3744;
192
+  border: none;
193
+  border-radius: 0;
194
+}
195
+/deep/ .el-select {
196
+  height: 40px;
197
+  .el-input__inner {
198
+    height: 40px;
199
+  }
200
+  .el-input__prefix, .el-input__suffix {
201
+    height: 40px;
202
+  }
203
+
204
+  /* 下面设置右侧按钮居中 */
205
+  .el-input__suffix {
206
+    top: 0px;
207
+    display: flex;
208
+    justify-content: center;
209
+    align-items: center;
210
+    flex-wrap: nowrap;
211
+    flex-direction: row;
212
+    align-content: flex-start;
213
+  }
214
+  /* 输入框加上上下边是 32px + 2px =34px */
215
+  .el-input__icon {
216
+    line-height: 0px;
217
+  }
218
+}
219
+.body-wrapper {
220
+  padding: 20px;
221
+  background: #0c0c0c;
222
+  .table-pagination{
223
+    text-align: right;
224
+  }
225
+}
226
+.audit-dialog{
227
+  .mg-bt{
228
+    margin-bottom: 24px;
229
+  }
230
+  .label{
231
+    text-align: right;
232
+  }
233
+  .form-div{
234
+    /deep/ .el-input__inner{
235
+      height: 35px;
236
+      width: 90%;
237
+      border: 1px solid #a6a5a5;
238
+      color: #fff;
239
+      background: #2d3744;
240
+    }
241
+  }
242
+}
243
+</style>

+ 196 - 0
src/pages/index/components/temp_parking-statistics.vue

@@ -0,0 +1,196 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <div>
4
+      <h2 style="color: #3498db;margin-bottom: 20px;display: inline-block;width: 90%">临时停车统计</h2>
5
+    </div>
6
+    <div style="height: 300px;width:100%">
7
+      <piechart
8
+        class="model-pie-body"
9
+        id="chart1"
10
+        :radiusArr="['30%', '70%']"
11
+        :roseType = "false"
12
+        :colorArr="modelPieColor"
13
+        :labelFormat="['{name|{b}}', '{sub|{@value}辆 {d}%}', '{hr|}']"
14
+        :dataset="modelData"
15
+        :encode="{ itemName: 'name', value: 'value' }"
16
+      />
17
+    </div>
18
+    <br>
19
+    <br>
20
+
21
+
22
+    <br>
23
+    <div style="height: 400px;width: 100%">
24
+      <linechart
25
+        :autoStop="false"
26
+        :top="30"
27
+        :bottom="30"
28
+        :left="40"
29
+        :legendTop="0"
30
+        yAxisName="(过去30日临时停车趋势)"
31
+        :dataset="linedata"
32
+        :tooltipFormat="lineTooltipFormat"
33
+        :encode="[
34
+              { x: 'month', y: 'cq', seriesName: '长期',bool:'true' },
35
+              { x: 'month', y: 'ls', seriesName: '临时',bool:'true' },
36
+            ]"
37
+        id="sxcyfzqk"
38
+      />
39
+    </div>
40
+
41
+  </div>
42
+</template>
43
+<script>
44
+import api from "@/api/audit.js";
45
+import linechart from "@/components/lineChart";
46
+import piechart from "@/components/pieChart";
47
+
48
+export default {
49
+  components: {
50
+    linechart,
51
+    piechart
52
+  },
53
+  data() {
54
+    return {
55
+      linedata: [],
56
+      linedata2: [],
57
+      formInline1: {
58
+        plateNo: ''
59
+      },
60
+      tableData: [{"publicTitle":'预警提示',"publicTime":'2023-12-29 10:00:00',"publicPerson":'李玉'},
61
+        {"publicTitle":'停车时限',"publicTime":'2023-12-31 11:00:00',"publicPerson":'张玮'},
62
+        {"publicTitle":'设备故障',"publicTime":'2023-12-30 10:00:00',"publicPerson":'李玉'},],
63
+      tableData2:[{"noticeTitle":'预警提示',"createTime":'2023-12-29 10:00:00',"noticeTitle2":'李玉'}],
64
+      tableData3:[],
65
+      modelData:[],
66
+      modelPieColor: ["#4382f6","#9078f8"],
67
+      total: 3,
68
+      pageSize: 10,
69
+      pageNum: 1,
70
+      dialogVisible: false,
71
+      formLabelAlign: {},
72
+      title: ''
73
+    }
74
+  },
75
+  mounted() {
76
+    this.getTableData()
77
+  },
78
+  watch: {
79
+  },
80
+  methods: {
81
+    lineTooltipFormat(params) {
82
+      const data = params[0].data;
83
+      return `<div class="line-tooltip">
84
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
85
+        params[0].data.lastAmount || "--"
86
+      }</div>
87
+      </div>`;
88
+    },
89
+    indexMethod(index) {
90
+      return this.pageSize * (this.pageNum - 1) + index + 1
91
+    },
92
+    handlePageChange() {
93
+      this.getTableData()
94
+    },
95
+    handleDetail(row) {
96
+      this.title = '查看详情'
97
+      this.formLabelAlign = row
98
+      this.dialogVisible = true
99
+    },
100
+    handleAdd () {
101
+      this.title = '发布公告'
102
+      this.formLabelAlign.publicTitle = ''
103
+      // this.formLabelAlign.publicTime = ''
104
+      this.formLabelAlign.publicPerson = ''
105
+      this.dialogVisible = true
106
+    },
107
+    handleConfirm(formName) {
108
+      this.$refs[formName].validate((valid) => {
109
+        if (valid) {
110
+          if (this.title === '发布公告') {
111
+            api.announcementSave(this.formLabelAlign).then(res => {
112
+              if(res.code === 200) {
113
+                this.dialogVisible = false
114
+                this.$message({
115
+                  message: '发布成功!',
116
+                  type: 'success'
117
+                })
118
+                this.getTableData()
119
+              }
120
+            })
121
+          } else {
122
+            this.dialogVisible = false;
123
+          }
124
+        } else {
125
+          return false
126
+        }
127
+      })
128
+    },
129
+    getTableData() {
130
+      const {pageNum, pageSize, searchWords} = this
131
+      api.announcementListByPage({current: pageNum, size: pageSize}).then(res => {
132
+        this.tableData = res.data.records || []
133
+        this.total = res.data.total
134
+      })
135
+    },
136
+  }
137
+}
138
+</script>
139
+<style  lang="scss" scoped>
140
+.form-wrapper {
141
+  margin-bottom: 20px;
142
+}
143
+/deep/ .el-input__inner {
144
+  background: #2d3744;
145
+  border: none;
146
+  border-radius: 0;
147
+}
148
+/deep/ .el-select {
149
+  height: 40px;
150
+  .el-input__inner {
151
+    height: 40px;
152
+  }
153
+  .el-input__prefix, .el-input__suffix {
154
+    height: 40px;
155
+  }
156
+
157
+  /* 下面设置右侧按钮居中 */
158
+  .el-input__suffix {
159
+    top: 0px;
160
+    display: flex;
161
+    justify-content: center;
162
+    align-items: center;
163
+    flex-wrap: nowrap;
164
+    flex-direction: row;
165
+    align-content: flex-start;
166
+  }
167
+  /* 输入框加上上下边是 32px + 2px =34px */
168
+  .el-input__icon {
169
+    line-height: 0px;
170
+  }
171
+}
172
+.body-wrapper {
173
+  padding: 20px;
174
+  background: #0c0c0c;
175
+  .table-pagination{
176
+    text-align: right;
177
+  }
178
+}
179
+.audit-dialog{
180
+  .mg-bt{
181
+    margin-bottom: 24px;
182
+  }
183
+  .label{
184
+    text-align: right;
185
+  }
186
+  .form-div{
187
+    /deep/ .el-input__inner{
188
+      height: 35px;
189
+      width: 90%;
190
+      border: 1px solid #a6a5a5;
191
+      color: #fff;
192
+      background: #2d3744;
193
+    }
194
+  }
195
+}
196
+</style>

+ 25 - 0
src/router/index.js

@@ -293,6 +293,31 @@ export default new Router({
293 293
           path: "/parking_analysis_report",
294 294
           component: () => import("../pages/index/components/parking_analysis_report.vue")
295 295
         },
296
+        {
297
+          name: "parking_analysis",
298
+          path: "/parking_analysis",
299
+          component: () => import("../pages/index/components/parking_analysis.vue")
300
+        },
301
+        {
302
+          name: "parking_time_analysis",
303
+          path: "/parking_time_analysis",
304
+          component: () => import("../pages/index/components/parking_time_analysis.vue")
305
+        },
306
+        {
307
+          name: "temp_parking-statistics",
308
+          path: "/temp_parking-statistics",
309
+          component: () => import("../pages/index/components/temp_parking-statistics.vue")
310
+        },
311
+        {
312
+          name: "berth_turnover",
313
+          path: "/berth_turnover",
314
+          component: () => import("../pages/index/components/berth_turnover.vue")
315
+        },
316
+        {
317
+          name: "parking_lot",
318
+          path: "/parking_lot",
319
+          component: () => import("../pages/index/components/parking_lot.vue")
320
+        },
296 321
       ]
297 322
     }
298 323
   ]