Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
35c175aa
提交
35c175aa
authored
6月 07, 2022
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修复部分类型视图无法自定义颜色的问题
上级
54d8d59c
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
24 行增加
和
11 行删除
+24
-11
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+10
-4
ColorSelector.vue
...d/src/views/chart/components/shape-attr/ColorSelector.vue
+9
-2
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+5
-5
没有找到文件。
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
35c175aa
...
...
@@ -524,7 +524,7 @@ export default {
}
}
},
getData
(
id
,
cache
=
true
)
{
getData
(
id
,
cache
=
true
,
dataBroadcast
=
false
)
{
if
(
id
)
{
this
.
requestStatus
=
'waiting'
this
.
message
=
null
...
...
@@ -549,7 +549,7 @@ export default {
// 将视图传入echart组件
if
(
response
.
success
)
{
this
.
chart
=
response
.
data
this
.
getDataOnly
(
response
.
data
)
this
.
getDataOnly
(
response
.
data
,
dataBroadcast
)
this
.
chart
[
'position'
]
=
this
.
inTab
?
'tab'
:
'panel'
// 记录当前数据
this
.
panelViewDetailsInfo
[
id
]
=
JSON
.
stringify
(
this
.
chart
)
...
...
@@ -845,7 +845,7 @@ export default {
getDataEdit
(
param
)
{
this
.
$store
.
state
.
styleChangeTimes
++
if
(
param
.
type
===
'propChange'
)
{
this
.
getData
(
param
.
viewId
,
false
)
this
.
getData
(
param
.
viewId
,
false
,
true
)
}
else
if
(
param
.
type
===
'styleChange'
)
{
this
.
chart
.
customAttr
=
param
.
viewInfo
.
customAttr
this
.
chart
.
customStyle
=
param
.
viewInfo
.
customStyle
...
...
@@ -860,7 +860,7 @@ export default {
this
.
mergeScale
()
}
},
getDataOnly
(
sourceResponseData
)
{
getDataOnly
(
sourceResponseData
,
dataBroadcast
)
{
if
(
this
.
isEdit
)
{
if
((
this
.
filter
.
filter
&&
this
.
filter
.
filter
.
length
)
||
(
this
.
filter
.
linkageFilters
&&
this
.
filter
.
linkageFilters
.
length
))
{
viewData
(
this
.
chart
.
id
,
this
.
panelInfo
.
id
,
{
...
...
@@ -869,9 +869,15 @@ export default {
queryFrom
:
'panel'
}).
then
(
response
=>
{
this
.
componentViewsData
[
this
.
chart
.
id
]
=
response
.
data
if
(
dataBroadcast
)
{
bus
.
$emit
(
'prop-change-data'
)
}
})
}
else
{
this
.
componentViewsData
[
this
.
chart
.
id
]
=
sourceResponseData
if
(
dataBroadcast
)
{
bus
.
$emit
(
'prop-change-data'
)
}
}
}
}
...
...
frontend/src/views/chart/components/shape-attr/ColorSelector.vue
浏览文件 @
35c175aa
...
...
@@ -118,6 +118,7 @@
import
{
COLOR_PANEL
,
DEFAULT_COLOR_CASE
}
from
'../../chart/chart'
import
{
getColors
}
from
'@/views/chart/chart/util'
import
{
mapState
}
from
'vuex'
import
bus
from
'@/utils/bus'
export
default
{
name
:
'ColorSelector'
,
...
...
@@ -248,11 +249,15 @@ export default {
},
computed
:
{
...
mapState
([
'batchOptStatus'
'batchOptStatus'
,
'componentViewsData'
])
},
mounted
()
{
this
.
init
()
bus
.
$on
(
'prop-change-data'
,
()
=>
{
this
.
initCustomColor
()
})
},
methods
:
{
changeColorOption
(
modifyName
=
'value'
)
{
...
...
@@ -336,11 +341,13 @@ export default {
this
.
chart
.
type
===
'funnel'
||
this
.
chart
.
type
===
'radar'
||
this
.
chart
.
type
===
'scatter'
))
{
const
chart
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
chart
))
if
(
this
.
componentViewsData
[
this
.
chart
.
id
])
{
const
chart
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
componentViewsData
[
this
.
chart
.
id
]))
this
.
colorForm
.
seriesColors
=
getColors
(
chart
,
this
.
colorForm
.
colors
,
reset
)
}
}
}
}
}
</
script
>
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
35c175aa
...
...
@@ -1199,8 +1199,8 @@ export default {
...
mapState
([
'curComponent'
,
'panelViewEditInfo'
,
'allViewRender'
,
'componentViewsData'
'allViewRender'
])
/* pluginRenderOptions() {
const plugins = localStorage.getItem('plugin-views') && JSON.parse(localStorage.getItem('plugin-views')) || []
...
...
@@ -1283,9 +1283,9 @@ export default {
this
.
resetDrill
()
this
.
initFromPanel
()
this
.
getChart
(
this
.
param
.
id
)
if
(
this
.
componentViewsData
[
this
.
param
.
id
])
{
this
.
chart
=
this
.
componentViewsData
[
this
.
param
.
id
]
}
//
if (this.componentViewsData[this.param.id]) {
//
this.chart = this.componentViewsData[this.param.id]
//
}
},
bindPluginEvent
()
{
bus
.
$on
(
'show-dimension-edit-filter'
,
this
.
showDimensionEditFilter
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论