Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
31b76c15
提交
31b76c15
authored
12月 10, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 仪表板选项卡组件内视图支持放大编辑
上级
99c6cfd9
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
151 行增加
和
28 行删除
+151
-28
ComponentWrapper.vue
.../components/canvas/components/Editor/ComponentWrapper.vue
+3
-2
EditBarView.vue
...d/src/components/canvas/components/Editor/EditBarView.vue
+90
-0
SettingMenu.vue
...d/src/components/canvas/components/Editor/SettingMenu.vue
+1
-1
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+38
-24
DeTabs.vue
frontend/src/components/widget/DeWidget/DeTabs.vue
+19
-1
没有找到文件。
frontend/src/components/canvas/components/Editor/ComponentWrapper.vue
浏览文件 @
31b76c15
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
@
click=
"handleClick"
@
click=
"handleClick"
@
mousedown=
"elementMouseDown"
@
mousedown=
"elementMouseDown"
>
>
<edit-bar
v-if=
"
editBarShow
"
:element=
"config"
@
showViewDetails=
"showViewDetails"
/>
<edit-bar
v-if=
"
componentActiveFlag
"
:element=
"config"
@
showViewDetails=
"showViewDetails"
/>
<de-out-widget
<de-out-widget
v-if=
"config.type==='custom'"
v-if=
"config.type==='custom'"
:id=
"'component' + config.id"
:id=
"'component' + config.id"
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
:style=
"getComponentStyleDefault(config.style)"
:style=
"getComponentStyleDefault(config.style)"
:prop-value=
"config.propValue"
:prop-value=
"config.propValue"
:is-edit=
"false"
:is-edit=
"false"
:active=
"componentActiveFlag"
:element=
"config"
:element=
"config"
:search-count=
"searchCount"
:search-count=
"searchCount"
:h=
"config.style.height"
:h=
"config.style.height"
...
@@ -66,7 +67,7 @@ export default {
...
@@ -66,7 +67,7 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
editBarShow
()
{
componentActiveFlag
()
{
return
this
.
curComponent
&&
this
.
config
===
this
.
curComponent
return
this
.
curComponent
&&
this
.
config
===
this
.
curComponent
},
},
curGap
()
{
curGap
()
{
...
...
frontend/src/components/canvas/components/Editor/EditBarView.vue
0 → 100644
浏览文件 @
31b76c15
<
template
>
<div
class=
"bar-main"
>
<div
v-if=
"!linkageSettingStatus"
>
<span
v-if=
"isEdit"
:title=
"$t('panel.edit')"
>
<i
class=
"icon iconfont icon-edit"
@
click
.
stop=
"edit"
/>
</span>
<span
:title=
"$t('panel.details')"
>
<i
class=
"icon iconfont icon-fangda"
@
click
.
stop=
"showViewDetails"
/>
</span>
</div>
</div>
</
template
>
<
script
>
import
bus
from
'@/utils/bus'
import
{
mapState
}
from
'vuex'
export
default
{
props
:
{
viewId
:
{
type
:
String
,
required
:
true
},
isEdit
:
{
type
:
Boolean
,
required
:
false
,
default
:
true
}
},
data
()
{
return
{
componentType
:
null
,
linkageActiveStatus
:
false
,
editFilter
:
[
'view'
,
'custom'
],
timer
:
null
}
},
computed
:
{
...
mapState
([
'linkageSettingStatus'
])
},
mounted
()
{
},
beforeDestroy
()
{
},
methods
:
{
edit
()
{
// 编辑时临时保存 当前修改的画布
this
.
$store
.
dispatch
(
'panel/setComponentDataTemp'
,
JSON
.
stringify
(
this
.
componentData
))
this
.
$store
.
dispatch
(
'panel/setCanvasStyleDataTemp'
,
JSON
.
stringify
(
this
.
canvasStyleData
))
this
.
$store
.
dispatch
(
'chart/setViewId'
,
null
)
this
.
$store
.
dispatch
(
'chart/setViewId'
,
this
.
viewId
)
bus
.
$emit
(
'PanelSwitchComponent'
,
{
name
:
'ChartEdit'
,
param
:
{
'id'
:
this
.
viewId
,
'optType'
:
'edit'
}})
},
linkageEdit
()
{
},
amRemoveItem
()
{
this
.
$emit
(
'amRemoveItem'
)
},
showViewDetails
()
{
this
.
$emit
(
'showViewDetails'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.bar-main
{
position
:
absolute
;
right
:
0px
;
float
:right
;
z-index
:
2
;
border-radius
:
2px
;
padding-left
:
5px
;
padding-right
:
2px
;
cursor
:pointer
!
important
;
background-color
:
#0a7be0
;
}
.bar-main
i
{
color
:
white
;
float
:
right
;
margin-right
:
3px
;
}
</
style
>
frontend/src/components/canvas/components/Editor/SettingMenu.vue
浏览文件 @
31b76c15
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<el-dropdown-item
icon=
"el-icon-arrow-down"
@
click
.
native=
"downComponent"
>
{{
$t
(
'panel.downComponent'
)
}}
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-arrow-down"
@
click
.
native=
"downComponent"
>
{{
$t
(
'panel.downComponent'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"'view'===curComponent.type"
icon=
"el-icon-link"
@
click
.
native=
"linkageSetting"
>
{{
$t
(
'panel.linkage_setting'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"'view'===curComponent.type"
icon=
"el-icon-link"
@
click
.
native=
"linkageSetting"
>
{{
$t
(
'panel.linkage_setting'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"'de-tabs'===curComponent.type"
icon=
"el-icon-link"
@
click
.
native=
"addTab"
>
{{
$t
(
'panel.add_tab'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"'de-tabs'===curComponent.type"
icon=
"el-icon-link"
@
click
.
native=
"addTab"
>
{{
$t
(
'panel.add_tab'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"'view'===curComponent.type"
icon=
"el-icon-connection"
@
click
.
native=
"linkJumpSet"
>
跳转设置
</el-dropdown-item>
<el-dropdown-item
v-if=
"'view'===curComponent.type"
icon=
"el-icon-connection"
@
click
.
native=
"linkJumpSet"
>
跳转设置
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
</div>
</div>
...
...
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
31b76c15
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
'rect-shape'
'rect-shape'
]"
]"
>
>
<EditBarView
v-if=
"editBarViewShowFlag"
:is-edit=
"isEdit"
:view-id=
"element.propValue.viewId"
@
showViewDetails=
"openChartDetailsDialog"
/>
<div
v-if=
"requestStatus==='error'"
class=
"chart-error-class"
>
<div
v-if=
"requestStatus==='error'"
class=
"chart-error-class"
>
<div
class=
"chart-error-message-class"
>
<div
class=
"chart-error-message-class"
>
{{
message
}}
,
{{
$t
(
'chart.chart_show_error'
)
}}
{{
message
}}
,
{{
$t
(
'chart.chart_show_error'
)
}}
...
@@ -67,10 +68,11 @@ import { getToken, getLinkToken } from '@/utils/auth'
...
@@ -67,10 +68,11 @@ import { getToken, getLinkToken } from '@/utils/auth'
import
DrillPath
from
'@/views/chart/view/DrillPath'
import
DrillPath
from
'@/views/chart/view/DrillPath'
import
{
areaMapping
}
from
'@/api/map/map'
import
{
areaMapping
}
from
'@/api/map/map'
import
ChartComponentG2
from
'@/views/chart/components/ChartComponentG2'
import
ChartComponentG2
from
'@/views/chart/components/ChartComponentG2'
import
EditBarView
from
'@/components/canvas/components/Editor/EditBarView'
export
default
{
export
default
{
name
:
'UserView'
,
name
:
'UserView'
,
components
:
{
ChartComponent
,
TableNormal
,
LabelNormal
,
DrillPath
,
ChartComponentG2
},
components
:
{
EditBarView
,
ChartComponent
,
TableNormal
,
LabelNormal
,
DrillPath
,
ChartComponentG2
},
props
:
{
props
:
{
element
:
{
element
:
{
type
:
Object
,
type
:
Object
,
...
@@ -93,10 +95,19 @@ export default {
...
@@ -93,10 +95,19 @@ export default {
required
:
false
,
required
:
false
,
default
:
false
default
:
false
},
},
// eslint-disable-next-line vue/require-default-prop
componentIndex
:
{
componentIndex
:
{
type
:
Number
,
type
:
Number
,
required
:
false
required
:
false
},
inTab
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
},
isEdit
:
{
type
:
Boolean
,
require
:
false
,
default
:
true
}
}
},
},
data
()
{
data
()
{
...
@@ -120,6 +131,9 @@ export default {
...
@@ -120,6 +131,9 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
editBarViewShowFlag
()
{
return
this
.
active
&&
this
.
inTab
},
charViewShowFlag
()
{
charViewShowFlag
()
{
return
this
.
httpRequest
.
status
&&
this
.
chart
.
type
&&
!
this
.
chart
.
type
.
includes
(
'table'
)
&&
!
this
.
chart
.
type
.
includes
(
'text'
)
&&
this
.
renderComponent
()
===
'echarts'
return
this
.
httpRequest
.
status
&&
this
.
chart
.
type
&&
!
this
.
chart
.
type
.
includes
(
'table'
)
&&
!
this
.
chart
.
type
.
includes
(
'text'
)
&&
this
.
renderComponent
()
===
'echarts'
},
},
...
@@ -566,31 +580,31 @@ export default {
...
@@ -566,31 +580,31 @@ export default {
display
:
block
!
important
;
display
:
block
!
important
;
}
}
.rect-shape
>
i
{
/*.rect-shape > i {*/
right
:
5px
;
/* right: 5px;*/
color
:
gray
;
/* color: gray;*/
position
:
absolute
;
/* position: absolute;*/
}
/*}*/
.rect-shape
>
>
>
i
:hover
{
/*.rect-shape > > > i:hover {*/
color
:
red
;
/* color: red;*/
}
/*}*/
.rect-shape
:hover
>
>
>
.icon-fangda
{
/*.rect-shape:hover > > > .icon-fangda {*/
z-index
:
2
;
/* z-index: 2;*/
display
:
block
;
/* display: block;*/
}
/*}*/
.rect-shape
>
>
>
.icon-fangda
{
/*.rect-shape > > > .icon-fangda {*/
display
:
none
/* display: none*/
}
/*}*/
.rect-shape
:hover
>
>
>
.icon-shezhi
{
/*.rect-shape:hover > > > .icon-shezhi {*/
z-index
:
2
;
/* z-index: 2;*/
display
:
block
;
/* display: block;*/
}
/*}*/
.rect-shape
>
>
>
.icon-shezhi
{
/*.rect-shape > > > .icon-shezhi {*/
display
:
none
/* display: none*/
}
/*}*/
</
style
>
</
style
>
frontend/src/components/widget/DeWidget/DeTabs.vue
浏览文件 @
31b76c15
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</span>
</span>
<div
v-if=
"activeTabName === item.name"
class=
"de-tab-content"
>
<div
v-if=
"activeTabName === item.name"
class=
"de-tab-content"
>
<user-view
v-if=
"item.content && item.content.propValue && item.content.propValue.viewId"
:ref=
"item.name"
:element=
"item.content"
:out-style=
"outStyle"
/>
<user-view
v-if=
"item.content && item.content.propValue && item.content.propValue.viewId"
:ref=
"item.name"
:
in-tab=
"true"
:is-edit=
"isEdit"
:active=
"active"
:
element=
"item.content"
:out-style=
"outStyle"
/>
</div>
</div>
</el-tab-pane>
</el-tab-pane>
...
@@ -94,6 +94,7 @@ import ViewSelect from '@/views/panel/ViewSelect'
...
@@ -94,6 +94,7 @@ import ViewSelect from '@/views/panel/ViewSelect'
import
{
uuid
}
from
'vue-uuid'
import
{
uuid
}
from
'vue-uuid'
import
bus
from
'@/utils/bus'
import
bus
from
'@/utils/bus'
import
componentList
from
'@/components/canvas/custom-component/component-list'
import
componentList
from
'@/components/canvas/custom-component/component-list'
import
{
mapState
}
from
'vuex'
export
default
{
export
default
{
name
:
'DeTabls'
,
name
:
'DeTabls'
,
...
@@ -107,6 +108,10 @@ export default {
...
@@ -107,6 +108,10 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
},
},
active
:
{
type
:
Boolean
,
default
:
false
},
outStyle
:
{
outStyle
:
{
type
:
Object
,
type
:
Object
,
required
:
false
,
required
:
false
,
...
@@ -129,11 +134,24 @@ export default {
...
@@ -129,11 +134,24 @@ export default {
tabList
:
[]
tabList
:
[]
}
}
},
},
watch
:
{
curComponent
:
{
handler
(
newVal
,
oldVla
)
{
console
.
log
(
newVal
)
},
deep
:
true
}
},
created
()
{
created
()
{
bus
.
$on
(
'add-new-tab'
,
this
.
addNewTab
)
bus
.
$on
(
'add-new-tab'
,
this
.
addNewTab
)
this
.
tabList
=
this
.
element
.
options
&&
this
.
element
.
options
.
tabList
this
.
tabList
=
this
.
element
.
options
&&
this
.
element
.
options
.
tabList
this
.
activeTabName
=
this
.
tabList
[
0
].
name
this
.
activeTabName
=
this
.
tabList
[
0
].
name
},
},
computed
:
{
...
mapState
([
'curComponent'
])
},
methods
:
{
methods
:
{
beforeHandleCommond
(
item
,
param
)
{
beforeHandleCommond
(
item
,
param
)
{
return
{
return
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论