Browse Source

新页面添加

duwendi 1 year ago
parent
commit
2f81830a9c

+ 11 - 6
src/api/audit.js

@@ -201,13 +201,18 @@ export default {
201 201
   czxyjgListByPage(params) {
202 202
     return axios.get('/dash/car/owner/credit/page', {params})
203 203
   },
204
-  // 申请列表
205
-  applyList(params) {
206
-    return axios.get('/resourceApply/selectBackedApplyList', {params});
204
+  // 收费趋势
205
+  sfqs(params) {
206
+    return axios.post('/dash/business/conditions/stat1', params)
207 207
   },
208
-  // 审核
209
-  applyResource(params) {
210
-    return axios.post('/resourceApply/approveApply', params);
208
+  // 车辆类型
209
+  cllx(params) {
210
+    return axios.post('/dash/business/conditions/stat2', params)
211
+  },
212
+  // 经营情况——
213
+  jyqk(params) {
214
+    return axios.get('/dash/business/conditions/page', {params})
211 215
   }
212 216
 
217
+
213 218
 }

+ 186 - 0
src/pages/index/components/business_conditions.vue

@@ -0,0 +1,186 @@
1
+<template xmlns:piechart="http://www.w3.org/1999/html">
2
+  <div class="body-wrapper">
3
+    <div style="display: flex;justify-content: space-around;">
4
+      <div style="width: 25%;display: flex;">
5
+        <h4 class="h4font">泊位数量:</h4><h3 class="h4font">{{viewData.totalParkingNumber}}</h3>
6
+      </div>
7
+      <div style="width: 25%;display: flex;">
8
+        <h4 class="h4font">实时余位:</h4><h3 class="h4font">{{viewData.remainParkingNumber}}</h3>
9
+      </div>
10
+      <div style="width: 25%;display: flex;">
11
+        <h4 class="h4font">实时进场:</h4><h3 class="h4font">{{viewData.inNumber}}</h3>
12
+      </div>
13
+      <div style="width: 25%;display: flex;">
14
+        <h4 class="h4font">实时出场:</h4><h3 class="h4font">{{viewData.outNumber}}</h3>
15
+      </div>
16
+    </div>
17
+    <br>
18
+    <br>
19
+    <div class="charts">
20
+      <div style="width: 50%;height: 500px;">
21
+        <h4 style="color: white">收费趋势</h4>
22
+        <linechart
23
+          :autoStop="false"
24
+          :top="30"
25
+          :bottom="30"
26
+          :left="40"
27
+          :legendTop="0"
28
+          yAxisName="元"
29
+          :dataset="linedata"
30
+          :tooltipFormat="lineTooltipFormat"
31
+          :encode="[
32
+              { x: 'month', y: 'lastAmount', seriesName: '收费金额',bool:'true' },
33
+            ]"
34
+          id="sfqfqs"
35
+        />
36
+      </div>
37
+      <div style="width: 50%;height: 500px;">
38
+        <h4 style="color: white">车辆类型</h4>
39
+        <piechart
40
+          class="model-pie-body"
41
+          id="chart3"
42
+          :radiusArr="['30%', '70%']"
43
+          :roseType = "false"
44
+          :colorArr="pieColor"
45
+          :labelFormat="['{name|{b}}', '{sub|{@value} {d}%}', '{hr|}']"
46
+          :dataset="modelData"
47
+          :encode="{ itemName: 'name', value: 'value' }"
48
+        />
49
+      </div>
50
+      <br>
51
+    </div>
52
+    <br>
53
+    <br>
54
+    <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
55
+      <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
56
+      </el-table-column>
57
+    </el-table>
58
+    <div class="table-pagination">
59
+      <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
60
+                     :current-page.sync="pageNum" :page-size.sync="pageSize">
61
+      </el-pagination>
62
+    </div>
63
+  </div>
64
+</template>
65
+<script>
66
+  import api from "@/api/audit.js";
67
+  import piechart from "@/components/pieChart";
68
+  import linechart from "@/components/lineChart";
69
+  import api1 from '@/api/article_liao.js'
70
+
71
+  export default {
72
+    components: {
73
+      piechart,
74
+      linechart
75
+    },
76
+    data() {
77
+      return {
78
+        viewData: {
79
+          outNumber: "0",
80
+          inNumber: "0",
81
+          totalParkingNumber: "0",
82
+          remainParkingNumber: "0"
83
+        },
84
+        linedata: [],
85
+        modelData: [],
86
+        columns: [
87
+          {
88
+            label: '停车场名称',
89
+            key: 'carParkName'
90
+          },
91
+          {
92
+            label: '待结算',
93
+            key: 'settled'
94
+          },
95
+          {
96
+            label: '停入车次',
97
+            key: 'parkNum'
98
+          },
99
+          {
100
+            label: '当日停泊时长',
101
+            key: 'parkingduration'
102
+          }
103
+        ],
104
+        pieColor: ["rgb(0, 143, 251)","rgb(0, 227, 150)"],
105
+        tableData: [],
106
+        total: 0,
107
+        pageSize: 5,
108
+        pageNum: 1,
109
+      }
110
+    },
111
+    mounted() {
112
+      const {pageNum, pageSize} = this
113
+      let that = this
114
+      let params4 = {current: pageNum, size: pageSize}
115
+      // todo 添加对应页面接口
116
+      let requestList = [api.tccqkView(), api.sfqs(),api.cllx(), api.tccqkListByPage(params4)];
117
+      Promise.all(requestList).then(res => {
118
+        that.viewData = res[0].data
119
+        that.linedata = res[1].data || []
120
+        that.modelData = res[2].data || []
121
+        this.tableData = res[3].data.records || []
122
+        this.total = res[3].data.total || 0
123
+      })
124
+    },
125
+    watch: {
126
+    },
127
+    methods: {
128
+      lineTooltipFormat(params) {
129
+        return `<div class="line-tooltip">
130
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
131
+          params[0].data.lastAmount || "--"
132
+        }</div>
133
+      </div>`;
134
+      },
135
+      handlePageChange() {
136
+        this.getTableData()
137
+      },
138
+      getTableData() {
139
+        const {pageNum, pageSize} = this
140
+        api.tccqkListByPage({current: pageNum, size: pageSize}).then(res => {
141
+          this.tableData = res.data.records || []
142
+          this.total = res.data.total || 0
143
+        })
144
+      },
145
+    }
146
+  }
147
+</script>
148
+<style  lang="scss" scoped>
149
+.body-wrapper {
150
+  padding: 20px;
151
+  background: #0c0c0c;
152
+  .button-block{
153
+    text-align: right;
154
+    margin-bottom: 20px;
155
+  }
156
+  .table-pagination{
157
+    text-align: right;
158
+  }
159
+  .search-card{
160
+    font-size: 24px;
161
+    font-weight: bold;
162
+    color: #3498db;
163
+    margin-bottom: 20px;
164
+    .input-wrapper{
165
+      width: 36%;
166
+    }
167
+  }
168
+}
169
+
170
+.charts{
171
+  width: 100%;
172
+  display: flex;
173
+  justify-content: space-between;
174
+}
175
+.h4font{
176
+  color: #FFFFFF;
177
+}
178
+.audit-dialog{
179
+  .mg-bt{
180
+    margin-bottom: 24px;
181
+  }
182
+  .label{
183
+    text-align: right;
184
+  }
185
+}
186
+</style>

+ 148 - 0
src/pages/index/components/business_overview.vue

@@ -0,0 +1,148 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <div style="width: 100%;display: flex;justify-content: space-between;">
4
+      <div style="width: 33%;height: 400px;">
5
+        <h4 style="color: white">车场数量</h4>
6
+        <piechart
7
+          class="model-pie-body"
8
+          id="chart1"
9
+          :radiusArr="['30%', '70%']"
10
+          :roseType = "false"
11
+          :colorArr="modelPieColor"
12
+          :labelFormat="['{name|{b}}', '{sub|{@value} {d}%}', '{hr|}']"
13
+          :dataset="modelData"
14
+          :encode="{ itemName: 'name', value: 'value' }"
15
+        />
16
+      </div>
17
+      <div style="width: 33%;height: 400px;">
18
+        <h4 style="color: white">设备情况</h4>
19
+        <barchart
20
+          class="side-chart"
21
+          :autoStop="false"
22
+          :colorArr="['#ffd201', '#00eacb', '#01b4ff', '#5d78ff']"
23
+          legendIcon="react"
24
+          :bottom="30"
25
+          :xlabelFormat="xLabelFormat"
26
+          :top="60"
27
+          yAxisName="(元)"
28
+          :tooltip="tooltipFormat"
29
+          :dataset="bardata"
30
+          :encode="[
31
+            {x: 'month', y: 'hs', seriesName: '应收'},
32
+            {x: 'month', y: 'cs', seriesName: '实收'}]"
33
+          :labelSize="15"
34
+          id="fxdqhszzt"
35
+        />
36
+      </div>
37
+      <div style="width: 33%;height: 400px;">
38
+        <h4 style="color: white">满位显示器</h4>
39
+        <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
40
+          <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
41
+          </el-table-column>
42
+        </el-table>
43
+        <div class="table-pagination">
44
+          <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
45
+                         :current-page.sync="pageNum" :page-size.sync="pageSize">
46
+          </el-pagination>
47
+        </div>
48
+      </div>
49
+      <br>
50
+    </div>
51
+
52
+
53
+  </div>
54
+</template>
55
+<script>
56
+import piechart from "@/components/pieChart";
57
+import api from "@/api/article_z";
58
+
59
+export default {
60
+  components: {
61
+    piechart
62
+  },
63
+  data() {
64
+    return {
65
+      columns: [
66
+        {
67
+          label: '设备名称',
68
+          key: 'deviceName'
69
+        },
70
+        {
71
+          label: '状态',
72
+          key: 'deviceState'
73
+        }
74
+      ],
75
+      modelPieColor: ["#2E8B57","#9078f8"],
76
+      modelData: [],
77
+      modelPieColor2: ["#2E8B57","#9078f8"],
78
+      modelData2: [],
79
+      modelPieColor3: ["#2E8B57","#9078f8"],
80
+      modelData3: [],
81
+      tableData: [],
82
+      total: 0,
83
+      pageSize: 5,
84
+      pageNum: 1,
85
+      radio: '2',
86
+      dialogVisible: false,
87
+      selRow: {},
88
+    }
89
+  },
90
+  mounted() {
91
+    const {pageNum, pageSize} = this
92
+    let that = this
93
+    let params4 = {current: pageNum, size: pageSize}
94
+    let requestList = [api.queryEquipmentRunning_Sxt(), api.queryEquipmentRunning_Zj(),api.queryEquipmentRunning_Mwxsq(), api.sbyxjcList(params4)];
95
+    Promise.all(requestList).then(res => {
96
+      that.modelData = res[0].data || []
97
+      that.modelData2 = res[1].data || []
98
+      that.modelData3 = res[2].data || []
99
+      this.tableData = res[3].data.records || []
100
+      this.total = res[3].data.total || 0
101
+    })
102
+  },
103
+  watch: {
104
+  },
105
+  methods: {
106
+    handlePageChange() {
107
+      this.getTableData()
108
+    },
109
+    getTableData() {
110
+      const {pageNum, pageSize} = this
111
+      api1.sbyxjcList({current: pageNum, size: pageSize}).then(res => {
112
+        this.tableData = res.data.records || []
113
+        this.total = res.data.total
114
+      })
115
+    },
116
+  }
117
+}
118
+</script>
119
+<style  lang="scss" scoped>
120
+.body-wrapper {
121
+  padding: 20px;
122
+  background: #0c0c0c;
123
+  .button-block{
124
+    text-align: right;
125
+    margin-bottom: 20px;
126
+  }
127
+  .table-pagination{
128
+    text-align: right;
129
+  }
130
+  .search-card{
131
+    font-size: 24px;
132
+    font-weight: bold;
133
+    color: #3498db;
134
+    margin-bottom: 20px;
135
+    .input-wrapper{
136
+      width: 36%;
137
+    }
138
+  }
139
+}
140
+.audit-dialog{
141
+  .mg-bt{
142
+    margin-bottom: 24px;
143
+  }
144
+  .label{
145
+    text-align: right;
146
+  }
147
+}
148
+</style>

