Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
fcd4ca8f
提交
fcd4ca8f
authored
3月 24, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
style(视图): 视图编辑UI css调整
上级
cd41a068
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
205 行增加
和
44 行删除
+205
-44
ChartComponent.vue
frontend/src/views/chart/components/ChartComponent.vue
+1
-1
LegendSelector.vue
...views/chart/components/component-style/LegendSelector.vue
+1
-1
TitleSelector.vue
.../views/chart/components/component-style/TitleSelector.vue
+1
-1
XAxisSelector.vue
.../views/chart/components/component-style/XAxisSelector.vue
+1
-1
YAxisSelector.vue
.../views/chart/components/component-style/YAxisSelector.vue
+1
-1
DimensionItem.vue
...nd/src/views/chart/components/drag-item/DimensionItem.vue
+0
-0
FilterItem.vue
frontend/src/views/chart/components/drag-item/FilterItem.vue
+129
-0
QuotaItem.vue
frontend/src/views/chart/components/drag-item/QuotaItem.vue
+0
-0
ColorSelector.vue
...d/src/views/chart/components/shape-attr/ColorSelector.vue
+1
-1
LabelSelector.vue
...d/src/views/chart/components/shape-attr/LabelSelector.vue
+1
-1
SizeSelector.vue
...nd/src/views/chart/components/shape-attr/SizeSelector.vue
+1
-1
TooltipSelector.vue
...src/views/chart/components/shape-attr/TooltipSelector.vue
+1
-1
Group.vue
frontend/src/views/chart/group/Group.vue
+1
-0
index.vue
frontend/src/views/chart/index.vue
+1
-1
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+65
-34
没有找到文件。
frontend/src/views/chart/components/ChartComponent.vue
浏览文件 @
fcd4ca8f
<
template
>
<div
class=
"Echarts"
style=
"
height: 100%;display: flex;margin-top: 10p
x;"
>
<div
class=
"Echarts"
style=
"
display: fle
x;"
>
<div
:id=
"chartId"
style=
"width: 100%;height: 100%;"
/>
</div>
</
template
>
...
...
frontend/src/views/chart/components/component
_
style/LegendSelector.vue
→
frontend/src/views/chart/components/component
-
style/LegendSelector.vue
浏览文件 @
fcd4ca8f
<
template
>
<div>
<div
style=
"width:100%;height: 32px;margin:0;padding:0 4px;border-radius: 4px;border: 1px solid #DCDFE6;display: flex;align-items: center;"
>
<div>
<el-popover
placement=
"right"
width=
"400"
...
...
frontend/src/views/chart/components/component
_
style/TitleSelector.vue
→
frontend/src/views/chart/components/component
-
style/TitleSelector.vue
浏览文件 @
fcd4ca8f
<
template
>
<div>
<div
style=
"width:100%;height: 32px;margin:0;padding:0 4px;border-radius: 4px;border: 1px solid #DCDFE6;display: flex;align-items: center;"
>
<div>
<el-popover
placement=
"right"
width=
"400"
...
...
frontend/src/views/chart/components/component
_
style/XAxisSelector.vue
→
frontend/src/views/chart/components/component
-
style/XAxisSelector.vue
浏览文件 @
fcd4ca8f
<
template
>
<div>
<div
style=
"width:100%;height: 32px;margin:0;padding:0 4px;border-radius: 4px;border: 1px solid #DCDFE6;display: flex;align-items: center;"
>
<div>
<el-popover
placement=
"right"
width=
"400"
...
...
frontend/src/views/chart/components/component
_
style/YAxisSelector.vue
→
frontend/src/views/chart/components/component
-
style/YAxisSelector.vue
浏览文件 @
fcd4ca8f
<
template
>
<div>
<div
style=
"width:100%;height: 32px;margin:0;padding:0 4px;border-radius: 4px;border: 1px solid #DCDFE6;display: flex;align-items: center;"
>
<div>
<el-popover
placement=
"right"
width=
"400"
...
...
frontend/src/views/chart/components/DimensionItem.vue
→
frontend/src/views/chart/components/
drag-item/
DimensionItem.vue
浏览文件 @
fcd4ca8f
File moved
frontend/src/views/chart/components/drag-item/FilterItem.vue
0 → 100644
浏览文件 @
fcd4ca8f
<
template
>
<div>
<el-dropdown
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<span
class=
"el-dropdown-link"
>
<el-tag
size=
"small"
class=
"item-axis"
>
{{
item
.
name
}}
<i
class=
"el-icon-arrow-down el-icon--right"
/>
</el-tag>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
icon=
"el-icon-edit-outline"
:command=
"beforeClickItem('rename')"
>
<span>
{{
$t
(
'chart.show_name_set'
)
}}
</span>
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-delete"
divided
:command=
"beforeClickItem('remove')"
>
<span>
{{
$t
(
'chart.delete'
)
}}
</span>
</el-dropdown-item>
</el-dropdown-menu>
</span>
</el-dropdown>
<el-dialog
:title=
"$t('chart.show_name_set')"
:visible=
"renameItem"
:show-close=
"false"
width=
"30%"
>
<el-form
ref=
"itemForm"
:model=
"itemForm"
:rules=
"itemFormRules"
>
<el-form-item
:label=
"$t('commons.name')"
prop=
"name"
>
<el-input
v-model=
"itemForm.name"
size=
"mini"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"mini"
@
click=
"closeRename()"
>
{{
$t
(
'chart.cancel'
)
}}
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"saveRename(itemForm)"
>
{{
$t
(
'chart.confirm'
)
}}
</el-button>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
name
:
'FilterItem'
,
props
:
{
item
:
{
type
:
Object
,
required
:
true
},
index
:
{
type
:
Number
,
required
:
true
}
},
data
()
{
return
{
renameItem
:
false
,
itemForm
:
{
name
:
''
},
itemFormRules
:
{
name
:
[
{
required
:
true
,
message
:
this
.
$t
(
'commons.input_content'
),
trigger
:
'change'
}
]
}
}
},
mounted
()
{
},
methods
:
{
clickItem
(
param
)
{
if
(
!
param
)
{
return
}
switch
(
param
.
type
)
{
case
'rename'
:
this
.
showRename
()
break
case
'remove'
:
this
.
removeItem
()
break
default
:
break
}
},
beforeClickItem
(
type
)
{
return
{
type
:
type
}
},
showRename
()
{
this
.
itemForm
.
name
=
this
.
item
.
name
this
.
renameItem
=
true
},
closeRename
()
{
this
.
renameItem
=
false
this
.
resetRename
()
},
saveRename
(
param
)
{
this
.
item
.
name
=
param
.
name
this
.
$emit
(
'onFilterItemChange'
,
this
.
item
)
this
.
closeRename
()
},
resetRename
()
{
this
.
itemForm
=
{
name
:
''
}
},
removeItem
()
{
this
.
item
.
index
=
this
.
index
this
.
$emit
(
'onFilterItemRemove'
,
this
.
item
)
}
}
}
</
script
>
<
style
scoped
>
.item-axis
{
padding
:
1px
6px
;
margin
:
0
3px
2px
3px
;
text-align
:
left
;
height
:
24px
;
line-height
:
22px
;
display
:
inline-block
;
border-radius
:
4px
;
box-sizing
:
border-box
;
white-space
:
nowrap
;
}
.item-axis
:hover
{
background-color
:
#fdfdfd
;
cursor
:
pointer
;
}
span
{
font-size
:
12px
;
}
</
style
>
frontend/src/views/chart/components/QuotaItem.vue
→
frontend/src/views/chart/components/
drag-item/
QuotaItem.vue
浏览文件 @
fcd4ca8f
File moved
frontend/src/views/chart/components/shape
_
attr/ColorSelector.vue
→
frontend/src/views/chart/components/shape
-
attr/ColorSelector.vue
浏览文件 @
fcd4ca8f
<
template
>
<div>
<div
style=
"width:100%;height: 32px;margin:0;padding:0 4px;border-radius: 4px;border: 1px solid #DCDFE6;display: flex;align-items: center;"
>
<div>
<el-popover
placement=
"right"
width=
"400"
...
...
frontend/src/views/chart/components/shape
_
attr/LabelSelector.vue
→
frontend/src/views/chart/components/shape
-
attr/LabelSelector.vue
浏览文件 @
fcd4ca8f
<
template
>
<div>
<div
style=
"width:100%;height: 32px;margin:0;padding:0 4px;border-radius: 4px;border: 1px solid #DCDFE6;display: flex;align-items: center;"
>
<div>
<el-popover
placement=
"right"
width=
"400"
...
...
frontend/src/views/chart/components/shape
_
attr/SizeSelector.vue
→
frontend/src/views/chart/components/shape
-
attr/SizeSelector.vue
浏览文件 @
fcd4ca8f
<
template
>
<div>
<div
style=
"width:100%;height: 32px;margin:0;padding:0 4px;border-radius: 4px;border: 1px solid #DCDFE6;display: flex;align-items: center;"
>
<div>
<el-popover
placement=
"right"
width=
"400"
...
...
frontend/src/views/chart/components/shape
_
attr/TooltipSelector.vue
→
frontend/src/views/chart/components/shape
-
attr/TooltipSelector.vue
浏览文件 @
fcd4ca8f
<
template
>
<div>
<div
style=
"width:100%;height: 32px;margin:0;padding:0 4px;border-radius: 4px;border: 1px solid #DCDFE6;display: flex;align-items: center;"
>
<div>
<el-popover
placement=
"right"
width=
"400"
...
...
frontend/src/views/chart/group/Group.vue
浏览文件 @
fcd4ca8f
...
...
@@ -522,6 +522,7 @@ export default {
text
:
DEFAULT_TITLE_STYLE
,
legend
:
DEFAULT_LEGEND_STYLE
})
view
.
customFilter
=
JSON
.
stringify
({})
post
(
'/chart/view/save'
,
view
).
then
(
response
=>
{
this
.
selectTableFlag
=
false
this
.
$store
.
dispatch
(
'chart/setTableId'
,
null
)
...
...
frontend/src/views/chart/index.vue
浏览文件 @
fcd4ca8f
<
template
>
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
>
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
style=
"background-color: #f7f8fa"
>
<de-aside-container>
<group
@
switchComponent=
"switchComponent"
/>
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
fcd4ca8f
...
...
@@ -4,7 +4,7 @@
<span
v-show=
"false"
>
{{
tableId
}}
</span>
<span
v-show=
"false"
>
{{
sceneId
}}
</span>
<span
v-show=
"false"
>
{{
vId
}}
</span>
<el-row
style=
"height: 40px;"
class=
"padding-lr"
>
<el-row
style=
"height: 40px;
background-color: white
"
class=
"padding-lr"
>
<span
style=
"line-height: 40px;"
>
{{
view
.
name
}}
</span>
<span
style=
"float: right;line-height: 40px;"
>
<el-button
size=
"mini"
@
click=
"closeEdit"
>
...
...
@@ -54,9 +54,9 @@
</el-col>
<el-col
style=
"height: 100%;width: 25%;min-width: 200px;max-width:2
4
0px;border: 1px solid #E6E6E6;border-left: 0 solid;"
style=
"height: 100%;width: 25%;min-width: 200px;max-width:2
2
0px;border: 1px solid #E6E6E6;border-left: 0 solid;"
>
<div
style=
"border-bottom: 1px solid #E6E6E6;overflow-y:hidden;"
class=
"padding-lr"
>
<div
style=
"border-bottom: 1px solid #E6E6E6;overflow-y:hidden;
height: 62px;
"
class=
"padding-lr"
>
<el-row>
<span>
{{
$t
(
'chart.title'
)
}}
</span>
<el-button
style=
"float: right;padding: 0;margin: 8px 0 0 0;font-size: 12px;"
type=
"text"
@
click=
"save"
>
{{
$t
(
'chart.confirm'
)
}}
</el-button>
...
...
@@ -117,9 +117,22 @@
</el-tab-pane>
</el-tabs>
</div>
<div
style=
"
height: 35%;overflow:auto;border-top: 1px solid #e6e6e6"
class=
"padding-lr
"
>
<div
style=
"
overflow:auto;border-top: 1px solid #e6e6e6"
class=
"padding-lr filter-class
"
>
<span>
{{
$t
(
'chart.result_filter'
)
}}
</span>
<div>
TODO
</div>
<div
style=
"margin: 8px"
class=
"filter-inner-class"
>
<draggable
v-model=
"view.customFilter"
group=
"drag"
animation=
"300"
:move=
"onMove"
style=
"height:100%;margin:0;overflow-x: auto;background-color: white;"
@
end=
"end2"
>
<transition-group
class=
"draggable-group"
>
<filter-item
v-for=
"(item,index) in view.customFilter"
:key=
"item.id"
:index=
"index"
:item=
"item"
/>
</transition-group>
</draggable>
</div>
</div>
</el-col>
...
...
@@ -133,7 +146,7 @@
group=
"dimension"
animation=
"300"
:move=
"onMove"
style=
"width:100%;height: 100%;margin:0 10px;border-radius: 4px;border: 1px solid #DCDFE6;overflow-x: auto;display: flex;align-items: center;"
style=
"width:100%;height: 100%;margin:0 10px;border-radius: 4px;border: 1px solid #DCDFE6;overflow-x: auto;display: flex;align-items: center;
background-color: white;
"
@
end=
"end2"
>
<transition-group
class=
"draggable-group"
>
...
...
@@ -148,7 +161,7 @@
group=
"quota"
animation=
"300"
:move=
"onMove"
style=
"width:100%;height: 100%;margin:0 10px;border-radius: 4px;border: 1px solid #DCDFE6;overflow-x: auto;display: flex;align-items: center;"
style=
"width:100%;height: 100%;margin:0 10px;border-radius: 4px;border: 1px solid #DCDFE6;overflow-x: auto;display: flex;align-items: center;
background-color: white;
"
@
end=
"end2"
>
<transition-group
class=
"draggable-group"
>
...
...
@@ -158,7 +171,7 @@
</el-row>
</el-row>
<chart-component
:chart-id=
"chart.id"
:chart=
"chart"
style=
"
height: 80%
"
/>
<chart-component
:chart-id=
"chart.id"
:chart=
"chart"
style=
"
padding: 10px"
class=
"chart-class
"
/>
</el-row>
</el-col>
</el-row>
...
...
@@ -168,8 +181,9 @@
<
script
>
import
{
post
}
from
'@/api/dataset/dataset'
import
draggable
from
'vuedraggable'
import
DimensionItem
from
'../components/DimensionItem'
import
QuotaItem
from
'../components/QuotaItem'
import
DimensionItem
from
'../components/drag-item/DimensionItem'
import
QuotaItem
from
'../components/drag-item/QuotaItem'
import
FilterItem
from
'../components/drag-item/FilterItem'
import
ChartComponent
from
'../components/ChartComponent'
// shape attr,component style
import
{
...
...
@@ -180,18 +194,18 @@ import {
DEFAULT_LABEL
,
DEFAULT_TOOLTIP
}
from
'../chart/chart'
import
ColorSelector
from
'../components/shape
_
attr/ColorSelector'
import
SizeSelector
from
'../components/shape
_
attr/SizeSelector'
import
LabelSelector
from
'../components/shape
_
attr/LabelSelector'
import
TitleSelector
from
'../components/component
_
style/TitleSelector'
import
LegendSelector
from
'../components/component
_
style/LegendSelector'
import
TooltipSelector
from
'../components/shape
_
attr/TooltipSelector'
import
XAxisSelector
from
'../components/component
_
style/XAxisSelector'
import
YAxisSelector
from
'../components/component
_
style/YAxisSelector'
import
ColorSelector
from
'../components/shape
-
attr/ColorSelector'
import
SizeSelector
from
'../components/shape
-
attr/SizeSelector'
import
LabelSelector
from
'../components/shape
-
attr/LabelSelector'
import
TitleSelector
from
'../components/component
-
style/TitleSelector'
import
LegendSelector
from
'../components/component
-
style/LegendSelector'
import
TooltipSelector
from
'../components/shape
-
attr/TooltipSelector'
import
XAxisSelector
from
'../components/component
-
style/XAxisSelector'
import
YAxisSelector
from
'../components/component
-
style/YAxisSelector'
export
default
{
name
:
'ChartEdit'
,
components
:
{
XAxisSelector
,
YAxisSelector
,
TooltipSelector
,
LabelSelector
,
LegendSelector
,
TitleSelector
,
SizeSelector
,
ColorSelector
,
ChartComponent
,
QuotaItem
,
DimensionItem
,
draggable
},
components
:
{
FilterItem
,
XAxisSelector
,
YAxisSelector
,
TooltipSelector
,
LabelSelector
,
LegendSelector
,
TitleSelector
,
SizeSelector
,
ColorSelector
,
ChartComponent
,
QuotaItem
,
DimensionItem
,
draggable
},
data
()
{
return
{
table
:
{},
...
...
@@ -212,19 +226,9 @@ export default {
customStyle
:
{
text
:
DEFAULT_TITLE_STYLE
,
legend
:
DEFAULT_LEGEND_STYLE
}
},
customFilter
:
[]
},
// 定义要被拖拽对象的数组
arr1
:
[
{
id
:
1
,
name
:
'id'
},
{
id
:
2
,
name
:
'名称'
},
{
id
:
3
,
name
:
'类型'
},
{
id
:
5
,
name
:
'状态'
},
{
id
:
4
,
name
:
'指标指标指标'
}
],
arr2
:
[
{
id
:
11
,
name
:
'容量'
}
],
moveId
:
-
1
,
chart
:
{
id
:
'echart'
...
...
@@ -303,6 +307,7 @@ export default {
view
.
yaxis
=
JSON
.
stringify
(
view
.
yaxis
)
view
.
customAttr
=
JSON
.
stringify
(
view
.
customAttr
)
view
.
customStyle
=
JSON
.
stringify
(
view
.
customStyle
)
view
.
customFilter
=
JSON
.
stringify
(
view
.
customFilter
)
post
(
'/chart/view/save'
,
view
).
then
(
response
=>
{
// this.get(response.data.id);
this
.
getData
(
response
.
data
.
id
)
...
...
@@ -321,6 +326,7 @@ export default {
this
.
view
.
yaxis
=
this
.
view
.
yaxis
?
JSON
.
parse
(
this
.
view
.
yaxis
)
:
[]
this
.
view
.
customAttr
=
this
.
view
.
customAttr
?
JSON
.
parse
(
this
.
view
.
customAttr
)
:
{}
this
.
view
.
customStyle
=
this
.
view
.
customStyle
?
JSON
.
parse
(
this
.
view
.
customStyle
)
:
{}
this
.
view
.
customFilter
=
this
.
view
.
customFilter
?
JSON
.
parse
(
this
.
view
.
customFilter
)
:
{}
// 将视图传入echart组件
this
.
chart
=
response
.
data
})
...
...
@@ -505,7 +511,8 @@ export default {
border
:
solid
1px
#eee
;
text-align
:
left
;
color
:
#606266
;
background-color
:
rgba
(
35
,
46
,
64
,.
05
);
/*background-color: rgba(35,46,64,.05);*/
background-color
:
white
;
display
:
block
;
}
...
...
@@ -515,7 +522,8 @@ export default {
border
:
solid
1px
#eee
;
text-align
:
left
;
color
:
#606266
;
background-color
:
rgba
(
35
,
46
,
64
,.
05
);
/*background-color: rgba(35,46,64,.05);*/
background-color
:
white
;
}
.item
+
.item
{
...
...
@@ -539,6 +547,12 @@ export default {
.tab-header
>>>
.el-tabs__item
{
font-size
:
12px
;
background-color
:
#E8EAED
;
}
.tab-header
>>>
.is-active
{
background-color
:
#f7f8fa
;
border-bottom-color
:
#f7f8fa
!
important
;
}
.draggable-group
{
...
...
@@ -572,11 +586,28 @@ export default {
}
.attr-selector
{
margin
:
2px
0
;
width
:
100%
;
height
:
32px
;
margin
:
0
0
6px
0
;
padding
:
0
4px
;
display
:
flex
;
align-items
:
center
;
background-color
:
white
}
.disabled-none-cursor
{
cursor
:
not
-
allowed
;
pointer-events
:none
;
}
.filter-class
{
height
:
calc
(
35%
-
102px
);
.filter-inner-class
{
height
:
calc
(
100%
-
40px
);
}
}
.chart-class
{
height
:
calc
(
100%
-
124px
);
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论