Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
704cb29d
提交
704cb29d
authored
5月 20, 2022
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 批量修改样式优化
上级
0d7e913a
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
54 行增加
和
29 行删除
+54
-29
PanelGroupService.java
...ain/java/io/dataease/service/panel/PanelGroupService.java
+1
-1
EditBar.vue
frontend/src/components/canvas/components/Editor/EditBar.vue
+1
-1
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+4
-1
TitleSelector.vue
.../views/chart/components/component-style/TitleSelector.vue
+21
-11
TitleSelectorAntV.vue
...ws/chart/components/component-style/TitleSelectorAntV.vue
+21
-12
ChartStyle.vue
frontend/src/views/chart/view/ChartStyle.vue
+6
-3
ChartStyleBack.vue
frontend/src/views/chart/view/ChartStyleBack.vue
+0
-0
没有找到文件。
backend/src/main/java/io/dataease/service/panel/PanelGroupService.java
浏览文件 @
704cb29d
...
@@ -124,7 +124,7 @@ public class PanelGroupService {
...
@@ -124,7 +124,7 @@ public class PanelGroupService {
if
(
StringUtils
.
isEmpty
(
panelId
))
{
// 新建
if
(
StringUtils
.
isEmpty
(
panelId
))
{
// 新建
checkPanelName
(
request
.
getName
(),
request
.
getPid
(),
PanelConstants
.
OPT_TYPE_INSERT
,
null
,
request
.
getNodeType
());
checkPanelName
(
request
.
getName
(),
request
.
getPid
(),
PanelConstants
.
OPT_TYPE_INSERT
,
null
,
request
.
getNodeType
());
panelId
=
newPanel
(
request
);
panelId
=
newPanel
(
request
);
panelGroupMapper
.
insert
(
request
);
panelGroupMapper
.
insert
Selective
(
request
);
// 清理权限缓存
// 清理权限缓存
clearPermissionCache
();
clearPermissionCache
();
sysAuthService
.
copyAuth
(
panelId
,
SysAuthConstants
.
AUTH_SOURCE_TYPE_PANEL
);
sysAuthService
.
copyAuth
(
panelId
,
SysAuthConstants
.
AUTH_SOURCE_TYPE_PANEL
);
...
...
frontend/src/components/canvas/components/Editor/EditBar.vue
浏览文件 @
704cb29d
...
@@ -91,7 +91,7 @@ export default {
...
@@ -91,7 +91,7 @@ export default {
},
},
// batch operation area
// batch operation area
batchOptAreaShow
()
{
batchOptAreaShow
()
{
return
this
.
batchOptStatus
&&
this
.
element
.
type
===
'view'
return
this
.
batchOptStatus
&&
this
.
element
.
type
===
'view'
&&
!
this
.
element
.
isPlugin
},
},
// 联动区域按钮显示
// 联动区域按钮显示
linkageAreaShow
()
{
linkageAreaShow
()
{
...
...
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
704cb29d
...
@@ -412,8 +412,11 @@ export default {
...
@@ -412,8 +412,11 @@ export default {
this
.
chart
.
customAttr
=
this
.
sourceCustomAttrStr
this
.
chart
.
customAttr
=
this
.
sourceCustomAttrStr
updateParams
[
'customAttr'
]
=
this
.
sourceCustomAttrStr
updateParams
[
'customAttr'
]
=
this
.
sourceCustomAttrStr
}
else
if
(
param
.
custom
===
'customStyle'
)
{
}
else
if
(
param
.
custom
===
'customStyle'
)
{
this
.
sourceCustomStyleStr
=
this
.
chart
.
customStyle
const
sourceCustomStyle
=
JSON
.
parse
(
this
.
sourceCustomStyleStr
)
const
sourceCustomStyle
=
JSON
.
parse
(
this
.
sourceCustomStyleStr
)
// view's title use history
if
(
param
.
property
===
'text'
)
{
param
.
value
.
title
=
sourceCustomStyle
.
text
.
title
}
sourceCustomStyle
[
param
.
property
]
=
param
.
value
sourceCustomStyle
[
param
.
property
]
=
param
.
value
this
.
sourceCustomStyleStr
=
JSON
.
stringify
(
sourceCustomStyle
)
this
.
sourceCustomStyleStr
=
JSON
.
stringify
(
sourceCustomStyle
)
this
.
chart
.
customStyle
=
this
.
sourceCustomStyleStr
this
.
chart
.
customStyle
=
this
.
sourceCustomStyleStr
...
...
frontend/src/views/chart/components/component-style/TitleSelector.vue
浏览文件 @
704cb29d
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<el-checkbox
v-model=
"titleForm.show"
@
change=
"changeTitleStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
<el-checkbox
v-model=
"titleForm.show"
@
change=
"changeTitleStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
</el-form-item>
</el-form-item>
<div
v-show=
"titleForm.show"
>
<div
v-show=
"titleForm.show"
>
<el-form-item
:label=
"$t('chart.title')"
class=
"form-item"
>
<el-form-item
v-if=
"!batchOptStatus"
:label=
"$t('chart.title')"
class=
"form-item"
>
<el-input
<el-input
v-model=
"titleForm.title"
v-model=
"titleForm.title"
size=
"mini"
size=
"mini"
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
<
script
>
<
script
>
import
{
COLOR_PANEL
,
DEFAULT_TITLE_STYLE
}
from
'../../chart/chart'
import
{
COLOR_PANEL
,
DEFAULT_TITLE_STYLE
}
from
'../../chart/chart'
import
{
checkViewTitle
}
from
'@/components/canvas/utils/utils'
import
{
checkViewTitle
}
from
'@/components/canvas/utils/utils'
import
{
mapState
}
from
'vuex'
export
default
{
export
default
{
name
:
'TitleSelector'
,
name
:
'TitleSelector'
,
...
@@ -79,6 +80,11 @@ export default {
...
@@ -79,6 +80,11 @@ export default {
}
}
}
}
},
},
computed
:
{
...
mapState
([
'batchOptStatus'
])
},
mounted
()
{
mounted
()
{
this
.
init
()
this
.
init
()
this
.
initData
()
this
.
initData
()
...
@@ -96,7 +102,9 @@ export default {
...
@@ -96,7 +102,9 @@ export default {
if
(
customStyle
.
text
)
{
if
(
customStyle
.
text
)
{
this
.
titleForm
=
customStyle
.
text
this
.
titleForm
=
customStyle
.
text
}
}
this
.
titleForm
.
title
=
this
.
chart
.
title
if
(
!
this
.
batchOptStatus
)
{
this
.
titleForm
.
title
=
this
.
chart
.
title
}
}
}
},
},
init
()
{
init
()
{
...
@@ -110,15 +118,17 @@ export default {
...
@@ -110,15 +118,17 @@ export default {
this
.
fontSize
=
arr
this
.
fontSize
=
arr
},
},
changeTitleStyle
()
{
changeTitleStyle
()
{
if
(
this
.
titleForm
.
title
.
length
<
1
)
{
if
(
!
this
.
batchOptStatus
)
{
this
.
$error
(
this
.
$t
(
'chart.title_cannot_empty'
))
if
(
this
.
titleForm
.
title
.
length
<
1
)
{
this
.
titleForm
.
title
=
this
.
chart
.
title
this
.
$error
(
this
.
$t
(
'chart.title_cannot_empty'
))
return
this
.
titleForm
.
title
=
this
.
chart
.
title
}
return
if
(
checkViewTitle
(
'update'
,
this
.
chart
.
id
,
this
.
titleForm
.
title
))
{
}
this
.
$error
(
this
.
$t
(
'chart.title_repeat'
))
if
(
checkViewTitle
(
'update'
,
this
.
chart
.
id
,
this
.
titleForm
.
title
))
{
this
.
titleForm
.
title
=
this
.
chart
.
title
this
.
$error
(
this
.
$t
(
'chart.title_repeat'
))
return
this
.
titleForm
.
title
=
this
.
chart
.
title
return
}
}
}
if
(
!
this
.
titleForm
.
show
)
{
if
(
!
this
.
titleForm
.
show
)
{
this
.
isSetting
=
false
this
.
isSetting
=
false
...
...
frontend/src/views/chart/components/component-style/TitleSelectorAntV.vue
浏览文件 @
704cb29d
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<el-checkbox
v-model=
"titleForm.show"
@
change=
"changeTitleStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
<el-checkbox
v-model=
"titleForm.show"
@
change=
"changeTitleStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
</el-form-item>
</el-form-item>
<div
v-show=
"titleForm.show"
>
<div
v-show=
"titleForm.show"
>
<el-form-item
:label=
"$t('chart.title')"
class=
"form-item"
>
<el-form-item
v-if=
"!this.batchOptStatus"
:label=
"$t('chart.title')"
class=
"form-item"
>
<el-input
<el-input
v-model=
"titleForm.title"
v-model=
"titleForm.title"
size=
"mini"
size=
"mini"
...
@@ -43,8 +43,8 @@
...
@@ -43,8 +43,8 @@
<
script
>
<
script
>
import
{
COLOR_PANEL
,
DEFAULT_TITLE_STYLE
}
from
'../../chart/chart'
import
{
COLOR_PANEL
,
DEFAULT_TITLE_STYLE
}
from
'../../chart/chart'
import
{
checkTitle
}
from
'@/api/chart/chart'
import
{
checkViewTitle
}
from
'@/components/canvas/utils/utils'
import
{
checkViewTitle
}
from
'@/components/canvas/utils/utils'
import
{
mapState
}
from
'vuex'
export
default
{
export
default
{
name
:
'TitleSelectorAntV'
,
name
:
'TitleSelectorAntV'
,
...
@@ -66,6 +66,11 @@ export default {
...
@@ -66,6 +66,11 @@ export default {
predefineColors
:
COLOR_PANEL
predefineColors
:
COLOR_PANEL
}
}
},
},
computed
:
{
...
mapState
([
'batchOptStatus'
])
},
watch
:
{
watch
:
{
'chart'
:
{
'chart'
:
{
handler
:
function
()
{
handler
:
function
()
{
...
@@ -90,7 +95,9 @@ export default {
...
@@ -90,7 +95,9 @@ export default {
if
(
customStyle
.
text
)
{
if
(
customStyle
.
text
)
{
this
.
titleForm
=
customStyle
.
text
this
.
titleForm
=
customStyle
.
text
}
}
this
.
titleForm
.
title
=
this
.
chart
.
title
if
(
!
this
.
batchOptStatus
)
{
this
.
titleForm
.
title
=
this
.
chart
.
title
}
}
}
},
},
init
()
{
init
()
{
...
@@ -104,15 +111,17 @@ export default {
...
@@ -104,15 +111,17 @@ export default {
this
.
fontSize
=
arr
this
.
fontSize
=
arr
},
},
changeTitleStyle
()
{
changeTitleStyle
()
{
if
(
this
.
titleForm
.
title
.
length
<
1
)
{
if
(
!
this
.
batchOptStatus
)
{
this
.
$error
(
this
.
$t
(
'chart.title_cannot_empty'
))
if
(
this
.
titleForm
.
title
.
length
<
1
)
{
this
.
titleForm
.
title
=
this
.
chart
.
title
this
.
$error
(
this
.
$t
(
'chart.title_cannot_empty'
))
return
this
.
titleForm
.
title
=
this
.
chart
.
title
}
return
if
(
checkViewTitle
(
'update'
,
this
.
chart
.
id
,
this
.
titleForm
.
title
))
{
}
this
.
$error
(
this
.
$t
(
'chart.title_repeat'
))
if
(
checkViewTitle
(
'update'
,
this
.
chart
.
id
,
this
.
titleForm
.
title
))
{
this
.
titleForm
.
title
=
this
.
chart
.
title
this
.
$error
(
this
.
$t
(
'chart.title_repeat'
))
return
this
.
titleForm
.
title
=
this
.
chart
.
title
return
}
}
}
this
.
$emit
(
'onTextChange'
,
this
.
titleForm
)
this
.
$emit
(
'onTextChange'
,
this
.
titleForm
)
},
},
...
...
frontend/src/views/chart/view/ChartStyle.vue
浏览文件 @
704cb29d
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
style=
"overflow:auto;border-right: 1px solid #e6e6e6;height: 100%;width: 100%;padding-right: 6px"
style=
"overflow:auto;border-right: 1px solid #e6e6e6;height: 100%;width: 100%;padding-right: 6px"
class=
"attr-style theme-border-class"
class=
"attr-style theme-border-class"
>
>
<el-row
v-if=
"
chart.mode!=='batchOpt'
"
class=
"padding-lr"
>
<el-row
v-if=
"
!batchOptStatus
"
class=
"padding-lr"
>
<span
class=
"title-text"
>
{{
$t
(
'chart.style_priority'
)
}}
</span>
<span
class=
"title-text"
>
{{
$t
(
'chart.style_priority'
)
}}
batchOptStatus-
{{
batchOptStatus
}}
</span>
<el-row>
<el-row>
<el-radio-group
<el-radio-group
v-model=
"view.stylePriority"
v-model=
"view.stylePriority"
...
@@ -274,6 +274,7 @@ import LegendSelectorAntV from '@/views/chart/components/component-style/LegendS
...
@@ -274,6 +274,7 @@ import LegendSelectorAntV from '@/views/chart/components/component-style/LegendS
import
BackgroundColorSelector
from
'@/views/chart/components/component-style/BackgroundColorSelector'
import
BackgroundColorSelector
from
'@/views/chart/components/component-style/BackgroundColorSelector'
import
SplitSelector
from
'@/views/chart/components/component-style/SplitSelector'
import
SplitSelector
from
'@/views/chart/components/component-style/SplitSelector'
import
SplitSelectorAntV
from
'@/views/chart/components/component-style/SplitSelectorAntV'
import
SplitSelectorAntV
from
'@/views/chart/components/component-style/SplitSelectorAntV'
import
{
mapState
}
from
'vuex'
export
default
{
export
default
{
name
:
'ChartStyle'
,
name
:
'ChartStyle'
,
...
@@ -321,7 +322,9 @@ export default {
...
@@ -321,7 +322,9 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
...
mapState
([
'batchOptStatus'
])
},
},
created
()
{
created
()
{
...
...
frontend/src/views/chart/view/ChartStyleBack.vue
deleted
100644 → 0
浏览文件 @
0d7e913a
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论