|
@@ -11,51 +11,24 @@
|
11
|
11
|
<card label="最近7天新增" @click="toNewUsers()" class="under-line" >{{echartsInfo.selectRecentlyCount}}</card>
|
12
|
12
|
</el-col>
|
13
|
13
|
</el-row>
|
14
|
|
- <p class="title under-line" @click="toUserSource()">用户来源</p>
|
15
|
|
- <span class="title-desc under-line" @click="toUserSource()">最近7天</span>
|
16
|
|
- <el-row :gutter="20" :style="{ height: '560px',margin:'20px 0',border:'1px solid #eee',borderRadius:'5px'}">
|
17
|
|
- <el-col :span="14">
|
18
|
|
- <div class="grid-content" ref="firstChart" id="firstChart" :style="{ height: '500px' ,padding:'20px 10px'}" >
|
19
|
|
- </div>
|
20
|
|
- </el-col>
|
21
|
|
- <el-col :span="10" :style="{ height: '560px',borderLeft:'1px solid #eee'}">
|
22
|
|
- <div class="grid-content" ref="secondChart" id="secondChart" :style="{ height: '500px',padding:'20px 10px'}" >
|
23
|
|
- </div>
|
24
|
|
- </el-col>
|
25
|
|
- </el-row>
|
26
|
|
- <p class="title under-line" @click="toBehaviorAnalysis()">用户行为</p>
|
27
|
|
- <span class="title-desc under-line" @click="toBehaviorAnalysis()">最近7天</span>
|
28
|
|
- <!-- <div class="grid-content" ref="thirdChart" id="thirdChart" :style="{ height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" ></div> -->
|
29
|
|
- <x-line :style="{height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" :value="lineSeting"></x-line>
|
|
14
|
+ <user-source :value="userSourceData"></user-source>
|
|
15
|
+ <user-behavior class="marginTB" :value="userBehaviorData" @click="toBehaviorAnalysis()"></user-behavior>
|
30
|
16
|
<el-row :gutter="20">
|
31
|
17
|
<el-col :span="12">
|
32
|
|
- <div class="grid-content" ref="fourthChart" id="fourthChart" :style="{height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" ></div>
|
|
18
|
+ <user-active :value="userActiveData"></user-active>
|
33
|
19
|
</el-col>
|
34
|
20
|
<el-col :span="12">
|
35
|
|
- <div class="grid-content" ref="fifthChart" id="fifthChart" :style="{ height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" >
|
36
|
|
- </div>
|
|
21
|
+ <user-conversion></user-conversion>
|
37
|
22
|
</el-col>
|
38
|
23
|
<el-col :span="12">
|
39
|
|
- <div class="grid-content" ref="sixthChart" id="sixthChart" :style="{ height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" >
|
40
|
|
- </div>
|
|
24
|
+ <user-sex :value="userSexData"></user-sex>
|
41
|
25
|
</el-col>
|
42
|
26
|
<el-col :span="12">
|
43
|
|
- <div class="grid-content" ref="seventhChart" id="seventhChart" :style="{ height: '500px',margin:'20px 0',border:'1px solid #eee', padding:'20px',borderRadius:'5px'}" >
|
44
|
|
- </div>
|
|
27
|
+ <user-city :value="userCityData"></user-city>
|
45
|
28
|
</el-col>
|
46
|
29
|
</el-row>
|
47
|
|
- <p class="title under-line" @click="toNewUsers()">新增用户</p>
|
48
|
|
- <span class="title-desc under-line" @click="toNewUsers()">最近7天</span>
|
49
|
|
- <el-table :data="tableData" border center style="width: 100%">
|
50
|
|
- <el-table-column v-for="(item, index) in tableTitle" :key="index" :label="item" :prop="index == 0 ? 'label': item"></el-table-column>
|
51
|
|
- </el-table>
|
52
|
|
- <p class="title">意向客户</p>
|
53
|
|
- <el-table :data="tableData2" border center style="width: 100%">
|
54
|
|
- <el-table-column label="用户姓名" prop="name"></el-table-column>
|
55
|
|
- <el-table-column label="手机号" prop="phone"></el-table-column>
|
56
|
|
- <el-table-column label="意向楼盘" prop="building"></el-table-column>
|
57
|
|
- <el-table-column label="意向值" prop="num"></el-table-column>
|
58
|
|
- </el-table>
|
|
30
|
+ <new-users class="marginTB" :value="newUserData"></new-users>
|
|
31
|
+ <intentional-customers class="marginTB"></intentional-customers>
|
59
|
32
|
</div>
|
60
|
33
|
</template>
|
61
|
34
|
|
|
@@ -71,32 +44,24 @@ const {
|
71
|
44
|
|
72
|
45
|
export default {
|
73
|
46
|
components: {
|
74
|
|
- XLine: () => import('@/components/charts/XLine.vue'),
|
75
|
47
|
Card: () => import('./components/Card'),
|
|
48
|
+ UserSource: () => import('./components/UsrSRCLineAndPie'),
|
|
49
|
+ UserBehavior: () => import('./components/UserBehavior'),
|
|
50
|
+ UserActive: () => import('./components/UserActive'),
|
|
51
|
+ UserConversion: () => import('./components/UserConversion'),
|
|
52
|
+ UserSex: () => import('./components/UserSex'),
|
|
53
|
+ UserCity: () => import('./components/UserCity'),
|
|
54
|
+ NewUsers: () => import('./components/NewUsers'),
|
|
55
|
+ IntentionalCustomers: () => import('./components/IntentionalCustomers'),
|
76
|
56
|
},
|
77
|
57
|
data() {
|
78
|
58
|
return {
|
79
|
|
- // 新增用户
|
80
|
|
- tableData: [
|
81
|
|
- { label: '新增用户', },
|
82
|
|
- { label: '授权注册', }
|
83
|
|
- ],
|
84
|
|
- tableTitle: [ '类型' ],
|
85
|
|
- tableData2: [ ],
|
86
|
|
- userBehavior: [], // 用户行为
|
87
|
|
- lineSeting: {
|
88
|
|
- dataset: {
|
89
|
|
- dimensions: ['date', 'activity', 'activityCount'],
|
90
|
|
- source: [],
|
91
|
|
- },
|
92
|
|
- },
|
93
|
|
- // ---- 用户来源 start -----
|
94
|
|
- pieSecondChart: '', // 饼状图实例
|
95
|
|
- columnarSecondChart: '', // 柱状图实例
|
96
|
|
- // ---- 用户来源 end -----
|
97
|
|
- // ---- 性别 start ----
|
98
|
|
- sexSixthChart: '', // 饼状图实例
|
99
|
|
- // ---- 性别 end ------
|
|
59
|
+ userSourceData: {},
|
|
60
|
+ userBehaviorData: [],
|
|
61
|
+ userActiveData: [],
|
|
62
|
+ userSexData: [],
|
|
63
|
+ userCityData: [],
|
|
64
|
+ newUserData: [],
|
100
|
65
|
};
|
101
|
66
|
},
|
102
|
67
|
computed: {
|
|
@@ -109,35 +74,11 @@ export default {
|
109
|
74
|
initPage() {
|
110
|
75
|
this.setDetailNull();
|
111
|
76
|
this.getIndexEcharts().then(x => {
|
112
|
|
- this.lineSeting.dataset.source = this.echartsInfo.selectUserBehavior
|
113
|
|
- const data = this.echartsInfo.selectNewsUserCount
|
114
|
|
- this.tableData = (data || []).reduce((acc, item, index) => {
|
115
|
|
- const { date, userCount, authorizationCount } = item
|
116
|
|
- const row2 = {
|
117
|
|
- ...acc[0],
|
118
|
|
- [`${date}`]: userCount,
|
119
|
|
- }
|
120
|
|
- const row3 = {
|
121
|
|
- ...acc[1],
|
122
|
|
- [`${date}`]: authorizationCount,
|
123
|
|
- }
|
124
|
|
-
|
125
|
|
- this.tableTitle = this.tableTitle.concat(`${date}`)
|
126
|
|
-
|
127
|
|
- return [row2, row3];
|
128
|
|
- }, this.tableData)
|
129
|
|
-
|
130
|
|
-
|
131
|
|
- // ----- 用户来源 start -----
|
132
|
|
- console.log('selectUserSource - pie: ', x.selectUserSource.pie)
|
133
|
|
- console.log('selectUserSource - columnar: ', x.selectUserSource.columnar)
|
134
|
|
- this.selectUserSourcePie(x.selectUserSource.pie)
|
135
|
|
- this.selectUserSourceColumnar(x.selectUserSource.columnar)
|
136
|
|
- // ----- 用户来源 end --------
|
137
|
|
-
|
138
|
|
- // 用户性别
|
139
|
|
- this.sexSixthChartPie(x.selectSexUser)
|
140
|
|
-
|
|
77
|
+ this.userSourceData = x.selectUserSource
|
|
78
|
+ this.userBehaviorData = x.selectUserBehavior
|
|
79
|
+ this.userActiveData = x.selectActiveUserCount
|
|
80
|
+ this.userSexData = x.selectSexUser
|
|
81
|
+ this.newUserData = this.echartsInfo.selectNewsUserCount
|
141
|
82
|
});;
|
142
|
83
|
},
|
143
|
84
|
toNewUsers() {
|
|
@@ -149,429 +90,8 @@ export default {
|
149
|
90
|
toBehaviorAnalysis() {
|
150
|
91
|
this.$router.push({ name: "behaviorAnalysis" });
|
151
|
92
|
},
|
152
|
|
- drawLine() {
|
153
|
|
- // --- 用户来源 start -------
|
154
|
|
- // 柱状
|
155
|
|
- this.columnarSecondChart = Echarts.init(this.$refs.firstChart);
|
156
|
|
- // 饼图
|
157
|
|
- this.pieSecondChart = Echarts.init(this.$refs.secondChart);
|
158
|
|
- // --- 用户来源 start -------
|
159
|
|
-
|
160
|
|
- // --- 性别 环形图 start -------
|
161
|
|
- this.sexSixthChart = Echarts.init(this.$refs.sixthChart);
|
162
|
|
- // --- 性别 环形图 end -------
|
163
|
|
-
|
164
|
|
-
|
165
|
|
- // 折线图
|
166
|
|
- // let thirdChart = Echarts.init(this.$refs.thirdChart);
|
167
|
|
- // 绘制图表
|
168
|
|
- // thirdChart.setOption({
|
169
|
|
- // title: {
|
170
|
|
- // text: "访问人数"
|
171
|
|
- // },
|
172
|
|
- // color: ["#ed3a3d", "#e613d2", "#2ed9f7", "#0ab662", "#165cf8", "#8854b9"],
|
173
|
|
- // tooltip: {
|
174
|
|
- // trigger: "axis"
|
175
|
|
- // },
|
176
|
|
- // legend: {
|
177
|
|
- // data: ["首页", "项目", "咨询", "名片", "活动", "资讯"]
|
178
|
|
- // },
|
179
|
|
- // grid: {
|
180
|
|
- // left: "3%",
|
181
|
|
- // right: "4%",
|
182
|
|
- // bottom: "3%",
|
183
|
|
- // containLabel: true
|
184
|
|
- // },
|
185
|
|
- // toolbox: {},
|
186
|
|
- // xAxis: {
|
187
|
|
- // type: "category",
|
188
|
|
- // boundaryGap: false,
|
189
|
|
- // data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
190
|
|
- // },
|
191
|
|
- // yAxis: {
|
192
|
|
- // type: "value"
|
193
|
|
- // },
|
194
|
|
- // series: [
|
195
|
|
- // {
|
196
|
|
- // name: "首页",
|
197
|
|
- // type: "line",
|
198
|
|
- // stack: "1",
|
199
|
|
- // data: []
|
200
|
|
- // },
|
201
|
|
- // {
|
202
|
|
- // name: "项目",
|
203
|
|
- // type: "line",
|
204
|
|
- // stack: "2",
|
205
|
|
- // data: [220, 182, 191, 234, 290, 330, 310]
|
206
|
|
- // },
|
207
|
|
- // {
|
208
|
|
- // name: "咨询",
|
209
|
|
- // type: "line",
|
210
|
|
- // stack: "3",
|
211
|
|
- // data: [150, 232, 201, 154, 190, 330, 410]
|
212
|
|
- // },
|
213
|
|
- // {
|
214
|
|
- // name: "名片",
|
215
|
|
- // type: "line",
|
216
|
|
- // stack: "4",
|
217
|
|
- // data: [320, 332, 301, 334, 390, 330, 320]
|
218
|
|
- // },
|
219
|
|
- // {
|
220
|
|
- // name: "活动",
|
221
|
|
- // type: "line",
|
222
|
|
- // stack: "5",
|
223
|
|
- // data: [820, 932, 901, 544, 1290, 1330, 1320]
|
224
|
|
- // },
|
225
|
|
- // {
|
226
|
|
- // name: "资讯",
|
227
|
|
- // type: "line",
|
228
|
|
- // stack: "6",
|
229
|
|
- // data: [400, 500, 201, 934, 1290, 1423, 777]
|
230
|
|
- // }
|
231
|
|
- // ]
|
232
|
|
- // });
|
233
|
|
- // 柱状图
|
234
|
|
- let fourthChart = Echarts.init(this.$refs.fourthChart);
|
235
|
|
- // 绘制图表
|
236
|
|
- let labelOption2 = {
|
237
|
|
- normal: {
|
238
|
|
- show: true,
|
239
|
|
- position: "top",
|
240
|
|
- fontSize: 15,
|
241
|
|
- rich: {
|
242
|
|
- name: {
|
243
|
|
- textBorderColor: "#fff"
|
244
|
|
- }
|
245
|
|
- }
|
246
|
|
- }
|
247
|
|
- };
|
248
|
|
- fourthChart.setOption({
|
249
|
|
- title: {
|
250
|
|
- text: "活跃用户数"
|
251
|
|
- },
|
252
|
|
- color: ["#7571cf"],
|
253
|
|
- tooltip: {
|
254
|
|
- trigger: "axis",
|
255
|
|
- axisPointer: {
|
256
|
|
- type: "shadow"
|
257
|
|
- }
|
258
|
|
- },
|
259
|
|
- grid: {
|
260
|
|
- left: "3%",
|
261
|
|
- right: "4%",
|
262
|
|
- bottom: "3%",
|
263
|
|
- containLabel: true
|
264
|
|
- },
|
265
|
|
- xAxis: [
|
266
|
|
- {
|
267
|
|
- type: "category",
|
268
|
|
- data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
269
|
|
- axisTick: {
|
270
|
|
- alignWithLabel: true
|
271
|
|
- }
|
272
|
|
- }
|
273
|
|
- ],
|
274
|
|
- yAxis: [
|
275
|
|
- {
|
276
|
|
- type: "value"
|
277
|
|
- }
|
278
|
|
- ],
|
279
|
|
- series: [
|
280
|
|
- {
|
281
|
|
- name: "直接访问",
|
282
|
|
- type: "bar",
|
283
|
|
- barWidth: "60%",
|
284
|
|
- label: labelOption2,
|
285
|
|
- data: [10, 52, 200, 334, 390, 330, 220]
|
286
|
|
- }
|
287
|
|
- ]
|
288
|
|
- });
|
289
|
|
- // 环形图
|
290
|
|
- let fifthChart = Echarts.init(this.$refs.fifthChart);
|
291
|
|
- // 绘制图表
|
292
|
|
- fifthChart.setOption({
|
293
|
|
- title: {
|
294
|
|
- text: "转化率"
|
295
|
|
- },
|
296
|
|
- color:["#6a96f7","#f5749d"],
|
297
|
|
- tooltip: {
|
298
|
|
- trigger: "item",
|
299
|
|
- formatter: "{a} <br/>{b}: {c} ({d}%)"
|
300
|
|
- },
|
301
|
|
- legend: {
|
302
|
|
- orient: "vertical",
|
303
|
|
- x: "right",
|
304
|
|
- data: ["收藏楼盘", "查看楼盘"]
|
305
|
|
- },
|
306
|
|
- series: [
|
307
|
|
- {
|
308
|
|
- name: "转化率",
|
309
|
|
- type: "pie",
|
310
|
|
- radius: ["40%", "56%"],
|
311
|
|
- avoidLabelOverlap: false,
|
312
|
|
- label: {
|
313
|
|
- normal: {
|
314
|
|
- show: false,
|
315
|
|
- position: "center"
|
316
|
|
- },
|
317
|
|
- emphasis: {
|
318
|
|
- show: true,
|
319
|
|
- textStyle: {
|
320
|
|
- fontSize: "30",
|
321
|
|
- fontWeight: "bold"
|
322
|
|
- }
|
323
|
|
- }
|
324
|
|
- },
|
325
|
|
- data: [
|
326
|
|
- { value: 335, name: "收藏楼盘" },
|
327
|
|
- { value: 310, name: "查看楼盘" }
|
328
|
|
- ]
|
329
|
|
- }
|
330
|
|
- ]
|
331
|
|
- });
|
332
|
|
-
|
333
|
|
- // 饼图
|
334
|
|
- let seventhChart = Echarts.init(this.$refs.seventhChart);
|
335
|
|
- // 绘制图表
|
336
|
|
- seventhChart.setOption({
|
337
|
|
- title: {
|
338
|
|
- text: "城市分布"
|
339
|
|
- },
|
340
|
|
- tooltip: {
|
341
|
|
- trigger: "item",
|
342
|
|
- formatter: "{a} <br/>{b} : {c} ({d}%)"
|
343
|
|
- },
|
344
|
|
- legend: {
|
345
|
|
- orient: "vertical",
|
346
|
|
- left: "right",
|
347
|
|
- data: ["合肥", "南京", "南通"]
|
348
|
|
- },
|
349
|
|
- series: [
|
350
|
|
- {
|
351
|
|
- name: "城市分布",
|
352
|
|
- type: "pie",
|
353
|
|
- radius: "55%",
|
354
|
|
- center: ["50%", "60%"],
|
355
|
|
- // label: {
|
356
|
|
- // normal: {
|
357
|
|
- // position: "inner"
|
358
|
|
- // }
|
359
|
|
- // },
|
360
|
|
- data: [
|
361
|
|
- { value: 21, name: "合肥" },
|
362
|
|
- { value: 90, name: "南京" },
|
363
|
|
- { value: 47, name: "南通" }
|
364
|
|
- ],
|
365
|
|
- itemStyle: {
|
366
|
|
- emphasis: {
|
367
|
|
- shadowBlur: 10,
|
368
|
|
- shadowOffsetX: 0,
|
369
|
|
- shadowColor: "rgba(0, 0, 0, 0.5)"
|
370
|
|
- }
|
371
|
|
- }
|
372
|
|
- }
|
373
|
|
- ]
|
374
|
|
- });
|
375
|
|
- },
|
376
|
|
- // ---------- 用户来源 start --------------
|
377
|
|
- selectUserSourcePie (obj) { // 饼状图绘制
|
378
|
|
- // 绘制图表
|
379
|
|
- this.pieSecondChart.setOption({
|
380
|
|
- color: ["#7974ce","#f5749d","#3688f8"],
|
381
|
|
- tooltip: {
|
382
|
|
- trigger: "item",
|
383
|
|
- formatter: "{a} <br/>{b} : {c} ({d}%)"
|
384
|
|
- },
|
385
|
|
- legend: {
|
386
|
|
- orient: "vertical",
|
387
|
|
- left: "left",
|
388
|
|
- data: ["自主进入", "来源全民经纪人", "来源置业顾问"]
|
389
|
|
- },
|
390
|
|
- series: [
|
391
|
|
- {
|
392
|
|
- name: "访问来源",
|
393
|
|
- type: "pie",
|
394
|
|
- radius: "55%",
|
395
|
|
- center: ["50%", "60%"],
|
396
|
|
- // label: {
|
397
|
|
- // normal: {
|
398
|
|
- // position: "inner"
|
399
|
|
- // }
|
400
|
|
- // },
|
401
|
|
- data: [
|
402
|
|
- { value: obj.person_null, name: "自主进入" },
|
403
|
|
- { value: obj.person_estate_agent, name: "来源全民经纪人" },
|
404
|
|
- { value: obj.person_realty_consultant, name: "来源置业顾问" }
|
405
|
|
- ],
|
406
|
|
- itemStyle: {
|
407
|
|
- emphasis: {
|
408
|
|
- shadowBlur: 10,
|
409
|
|
- shadowOffsetX: 0,
|
410
|
|
- shadowColor: "rgba(0, 0, 0, 0.5)"
|
411
|
|
- }
|
412
|
|
- }
|
413
|
|
- }
|
414
|
|
- ]
|
415
|
|
- });
|
416
|
|
- },
|
417
|
|
- selectUserSourceColumnar(obj) { // 柱状图
|
418
|
|
- // 活动名称
|
419
|
|
- const fromName = []
|
420
|
|
-
|
421
|
|
- // 注册人数
|
422
|
|
- const registered = []
|
423
|
|
-
|
424
|
|
- // 注册人数
|
425
|
|
- const userCount = []
|
426
|
|
-
|
427
|
|
- obj.map((item, index) => {
|
428
|
|
- fromName.push(item.fromName)
|
429
|
|
- registered.push(item.registered)
|
430
|
|
- userCount.push(item.userCount)
|
431
|
|
- })
|
432
|
|
-
|
433
|
|
- let labelOption = {
|
434
|
|
- normal: {
|
435
|
|
- show: true,
|
436
|
|
- position: "top",
|
437
|
|
- fontSize: 15,
|
438
|
|
- rich: {
|
439
|
|
- name: {
|
440
|
|
- textBorderColor: "#fff"
|
441
|
|
- }
|
442
|
|
- }
|
443
|
|
- }
|
444
|
|
- };
|
445
|
|
- // 绘制图表
|
446
|
|
- this.columnarSecondChart.setOption({
|
447
|
|
- color: ["#3688f8", "#7974ce"],
|
448
|
|
- backgroundColor: "#fff",
|
449
|
|
- tooltip: {
|
450
|
|
- trigger: "axis"
|
451
|
|
- },
|
452
|
|
- toolbox: {
|
453
|
|
- show: false,
|
454
|
|
- feature: {
|
455
|
|
- mark: { show: true },
|
456
|
|
- dataView: { show: true, readOnly: false },
|
457
|
|
- magicType: { show: true, type: ["bar"] },
|
458
|
|
- restore: { show: true },
|
459
|
|
- saveAsImage: { show: true }
|
460
|
|
- }
|
461
|
|
- },
|
462
|
|
- calculable: true,
|
463
|
|
- legend: {
|
464
|
|
- data: ["所有用户", "注册用户"]
|
465
|
|
- },
|
466
|
|
- xAxis: [
|
467
|
|
- {
|
468
|
|
- type: "category",
|
469
|
|
- axisLabel: {
|
470
|
|
- interval: 0,
|
471
|
|
- formatter: function(val) {
|
472
|
|
- // return val.split("").join("\n");
|
473
|
|
- return val;
|
474
|
|
- }
|
475
|
|
- },
|
476
|
|
- // data: ["生成海报", "好友分享", "群分享", "线下扫码", "名片分享", "小程序搜索"]
|
477
|
|
- data: fromName
|
478
|
|
- }
|
479
|
|
- ],
|
480
|
|
- yAxis: [
|
481
|
|
- {
|
482
|
|
- type: "value",
|
483
|
|
- name: "人数(人)",
|
484
|
|
- axisTick: {
|
485
|
|
- inside: true
|
486
|
|
- },
|
487
|
|
- axisLabel: {
|
488
|
|
- formatter: "{value}"
|
489
|
|
- }
|
490
|
|
- }
|
491
|
|
- ],
|
492
|
|
- grid: {
|
493
|
|
- left: "1%",
|
494
|
|
- right: "1%",
|
495
|
|
- containLabel: true,
|
496
|
|
- y2: 10
|
497
|
|
- },
|
498
|
|
- series: [
|
499
|
|
- {
|
500
|
|
- name: "所有用户",
|
501
|
|
- type: "bar",
|
502
|
|
- smooth: true,
|
503
|
|
- label: labelOption,
|
504
|
|
- // data: [78, 90, 13, 81, 170, 77]
|
505
|
|
- data: registered
|
506
|
|
- },
|
507
|
|
- {
|
508
|
|
- name: "注册用户",
|
509
|
|
- type: "bar",
|
510
|
|
- smooth: true,
|
511
|
|
- label: labelOption,
|
512
|
|
- // data: [26, 49, 62, 45, 21, 89]
|
513
|
|
- data: userCount
|
514
|
|
- }
|
515
|
|
- ]
|
516
|
|
- });
|
517
|
|
- },
|
518
|
|
- // ---------- 用户来源 end -------------
|
519
|
|
- // ---------- 性别 start --------------
|
520
|
|
- sexSixthChartPie(obj) {
|
521
|
|
- // 性别 绘制图表
|
522
|
|
- this.sexSixthChart.setOption({
|
523
|
|
- title: {
|
524
|
|
- text: "性别比例"
|
525
|
|
- },
|
526
|
|
- color:["#6a96f7","#f5749d"],
|
527
|
|
- tooltip: {
|
528
|
|
- trigger: "item",
|
529
|
|
- formatter: "{a} <br/>{b}: {c} ({d}%)"
|
530
|
|
- },
|
531
|
|
- legend: {
|
532
|
|
- orient: "vertical",
|
533
|
|
- x: "right",
|
534
|
|
- data: ["男", "女"]
|
535
|
|
- },
|
536
|
|
- series: [
|
537
|
|
- {
|
538
|
|
- name: "性别比例",
|
539
|
|
- type: "pie",
|
540
|
|
- radius: ["40%", "56%"],
|
541
|
|
- avoidLabelOverlap: false,
|
542
|
|
- label: {
|
543
|
|
- normal: {
|
544
|
|
- show: false,
|
545
|
|
- position: "center"
|
546
|
|
- },
|
547
|
|
- emphasis: {
|
548
|
|
- show: true,
|
549
|
|
- textStyle: {
|
550
|
|
- fontSize: "30",
|
551
|
|
- fontWeight: "bold"
|
552
|
|
- }
|
553
|
|
- }
|
554
|
|
- },
|
555
|
|
- labelLine: {
|
556
|
|
- normal: {
|
557
|
|
- show: false
|
558
|
|
- }
|
559
|
|
- },
|
560
|
|
- // data: [{ value: 335, name: "男" }, { value: 310, name: "女" }]
|
561
|
|
- data: obj
|
562
|
|
- }
|
563
|
|
- ]
|
564
|
|
- });
|
565
|
|
- }
|
566
|
|
- // ---------- 性别 end ---------------
|
567
|
93
|
},
|
568
|
94
|
mounted() {
|
569
|
|
- if (this.echartsInfo) {
|
570
|
|
- this.drawLine();
|
571
|
|
- // for (var i = 0; i < this.echartsInfo.selectUserBehavior.length; i++) {
|
572
|
|
- // this.members.push(this.echartsInfo.selectUserBehavior[i].members);
|
573
|
|
- // }
|
574
|
|
- }
|
575
|
95
|
this.initPage();
|
576
|
96
|
}
|
577
|
97
|
};
|
|
@@ -585,6 +105,11 @@ export default {
|
585
|
105
|
p {
|
586
|
106
|
margin: 0;
|
587
|
107
|
}
|
|
108
|
+
|
|
109
|
+.marginTB {
|
|
110
|
+ margin: 20px 0;
|
|
111
|
+}
|
|
112
|
+
|
588
|
113
|
.top-info {
|
589
|
114
|
margin: 20px 0;
|
590
|
115
|
.grid-content {
|