Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
aa38a4be
提交
aa38a4be
authored
6月 22, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 合并重复样式数据
上级
d9d1b3a2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
65 行增加
和
150 行删除
+65
-150
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+2
-34
chart.js
frontend/src/views/chart/chart/chart.js
+47
-0
PanelList.vue
frontend/src/views/panel/list/PanelList.vue
+3
-81
panel.js
frontend/src/views/panel/panel.js
+13
-35
没有找到文件。
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
aa38a4be
...
...
@@ -23,17 +23,7 @@ import { uuid } from 'vue-uuid'
import
{
mapState
}
from
'vuex'
import
{
isChange
}
from
'@/utils/conditionUtil'
import
{
DEFAULT_COLOR_CASE
,
DEFAULT_SIZE
,
DEFAULT_TITLE_STYLE
,
DEFAULT_LEGEND_STYLE
,
DEFAULT_LABEL
,
DEFAULT_TOOLTIP
,
DEFAULT_XAXIS_STYLE
,
DEFAULT_YAXIS_STYLE
,
DEFAULT_BACKGROUND_COLOR
}
from
'@/views/chart/chart/chart'
import
{
BASE_CHART_STRING
}
from
'@/views/chart/chart/chart'
export
default
{
name
:
'UserView'
,
...
...
@@ -64,29 +54,7 @@ export default {
data
()
{
return
{
refId
:
null
,
chart
:
{
stylePriority
:
'panel'
,
xaxis
:
'[]'
,
yaxis
:
'[]'
,
show
:
true
,
type
:
'panel'
,
title
:
''
,
customAttr
:
JSON
.
stringify
({
color
:
DEFAULT_COLOR_CASE
,
tableColor
:
DEFAULT_COLOR_CASE
,
size
:
DEFAULT_SIZE
,
label
:
DEFAULT_LABEL
,
tooltip
:
DEFAULT_TOOLTIP
}),
customStyle
:
JSON
.
stringify
({
text
:
DEFAULT_TITLE_STYLE
,
legend
:
DEFAULT_LEGEND_STYLE
,
xAxis
:
DEFAULT_XAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
background
:
DEFAULT_BACKGROUND_COLOR
}),
customFilter
:
'[]'
},
chart
:
BASE_CHART_STRING
,
requestStatus
:
'waiting'
,
message
:
null
}
...
...
frontend/src/views/chart/chart/chart.js
浏览文件 @
aa38a4be
...
...
@@ -367,3 +367,50 @@ export const BASE_GAUGE = {
}
]
}
export
const
BASE_CHART_STRING
=
{
stylePriority
:
'panel'
,
xaxis
:
'[]'
,
yaxis
:
'[]'
,
show
:
true
,
type
:
'panel'
,
title
:
''
,
customAttr
:
JSON
.
stringify
({
color
:
DEFAULT_COLOR_CASE
,
tableColor
:
DEFAULT_COLOR_CASE
,
size
:
DEFAULT_SIZE
,
label
:
DEFAULT_LABEL
,
tooltip
:
DEFAULT_TOOLTIP
}),
customStyle
:
JSON
.
stringify
({
text
:
DEFAULT_TITLE_STYLE
,
legend
:
DEFAULT_LEGEND_STYLE
,
xAxis
:
DEFAULT_XAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
background
:
DEFAULT_BACKGROUND_COLOR
}),
customFilter
:
'[]'
}
export
const
BASE_CHART
=
{
xaxis
:
[],
yaxis
:
[],
show
:
true
,
type
:
'panel'
,
title
:
''
,
customAttr
:
{
color
:
DEFAULT_COLOR_CASE
,
tableColor
:
DEFAULT_COLOR_CASE
,
size
:
DEFAULT_SIZE
,
label
:
DEFAULT_LABEL
,
tooltip
:
DEFAULT_TOOLTIP
},
customStyle
:
{
text
:
DEFAULT_TITLE_STYLE
,
legend
:
DEFAULT_LEGEND_STYLE
,
xAxis
:
DEFAULT_XAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
background
:
DEFAULT_BACKGROUND_COLOR
},
customFilter
:
[]
}
frontend/src/views/panel/list/PanelList.vue
浏览文件 @
aa38a4be
...
...
@@ -48,9 +48,6 @@
<span
class=
"header-title"
>
{{
$t
(
'panel.panel_list'
)
}}
<el-button
style=
"float: right;padding-right: 7px;margin-top: -8px"
icon=
"el-icon-plus"
type=
"text"
@
click=
"showEditPanel(newFolder)"
/>
<!--
<el-button
style=
"float: right;"
type=
"primary"
size=
"mini"
@
click=
"showEditPanel(newFolder)"
>
-->
<!--
{{
$t
(
'panel.groupAdd'
)
}}
-->
<!--
</el-button>
-->
</span>
</el-row>
<el-col
class=
"custom-tree-container"
>
...
...
@@ -181,22 +178,9 @@ import bus from '@/utils/bus'
import
EditPanel
from
'./EditPanel'
import
{
addGroup
,
delGroup
,
groupTree
,
defaultTree
,
findOne
}
from
'@/api/panel/panel'
import
{
DEFAULT_COLOR_CASE
,
DEFAULT_SIZE
,
DEFAULT_TITLE_STYLE
,
DEFAULT_LEGEND_STYLE
,
DEFAULT_LABEL
,
DEFAULT_TOOLTIP
,
DEFAULT_XAXIS_STYLE
,
DEFAULT_YAXIS_STYLE
,
DEFAULT_BACKGROUND_COLOR
}
from
'@/views/chart/chart/chart'
import
{
DEFAULT_COMMON_CANVAS_STYLE
DEFAULT_COMMON_CANVAS_STYLE
,
DEFAULT_COMMON_CANVAS_STYLE_STRING
}
from
'@/views/panel/panel'
import
{
DEFAULT_PANEL_STYLE
}
from
'@/views/panel/panel'
export
default
{
name
:
'PanelList'
,
components
:
{
GrantAuth
,
LinkGenerate
,
EditPanel
},
...
...
@@ -216,38 +200,7 @@ export default {
level
:
null
,
nodeType
:
null
,
panelType
:
null
,
panelStyle
:
JSON
.
stringify
({
width
:
1600
,
height
:
900
,
scale
:
100
,
scaleWidth
:
100
,
scaleHeight
:
100
,
selfAdaption
:
true
,
auxiliaryMatrix
:
true
,
openCommonStyle
:
true
,
panel
:
DEFAULT_PANEL_STYLE
,
chart
:
{
xaxis
:
'[]'
,
yaxis
:
'[]'
,
show
:
true
,
type
:
'panel'
,
title
:
''
,
customAttr
:
JSON
.
stringify
({
color
:
DEFAULT_COLOR_CASE
,
tableColor
:
DEFAULT_COLOR_CASE
,
size
:
DEFAULT_SIZE
,
label
:
DEFAULT_LABEL
,
tooltip
:
DEFAULT_TOOLTIP
}),
customStyle
:
JSON
.
stringify
({
text
:
DEFAULT_TITLE_STYLE
,
legend
:
DEFAULT_LEGEND_STYLE
,
xAxis
:
DEFAULT_XAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
background
:
DEFAULT_BACKGROUND_COLOR
}),
customFilter
:
'[]'
}}),
panelStyle
:
JSON
.
stringify
(
DEFAULT_COMMON_CANVAS_STYLE_STRING
),
panelData
:
'[]'
}
},
...
...
@@ -262,38 +215,7 @@ export default {
level
:
null
,
nodeType
:
null
,
panelType
:
null
,
panelStyle
:
JSON
.
stringify
({
width
:
1600
,
height
:
900
,
scale
:
100
,
scaleWidth
:
100
,
scaleHeight
:
100
,
selfAdaption
:
true
,
auxiliaryMatrix
:
true
,
openCommonStyle
:
true
,
panel
:
DEFAULT_PANEL_STYLE
,
chart
:
{
xaxis
:
'[]'
,
yaxis
:
'[]'
,
show
:
true
,
type
:
'panel'
,
title
:
''
,
customAttr
:
JSON
.
stringify
({
color
:
DEFAULT_COLOR_CASE
,
tableColor
:
DEFAULT_COLOR_CASE
,
size
:
DEFAULT_SIZE
,
label
:
DEFAULT_LABEL
,
tooltip
:
DEFAULT_TOOLTIP
}),
customStyle
:
JSON
.
stringify
({
text
:
DEFAULT_TITLE_STYLE
,
legend
:
DEFAULT_LEGEND_STYLE
,
xAxis
:
DEFAULT_XAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
background
:
DEFAULT_BACKGROUND_COLOR
}),
customFilter
:
'[]'
}}),
panelStyle
:
JSON
.
stringify
(
DEFAULT_COMMON_CANVAS_STYLE_STRING
),
panelData
:
'[]'
}
},
...
...
frontend/src/views/panel/panel.js
浏览文件 @
aa38a4be
import
{
DEFAULT_COLOR_CASE
,
DEFAULT_SIZE
,
DEFAULT_TITLE_STYLE
,
DEFAULT_LEGEND_STYLE
,
DEFAULT_LABEL
,
DEFAULT_TOOLTIP
,
DEFAULT_XAXIS_STYLE
,
DEFAULT_YAXIS_STYLE
,
DEFAULT_BACKGROUND_COLOR
}
from
'@/views/chart/chart/chart'
import
{
BASE_CHART
,
BASE_CHART_STRING
}
from
'@/views/chart/chart/chart'
import
{
deepCopy
}
from
'@/components/canvas/utils/utils'
export
const
DEFAULT_PANEL_STYLE
=
{
...
...
@@ -18,7 +8,7 @@ export const DEFAULT_PANEL_STYLE = {
gap
:
'no'
}
export
const
DEFAULT_COMMON_
CANVAS_STYLE
=
{
export
const
CANVAS_STYLE
=
{
width
:
1600
,
height
:
900
,
scale
:
100
,
...
...
@@ -27,29 +17,17 @@ export const DEFAULT_COMMON_CANVAS_STYLE = {
selfAdaption
:
true
,
auxiliaryMatrix
:
true
,
openCommonStyle
:
true
,
panel
:
DEFAULT_PANEL_STYLE
,
chart
:
{
xaxis
:
[],
yaxis
:
[],
show
:
true
,
type
:
'panel'
,
title
:
''
,
customAttr
:
{
color
:
DEFAULT_COLOR_CASE
,
tableColor
:
DEFAULT_COLOR_CASE
,
size
:
DEFAULT_SIZE
,
label
:
DEFAULT_LABEL
,
tooltip
:
DEFAULT_TOOLTIP
},
customStyle
:
{
text
:
DEFAULT_TITLE_STYLE
,
legend
:
DEFAULT_LEGEND_STYLE
,
xAxis
:
DEFAULT_XAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
background
:
DEFAULT_BACKGROUND_COLOR
},
customFilter
:
[]
}
panel
:
DEFAULT_PANEL_STYLE
}
export
const
DEFAULT_COMMON_CANVAS_STYLE
=
{
...
CANVAS_STYLE
,
chart
:
BASE_CHART
}
export
const
DEFAULT_COMMON_CANVAS_STYLE_STRING
=
{
...
CANVAS_STYLE
,
chart
:
BASE_CHART_STRING
}
export
function
chartTransStr2Object
(
targetIn
,
copy
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论