Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
74cb7949
提交
74cb7949
authored
9月 17, 2023
作者:
haodaking
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 优化报表分析
上级
920e7405
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
31 行增加
和
8 行删除
+31
-8
Index.vue
src/modules/analyze/user/views/Index.vue
+31
-8
没有找到文件。
src/modules/analyze/user/views/Index.vue
浏览文件 @
74cb7949
...
...
@@ -83,12 +83,13 @@ onMounted(fetchAge)
const
ageOption
=
computed
(()
=>
{
return
{
tooltip
:
{
trigger
:
'item'
trigger
:
'item'
,
formatter
:
'{b}: {c}<br />{d}%'
},
series
:
[
{
type
:
'pie'
,
label
:
{
formatter
:
'{b}
\
n{
c}
'
},
label
:
{
formatter
:
'{b}
\
n{
d}%
'
},
itemStyle
:
{
borderRadius
:
6
},
...
...
@@ -129,6 +130,11 @@ const levelOption = computed(() => {
{
name
:
'数据'
,
type
:
'bar'
,
label
:
{
show
:
true
,
position
:
'top'
},
itemStyle
:
{
borderRadius
:
2
},
data
:
cardLevel
.
value
.
map
(
item
=>
item
.
total
)
}
]
...
...
@@ -148,7 +154,8 @@ onMounted(fetchMonthly)
const
monthlyOption
=
computed
(()
=>
{
return
{
tooltip
:
{
trigger
:
'item'
trigger
:
'item'
,
formatter
:
'{b}: {c}<br />{d}%'
},
series
:
[
{
...
...
@@ -158,7 +165,7 @@ const monthlyOption = computed(() => {
borderRadius
:
6
},
label
:
{
formatter
:
'{b}
\
n{
c}
'
formatter
:
'{b}
\
n{
d}%
'
},
data
:
monthly
.
value
}
...
...
@@ -278,7 +285,7 @@ async function fetchCardOpen() {
if
(
index
===
0
)
{
rate
=
((
items
[
items
.
length
-
1
]?.
total
/
item
.
total
)
*
100
).
toFixed
(
2
)
}
else
{
rate
=
((
(
items
[
index
+
1
]?.
total
||
0
)
/
item
.
total
)
*
100
).
toFixed
(
2
)
rate
=
((
item
.
total
/
(
items
[
index
-
1
]?.
total
||
0
)
)
*
100
).
toFixed
(
2
)
}
return
{
...
item
,
rate
}
})
...
...
@@ -295,7 +302,7 @@ async function fetchCardIntegral() {
if
(
index
===
0
)
{
rate
=
((
items
[
items
.
length
-
1
]?.
total
/
item
.
total
)
*
100
).
toFixed
(
2
)
}
else
{
rate
=
((
(
items
[
index
+
1
]?.
total
||
0
)
/
item
.
total
)
*
100
).
toFixed
(
2
)
rate
=
((
item
.
total
/
(
items
[
index
-
1
]?.
total
||
0
)
)
*
100
).
toFixed
(
2
)
}
return
{
...
item
,
rate
}
})
...
...
@@ -312,7 +319,7 @@ async function fetchCardInstallment() {
if
(
index
===
0
)
{
rate
=
((
items
[
items
.
length
-
1
]?.
total
/
item
.
total
)
*
100
).
toFixed
(
2
)
}
else
{
rate
=
((
(
items
[
index
+
1
]?.
total
||
0
)
/
item
.
total
)
*
100
).
toFixed
(
2
)
rate
=
((
item
.
total
/
(
items
[
index
-
1
]?.
total
||
0
)
)
*
100
).
toFixed
(
2
)
}
return
{
...
item
,
rate
}
})
...
...
@@ -331,22 +338,30 @@ onMounted(fetchCardInstallment)
<div
class=
"row"
>
<div
class=
"box"
>
<h3>
用户性别分布
</h3>
<div
class=
"box-inner"
>
<v-chart
class=
"chart"
:option=
"genderOption"
ref=
"chart"
style=
"height: 280px"
/>
</div>
</div>
<div
class=
"box"
>
<h3>
用户年龄分布
</h3>
<div
class=
"box-inner"
>
<v-chart
class=
"chart"
:option=
"ageOption"
ref=
"chart"
style=
"height: 280px"
/>
</div>
</div>
<div
class=
"box"
>
<h3>
信用卡级别分布
</h3>
<div
class=
"box-inner"
>
<v-chart
class=
"chart"
:option=
"levelOption"
ref=
"chart"
style=
"height: 280px"
/>
</div>
</div>
<div
class=
"box"
>
<h3>
月收入分布
</h3>
<div
class=
"box-inner"
>
<v-chart
class=
"chart"
:option=
"monthlyOption"
ref=
"chart"
style=
"height: 280px"
/>
</div>
</div>
</div>
</div>
<div
class=
"group"
>
<h2>
标签及群组分析
</h2>
<div
class=
"row"
>
...
...
@@ -369,9 +384,11 @@ onMounted(fetchCardInstallment)
<div
class=
"row"
>
<div
class=
"box"
>
<h3>
事件分析
</h3>
<div
class=
"box-inner"
>
<v-chart
class=
"chart"
:option=
"eventOption"
ref=
"chart"
style=
"height: 380px"
/>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"box"
>
<h3>
信用卡开卡
</h3>
...
...
@@ -449,12 +466,18 @@ onMounted(fetchCardInstallment)
border-radius
:
6px
;
overflow
:
hidden
;
}
.box-inner
{
background-color
:
#fff
;
margin
:
0
20px
20px
;
border-radius
:
4px
;
}
}
.card
{
margin
:
20px
;
margin
:
0
20px
20px
;
background-color
:
#fff
;
padding
:
20px
;
min-height
:
410px
;
border-radius
:
4px
;
.item
{
min-height
:
40px
;
display
:
flex
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论