Browse Source

no message

duwendi 1 year ago
parent
commit
998345b4ec

+ 65 - 32
src/pages/index/components/business_overview.vue

@@ -59,11 +59,12 @@
59
           :bottom="30"
59
           :bottom="30"
60
           :left="40"
60
           :left="40"
61
           :legendTop="0"
61
           :legendTop="0"
62
-          yAxisName="(%)"
62
+          yAxisName="(小时)"
63
           :dataset="linedata"
63
           :dataset="linedata"
64
           :tooltipFormat="lineTooltipFormat1"
64
           :tooltipFormat="lineTooltipFormat1"
65
           :encode="[
65
           :encode="[
66
-              { x: 'month', y: 'lastAmount', seriesName: '停车总时长(时)',bool:'true' },
66
+              { x: 'mouth', y: 'lastYearAmount', seriesName: '路内',bool:'true' },
67
+              { x: 'mouth', y: 'thisYearAmount', seriesName: '路外',bool:'true' },
67
             ]"
68
             ]"
68
           id="sxcyfzqk1"
69
           id="sxcyfzqk1"
69
         />
70
         />
@@ -76,11 +77,12 @@
76
           :bottom="30"
77
           :bottom="30"
77
           :left="40"
78
           :left="40"
78
           :legendTop="0"
79
           :legendTop="0"
79
-          yAxisName="(%)"
80
+          yAxisName="()"
80
           :dataset="linedata2"
81
           :dataset="linedata2"
81
-          :tooltipFormat="lineTooltipFormat1"
82
+          :tooltipFormat="lineTooltipFormat2"
82
           :encode="[
83
           :encode="[
83
-              { x: 'month', y: 'lastAmount', seriesName: '当日平均周转次数',bool:'true' },
84
+              { x: 'mouth', y: 'lastYearAmount', seriesName: '路内',bool:'true' },
85
+              { x: 'mouth', y: 'thisYearAmount', seriesName: '路外',bool:'true' },
84
             ]"
86
             ]"
85
           id="bwzzqs"
87
           id="bwzzqs"
86
         />
88
         />
@@ -95,9 +97,10 @@
95
           :legendTop="0"
97
           :legendTop="0"
96
           yAxisName="(%)"
98
           yAxisName="(%)"
97
           :dataset="linedata3"
99
           :dataset="linedata3"
98
-          :tooltipFormat="lineTooltipFormat1"
100
+          :tooltipFormat="lineTooltipFormat3"
99
           :encode="[
101
           :encode="[
100
-              { x: 'month', y: 'lastAmount', seriesName: '当日平均利用率(%)',bool:'true' },
102
+              { x: 'mouth', y: 'lastYearAmount', seriesName: '路内',bool:'true' },
103
+              { x: 'mouth', y: 'thisYearAmount', seriesName: '路外',bool:'true' },
101
             ]"
104
             ]"
102
           id="bwlylqs"
105
           id="bwlylqs"
103
         />
106
         />
@@ -107,18 +110,19 @@
107
     <br>
110
     <br>
108
     <div style="width: 100%;display: flex;justify-content: space-between;">
111
     <div style="width: 100%;display: flex;justify-content: space-between;">
109
       <div style="width: 33%;height: 400px;">
112
       <div style="width: 33%;height: 400px;">
110
-        <div align="center" style="color: white">实缴趋势</div>
113
+        <div align="center" style="color: white">实缴金额</div>
111
         <linechart
114
         <linechart
112
           :autoStop="false"
115
           :autoStop="false"
113
           :top="30"
116
           :top="30"
114
           :bottom="30"
117
           :bottom="30"
115
           :left="40"
118
           :left="40"
116
           :legendTop="0"
119
           :legendTop="0"
117
-          yAxisName="(%)"
120
+          yAxisName="()"
118
           :dataset="linedata4"
121
           :dataset="linedata4"
119
-          :tooltipFormat="lineTooltipFormat1"
122
+          :tooltipFormat="lineTooltipFormat4"
120
           :encode="[
123
           :encode="[
121
-              { x: 'month', y: 'lastAmount', seriesName: '实缴率(%)',bool:'true' },
124
+              { x: 'mouth', y: 'lastYearAmount', seriesName: '路内',bool:'true' },
125
+              { x: 'mouth', y: 'thisYearAmount', seriesName: '路外',bool:'true' },
122
             ]"
