6ee6b0b7
杨鑫
'最新'
|
1
2
3
4
5
6
7
|
<template>
<div style="background-color:#f7f7f7;padding:10px 10px;">
<div style="padding: 0 20px 20px 20px;background-color:#fff;">
<div style="height:58px;line-height:58px;">
<div style="color:#0006"> <span>联机交易</span> <span style="padding:0 5px;">></span> <span
style="color:#000000e6">汇总查询</span></div>
</div>
|
a6a3878d
杨鑫
最新绿道
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
<div>
<el-form :inline="true" :model="formInline" label-width="auto" >
<el-form-item label="区域">
<el-input v-model="formInline.receiveAddress" placeholder="请输入"></el-input>
<!-- <el-select v-model="formInline.belongingGreenwaySection" placeholder="请选择" style="margin-top:5px;width: 100%;">
<el-option :label="item.name" :value="item.code" v-for="(item,index) in lvdaoList" :key="index" ></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="项目">
<el-input v-model="formInline.productName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="商户">
<el-input v-model="formInline.shopName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="选择日期">
<el-date-picker v-model="formInline.time" type="daterange" value-format="yyyy-MM-dd" style="width: 240px;margin-top:5px"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
style="background-color: #3F9B6A;color: #fff;"
@click="onSubmit"
>查询
</el-button>
<el-button
class="buttonHover"
style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
@click="resetting"
>重置
</el-button>
</el-form-item>
</el-form>
</div>
<!-- <div class="filter-container">
|
6ee6b0b7
杨鑫
'最新'
|
46
47
48
49
50
|
<div style="display:flex;justify-content: space-between;background-color: #f5f5f5;padding:10px">
<div style="line-height:200%">筛选查询</div>
<div>
<button @click="toggleFilter">收起筛选</button>
<el-button plain @click="search" style="background-color: #3F9B6A;color: #fff;">查询</el-button>
|
8550d958
杨鑫
'最新'
|
51
52
|
<el-button plain @click="resetting" class="buttonHover"
style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">重置</el-button>
|
6ee6b0b7
杨鑫
'最新'
|
53
54
55
56
57
58
59
60
61
62
|
</div>
</div>
<div :class="fut?'formSearch':'collapsed'" ref="formSearch">
<el-form :inline="true" :model="formInline" label-width="auto" style="padding: 10px 30px">
<el-form-item label="区域">
<el-select v-model="formInline.belongingGreenwaySection" placeholder="请选择" style="margin-top:5px;width: 100%;">
<el-option :label="item.name" :value="item.code" v-for="(item,index) in lvdaoList" :key="index" ></el-option>
</el-select>
</el-form-item>
|
a6a3878d
杨鑫
最新绿道
|
63
|
|
6ee6b0b7
杨鑫
'最新'
|
64
65
66
|
</el-form>
</div>
|
a6a3878d
杨鑫
最新绿道
|
67
|
</div> -->
|
6ee6b0b7
杨鑫
'最新'
|
68
|
|
a6a3878d
杨鑫
最新绿道
|
69
70
|
<!-- <div style="display:flex;">
<div style="width:50%">
|
6ee6b0b7
杨鑫
'最新'
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
<div style="display:flex;">
<div style="width:50%;padding:20px;">
<div>最高营业额</div>
<div style="font-size:20px;padding:15px 0;">9,646 <span style="margin-left:10px;">17.1%</span></div>
<div ref="maxYe" style="height:100px;"></div>
</div>
<div style="width:50%;padding:20px;">
<div>最低营业额</div>
<div style="font-size:20px;padding:15px 0;">646 <span style="margin-left:10px;">10.1%</span></div>
<div ref="minYe" style="height:100px;"></div>
</div>
</div>
<div>
<el-table
:data="tableData"
:header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
>
<el-table-column
label="排名"
min-width="4%"
>
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column
label="商户名称"
prop="shopName"
min-width="12%"
>
</el-table-column>
<el-table-column
label="营业额(元)"
prop=""
width="auto"
min-width="12%"
>
</el-table-column>
<el-table-column
label="周涨幅"
prop="name"
width="auto"
min-width="12%"
>
</el-table-column>
</el-table>
</div>
|
a6a3878d
杨鑫
最新绿道
|
119
|
</div>
|
6ee6b0b7
杨鑫
'最新'
|
120
121
122
123
|
<div style="width:100%;">
<div ref="tongji" style="height:300px"></div>
</div>
|
a6a3878d
杨鑫
最新绿道
|
124
|
</div> -->
|
6ee6b0b7
杨鑫
'最新'
|
125
126
|
<div style="margin-top:20px;">
|
a6a3878d
杨鑫
最新绿道
|
127
|
<!-- <div style="padding:0 20px 20px 20px ;border-bottom:1px solid #F2F3F5">交易流水</div> -->
|
6ee6b0b7
杨鑫
'最新'
|
128
129
130
131
132
133
134
135
136
137
138
139
|
<!-- <div style="display:flex;padding: 10px 0">
<el-form :inline="true" :model="formInline" label-width="auto">
<el-form-item label="用户名">
<el-input v-model="formInline.searchType" placeholder="请输入"
style="width: 168px;margin-right: 10px;" />
</el-form-item>
</el-form>
<el-button @click="Modes " style="background-color: #3F9B6A;color: #fff;margin-top:4px;">查询
</el-button>
</div> -->
<el-table
:data="tableData"
|
a6a3878d
杨鑫
最新绿道
|
140
141
|
:summary-method="getSummaries"
show-summary
|
6ee6b0b7
杨鑫
'最新'
|
142
143
144
145
146
147
148
149
150
151
152
|
:header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
>
<el-table-column
label="序号"
min-width="4%"
>
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column
|
a6a3878d
杨鑫
最新绿道
|
153
154
|
label="商户编号"
prop="shopId"
|
6ee6b0b7
杨鑫
'最新'
|
155
156
157
158
159
160
161
162
163
164
165
|
min-width="12%"
>
</el-table-column>
<el-table-column
label="商户名称"
prop="shopName"
width="auto"
min-width="12%"
>
</el-table-column>
<el-table-column
|
a6a3878d
杨鑫
最新绿道
|
166
167
|
label="区域"
prop="receiveAddress"
|
6ee6b0b7
杨鑫
'最新'
|
168
169
170
|
width="auto"
min-width="12%"
>
|
6ee6b0b7
杨鑫
'最新'
|
171
|
</el-table-column>
|
a6a3878d
杨鑫
最新绿道
|
172
173
174
175
176
177
178
179
180
|
<el-table-column
label="项目"
prop="productName"
width="auto"
min-width="12%"
>
</el-table-column>
<!-- <el-table-column
|
6ee6b0b7
杨鑫
'最新'
|
181
182
183
184
185
186
187
188
|
label="营业期间"
prop=""
width="auto"
min-width="12%"
>
<template slot-scope="scope">
{{scope.row.businessStartDate}}-{{scope.row.businessEndDate}}
</template>
|
a6a3878d
杨鑫
最新绿道
|
189
|
</el-table-column> -->
|
6ee6b0b7
杨鑫
'最新'
|
190
191
|
<el-table-column
label="营业额(元)"
|
a6a3878d
杨鑫
最新绿道
|
192
|
prop="price"
|
6ee6b0b7
杨鑫
'最新'
|
193
194
195
196
197
198
|
width="auto"
min-width="12%"
>
</el-table-column>
</el-table>
|
a6a3878d
杨鑫
最新绿道
|
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
<div class="fenye">
<div>共{{total}}条</div>
<el-pagination
class="pagination"
:hide-on-single-page="flag"
background
:current-page="formInline.pageNumber+1"
:page-sizes="[10, 20, 50, 100]"
:page-size="formInline.pageSize"
layout="prev, pager,next"
:total="total"
@current-change="handleCurrentChange"
/>
</div>
|
6ee6b0b7
杨鑫
'最新'
|
213
214
|
</div>
</div>
|
a6a3878d
杨鑫
最新绿道
|
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
<div style="margin-top: 20px;background-color: #fff;padding: 20px;">
<div style="display: flex;justify-content: space-between;">
<div style="width: 50%;">
<div>交易记录按区域分析</div>
<div id="jiaochart" style="width: 100%; height: 400px;"></div>
</div>
<div style="width: 50%;">
<div>交易记录按项目分析</div>
<div id="xingchart" style="width: 100%; height: 400px;"></div>
</div>
</div>
<div style="width: 50%;">
<div>
<div>交易记录按商户分析</div>
<div id="shangchart" style="width: 100%; height: 400px;"></div>
</div>
</div>
</div>
|
6ee6b0b7
杨鑫
'最新'
|
233
234
235
236
237
|
</div>
</template>
<script>
import * as echarts from 'echarts'
|
a6a3878d
杨鑫
最新绿道
|
238
|
import {aggregateQuery,consumerTrends} from '../../../api/online.js'
|
6ee6b0b7
杨鑫
'最新'
|
239
240
241
242
243
|
export default {
data() {
return {
value: new Date(),
formInline: {
|
a6a3878d
杨鑫
最新绿道
|
244
245
246
247
248
249
250
251
|
time:[],
startTime:'',
endTime:'',
receiveAddress:'',
productName:'',
shopName:'',
pageSize:10,
pageNumber:0,
|
6ee6b0b7
杨鑫
'最新'
|
252
253
254
255
|
},
fut: true,
lvdaoList:[],
tableData: [],
|
a6a3878d
杨鑫
最新绿道
|
256
257
258
259
260
261
|
total:0,
flag:false,
// pageindex: {
// pageSize:10,
// pageNumber:0,
// },
|
6ee6b0b7
杨鑫
'最新'
|
262
263
264
265
266
267
|
}
},
mounted() {
this.getAll()
// this.max()
// this.min()
|
8550d958
杨鑫
'最新'
|
268
|
|
6ee6b0b7
杨鑫
'最新'
|
269
270
|
},
methods: {
|
a6a3878d
杨鑫
最新绿道
|
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
|
onSubmit(){
if(this.formInline.time.length!=0){
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
}
this.getAll()
},
resetting(){
this.formInline = {
time:[],
startTime:'',
endTime:'',
receiveAddress:'',
productName:'',
shopName:'',
pageSize:10,
pageNumber:0,
}
this.getAll()
},
|
6ee6b0b7
杨鑫
'最新'
|
291
|
async getAll(){
|
a6a3878d
杨鑫
最新绿道
|
292
293
294
295
296
297
|
const res= await aggregateQuery(this.formInline)
this.tableData = res.data.content
this.total = res.data.totalElements // this.tong(res.data)
this.initChartOne(res.data.content)
this.initChartTwo(res.data.content)
this.initChartThree(res.data.content)
|
6ee6b0b7
杨鑫
'最新'
|
298
299
300
301
|
},
toggleFilter() {
this.fut = !this.fut
},
|
a6a3878d
杨鑫
最新绿道
|
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
|
handleCurrentChange(val){
this.formInline.pageNumber = val
this.getAll()
},
initChartOne(dataSource) {
// 初始化 echarts 实例
const myChart = echarts.init(document.getElementById('jiaochart'));
// 从数据源中提取 X 轴和 Y 轴数据
const xData = dataSource.map(item => item.receiveAddress);
const yData = dataSource.map(item => item.price);
// 配置项
const option = {
xAxis: {
type: 'category',
data: xData
},
yAxis: {
type: 'value'
},
series: [
{
data: yData,
type: 'bar',
color:'#3F9B6A'
}
]
};
// 使用配置项显示图表
myChart.setOption(option);
},
initChartTwo(dataSource) {
// 初始化 echarts 实例
const myChart = echarts.init(document.getElementById('xingchart'));
// 从数据源中提取 X 轴和 Y 轴数据
const xData = dataSource.map(item => item.productName);
const yData = dataSource.map(item => item.price);
// 配置项
const option = {
xAxis: {
type: 'category',
data: xData
},
yAxis: {
type: 'value'
},
series: [
{
data: yData,
type: 'bar',
color:'#3F9B6A'
}
]
};
// 使用配置项显示图表
myChart.setOption(option);
},
initChartThree(dataSource) {
// 初始化 echarts 实例
const myChart = echarts.init(document.getElementById('shangchart'));
const xData = dataSource.map(item => item.shopName);
const yData = dataSource.map(item => item.price);
// 配置项
const option = {
xAxis: {
type: 'category',
data: xData
},
yAxis: {
type: 'value'
},
series: [
{
data: yData,
type: 'bar',
color:'#3F9B6A'
}
]
};
// 使用配置项显示图表
myChart.setOption(option);
},
|
8550d958
杨鑫
'最新'
|
393
394
395
|
// max() {
// var chartDom = this.$refs.maxYe
// var myChart = echarts.init(chartDom);
|
6ee6b0b7
杨鑫
'最新'
|
396
|
|
8550d958
杨鑫
'最新'
|
397
398
399
400
401
402
403
404
405
406
407
|
// const option = {
// color: ['#80FFA5'],
// tooltip: {
// trigger: 'axis',
// axisPointer: {
// type: 'cross',
// label: {
// backgroundColor: '#6a7985'
// }
// }
// },
|
6ee6b0b7
杨鑫
'最新'
|
408
|
|
8550d958
杨鑫
'最新'
|
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
|
// grid: {
// left: '0%',
// right: '4%',
// bottom: '1%',
// top: '0%',
// containLabel: true
// },
// xAxis: [{
// type: 'category',
// boundaryGap: false,
// data: [],
// axisLine: {
// show: false
// }, // 隐藏X轴线
// lineStyle: {
// width: 0 // 将线条宽度设置为0以隐藏线条
// },
// itemStyle: {
// borderWidth: 0 // 隐藏数据点的边框
// },
// }],
// yAxis: [
// {
|
6ee6b0b7
杨鑫
'最新'
|
432
|
|
8550d958
杨鑫
'最新'
|
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
|
// axisLine: { show: false }, // 隐藏Y轴线
// axisTick: { show: false }, // 隐藏Y轴刻度线
// splitLine: { show: false } ,// 隐藏Y轴分割线
// axisLabel: { show: false } // 隐藏Y轴刻度标签
// }
// ],
// series: [{
// name: 'Line 1',
// type: 'line',
// stack: 'Total',
// smooth: true,
// lineStyle: {
// width: 0
// },
// showSymbol: false,
// areaStyle: {
// opacity: 0.8,
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
// offset: 0,
// color: 'rgb(128, 255, 165)'
// },
// {
// offset: 1,
// color: 'rgb(1, 191, 236)'
// }
// ])
// },
// emphasis: {
// focus: 'series'
// },
// data: [140, 232, 101, 264, 90, 340, 250]
// }]
// }
// option && myChart.setOption(option)
// },
// min() {
|
6ee6b0b7
杨鑫
'最新'
|
469
|
|
8550d958
杨鑫
'最新'
|
470
471
|
// var chartDom = this.$refs.minYe
// var myChart = echarts.init(chartDom);
|
6ee6b0b7
杨鑫
'最新'
|
472
|
|
8550d958
杨鑫
'最新'
|
473
474
475
476
477
478
479
480
481
482
483
|
// const option = {
// color: ['#80FFA5'],
// tooltip: {
// trigger: 'axis',
// axisPointer: {
// type: 'cross',
// label: {
// backgroundColor: '#6a7985'
// }
// }
// },
|
6ee6b0b7
杨鑫
'最新'
|
484
|
|
8550d958
杨鑫
'最新'
|
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
|
// grid: {
// left: '0%',
// right: '4%',
// bottom: '1%',
// top: '0%',
// containLabel: true
// },
// xAxis: [{
// type: 'category',
// boundaryGap: false,
// data: [],
// axisLine: {
// show: false
// }, // 隐藏X轴线
// lineStyle: {
// width: 0 // 将线条宽度设置为0以隐藏线条
// },
// itemStyle: {
// borderWidth: 0 // 隐藏数据点的边框
// },
// }],
// yAxis: [
// {
|
6ee6b0b7
杨鑫
'最新'
|
508
|
|
8550d958
杨鑫
'最新'
|
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
|
// axisLine: { show: false }, // 隐藏Y轴线
// axisTick: { show: false }, // 隐藏Y轴刻度线
// splitLine: { show: false } ,// 隐藏Y轴分割线
// axisLabel: { show: false } // 隐藏Y轴刻度标签
// }
// ],
// series: [{
// name: 'Line 1',
// type: 'line',
// stack: 'Total',
// smooth: true,
// lineStyle: {
// width: 0
// },
// showSymbol: false,
// areaStyle: {
// opacity: 0.8,
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
// offset: 0,
// color: 'rgb(128, 255, 165)'
// },
// {
// offset: 1,
// color: 'rgb(1, 191, 236)'
// }
// ])
// },
// emphasis: {
// focus: 'series'
// },
// data: [140, 232, 101, 264, 90, 340, 250]
// }]
// }
// option && myChart.setOption(option)
|
6ee6b0b7
杨鑫
'最新'
|
543
|
|
8550d958
杨鑫
'最新'
|
544
545
|
// },
tong(datas){
|
6ee6b0b7
杨鑫
'最新'
|
546
547
|
var chartDom = this.$refs.tongji
var myChart = echarts.init(chartDom);
|
8550d958
杨鑫
'最新'
|
548
549
550
551
|
let processedData = datas.map(item => ({
name: item.shopName,
value: item.earnestMoney || 0
}))
|
6ee6b0b7
杨鑫
'最新'
|
552
553
554
555
556
557
558
559
560
561
|
const option = {
grid: { // 图表距离边框的距离,可用百分比和数字(px)配置
top: '5%',
left: '3%',
right: '10%',
bottom: '5%',
containLabel: true
},
xAxis: {
|
6ee6b0b7
杨鑫
'最新'
|
562
|
type: 'category',
|
8550d958
杨鑫
'最新'
|
563
|
data:processedData.map(item => item.name),
|
6ee6b0b7
杨鑫
'最新'
|
564
565
566
567
568
|
},
yAxis: {
type: 'value',
min:0, // 配置 Y 轴刻度最小值
|
6ee6b0b7
杨鑫
'最新'
|
569
570
571
572
573
|
splitNumber:5, // 配置 Y 轴数值间隔
},
series: [
{
|
8550d958
杨鑫
'最新'
|
574
575
|
data:processedData.map(item => item.value),
|
6ee6b0b7
杨鑫
'最新'
|
576
577
578
579
580
581
582
583
|
type: 'line',
symbol: 'circle', // 实心圆点
smooth: 0.5, // 设置折线弧度
}
],
color: ['#3366CC'] // 三个折线的颜色
}
option && myChart.setOption(option)
|
8550d958
杨鑫
'最新'
|
584
|
},
|
8550d958
杨鑫
'最新'
|
585
|
|
a6a3878d
杨鑫
最新绿道
|
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
|
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总计';
return;
}
if (['营业额(元)'].includes(column.label)) {
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
} else {
sums[index] = '';
}
});
return sums;
},
|
6ee6b0b7
杨鑫
'最新'
|
615
616
617
618
619
|
}
}
</script>
<style lang="scss" scoped>
|
a6a3878d
杨鑫
最新绿道
|
620
621
622
623
624
|
.fenye {
margin-top: 20px;
display: flex;
justify-content: space-between;
}
|
6ee6b0b7
杨鑫
'最新'
|
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
|
.filter-container {
border: 1px solid #EBEEF5;
}
.formSearch {
max-height: 200px;
/* 或者你想要的任何高度 */
/* 过渡效果 */
transition: height 0.3s ease-in-out;
/* 动画的持续时间、类型 */
overflow: hidden;
/* 隐藏溢出的内容,这样高度变化时内容不会显示出来 */
}
.collapsed {
margin-top: 0px;
height: 0;
transition: height 0.3s ease-in-out;
/* 动画的持续时间、类型 */
overflow: hidden;
/* 隐藏溢出的内容,这样高度变化时内容不会显示出来 */
}
|
a6a3878d
杨鑫
最新绿道
|
649
650
651
652
|
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active{
background-color: #3F9B6A;
}
|
6ee6b0b7
杨鑫
'最新'
|
653
|
</style>
|