+ 12 - 21
src/pages/index/components/equipment_running.vue

@@ -62,9 +62,8 @@
62 62
   </div>
63 63
 </template>
64 64
 <script>
65
-import api from "@/api/audit.js";
66 65
 import piechart from "@/components/pieChart";
67
-import api1 from "@/api/article_z";
66
+import api from "@/api/article_z";
68 67
 
69 68
 export default {
70 69
   components: {
@@ -99,29 +98,21 @@ export default {
99 98
     }
100 99
   },
101 100
   mounted() {
102
-    this.getTableData()
103
-    this.getModelDataData()
104
-    this.getModelData2Data()
105
-    this.getModelData3Data()
101
+    const {pageNum, pageSize} = this
102
+    let that = this
103
+    let params4 = {current: pageNum, size: pageSize}
104
+    let requestList = [api.queryEquipmentRunning_Sxt(), api.queryEquipmentRunning_Zj(),api.queryEquipmentRunning_Mwxsq(), api.sbyxjcList(params4)];
105
+    Promise.all(requestList).then(res => {
106
+      that.modelData = res[0].data || []
107
+      that.modelData2 = res[1].data || []
108
+      that.modelData3 = res[2].data || []
109
+      this.tableData = res[3].data.records || []
110
+      this.total = res[3].data.total || 0
111
+    })
106 112
   },
107 113
   watch: {
108 114
   },
109 115
   methods: {
110
-    getModelDataData(){
111
-      api1.queryEquipmentRunning_Sxt().then(res=>{
112
-        this.modelData=res.data;
113
-      })
114
-    },
115
-    getModelData2Data(){
116
-      api1.queryEquipmentRunning_Zj().then(res=>{
117
-        this.modelData2=res.data;
118
-      })
119
-    },
120
-    getModelData3Data(){
121
-      api1.queryEquipmentRunning_Mwxsq().then(res=>{
122
-        this.modelData3=res.data;
123
-      })
124
-    },
125 116
     handlePageChange() {
126 117
       this.getTableData()
127 118
     },

+ 10 - 0
src/pages/index/components/park_bahavior.vue

@@ -101,6 +101,16 @@ export default {
101 101
   watch: {
102 102
   },
103 103
   methods: {
104
+    lineTooltipFormat(params) {
105
+      return `<div class="line-tooltip">
106
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
107
+        params[0].data.lastYearAmount || "--"
108
+      }</div>
109
+        <div style="color: ${params[1].color}">${params[1].seriesName}: ${
110
+        params[1].data.thisYearAmount || "--"
111
+      }</div>
112
+      </div>`;
113
+    },
104 114
     parkBehaviorDuration() {
105 115
       api.parkBehaviorDuration().then(res =>{
106 116
         this.modelData = res.data

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

@@ -198,7 +198,7 @@ export default {
198 198
       getTableData1() {
199 199
         const {pageNum1, pageSize1} = this
200 200
         api.carListByPage({current: pageNum1, size: pageSize1, ...this.formInline1}).then(res => {
201
-          this.tableData1 = (res.data.records || []).map(item => ({...item, carType: dictionary.carTypeMap[item.carType]}))
201
+          this.tableData1 = (res.data.records || []).map(item => ({...item, carType: dictionary.typeMap[item.carType]}))
202 202
           this.total1 = res.data.total
203 203
         })
204 204
       },

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

@@ -85,6 +85,8 @@ export default {
85 85
         {name: 'hot_map', url: '/hot_map'},
86 86
         {name: 'heat_map', url: '/heat_map'},
87 87
         {name: '泊位列表', url: '/berth_list'},
88
+        {name: '业务概览', url: '/business_overview'},
89
+        {name: '经营情况', url: '/business_conditions'},
88 90
       ]
89 91
     }
90 92
   },

+ 10 - 0
src/router/index.js

@@ -262,6 +262,16 @@ export default new Router({
262 262
           path: "/service_monitor",
263 263
           component: () => import("../pages/index/components/service_monitor.vue")
264 264
         },
265
+        {
266
+          name: "business_overview",
267
+          path: "/business_overview",
268
+          component: () => import("../pages/index/components/business_overview.vue")
269
+        },
270
+        {
271
+          name: "business_conditions",
272
+          path: "/business_conditions",
273
+          component: () => import("../pages/index/components/business_conditions.vue")
274
+        },
265 275
       ]
266 276
     }
267 277
   ]

+ 5 - 0
src/util/dictionary.js

@@ -1,4 +1,9 @@
1 1
 export default {
2
+  typeMap:  {
3
+    0: '未识别',
4
+    1: '小型',
5
+    2: '大型',
6
+  },
2 7
   carTypeMap:  {
3 8
     0: '临时车',
4 9
     1: '月卡车',

File diff suppressed because it is too large
+ 1 - 0
src/util/luohe.json