126
             ]"
123
           id="sjqs"
127
           id="sjqs"
124
         />
128
         />
@@ -133,9 +137,10 @@
133
           :legendTop="0"
137
           :legendTop="0"
134
           yAxisName="(%)"
138
           yAxisName="(%)"
135
           :dataset="linedata5"
139
           :dataset="linedata5"
136
-          :tooltipFormat="lineTooltipFormat1"
140
+          :tooltipFormat="lineTooltipFormat5"
137
           :encode="[
141
           :encode="[
138
-              { x: 'month', y: 'lastAmount', seriesName: '实时占用率',bool:'true' },
142
+              { x: 'mouth', y: 'lastYearAmount', seriesName: '路内',bool:'true' },
143
+              { x: 'mouth', y: 'thisYearAmount', seriesName: '路外',bool:'true' },
139
             ]"
144
             ]"
140
           id="bwsszyl"
145
           id="bwsszyl"
141
         />
146
         />
@@ -214,18 +219,7 @@ export default {
214
       modelData3: [],
219
       modelData3: [],
215
       tableData: [],
220
       tableData: [],
216
       tableData2: [],
221
       tableData2: [],
217
-      linedata:[{
218
-        "mouth": "星期一",
219
-        "lastAmount": 14
220
-      },
221
-        {
222
-          "mouth": "星期二",
223
-          "lastAmount": 46
224
-        },
225
-        {
226
-          "mouth": "星期三",
227
-          "lastAmount": 59
228
-        },],
222
+      linedata:[],
229
       linedata2:[],
223
       linedata2:[],
230
       linedata3:[],
224
       linedata3:[],
231
       linedata4:[],
225
       linedata4:[],
@@ -301,27 +295,27 @@ export default {
301
       })
295
       })
302
     },
296
     },
303
     dashBusinessOverviewStat3(){
297
     dashBusinessOverviewStat3(){
304
-      api_l.dashBusinessOverviewStat3().then(res => {
298
+      api_l.dashBusinessOverviewStat3({begin: '', end: ''}).then(res => {
305
         this.linedata=res.data;
299
         this.linedata=res.data;
306
       })
300
       })
307
     },
301
     },
308
     dashBusinessOverviewStat4(){
302
     dashBusinessOverviewStat4(){
309
-      api_l.dashBusinessOverviewStat4().then(res => {
303
+      api_l.dashBusinessOverviewStat4({begin: '', end: ''}).then(res => {
310
         this.linedata2=res.data;
304
         this.linedata2=res.data;
311
       })
305
       })
312
     },
306
     },
313
     dashBusinessOverviewStat5(){
307
     dashBusinessOverviewStat5(){
314
-      api_l.dashBusinessOverviewStat5().then(res => {
308
+      api_l.dashBusinessOverviewStat5({begin: '', end: ''}).then(res => {
315
         this.linedata3=res.data;
309
         this.linedata3=res.data;
316
       })
310
       })
317
     },
311
     },
318
     dashBusinessOverviewStat6(){
312
     dashBusinessOverviewStat6(){
319
-      api_l.dashBusinessOverviewStat6().then(res => {
313
+      api_l.dashBusinessOverviewStat6({begin: '', end: ''}).then(res => {
320
         this.linedata4=res.data;
314
         this.linedata4=res.data;
321
       })
315
       })
322
     },
316
     },
323
     dashBusinessOverviewStat7(){
317
     dashBusinessOverviewStat7(){
324
-      api_l.dashBusinessOverviewStat7().then(res => {
318
+      api_l.dashBusinessOverviewStat7({begin: '', end: ''}).then(res => {
325
         this.linedata5=res.data;
319
         this.linedata5=res.data;
326
       })
320
       })
327
     },
321
     },
