duwendi il y a 1 an
Parent
commit
b89df07f8a

+ 2 - 2
src/pages/index/components/parking_area.vue

@@ -281,7 +281,7 @@ export default {
281 281
             coordinateSystem: 'amap',
282 282
             data: convertData(data.sort(function (a, b) {
283 283
               return b.value - a.value;
284
-            }).slice(0, 6)),
284
+            }).slice(0, 5)),
285 285
             symbolSize: function (val) {
286 286
               return val[2] / 10;
287 287
             },
@@ -299,7 +299,7 @@ export default {
299 299
               show: false
300 300
             },
301 301
             itemStyle: {
302
-              color: '#fff',
302
+              color: '#f00',
303 303
               shadowBlur: 10,
304 304
               shadowColor: '#333'
305 305
             },

+ 3 - 2
src/pages/index/components/parking_lot_situation.vue

@@ -111,7 +111,8 @@ export default {
111 111
       formInline: {
112 112
         parkId: '',
113 113
         regionCode: '',
114
-        keyAreas: ''
114
+        keyAreas: '',
115
+        streetName: ''
115 116
       },
116 117
       queryParams: {},
117 118
       formInline2: {
@@ -120,8 +121,8 @@ export default {
120 121
         keyAreas: ''
121 122
       },
122 123
       queryParams2: {},
123
-      districtOptions: options.districtOptions,
124 124
       carOptions: [],
125
+      districtOptions: options.districtOptions,
125 126
       keyAreaOptions: options.keyAreaOptions,
126 127
       activeName: '实时概况',
127 128
       columns: [

+ 62 - 25
src/pages/index/components/saturation_warning.vue

@@ -1,7 +1,29 @@
1 1
 <template>
2 2
   <div class="body-wrapper">
3
-    <div style="color: #3498db;font-size: 23px;margin-bottom: 20px">全市停车饱和度</div>
4
-    <div class="body-wrapper" style="height: 300px;">
3
+    <el-form class="form-wrapper" :inline="true" ref="formInline" :model="formInline">
4
+      <el-form-item label="行政区">
5
+        <el-select clearable  v-model="formInline.regionCode" placeholder="请选择" popper-class="cur-select">
6
+          <el-option v-for="item in districtOptions"  :key="item.value" :label="item.label" :value="item.value"></el-option>
7
+        </el-select>
8
+      </el-form-item>
9
+      <el-form-item label="重点区域">
10
+        <el-select clearable filterable v-model="formInline.keyAreas" placeholder="请选择" popper-class="cur-select">
11
+          <el-option v-for="item in keyAreaOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
12
+        </el-select>
13
+      </el-form-item>
14
+      <el-form-item label="街道">
15
+        <el-input  v-model="formInline.streetName" placeholder="请输入"></el-input>
16
+      </el-form-item>
17
+      <el-form-item label="停车场">
18
+        <el-select clearable filterable v-model="formInline.parkId" placeholder="请选择" popper-class="cur-select">
19
+          <el-option v-for="item in carOptions" :key="item.parkId" :label="item.carParkName" :value="item.parkId"></el-option>
20
+        </el-select>
21
+      </el-form-item>
22
+      <el-form-item>
23
+        <el-button type="primary" @click="queryAll">查询</el-button>
24
+      </el-form-item>
25
+    </el-form>
26
+    <div style="width: 100%; height: 300px">
5 27
       <linechart
6 28
         :autoStop="false"
7 29
         :top="30"
@@ -12,22 +34,22 @@
12 34
         :dataset="linedata"
13 35
         :tooltipFormat="lineTooltipFormat"
14 36
         :encode="[
15
-              { x: 'month', y: 'thisAmount', seriesName: '预警值',col:'red' },
16
-              { x: 'month', y: 'lastAmount', seriesName: '饱和度',bool:'true' },
37
+              { x: 'mouth', y: 'thisAmount', seriesName: '预警值',col:'red' },
38
+              { x: 'mouth', y: 'lastAmount', seriesName: '饱和度',bool:'true' },
17 39
             ]"
18 40
         id="sxcyfzqk"
19 41
       />
20
-      <div class="body-wrapper" style=" height: 450px">
21
-        <div style="color: #3498db;font-size: 23px;margin-bottom: 20px">网格化停车饱和预警</div>
22
-        <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
23
-          <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
24
-          </el-table-column>
25
-        </el-table>
26
-        <div class="table-pagination">
27
-          <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
28
-                         :current-page.sync="pageNum" :page-size.sync="pageSize">
29
-          </el-pagination>
30
-        </div>
42
+    </div>
43
+    <div class="body-wrapper" style=" height: 450px">
44
+      <div style="color: #3498db;font-size: 23px;margin-bottom: 20px">网格化停车饱和预警</div>
45
+      <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
46
+        <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
47
+        </el-table-column>
48
+      </el-table>
49
+      <div class="table-pagination">
50
+        <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
51
+                       :current-page.sync="pageNum" :page-size.sync="pageSize">
52
+        </el-pagination>
31 53
       </div>
32 54
     </div>
33 55
   </div>
@@ -36,6 +58,7 @@
36 58
 import linechart from "@/components/lineChart";
37 59
 import vtable from "@/components/vtableNew";
38 60
 import api from '@/api/audit'
61
+import options from '@/util/options'
39 62
 
40 63
 export default {
41 64
   components: {
@@ -45,11 +68,14 @@ export default {
45 68
   data() {
46 69
     return {
47 70
       formInline: {
48
-        region0: '',
49
-        region1: '',
50
-        region2: '',
51
-        region3: '',
71
+        parkId: '',
72
+        regionCode: '',
73
+        streetName: '',
74
+        keyAreas: ''
52 75
       },
76
+      carOptions: [],
77
+      districtOptions: options.districtOptions,
78
+      keyAreaOptions: options.keyAreaOptions,
53 79
       linedata: [],
54 80
       columns: [
55 81
         {
@@ -71,23 +97,34 @@ export default {
71 97
     }
72 98
   },
73 99
   mounted() {
74
-    this.getTcbhyj()
75
-    this.getTableData()
100
+    this.getParkDic()
101
+    this.queryAll()
76 102
   },
77 103
   watch: {
78 104
   },
79 105
   methods: {
106
+    queryAll() {
107
+      this.pageNum = 1;
108
+      this.queryParams = {...this.formInline}
109
+      this.getTcbhyj()
110
+      this.getTableData()
111
+    },
112
+    getParkDic() {
113
+      api.parkDic().then(res => {
114
+        this.carOptions = res.data || [];
115
+      })
116
+    },
80 117
     getTcbhyj() {
81
-      api.tcbhyj().then(res => {
82
-        this.linedata = res.data.map(item => ({...item, thisAmount: 30})) || []
118
+      api.tcbhyj({...this.queryParams}).then(res => {
119
+        this.linedata = res.data.map(item => ({...item, thisAmount: 80})) || []
83 120
       })
84 121
     },
85 122
     handlePageChange() {
86 123
       this.getTableData()
87 124
     },
88 125
     getTableData() {
89
-      const {pageNum, pageSize} = this
90
-      api.wghtcbhyj({current: pageNum, size: pageSize}).then(res => {
126
+      const {pageNum, pageSize, queryParams} = this
127
+      api.wghtcbhyj({current: pageNum, size: pageSize, ...queryParams}).then(res => {
91 128
         this.tableData = res.data.records || []
92 129
         this.total = res.data.total
93 130
       })