Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
c65f335a
提交
c65f335a
authored
1月 06, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(gradientarea): 新增面积图转折线图效果
同上
上级
8e547f4f
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
48 行增加
和
9 行删除
+48
-9
GradientArea.vue
src/views/bi/competitor/sycm_prd/GradientArea.vue
+22
-1
GradientArea.vue
src/views/bi/competitor/sycm_store/GradientArea.vue
+21
-1
index.vue
src/views/index.vue
+5
-7
没有找到文件。
src/views/bi/competitor/sycm_prd/GradientArea.vue
浏览文件 @
c65f335a
...
@@ -34,10 +34,23 @@ const props = defineProps({
...
@@ -34,10 +34,23 @@ const props = defineProps({
const
echartsRef
=
ref
(
null
)
const
echartsRef
=
ref
(
null
)
const
chart
=
shallowRef
(
null
)
const
chart
=
shallowRef
(
null
)
let
myThousand
=
false
// 是否显示万单位
let
myThousand
=
false
// 是否显示万单位
let
isArea
=
ref
(
true
)
// 是否面积图
const
emits
=
defineEmits
([
'changeType'
])
const
emits
=
defineEmits
([
'changeType'
])
const
setOptions
=
()
=>
{
const
setOptions
=
()
=>
{
// 面积图是否切换
const
seriesResult
=
props
.
chartData
.
series
.
map
(
o
=>
{
if
(
!
isArea
.
value
)
{
const
obj
=
{...
o
}
delete
obj
.
areaStyle
delete
obj
.
lineStyle
return
obj
}
else
{
return
o
}
})
chart
.
value
.
setOption
({
chart
.
value
.
setOption
({
tooltip
:
{
tooltip
:
{
trigger
:
'axis'
,
trigger
:
'axis'
,
...
@@ -87,6 +100,14 @@ const setOptions = () => {
...
@@ -87,6 +100,14 @@ const setOptions = () => {
onclick
:
()
=>
{
onclick
:
()
=>
{
emits
(
'changeType'
,
'table'
)
emits
(
'changeType'
,
'table'
)
}
}
},
myTool2
:
{
show
:
true
,
title
:
'面积/折线图'
,
icon
:
'path://M5,5 L5,30 L15,30 L25,20 L35,30 L45,30 L45,5 Z'
,
onclick
:
()
=>
{
isArea
.
value
=
!
isArea
.
value
}
}
}
}
}
},
},
...
@@ -108,7 +129,7 @@ const setOptions = () => {
...
@@ -108,7 +129,7 @@ const setOptions = () => {
type
:
'value'
type
:
'value'
}
}
],
],
series
:
props
.
chartData
.
series
series
:
seriesResult
},
true
)
},
true
)
}
}
...
...
src/views/bi/competitor/sycm_store/GradientArea.vue
浏览文件 @
c65f335a
...
@@ -34,10 +34,22 @@ const props = defineProps({
...
@@ -34,10 +34,22 @@ const props = defineProps({
const
echartsRef
=
ref
(
null
)
const
echartsRef
=
ref
(
null
)
const
chart
=
shallowRef
(
null
)
const
chart
=
shallowRef
(
null
)
let
myThousand
=
false
// 是否显示万单位
let
myThousand
=
false
// 是否显示万单位
let
isArea
=
ref
(
true
)
// 是否面积图
const
emits
=
defineEmits
([
'changeType'
])
const
emits
=
defineEmits
([
'changeType'
])
const
setOptions
=
()
=>
{
const
setOptions
=
()
=>
{
// 面积图是否切换
const
seriesResult
=
props
.
chartData
.
series
.
map
(
o
=>
{
if
(
!
isArea
.
value
)
{
const
obj
=
{
...
o
}
delete
obj
.
areaStyle
delete
obj
.
lineStyle
return
obj
}
else
{
return
o
}
})
chart
.
value
.
setOption
({
chart
.
value
.
setOption
({
tooltip
:
{
tooltip
:
{
trigger
:
'axis'
,
trigger
:
'axis'
,
...
@@ -87,6 +99,14 @@ const setOptions = () => {
...
@@ -87,6 +99,14 @@ const setOptions = () => {
onclick
:
()
=>
{
onclick
:
()
=>
{
emits
(
'changeType'
,
'table'
)
emits
(
'changeType'
,
'table'
)
}
}
},
myTool2
:
{
show
:
true
,
title
:
'面积/折线图'
,
icon
:
'path://M5,5 L5,30 L15,30 L25,20 L35,30 L45,30 L45,5 Z'
,
onclick
:
()
=>
{
isArea
.
value
=
!
isArea
.
value
}
}
}
}
}
},
},
...
@@ -108,7 +128,7 @@ const setOptions = () => {
...
@@ -108,7 +128,7 @@ const setOptions = () => {
type
:
'value'
type
:
'value'
}
}
],
],
series
:
props
.
chartData
.
series
series
:
seriesResult
},
true
)
},
true
)
}
}
...
...
src/views/index.vue
浏览文件 @
c65f335a
<
template
>
<
template
>
<div
class=
"dashboard-editor-container app-container"
>
<div
class=
"dashboard-editor-container app-container"
>
<panel-group
@
handleSetLineChartData=
"handleSetLineChartData"
/>
<panel-group
@
handleSetLineChartData=
"handleSetLineChartData"
/>
<div
class=
"row"
>
<common-menu
class=
"row"
></common-menu>
<common-menu></common-menu>
<el-row
:gutter=
"32"
</div>
class=
"row"
>
<el-row
:gutter=
"32"
class=
"row"
>
<el-col
:xs=
"24"
<el-col
:xs=
"24"
:sm=
"24"
:sm=
"24"
:lg=
"8"
>
:lg=
"8"
>
...
@@ -29,7 +27,7 @@
...
@@ -29,7 +27,7 @@
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
class=
"line-chart row"
>
<el-row
class=
"line-chart row"
>
<line-chart
:chartData=
"lineChartData"
/>
<line-chart
:chartData=
"lineChartData"
/>
</el-row>
</el-row>
</div>
</div>
</
template
>
</
template
>
...
@@ -69,7 +67,7 @@ const handleSetLineChartData = (type) => {
...
@@ -69,7 +67,7 @@ const handleSetLineChartData = (type) => {
<
style
lang=
"scss"
<
style
lang=
"scss"
scoped
>
scoped
>
.dashboard-editor-container
{
.dashboard-editor-container
{
.row
{
.row
{
margin-top
:
20px
;
margin-top
:
20px
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论