@@ -329,8 +323,47 @@ export default {
329
       const data = params[0].data;
323
       const data = params[0].data;
330
       return `<div class="line-tooltip">
324
       return `<div class="line-tooltip">
331
         <div style="color: ${params[0].color}">${params[0].seriesName}: ${
325
         <div style="color: ${params[0].color}">${params[0].seriesName}: ${
332
-        params[0].data.lastAmount || "--"
333
-      }(%)</div>`;
326
+        params[0].data.lastYearAmount || 0
327
+      }小时</div><div style="color: ${params[1].color}">${params[1].seriesName}: ${
328
+        params[0].data.thisYearAmount || 0
329
+      }小时</div></div>`;
330
+    },
331
+    lineTooltipFormat2(params) {
332
+      const data = params[0].data;
333
+      return `<div class="line-tooltip">
334
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
335
+        params[0].data.lastYearAmount || 0
336
+      }次</div><div style="color: ${params[1].color}">${params[1].seriesName}: ${
337
+        params[0].data.thisYearAmount || 0
338
+      }次</div></div>`;
339
+    },
340
+    lineTooltipFormat3(params) {
341
+      const data = params[0].data;
342
+      return `<div class="line-tooltip">
343
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
344
+        params[0].data.lastYearAmount || 0
345
+      }%</div><div style="color: ${params[1].color}">${params[1].seriesName}: ${
346
+        params[0].data.thisYearAmount || 0
347
+      }%</div></div>`;
348
+    },
349
+    lineTooltipFormat4(params) {
350
+      const data = params[0].data;
351
+      return `<div class="line-tooltip">
352
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
353
+        params[0].data.lastYearAmount || 0
354
+      }元</div><div style="color: ${params[1].color}">${params[1].seriesName}: ${
355
+        params[0].data.thisYearAmount || 0
356
+      }元</div></div>`;
357
+    },
358
+
359
+    lineTooltipFormat5(params) {
360
+      const data = params[0].data;
361
+      return `<div class="line-tooltip">
362
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
363
+        params[0].data.lastYearAmount || 0
364
+      }%</div><div style="color: ${params[1].color}">${params[1].seriesName}: ${
365
+        params[0].data.thisYearAmount || 0
366
+      }%</div></div>`;
334
     },
367
     },
335
     tooltipFormat(params) {
368
     tooltipFormat(params) {
336
       const type = params[0].seriesType;
369
       const type = params[0].seriesType;

+ 140 - 5
src/pages/index/components/charge_business_analysis.vue

@@ -1,7 +1,27 @@
1
 <template>
1
 <template>
2
   <div class="body-wrapper">
2
   <div class="body-wrapper">
3
+    <el-form class="form-wrapper" :inline="true" :model="formInline" style="margin-bottom: 20px;">
4
+      <el-row>
5
+        <el-col :span="8">
6
+          <el-form-item label="查询日期:">
7
+            <el-date-picker
8
+              v-model="formInline.time"
9
+              type="daterange"
10
+              range-separator="至"
11
+              start-placeholder="开始日期"
12
+              value-format="yyyy-MM-dd"
13
+              end-placeholder="结束日期">
14
+            </el-date-picker>
15
+          </el-form-item>
16
+        </el-col>
17
+        <el-col :span="8">
18
+          <el-form-item>
19
+            <el-button type="primary" class="query-btn" @click="onSubmit">查询</el-button>
20
+          </el-form-item>
21
+        </el-col>
22
+      </el-row>
23
+    </el-form>
3
     <div style="width: 99%; height: 300px">
24
     <div style="width: 99%; height: 300px">
4
-      <h2 style="color: #3498db;">收费业务分析</h2>
5
       <h4 style="color: white">收费数据分析</h4>
25
       <h4 style="color: white">收费数据分析</h4>
6
       <barchart
26
       <barchart
7
         class="side-chart"
27
         class="side-chart"
@@ -69,7 +89,10 @@ export default {
69
         list: [],
89
         list: [],
70
         list1: []
90
         list1: []
71
       },
91
       },
72
-      bardata: []
92
+      bardata: [],
93
+      formInline: {
94
+        time: ''
95
+      }
73
     }
96
     }
74
   },
97
   },
