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
a83c15c1
Commit
a83c15c1
authored
Dec 13, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into 'master'
chore: echart渲染类型更换&调整agent应用分析样式 See merge request
!110
parents
836eb59b
91ee4115
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
16 deletions
+20
-16
custom-echart.vue
src/components/custom-echart/custom-echart.vue
+3
-5
echarts.ts
src/utils/echarts.ts
+2
-2
channel-usage-comparison-chart.vue
...nt-analysis/components/channel-usage-comparison-chart.vue
+1
-1
usage-trend-chart.vue
...omponents/agent-analysis/components/usage-trend-chart.vue
+14
-8
No files found.
src/components/custom-echart/custom-echart.vue
View file @
a83c15c1
...
@@ -34,10 +34,8 @@ watch(
...
@@ -34,10 +34,8 @@ watch(
)
)
const
chartResizeHandler
=
debounce
(()
=>
{
const
chartResizeHandler
=
debounce
(()
=>
{
if
(
customChart
.
value
)
{
customChart
.
value
?.
resize
()
customChart
.
value
.
resize
()
},
200
)
}
},
100
)
onMounted
(()
=>
{
onMounted
(()
=>
{
drawEChart
()
drawEChart
()
...
@@ -54,7 +52,7 @@ function drawEChart() {
...
@@ -54,7 +52,7 @@ function drawEChart() {
customChart
.
value
.
dispose
()
customChart
.
value
.
dispose
()
}
}
customChart
.
value
=
echarts
.
init
(
customChartRef
.
value
as
HTMLDivElement
)
customChart
.
value
=
echarts
.
init
(
customChartRef
.
value
as
HTMLDivElement
,
null
,
{
renderer
:
'svg'
}
)
customChart
.
value
?.
setOption
(
props
.
option
,
true
)
customChart
.
value
?.
setOption
(
props
.
option
,
true
)
}
}
...
...
src/utils/echarts.ts
View file @
a83c15c1
...
@@ -9,7 +9,7 @@ import {
...
@@ -9,7 +9,7 @@ import {
ToolboxComponent
,
ToolboxComponent
,
}
from
'echarts/components'
}
from
'echarts/components'
import
{
LabelLayout
,
UniversalTransition
}
from
'echarts/features'
import
{
LabelLayout
,
UniversalTransition
}
from
'echarts/features'
import
{
Canvas
Renderer
}
from
'echarts/renderers'
import
{
SVG
Renderer
}
from
'echarts/renderers'
import
type
{
BarSeriesOption
,
PieSeriesOption
,
LineSeriesOption
}
from
'echarts/charts'
import
type
{
BarSeriesOption
,
PieSeriesOption
,
LineSeriesOption
}
from
'echarts/charts'
import
type
{
import
type
{
TitleComponentOption
,
TitleComponentOption
,
...
@@ -31,7 +31,7 @@ Echarts.use([
...
@@ -31,7 +31,7 @@ Echarts.use([
ToolboxComponent
,
ToolboxComponent
,
LabelLayout
,
LabelLayout
,
UniversalTransition
,
UniversalTransition
,
Canvas
Renderer
,
SVG
Renderer
,
BarChart
,
BarChart
,
PieChart
,
PieChart
,
LineChart
,
LineChart
,
...
...
src/views/personal-space/personal-app-setting/components/agent-analysis/components/channel-usage-comparison-chart.vue
View file @
a83c15c1
...
@@ -19,7 +19,7 @@ const defaultEchartOption: EChartsOption = {
...
@@ -19,7 +19,7 @@ const defaultEchartOption: EChartsOption = {
title
:
[
title
:
[
{
{
subtext
:
t
(
'analysis_module.send_messages'
),
subtext
:
t
(
'analysis_module.send_messages'
),
left
:
'2
7
%'
,
left
:
'2
6.8
%'
,
top
:
'175px'
,
top
:
'175px'
,
subtextStyle
:
{
subtextStyle
:
{
fontSize
:
14
,
fontSize
:
14
,
...
...
src/views/personal-space/personal-app-setting/components/agent-analysis/components/usage-trend-chart.vue
View file @
a83c15c1
...
@@ -118,7 +118,7 @@ function defaultEchartOption(
...
@@ -118,7 +118,7 @@ function defaultEchartOption(
grid
:
{
grid
:
{
left
:
'58px'
,
left
:
'58px'
,
right
:
'40px'
,
right
:
'40px'
,
bottom
:
'
18
px'
,
bottom
:
'
20
px'
,
},
},
color
:
[
'#000DFF'
],
color
:
[
'#000DFF'
],
}
}
...
@@ -203,30 +203,36 @@ async function handleUpdateDateRange(_value: [number, number], formattedValue: [
...
@@ -203,30 +203,36 @@ async function handleUpdateDateRange(_value: [number, number], formattedValue: [
</div>
</div>
</div>
</div>
<div
class=
"mb-10
flex flex-1
"
>
<div
class=
"mb-10
grid h-full grid-cols-3
"
>
<div
class=
"text-font-color relative h-full
flex-1
border-r border-r-[#E2E2E2]"
>
<div
class=
"text-font-color relative h-full
w-full
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]"
/>
<span>
{{
t
(
'analysis_module.agent_users'
)
}}
</span>
<span>
{{
t
(
'analysis_module.agent_users'
)
}}
</span>
</div>
</div>
<div
class=
"h-full w-full"
>
<CustomEchart
ref=
"usageEchartRef"
:option=
"usageEchartOption"
/>
<CustomEchart
ref=
"usageEchartRef"
:option=
"usageEchartOption"
/>
</div>
</div>
</div>
<div
class=
"text-font-color relative h-full
flex-1
border-r border-r-[#E2E2E2]"
>
<div
class=
"text-font-color relative h-full 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-send-times text-[14px]"
/>
<i
class=
"iconfont icon-send-times text-[14px]"
/>
<span>
{{
t
(
'analysis_module.send_messages'
)
}}
</span>
<span>
{{
t
(
'analysis_module.send_messages'
)
}}
</span>
</div>
</div>
<div
class=
"h-full w-full"
>
<CustomEchart
ref=
"sendMessagesEchartRef"
:option=
"sendTimesEchartOption"
/>
<CustomEchart
ref=
"sendMessagesEchartRef"
:option=
"sendTimesEchartOption"
/>
</div>
</div>
</div>
<div
class=
"relative h-full
flex-1
"
>
<div
class=
"relative h-full"
>
<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-consume text-[14px]"
/>
<i
class=
"iconfont icon-consume text-[14px]"
/>
<span>
{{
t
(
'analysis_module.consume_points'
)
}}
</span>
<span>
{{
t
(
'analysis_module.consume_points'
)
}}
</span>
</div>
</div>
<div
class=
"h-full w-full"
>
<CustomEchart
ref=
"consumePointsEchartRef"
:option=
"consumePointsEchartOption"
/>
<CustomEchart
ref=
"consumePointsEchartRef"
:option=
"consumePointsEchartOption"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
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