|
@@ -34,11 +34,11 @@
|
34
|
34
|
</el-row>
|
35
|
35
|
<p class="title under-line" @click="toBehaviorAnalysis()">用户行为</p>
|
36
|
36
|
<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">
|
|
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
|
+ <x-line :style="{height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" :value="lineSeting"></x-line>
|
|
39
|
+ <el-row :gutter="20">
|
39
|
40
|
<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>
|
|
41
|
+ <div class="grid-content" ref="fourthChart" id="fourthChart" :style="{height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" ></div>
|
42
|
42
|
</el-col>
|
43
|
43
|
<el-col :span="12">
|
44
|
44
|
<div class="grid-content" ref="fifthChart" id="fifthChart" :style="{ height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" >
|
|
@@ -79,7 +79,9 @@ const {
|
79
|
79
|
} = createNamespacedHelpers("indexEcharts");
|
80
|
80
|
|
81
|
81
|
export default {
|
82
|
|
- components: {},
|
|
82
|
+ components: {
|
|
83
|
+ XLine: () => import('@/components/charts/XLine.vue'),
|
|
84
|
+ },
|
83
|
85
|
data() {
|
84
|
86
|
return {
|
85
|
87
|
// 新增用户
|
|
@@ -88,33 +90,14 @@ export default {
|
88
|
90
|
{ label: '授权注册', }
|
89
|
91
|
],
|
90
|
92
|
tableTitle: [ '类型' ],
|
91
|
|
- tableData2: [
|
92
|
|
- {
|
93
|
|
- num: "98",
|
94
|
|
- name: "王晓红",
|
95
|
|
- phone: "15742389456",
|
96
|
|
- building: "香颂.蔚澜半岛"
|
97
|
|
- },
|
98
|
|
- {
|
99
|
|
- num: "99",
|
100
|
|
- name: "王晓红2",
|
101
|
|
- phone: "15742389456",
|
102
|
|
- building: "香颂.蔚澜半岛"
|
|
93
|
+ tableData2: [ ],
|
|
94
|
+ userBehavior: [], // 用户行为
|
|
95
|
+ lineSeting: {
|
|
96
|
+ dataset: {
|
|
97
|
+ dimensions: ['date', 'activity', 'activityCount'],
|
|
98
|
+ source: [],
|
103
|
99
|
},
|
104
|
|
- {
|
105
|
|
- num: "88",
|
106
|
|
- name: "王晓红3",
|
107
|
|
- phone: "15742389456",
|
108
|
|
- building: "香颂.蔚澜半岛"
|
109
|
|
- },
|
110
|
|
- {
|
111
|
|
- num: "94",
|
112
|
|
- name: "王晓红4",
|
113
|
|
- phone: "15742389456",
|
114
|
|
- building: "香颂.蔚澜半岛"
|
115
|
|
- }
|
116
|
|
- ],
|
117
|
|
- userBehavior: [] // 用户行为
|
|
100
|
+ },
|
118
|
101
|
};
|
119
|
102
|
},
|
120
|
103
|
computed: {
|
|
@@ -127,8 +110,8 @@ export default {
|
127
|
110
|
initPage() {
|
128
|
111
|
this.setDetailNull();
|
129
|
112
|
this.getIndexEcharts().then(x => {
|
|
113
|
+ this.lineSeting.dataset.source = this.echartsInfo.selectUserBehavior
|
130
|
114
|
const data = this.echartsInfo.selectNewsUserCount
|
131
|
|
- // this.lineSeting.dataset.source = data
|
132
|
115
|
this.tableData = (data || []).reduce((acc, item, index) => {
|
133
|
116
|
const { date, userCount, authorizationCount } = item
|
134
|
117
|
const row2 = {
|
|
@@ -172,7 +155,7 @@ export default {
|
172
|
155
|
};
|
173
|
156
|
// 绘制图表
|
174
|
157
|
firstChart.setOption({
|
175
|
|
- color: ["#ff580f", "#ffb400"],
|
|
158
|
+ color: ["#3688f8", "#7974ce"],
|
176
|
159
|
backgroundColor: "#fff",
|
177
|
160
|
tooltip: {
|
178
|
161
|
trigger: "axis"
|
|
@@ -250,6 +233,7 @@ export default {
|
250
|
233
|
let secondChart = Echarts.init(this.$refs.secondChart);
|
251
|
234
|
// 绘制图表
|
252
|
235
|
secondChart.setOption({
|
|
236
|
+ color: ["#7974ce","#f5749d","#3688f8"],
|
253
|
237
|
tooltip: {
|
254
|
238
|
trigger: "item",
|
255
|
239
|
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
|
@@ -286,73 +270,73 @@ export default {
|
286
|
270
|
]
|
287
|
271
|
});
|
288
|
272
|
// 折线图
|
289
|
|
- let thirdChart = Echarts.init(this.$refs.thirdChart);
|
|
273
|
+ // let thirdChart = Echarts.init(this.$refs.thirdChart);
|
290
|
274
|
// 绘制图表
|
291
|
|
- thirdChart.setOption({
|
292
|
|
- title: {
|
293
|
|
- text: "访问人数"
|
294
|
|
- },
|
295
|
|
- color: ["#000", "green", "#5793f3", "#d14a61", "#241bba", "orange"],
|
296
|
|
- tooltip: {
|
297
|
|
- trigger: "axis"
|
298
|
|
- },
|
299
|
|
- legend: {
|
300
|
|
- data: ["首页", "项目", "咨询", "名片", "活动", "资讯"]
|
301
|
|
- },
|
302
|
|
- grid: {
|
303
|
|
- left: "3%",
|
304
|
|
- right: "4%",
|
305
|
|
- bottom: "3%",
|
306
|
|
- containLabel: true
|
307
|
|
- },
|
308
|
|
- toolbox: {},
|
309
|
|
- xAxis: {
|
310
|
|
- type: "category",
|
311
|
|
- boundaryGap: false,
|
312
|
|
- data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
313
|
|
- },
|
314
|
|
- yAxis: {
|
315
|
|
- type: "value"
|
316
|
|
- },
|
317
|
|
- series: [
|
318
|
|
- {
|
319
|
|
- name: "首页",
|
320
|
|
- type: "line",
|
321
|
|
- stack: "1",
|
322
|
|
- data: []
|
323
|
|
- },
|
324
|
|
- {
|
325
|
|
- name: "项目",
|
326
|
|
- type: "line",
|
327
|
|
- stack: "2",
|
328
|
|
- data: [220, 182, 191, 234, 290, 330, 310]
|
329
|
|
- },
|
330
|
|
- {
|
331
|
|
- name: "咨询",
|
332
|
|
- type: "line",
|
333
|
|
- stack: "3",
|
334
|
|
- data: [150, 232, 201, 154, 190, 330, 410]
|
335
|
|
- },
|
336
|
|
- {
|
337
|
|
- name: "名片",
|
338
|
|
- type: "line",
|
339
|
|
- stack: "4",
|
340
|
|
- data: [320, 332, 301, 334, 390, 330, 320]
|
341
|
|
- },
|
342
|
|
- {
|
343
|
|
- name: "活动",
|
344
|
|
- type: "line",
|
345
|
|
- stack: "5",
|
346
|
|
- data: [820, 932, 901, 544, 1290, 1330, 1320]
|
347
|
|
- },
|
348
|
|
- {
|
349
|
|
- name: "资讯",
|
350
|
|
- type: "line",
|
351
|
|
- stack: "6",
|
352
|
|
- data: [400, 500, 201, 934, 1290, 1423, 777]
|
353
|
|
- }
|
354
|
|
- ]
|
355
|
|
- });
|
|
275
|
+ // thirdChart.setOption({
|
|
276
|
+ // title: {
|
|
277
|
+ // text: "访问人数"
|
|
278
|
+ // },
|
|
279
|
+ // color: ["#ed3a3d", "#e613d2", "#2ed9f7", "#0ab662", "#165cf8", "#8854b9"],
|
|
280
|
+ // tooltip: {
|
|
281
|
+ // trigger: "axis"
|
|
282
|
+ // },
|
|
283
|
+ // legend: {
|
|
284
|
+ // data: ["首页", "项目", "咨询", "名片", "活动", "资讯"]
|
|
285
|
+ // },
|
|
286
|
+ // grid: {
|
|
287
|
+ // left: "3%",
|
|
288
|
+ // right: "4%",
|
|
289
|
+ // bottom: "3%",
|
|
290
|
+ // containLabel: true
|
|
291
|
+ // },
|
|
292
|
+ // toolbox: {},
|
|
293
|
+ // xAxis: {
|
|
294
|
+ // type: "category",
|
|
295
|
+ // boundaryGap: false,
|
|
296
|
+ // data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
|
297
|
+ // },
|
|
298
|
+ // yAxis: {
|
|
299
|
+ // type: "value"
|
|
300
|
+ // },
|
|
301
|
+ // series: [
|
|
302
|
+ // {
|
|
303
|
+ // name: "首页",
|
|
304
|
+ // type: "line",
|
|
305
|
+ // stack: "1",
|
|
306
|
+ // data: []
|
|
307
|
+ // },
|
|
308
|
+ // {
|
|
309
|
+ // name: "项目",
|
|
310
|
+ // type: "line",
|
|
311
|
+ // stack: "2",
|
|
312
|
+ // data: [220, 182, 191, 234, 290, 330, 310]
|
|
313
|
+ // },
|
|
314
|
+ // {
|
|
315
|
+ // name: "咨询",
|
|
316
|
+ // type: "line",
|
|
317
|
+ // stack: "3",
|
|
318
|
+ // data: [150, 232, 201, 154, 190, 330, 410]
|
|
319
|
+ // },
|
|
320
|
+ // {
|
|
321
|
+ // name: "名片",
|
|
322
|
+ // type: "line",
|
|
323
|
+ // stack: "4",
|
|
324
|
+ // data: [320, 332, 301, 334, 390, 330, 320]
|
|
325
|
+ // },
|
|
326
|
+ // {
|
|
327
|
+ // name: "活动",
|
|
328
|
+ // type: "line",
|
|
329
|
+ // stack: "5",
|
|
330
|
+ // data: [820, 932, 901, 544, 1290, 1330, 1320]
|
|
331
|
+ // },
|
|
332
|
+ // {
|
|
333
|
+ // name: "资讯",
|
|
334
|
+ // type: "line",
|
|
335
|
+ // stack: "6",
|
|
336
|
+ // data: [400, 500, 201, 934, 1290, 1423, 777]
|
|
337
|
+ // }
|
|
338
|
+ // ]
|
|
339
|
+ // });
|
356
|
340
|
// 柱状图
|
357
|
341
|
let fourthChart = Echarts.init(this.$refs.fourthChart);
|
358
|
342
|
// 绘制图表
|
|
@@ -372,7 +356,7 @@ export default {
|
372
|
356
|
title: {
|
373
|
357
|
text: "活跃用户数"
|
374
|
358
|
},
|
375
|
|
- color: ["#3398DB"],
|
|
359
|
+ color: ["#7571cf"],
|
376
|
360
|
tooltip: {
|
377
|
361
|
trigger: "axis",
|
378
|
362
|
axisPointer: {
|
|
@@ -416,6 +400,7 @@ export default {
|
416
|
400
|
title: {
|
417
|
401
|
text: "转化率"
|
418
|
402
|
},
|
|
403
|
+ color:["#6a96f7","#f5749d"],
|
419
|
404
|
tooltip: {
|
420
|
405
|
trigger: "item",
|
421
|
406
|
formatter: "{a} <br/>{b}: {c} ({d}%)"
|
|
@@ -458,6 +443,7 @@ export default {
|
458
|
443
|
title: {
|
459
|
444
|
text: "性别比例"
|
460
|
445
|
},
|
|
446
|
+ color:["#6a96f7","#f5749d"],
|
461
|
447
|
tooltip: {
|
462
|
448
|
trigger: "item",
|
463
|
449
|
formatter: "{a} <br/>{b}: {c} ({d}%)"
|