75
   mounted() {
98
   mounted() {
@@ -81,6 +104,11 @@ export default {
81
 
104
 
82
   },
105
   },
83
   methods: {
106
   methods: {
107
+    onSubmit() {
108
+      this.businessAnalysisStat()
109
+      this.businessAnalysisStat2()
110
+      this.businessAnalysisStat3()
111
+    },
84
     tooltipFormat(params) {
112
     tooltipFormat(params) {
85
       const type = params[0].seriesType;
113
       const type = params[0].seriesType;
86
       const data = params[0].data;
114
       const data = params[0].data;
@@ -92,17 +120,50 @@ export default {
92
 </div>`;
120
 </div>`;
93
     },
121
     },
94
     businessAnalysisStat(){
122
     businessAnalysisStat(){
95
-      api.businessAnalysisStat().then(res =>{
123
+      let params = this.formInline
124
+      if (
125
+        this.formInline.time && this.formInline.time.length === 2 &&
126
+        this.formInline.time[1] !== ""
127
+      ) {
128
+        this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
129
+        this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
130
+        params.start= this.formInline.time[0]
131
+        params.end = this.formInline.time[1]
132
+      }
133
+      delete params.time
134
+      api.businessAnalysisStat(params).then(res =>{
96
         this.bardata = res.data
135
         this.bardata = res.data
97
       })
136
       })
98
     },
137
     },
99
     businessAnalysisStat2(){
138
     businessAnalysisStat2(){
100
-      api.businessAnalysisStat2().then(res =>{
139
+      let params = this.formInline
140
+      if (
141
+        this.formInline.time && this.formInline.time.length === 2 &&
142
+        this.formInline.time[1] !== ""
143
+      ) {
144
+        this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
145
+        this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
146
+        params.start= this.formInline.time[0]
147
+        params.end = this.formInline.time[1]
148
+      }
149
+      delete params.time
150
+      api.businessAnalysisStat2(params).then(res =>{
101
         this.modelData.list = res.data
151
         this.modelData.list = res.data
102
       })
152
       })
103
     },
153
     },
104
     businessAnalysisStat3(){
154
     businessAnalysisStat3(){
105
-      api.businessAnalysisStat3().then(res =>{
155
+      let params = this.formInline
156
+      if (
157
+        this.formInline.time && this.formInline.time.length === 2 &&
158
+        this.formInline.time[1] !== ""
159
+      ) {
160
+        this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
161
+        this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
162
+        params.start= this.formInline.time[0]
163
+        params.end = this.formInline.time[1]
164
+      }
165
+      delete params.time
166
+      api.businessAnalysisStat3(params).then(res =>{
106
         this.modelData.list1 = res.data
167
         this.modelData.list1 = res.data
107
       })
168
       })
108
     },
169
     },
@@ -128,4 +189,78 @@ export default {
128
   width: 100%;
189
   width: 100%;
129
   height: 99%;
190
   height: 99%;
130
 }
191
 }
192
+
193
+
194
+.form-wrapper {
195
+  margin-bottom: 20px;
196
+}
197
+/deep/ .el-input__inner {
198
+  background: #2d3744;
199
+  border: none;
200
+  border-radius: 0;
201
+}
202
+/deep/ .el-select {
203
+  height: 40px;
204
+  .el-input__inner {
205
+    height: 40px;
206
+  }
207
+  .el-input__prefix, .el-input__suffix {
208
+    height: 40px;
209
+  }
210
+
211
+  /* 下面设置右侧按钮居中 */
212
+  .el-input__suffix {
213
+    top: 0px;
214
+    display: flex;
215
+    justify-content: center;
216
+    align-items: center;
217
+    flex-wrap: nowrap;
218
+    flex-direction: row;
219
+    align-content: flex-start;
220
+  }
221
+  /* 输入框加上上下边是 32px + 2px =34px */
222
+  .el-input__icon {
223
+    line-height: 0px;
224
+  }
225
+}
226
+/deep/ .form-wrapper .el-button {
227
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
228
+  width: 100px;
229
+  height: 40px;
230
+}
231
+.body-wrapper {
232
+  padding: 20px;
233
+  background: #0c0c0c;
234
+  .button-block{
235
+    text-align: right;
236
+    margin-bottom: 20px;
237
+  }
238
+  .table-pagination{
239
+    text-align: right;
240
+  }
241
+  .search-card{
242
+    margin-bottom: 20px;
243
+    text-align: center;
244
+    .input-wrapper{
245
+      width: 36%;
246
+    }
247
+  }
248
+}
249
+.audit-dialog{
250
+  .mg-bt{
251
+    margin-bottom: 24px;
252
+  }
253
+  .label{
254
+    text-align: right;
255
+  }
256
+  .form-div{
257
+    /deep/ .el-input__inner{
258
+      height: 35px;
259
+      width: 90%;
260
+      border: 1px solid #a6a5a5;
261
+      color: #fff;
262
+      background: #2d3744;
263
+    }
264
+  }
265
+}
131
 </style>
266
 </style>