Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
836eb59b
Commit
836eb59b
authored
Dec 13, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into 'master'
chore: agent应用分析样式调整 See merge request
!109
parents
165b230d
b7a4f248
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
21 deletions
+39
-21
channel-usage-comparison-chart.vue
...nt-analysis/components/channel-usage-comparison-chart.vue
+35
-17
channel-user-comparison-chart.vue
...ent-analysis/components/channel-user-comparison-chart.vue
+1
-1
usage-trend-chart.vue
...omponents/agent-analysis/components/usage-trend-chart.vue
+3
-3
No files found.
src/views/personal-space/personal-app-setting/components/agent-analysis/components/channel-usage-comparison-chart.vue
View file @
836eb59b
...
@@ -19,8 +19,8 @@ const defaultEchartOption: EChartsOption = {
...
@@ -19,8 +19,8 @@ const defaultEchartOption: EChartsOption = {
title
:
[
title
:
[
{
{
subtext
:
t
(
'analysis_module.send_messages'
),
subtext
:
t
(
'analysis_module.send_messages'
),
left
:
'2
4.5
%'
,
left
:
'2
7
%'
,
top
:
'1
90
px'
,
top
:
'1
75
px'
,
subtextStyle
:
{
subtextStyle
:
{
fontSize
:
14
,
fontSize
:
14
,
color
:
'#333333'
,
color
:
'#333333'
,
...
@@ -29,8 +29,8 @@ const defaultEchartOption: EChartsOption = {
...
@@ -29,8 +29,8 @@ const defaultEchartOption: EChartsOption = {
},
},
{
{
subtext
:
t
(
'analysis_module.consume_points'
),
subtext
:
t
(
'analysis_module.consume_points'
),
left
:
'7
4.5
%'
,
left
:
'7
2
%'
,
top
:
'1
90
px'
,
top
:
'1
75
px'
,
subtextStyle
:
{
subtextStyle
:
{
fontSize
:
14
,
fontSize
:
14
,
color
:
'#333333'
,
color
:
'#333333'
,
...
@@ -41,9 +41,8 @@ const defaultEchartOption: EChartsOption = {
...
@@ -41,9 +41,8 @@ const defaultEchartOption: EChartsOption = {
legend
:
{
legend
:
{
top
:
'20px'
,
top
:
'20px'
,
right
:
'54px'
,
right
:
'54px'
,
data
:
[{
name
:
t
(
ChannelText
.
link_share
)
},
{
name
:
t
(
ChannelText
.
mall
)
}],
},
},
color
:
[
'#
00C2FF'
,
'#454F
FF'
],
color
:
[
'#
454FFF'
,
'#00C2
FF'
],
tooltip
:
{
tooltip
:
{
trigger
:
'item'
,
trigger
:
'item'
,
textStyle
:
{
textStyle
:
{
...
@@ -53,10 +52,11 @@ const defaultEchartOption: EChartsOption = {
...
@@ -53,10 +52,11 @@ const defaultEchartOption: EChartsOption = {
series
:
[
series
:
[
{
{
type
:
'pie'
,
type
:
'pie'
,
top
:
'
9
0px'
,
top
:
'
6
0px'
,
radius
:
[
'50%'
,
'70%'
],
radius
:
[
'50%'
,
'70%'
],
center
:
[
'50%'
,
'50%'
],
center
:
[
'50%'
,
'50%'
],
encode
:
{
value
:
'count1'
,
itemName
:
'channel'
},
encode
:
{
value
:
'count1'
,
itemName
:
'channel'
},
clockwise
:
false
,
label
:
{
label
:
{
position
:
'outer'
,
position
:
'outer'
,
alignTo
:
'labelLine'
,
alignTo
:
'labelLine'
,
...
@@ -64,21 +64,22 @@ const defaultEchartOption: EChartsOption = {
...
@@ -64,21 +64,22 @@ const defaultEchartOption: EChartsOption = {
bleedMargin
:
5
,
bleedMargin
:
5
,
},
},
left
:
0
,
left
:
0
,
right
:
'
50
%'
,
right
:
'
45
%'
,
},
},
{
{
type
:
'pie'
,
type
:
'pie'
,
top
:
'
9
0px'
,
top
:
'
6
0px'
,
radius
:
[
'50%'
,
'70%'
],
radius
:
[
'50%'
,
'70%'
],
center
:
[
'50%'
,
'50%'
],
center
:
[
'50%'
,
'50%'
],
encode
:
{
value
:
'count2'
,
itemName
:
'channel'
},
encode
:
{
value
:
'count2'
,
itemName
:
'channel'
},
clockwise
:
false
,
label
:
{
label
:
{
position
:
'outer'
,
position
:
'outer'
,
alignTo
:
'labelLine'
,
alignTo
:
'labelLine'
,
formatter
:
'{d}%'
,
formatter
:
'{d}%'
,
bleedMargin
:
5
,
bleedMargin
:
5
,
},
},
left
:
'
50
%'
,
left
:
'
45
%'
,
right
:
0
,
right
:
0
,
},
},
],
],
...
@@ -103,13 +104,17 @@ async function handleGetMonthChannelProportion() {
...
@@ -103,13 +104,17 @@ async function handleGetMonthChannelProportion() {
const
dataSource
=
consumePointChannelCountList
.
value
.
map
((
consumePointChannelCountItem
)
=>
{
const
dataSource
=
consumePointChannelCountList
.
value
.
map
((
consumePointChannelCountItem
)
=>
{
const
sendMessageChannelCountItem
=
channelMap
.
get
(
consumePointChannelCountItem
.
channel
)
const
sendMessageChannelCountItem
=
channelMap
.
get
(
consumePointChannelCountItem
.
channel
)
return
sendMessageChannelCountItem
return
{
?
{
channel
:
consumePointChannelCountItem
.
channel
,
channel
:
t
(
ChannelText
[
consumePointChannelCountItem
.
channel
]),
count1
:
sendMessageChannelCountItem
?.
count
||
0
,
count1
:
sendMessageChannelCountItem
.
count
,
count2
:
consumePointChannelCountItem
?.
count
||
0
,
count2
:
consumePointChannelCountItem
.
count
,
}
}
})
:
consumePointChannelCountItem
const
newDataSource
=
handleDataSourceSort
(
dataSource
)
newDataSource
.
forEach
((
item
)
=>
{
;(
item
.
channel
as
string
)
=
t
(
ChannelText
[
item
.
channel
])
})
})
channelUsageChartOption
.
dataset
=
{
channelUsageChartOption
.
dataset
=
{
...
@@ -119,6 +124,19 @@ async function handleGetMonthChannelProportion() {
...
@@ -119,6 +124,19 @@ async function handleGetMonthChannelProportion() {
channelUsageChartRef
.
value
?.
echartHideLoading
()
channelUsageChartRef
.
value
?.
echartHideLoading
()
}
}
function
handleDataSourceSort
(
dataSource
:
{
channel
:
ChannelType
;
count1
:
number
;
count2
:
number
}[])
{
const
channelSortMap
=
{
[
ChannelType
.
link_share
]:
1
,
[
ChannelType
.
mall
]:
2
,
[
ChannelType
.
index
]:
3
,
[
ChannelType
.
api
]:
4
,
[
ChannelType
.
preview
]:
5
,
[
ChannelType
.
multi_preview
]:
6
,
}
return
dataSource
.
sort
((
a
,
b
)
=>
channelSortMap
[
a
.
channel
]
-
channelSortMap
[
b
.
channel
])
}
async
function
handleGetMonthSendMessageCount
()
{
async
function
handleGetMonthSendMessageCount
()
{
const
res
=
await
fetchGetMonthSendMessageCount
<
ChannelCountItem
[]
>
(
params
.
agentId
as
string
,
[
const
res
=
await
fetchGetMonthSendMessageCount
<
ChannelCountItem
[]
>
(
params
.
agentId
as
string
,
[
ChannelType
.
link_share
,
ChannelType
.
link_share
,
...
...
src/views/personal-space/personal-app-setting/components/agent-analysis/components/channel-user-comparison-chart.vue
View file @
836eb59b
...
@@ -61,7 +61,7 @@ const defaultEchartOption: EChartsOption = {
...
@@ -61,7 +61,7 @@ const defaultEchartOption: EChartsOption = {
grid
:
{
grid
:
{
left
:
'58px'
,
left
:
'58px'
,
right
:
'54px'
,
right
:
'54px'
,
bottom
:
'4
6
px'
,
bottom
:
'4
8
px'
,
top
:
'100px'
,
top
:
'100px'
,
},
},
}
}
...
...
src/views/personal-space/personal-app-setting/components/agent-analysis/components/usage-trend-chart.vue
View file @
836eb59b
...
@@ -118,7 +118,7 @@ function defaultEchartOption(
...
@@ -118,7 +118,7 @@ function defaultEchartOption(
grid
:
{
grid
:
{
left
:
'58px'
,
left
:
'58px'
,
right
:
'40px'
,
right
:
'40px'
,
bottom
:
'
20
px'
,
bottom
:
'
18
px'
,
},
},
color
:
[
'#000DFF'
],
color
:
[
'#000DFF'
],
}
}
...
@@ -180,7 +180,7 @@ async function handleUpdateDateRange(_value: [number, number], formattedValue: [
...
@@ -180,7 +180,7 @@ async function handleUpdateDateRange(_value: [number, number], formattedValue: [
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"
h-[356px] w-ful
l rounded-[20px] bg-white"
>
<div
class=
"
flex h-[356px] w-full flex-co
l rounded-[20px] bg-white"
>
<div
class=
"mx-[34px] flex justify-between py-5"
>
<div
class=
"mx-[34px] flex justify-between py-5"
>
<AnalysisContentTitle
:title=
"t('analysis_module.usage_trend_chart')"
/>
<AnalysisContentTitle
:title=
"t('analysis_module.usage_trend_chart')"
/>
...
@@ -203,7 +203,7 @@ async function handleUpdateDateRange(_value: [number, number], formattedValue: [
...
@@ -203,7 +203,7 @@ async function handleUpdateDateRange(_value: [number, number], formattedValue: [
</div>
</div>
</div>
</div>
<div
class=
"
flex h-[240px]
"
>
<div
class=
"
mb-10 flex flex-1
"
>
<div
class=
"text-font-color relative h-full flex-1 border-r border-r-[#E2E2E2]"
>
<div
class=
"text-font-color relative h-full flex-1 border-r border-r-[#E2E2E2]"
>
<div
class=
"absolute left-1/2 flex translate-x-[-50%] items-center gap-[5px]"
>
<div
class=
"absolute left-1/2 flex translate-x-[-50%] items-center gap-[5px]"
>
<i
class=
"iconfont icon-user text-[14px]"
/>
<i
class=
"iconfont icon-user text-[14px]"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment