|
@@ -20,6 +20,7 @@
|
20
|
20
|
</div>
|
21
|
21
|
</el-col>
|
22
|
22
|
</el-row>
|
|
23
|
+ <select-building></select-building>
|
23
|
24
|
<p class="title under-line" @click="toUserSource()">用户来源</p>
|
24
|
25
|
<span class="title-desc under-line" @click="toUserSource()">最近7天</span>
|
25
|
26
|
<el-row :gutter="20" :style="{ height: '560px',margin:'20px 0',border:'1px solid #eee',borderRadius:'5px'}">
|
|
@@ -34,11 +35,11 @@
|
34
|
35
|
</el-row>
|
35
|
36
|
<p class="title under-line" @click="toBehaviorAnalysis()">用户行为</p>
|
36
|
37
|
<span class="title-desc under-line" @click="toBehaviorAnalysis()">最近7天</span>
|
37
|
|
- <div class="grid-content" ref="thirdChart" id="thirdChart" :style="{ height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" ></div>
|
38
|
|
- <el-row :gutter="20">
|
|
38
|
+ <!-- <div class="grid-content" ref="thirdChart" id="thirdChart" :style="{ height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" ></div> -->
|
|
39
|
+ <x-line :style="{height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" :value="lineSeting"></x-line>
|
|
40
|
+ <el-row :gutter="20">
|
39
|
41
|
<el-col :span="12">
|
40
|
|
- <div class="grid-content" ref="fourthChart" id="fourthChart" :style="{ height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" >
|
41
|
|
- </div>
|
|
42
|
+ <div class="grid-content" ref="fourthChart" id="fourthChart" :style="{height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" ></div>
|
42
|
43
|
</el-col>
|
43
|
44
|
<el-col :span="12">
|
44
|
45
|
<div class="grid-content" ref="fifthChart" id="fifthChart" :style="{ height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" >
|
|
@@ -56,7 +57,7 @@
|
56
|
57
|
<p class="title under-line" @click="toNewUsers()">新增用户</p>
|
57
|
58
|
<span class="title-desc under-line" @click="toNewUsers()">最近7天</span>
|
58
|
59
|
<el-table :data="tableData" border center style="width: 100%">
|
59
|
|
- <el-table-column label=date prop="name" ></el-table-column>
|
|
60
|
+ <el-table-column v-for="(item, index) in tableTitle" :key="index" :label="item" :prop="index == 0 ? 'label': item"></el-table-column>
|
60
|
61
|
</el-table>
|
61
|
62
|
<p class="title">意向客户</p>
|
62
|
63
|
<el-table :data="tableData2" border center style="width: 100%">
|
|
@@ -79,54 +80,25 @@ const {
|
79
|
80
|
} = createNamespacedHelpers("indexEcharts");
|
80
|
81
|
|
81
|
82
|
export default {
|
82
|
|
- components: {},
|
|
83
|
+ components: {
|
|
84
|
+ XLine: () => import('@/components/charts/XLine.vue'),
|
|
85
|
+ },
|
83
|
86
|
data() {
|
84
|
87
|
return {
|
|
88
|
+ // 新增用户
|
85
|
89
|
tableData: [
|
86
|
|
- {
|
87
|
|
- date: "2016-05-02",
|
88
|
|
- name: "15"
|
89
|
|
- },
|
90
|
|
- {
|
91
|
|
- date: "2016-05-04",
|
92
|
|
- name: "16"
|
93
|
|
- },
|
94
|
|
- {
|
95
|
|
- date: "2016-05-01",
|
96
|
|
- name: "17"
|
97
|
|
- },
|
98
|
|
- {
|
99
|
|
- date: "2016-05-03",
|
100
|
|
- name: "18"
|
101
|
|
- }
|
|
90
|
+ { label: '新增用户', },
|
|
91
|
+ { label: '授权注册', }
|
102
|
92
|
],
|
103
|
|
- tableData2: [
|
104
|
|
- {
|
105
|
|
- num: "98",
|
106
|
|
- name: "王晓红",
|
107
|
|
- phone: "15742389456",
|
108
|
|
- building: "香颂.蔚澜半岛"
|
109
|
|
- },
|
110
|
|
- {
|
111
|
|
- num: "99",
|
112
|
|
- name: "王晓红2",
|
113
|
|
- phone: "15742389456",
|
114
|
|
- building: "香颂.蔚澜半岛"
|
|
93
|
+ tableTitle: [ '类型' ],
|
|
94
|
+ tableData2: [ ],
|
|
95
|
+ userBehavior: [], // 用户行为
|
|
96
|
+ lineSeting: {
|
|
97
|
+ dataset: {
|
|
98
|
+ dimensions: ['date', 'activity', 'activityCount'],
|
|
99
|
+ source: [],
|
115
|
100
|
},
|
116
|
|
- {
|
117
|
|
- num: "88",
|
118
|
|
- name: "王晓红3",
|
119
|
|
- phone: "15742389456",
|
120
|
|
- building: "香颂.蔚澜半岛"
|
121
|
|
- },
|
122
|
|
- {
|
123
|
|
- num: "94",
|
124
|
|
- name: "王晓红4",
|
125
|
|
- phone: "15742389456",
|
126
|
|
- building: "香颂.蔚澜半岛"
|
127
|
|
- }
|
128
|
|
- ],
|
129
|
|
- userBehavior: [] // 用户行为
|
|
101
|
+ },
|
130
|
102
|
};
|
131
|
103
|
},
|
132
|
104
|
computed: {
|
|
@@ -138,7 +110,25 @@ export default {
|
138
|
110
|
...mapIndexEchartsActions(["getIndexEcharts", "setDetailNull"]),
|
139
|
111
|
initPage() {
|
140
|
112
|
this.setDetailNull();
|
141
|
|
- this.getIndexEcharts();
|
|
113
|
+ this.getIndexEcharts().then(x => {
|
|
114
|
+ this.lineSeting.dataset.source = this.echartsInfo.selectUserBehavior
|
|
115
|
+ const data = this.echartsInfo.selectNewsUserCount
|
|
116
|
+ this.tableData = (data || []).reduce((acc, item, index) => {
|
|
117
|
+ const { date, userCount, authorizationCount } = item
|
|
118
|
+ const row2 = {
|
|
119
|
+ ...acc[0],
|
|
120
|
+ [`${date}`]: userCount,
|
|
121
|
+ }
|
|
122
|
+ const row3 = {
|
|
123
|
+ ...acc[1],
|
|
124
|
+ [`${date}`]: authorizationCount,
|
|
125
|
+ }
|
|
126
|
+
|
|
127
|
+ this.tableTitle = this.tableTitle.concat(`${date}`)
|
|
128
|
+
|
|
129
|
+ return [row2, row3];
|
|
130
|
+ }, this.tableData)
|
|
131
|
+ });;
|
142
|
132
|
},
|
143
|
133
|
toNewUsers() {
|
144
|
134
|
this.$router.push({ name: "newUsers" });
|
|
@@ -166,7 +156,7 @@ export default {
|
166
|
156
|
};
|
167
|
157
|
// 绘制图表
|
168
|
158
|
firstChart.setOption({
|
169
|
|
- color: ["#ff580f", "#ffb400"],
|
|
159
|
+ color: ["#3688f8", "#7974ce"],
|
170
|
160
|
backgroundColor: "#fff",
|
171
|
161
|
tooltip: {
|
172
|
162
|
trigger: "axis"
|
|
@@ -244,6 +234,7 @@ export default {
|
244
|
234
|
let secondChart = Echarts.init(this.$refs.secondChart);
|
245
|
235
|
// 绘制图表
|
246
|
236
|
secondChart.setOption({
|
|
237
|
+ color: ["#7974ce","#f5749d","#3688f8"],
|
247
|
238
|
tooltip: {
|
248
|
239
|
trigger: "item",
|
249
|
240
|
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
|
@@ -255,15 +246,15 @@ export default {
|
255
|
246
|
},
|
256
|
247
|
series: [
|
257
|
248
|
{
|
258
|
|
- name: "访问来源",
|
|
249
|
+ name: "用户来源",
|
259
|
250
|
type: "pie",
|
260
|
251
|
radius: "55%",
|
261
|
252
|
center: ["50%", "60%"],
|
262
|
|
- label: {
|
263
|
|
- normal: {
|
264
|
|
- position: "inner"
|
265
|
|
- }
|
266
|
|
- },
|
|
253
|
+ // label: {
|
|
254
|
+ // normal: {
|
|
255
|
+ // position: "inner"
|
|
256
|
+ // }
|
|
257
|
+ // },
|
267
|
258
|
data: [
|
268
|
259
|
{ value: 15, name: "自主进入" },
|
269
|
260
|
{ value: 30, name: "来源全民经纪人" },
|
|
@@ -280,73 +271,73 @@ export default {
|
280
|
271
|
]
|
281
|
272
|
});
|
282
|
273
|
// 折线图
|
283
|
|
- let thirdChart = Echarts.init(this.$refs.thirdChart);
|
|
274
|
+ // let thirdChart = Echarts.init(this.$refs.thirdChart);
|
284
|
275
|
// 绘制图表
|
285
|
|
- thirdChart.setOption({
|
286
|
|
- title: {
|
287
|
|
- text: "访问人数"
|
288
|
|
- },
|
289
|
|
- color: ["#000", "green", "#5793f3", "#d14a61", "#241bba", "orange"],
|
290
|
|
- tooltip: {
|
291
|
|
- trigger: "axis"
|
292
|
|
- },
|
293
|
|
- legend: {
|
294
|
|
- data: ["首页", "项目", "咨询", "名片", "活动", "资讯"]
|
295
|
|
- },
|
296
|
|
- grid: {
|
297
|
|
- left: "3%",
|
298
|
|
- right: "4%",
|
299
|
|
- bottom: "3%",
|
300
|
|
- containLabel: true
|
301
|
|
- },
|
302
|
|
- toolbox: {},
|
303
|
|
- xAxis: {
|
304
|
|
- type: "category",
|
305
|
|
- boundaryGap: false,
|
306
|
|
- data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
307
|
|
- },
|
308
|
|
- yAxis: {
|
309
|
|
- type: "value"
|
310
|
|
- },
|
311
|
|
- series: [
|
312
|
|
- {
|
313
|
|
- name: "首页",
|
314
|
|
- type: "line",
|
315
|
|
- stack: "1",
|
316
|
|
- data: []
|
317
|
|
- },
|
318
|
|
- {
|
319
|
|
- name: "项目",
|
320
|
|
- type: "line",
|
321
|
|
- stack: "2",
|
322
|
|
- data: [220, 182, 191, 234, 290, 330, 310]
|
323
|
|
- },
|
324
|
|
- {
|
325
|
|
- name: "咨询",
|
326
|
|
- type: "line",
|
327
|
|
- stack: "3",
|
328
|
|
- data: [150, 232, 201, 154, 190, 330, 410]
|
329
|
|
- },
|
330
|
|
- {
|
331
|
|
- name: "名片",
|
332
|
|
- type: "line",
|
333
|
|
- stack: "4",
|
334
|
|
- data: [320, 332, 301, 334, 390, 330, 320]
|
335
|
|
- },
|
336
|
|
- {
|
337
|
|
- name: "活动",
|
338
|
|
- type: "line",
|
339
|
|
- stack: "5",
|
340
|
|
- data: [820, 932, 901, 544, 1290, 1330, 1320]
|
341
|
|
- },
|
342
|
|
- {
|
343
|
|
- name: "资讯",
|
344
|
|
- type: "line",
|
345
|
|
- stack: "6",
|
346
|
|
- data: [400, 500, 201, 934, 1290, 1423, 777]
|
347
|
|
- }
|
348
|
|
- ]
|
349
|
|
- });
|
|
276
|
+ // thirdChart.setOption({
|
|
277
|
+ // title: {
|
|
278
|
+ // text: "访问人数"
|
|
279
|
+ // },
|
|
280
|
+ // color: ["#ed3a3d", "#e613d2", "#2ed9f7", "#0ab662", "#165cf8", "#8854b9"],
|
|
281
|
+ // tooltip: {
|
|
282
|
+ // trigger: "axis"
|
|
283
|
+ // },
|
|
284
|
+ // legend: {
|
|
285
|
+ // data: ["首页", "项目", "咨询", "名片", "活动", "资讯"]
|
|
286
|
+ // },
|
|
287
|
+ // grid: {
|
|
288
|
+ // left: "3%",
|
|
289
|
+ // right: "4%",
|
|
290
|
+ // bottom: "3%",
|
|
291
|
+ // containLabel: true
|
|
292
|
+ // },
|
|
293
|
+ // toolbox: {},
|
|
294
|
+ // xAxis: {
|
|
295
|
+ // type: "category",
|
|
296
|
+ // boundaryGap: false,
|
|
297
|
+ // data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
|
298
|
+ // },
|
|
299
|
+ // yAxis: {
|
|
300
|
+ // type: "value"
|
|
301
|
+ // },
|
|
302
|
+ // series: [
|
|
303
|
+ // {
|
|
304
|
+ // name: "首页",
|
|
305
|
+ // type: "line",
|
|
306
|
+ // stack: "1",
|
|
307
|
+ // data: []
|
|
308
|
+ // },
|
|
309
|
+ // {
|
|
310
|
+ // name: "项目",
|
|
311
|
+ // type: "line",
|
|
312
|
+ // stack: "2",
|
|
313
|
+ // data: [220, 182, 191, 234, 290, 330, 310]
|
|
314
|
+ // },
|
|
315
|
+ // {
|
|
316
|
+ // name: "咨询",
|
|
317
|
+ // type: "line",
|
|
318
|
+ // stack: "3",
|
|
319
|
+ // data: [150, 232, 201, 154, 190, 330, 410]
|
|
320
|
+ // },
|
|
321
|
+ // {
|
|
322
|
+ // name: "名片",
|
|
323
|
+ // type: "line",
|
|
324
|
+ // stack: "4",
|
|
325
|
+ // data: [320, 332, 301, 334, 390, 330, 320]
|
|
326
|
+ // },
|
|
327
|
+ // {
|
|
328
|
+ // name: "活动",
|
|
329
|
+ // type: "line",
|
|
330
|
+ // stack: "5",
|
|
331
|
+ // data: [820, 932, 901, 544, 1290, 1330, 1320]
|
|
332
|
+ // },
|
|
333
|
+ // {
|
|
334
|
+ // name: "资讯",
|
|
335
|
+ // type: "line",
|
|
336
|
+ // stack: "6",
|
|
337
|
+ // data: [400, 500, 201, 934, 1290, 1423, 777]
|
|
338
|
+ // }
|
|
339
|
+ // ]
|
|
340
|
+ // });
|
350
|
341
|
// 柱状图
|
351
|
342
|
let fourthChart = Echarts.init(this.$refs.fourthChart);
|
352
|
343
|
// 绘制图表
|
|
@@ -366,7 +357,7 @@ export default {
|
366
|
357
|
title: {
|
367
|
358
|
text: "活跃用户数"
|
368
|
359
|
},
|
369
|
|
- color: ["#3398DB"],
|
|
360
|
+ color: ["#7571cf"],
|
370
|
361
|
tooltip: {
|
371
|
362
|
trigger: "axis",
|
372
|
363
|
axisPointer: {
|
|
@@ -410,6 +401,7 @@ export default {
|
410
|
401
|
title: {
|
411
|
402
|
text: "转化率"
|
412
|
403
|
},
|
|
404
|
+ color:["#6a96f7","#f5749d"],
|
413
|
405
|
tooltip: {
|
414
|
406
|
trigger: "item",
|
415
|
407
|
formatter: "{a} <br/>{b}: {c} ({d}%)"
|
|
@@ -421,9 +413,9 @@ export default {
|
421
|
413
|
},
|
422
|
414
|
series: [
|
423
|
415
|
{
|
424
|
|
- name: "访问来源",
|
|
416
|
+ name: "转化率",
|
425
|
417
|
type: "pie",
|
426
|
|
- radius: ["50%", "70%"],
|
|
418
|
+ radius: ["40%", "56%"],
|
427
|
419
|
avoidLabelOverlap: false,
|
428
|
420
|
label: {
|
429
|
421
|
normal: {
|
|
@@ -452,6 +444,7 @@ export default {
|
452
|
444
|
title: {
|
453
|
445
|
text: "性别比例"
|
454
|
446
|
},
|
|
447
|
+ color:["#6a96f7","#f5749d"],
|
455
|
448
|
tooltip: {
|
456
|
449
|
trigger: "item",
|
457
|
450
|
formatter: "{a} <br/>{b}: {c} ({d}%)"
|
|
@@ -463,9 +456,9 @@ export default {
|
463
|
456
|
},
|
464
|
457
|
series: [
|
465
|
458
|
{
|
466
|
|
- name: "访问来源",
|
|
459
|
+ name: "性别比例",
|
467
|
460
|
type: "pie",
|
468
|
|
- radius: ["50%", "70%"],
|
|
461
|
+ radius: ["40%", "56%"],
|
469
|
462
|
avoidLabelOverlap: false,
|
470
|
463
|
label: {
|
471
|
464
|
normal: {
|
|
@@ -507,15 +500,15 @@ export default {
|
507
|
500
|
},
|
508
|
501
|
series: [
|
509
|
502
|
{
|
510
|
|
- name: "访问来源",
|
|
503
|
+ name: "城市分布",
|
511
|
504
|
type: "pie",
|
512
|
505
|
radius: "55%",
|
513
|
506
|
center: ["50%", "60%"],
|
514
|
|
- label: {
|
515
|
|
- normal: {
|
516
|
|
- position: "inner"
|
517
|
|
- }
|
518
|
|
- },
|
|
507
|
+ // label: {
|
|
508
|
+ // normal: {
|
|
509
|
+ // position: "inner"
|
|
510
|
+ // }
|
|
511
|
+ // },
|
519
|
512
|
data: [
|
520
|
513
|
{ value: 21, name: "合肥" },
|
521
|
514
|
{ value: 90, name: "南京" },
|