Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
2d7ad322
提交
2d7ad322
authored
4月 01, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:画布切换修改
上级
10feea18
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
373 行增加
和
134 行删除
+373
-134
ContextMenu.vue
...d/src/components/canvas/components/Editor/ContextMenu.vue
+85
-82
Shape.vue
frontend/src/components/canvas/components/Editor/Shape.vue
+21
-0
Toolbar.vue
frontend/src/components/canvas/components/Toolbar.vue
+11
-0
index.vue
frontend/src/views/panel/edit/index.vue
+3
-1
index.vue
frontend/src/views/panel/index.vue
+28
-50
ChartViewEdit.vue
frontend/src/views/panel/list/ChartViewEdit.vue
+156
-0
PanelList.vue
frontend/src/views/panel/list/PanelList.vue
+1
-1
PanelMain.vue
frontend/src/views/panel/list/PanelMain.vue
+68
-0
没有找到文件。
frontend/src/components/canvas/components/Editor/ContextMenu.vue
浏览文件 @
2d7ad322
<
template
>
<div
class=
"contextmenu"
v-show=
"menuShow"
:style=
"
{ top: menuTop + 'px', left: menuLeft + 'px' }">
<ul
@
mouseup=
"handleMouseUp"
>
<template
v-if=
"curComponent"
>
<template
v-if=
"!curComponent.isLock"
>
<li
@
click=
"copy"
>
复制
</li>
<li
@
click=
"paste"
>
粘贴
</li>
<li
@
click=
"cut"
>
剪切
</li>
<li
@
click=
"deleteComponent"
>
删除
</li>
<li
@
click=
"lock"
>
锁定
</li>
<li
@
click=
"topComponent"
>
置顶
</li>
<li
@
click=
"bottomComponent"
>
置底
</li>
<li
@
click=
"upComponent"
>
上移
</li>
<li
@
click=
"downComponent"
>
下移
</li>
</
template
>
<li
v-else
@
click=
"unlock"
>
解锁
</li>
</template>
<li
v-else
@
click=
"paste"
>
粘贴
</li>
</ul>
</div>
<div
v-show=
"menuShow"
class=
"contextmenu"
:style=
"
{ top: menuTop + 'px', left: menuLeft + 'px' }">
<ul
@
mouseup=
"handleMouseUp"
>
<template
v-if=
"curComponent"
>
<template
v-if=
"!curComponent.isLock"
>
<li
@
click=
"edit"
>
编辑
</li>
<li
@
click=
"copy"
>
复制
</li>
<li
@
click=
"paste"
>
粘贴
</li>
<li
@
click=
"cut"
>
剪切
</li>
<li
@
click=
"deleteComponent"
>
删除
</li>
<li
@
click=
"lock"
>
锁定
</li>
<li
@
click=
"topComponent"
>
置顶
</li>
<li
@
click=
"bottomComponent"
>
置底
</li>
<li
@
click=
"upComponent"
>
上移
</li>
<li
@
click=
"downComponent"
>
下移
</li>
</
template
>
<li
v-else
@
click=
"unlock"
>
解锁
</li>
</template>
<li
v-else
@
click=
"paste"
>
粘贴
</li>
</ul>
</div>
</template>
<
script
>
import
{
mapState
}
from
'vuex'
export
default
{
data
()
{
return
{
copyData
:
null
,
}
data
()
{
return
{
copyData
:
null
}
},
computed
:
mapState
([
'menuTop'
,
'menuLeft'
,
'menuShow'
,
'curComponent'
]),
methods
:
{
edit
()
{
// 编辑组件
},
lock
()
{
this
.
$store
.
commit
(
'lock'
)
},
unlock
()
{
this
.
$store
.
commit
(
'unlock'
)
},
// 点击菜单时不取消当前组件的选中状态
handleMouseUp
()
{
this
.
$store
.
commit
(
'setClickComponentStatus'
,
true
)
},
cut
()
{
this
.
$store
.
commit
(
'cut'
)
},
copy
()
{
this
.
$store
.
commit
(
'copy'
)
},
computed
:
mapState
([
'menuTop'
,
'menuLeft'
,
'menuShow'
,
'curComponent'
,
]),
methods
:
{
lock
()
{
this
.
$store
.
commit
(
'lock'
)
},
unlock
()
{
this
.
$store
.
commit
(
'unlock'
)
},
// 点击菜单时不取消当前组件的选中状态
handleMouseUp
()
{
this
.
$store
.
commit
(
'setClickComponentStatus'
,
true
)
},
cut
()
{
this
.
$store
.
commit
(
'cut'
)
},
copy
()
{
this
.
$store
.
commit
(
'copy'
)
},
paste
()
{
this
.
$store
.
commit
(
'paste'
,
true
)
this
.
$store
.
commit
(
'recordSnapshot'
)
},
deleteComponent
()
{
this
.
$store
.
commit
(
'deleteComponent'
)
this
.
$store
.
commit
(
'recordSnapshot'
)
},
upComponent
()
{
this
.
$store
.
commit
(
'upComponent'
)
this
.
$store
.
commit
(
'recordSnapshot'
)
},
downComponent
()
{
this
.
$store
.
commit
(
'downComponent'
)
this
.
$store
.
commit
(
'recordSnapshot'
)
},
topComponent
()
{
this
.
$store
.
commit
(
'topComponent'
)
this
.
$store
.
commit
(
'recordSnapshot'
)
},
bottomComponent
()
{
this
.
$store
.
commit
(
'bottomComponent'
)
this
.
$store
.
commit
(
'recordSnapshot'
)
},
paste
()
{
this
.
$store
.
commit
(
'paste'
,
true
)
this
.
$store
.
commit
(
'recordSnapshot'
)
},
deleteComponent
()
{
this
.
$store
.
commit
(
'deleteComponent'
)
this
.
$store
.
commit
(
'recordSnapshot'
)
},
upComponent
()
{
this
.
$store
.
commit
(
'upComponent'
)
this
.
$store
.
commit
(
'recordSnapshot'
)
},
downComponent
()
{
this
.
$store
.
commit
(
'downComponent'
)
this
.
$store
.
commit
(
'recordSnapshot'
)
},
topComponent
()
{
this
.
$store
.
commit
(
'topComponent'
)
this
.
$store
.
commit
(
'recordSnapshot'
)
},
bottomComponent
()
{
this
.
$store
.
commit
(
'bottomComponent'
)
this
.
$store
.
commit
(
'recordSnapshot'
)
}
}
}
</
script
>
...
...
@@ -123,4 +127,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
</
style
>
frontend/src/components/canvas/components/Editor/Shape.vue
浏览文件 @
2d7ad322
...
...
@@ -2,6 +2,14 @@
<div
class=
"shape"
:class=
"classInfo"
@
mouseenter=
"enter"
@
mouseleave=
"leave"
@
click=
"selectCurComponent"
@
mousedown=
"handleMouseDownOnShape"
>
<span
v-show=
"isActive()"
class=
"iconfont icon-xiangyouxuanzhuan"
@
mousedown=
"handleRotate"
/>
<span
v-show=
"element.isLock"
class=
"iconfont icon-suo"
/>
<!--
<span
v-show=
"isActive()"
class=
"iconfont icon-more"
>
-->
<!--
<el-button-->
<!-- icon="el-icon-more"-->
<!-- type="text"-->
<!-- size="small"-->
<!-- />-->
<!--
</span>
-->
<div
v-for=
"item in (isActive()? pointList : [])"
:key=
"item"
...
...
@@ -404,4 +412,17 @@ export default {
top
:
0
;
right
:
0
;
}
.edit-side
{
overflow
:
hidden
auto
;
min-height
:
24px
;
padding-top
:
0px
;
padding-bottom
:
0px
;
}
.icon-more
{
position
:
absolute
;
top
:
0
;
right
:
-10px
;
}
</
style
>
frontend/src/components/canvas/components/Toolbar.vue
浏览文件 @
2d7ad322
...
...
@@ -31,6 +31,12 @@
<el-tooltip
content=
"预览"
>
<el-button
class=
"el-icon-view"
size=
"mini"
circle
@
click=
"preview"
/>
</el-tooltip>
<span
style=
"float: right;margin-left: 10px"
>
<el-button
size=
"mini"
@
click=
"closePanelEdit"
>
关闭
</el-button>
</span>
</div>
<!-- 预览 -->
...
...
@@ -46,6 +52,7 @@ import { commonStyle, commonAttr } from '@/components/canvas/custom-component/co
import
eventBus
from
'@/components/canvas/utils/eventBus'
import
{
deepCopy
}
from
'@/components/canvas/utils/utils'
import
{
post
}
from
'@/api/panel/panel'
import
bus
from
'@/utils/bus'
export
default
{
data
()
{
...
...
@@ -77,6 +84,10 @@ export default {
this
.
scale
=
this
.
canvasStyleData
.
scale
},
methods
:
{
closePanelEdit
()
{
debugger
bus
.
$emit
(
'PanelSwitchComponent'
,
{
name
:
'PanelMain'
})
},
goFile
()
{
this
.
$refs
.
files
.
click
()
},
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
2d7ad322
...
...
@@ -67,6 +67,7 @@
</div>
</de-main-container>
</de-container>
</el-container>
</
template
>
...
...
@@ -94,6 +95,7 @@ import 'element-ui/lib/theme-chalk/index.css'
import
'@/components/canvas/styles/reset.css'
import
{
ApplicationContext
}
from
'@/utils/ApplicationContext'
export
default
{
name
:
'PanelEdit'
,
components
:
{
DeMainContainer
,
DeContainer
,
...
...
@@ -102,11 +104,11 @@ export default {
ViewSelect
,
Editor
,
Toolbar
},
data
()
{
return
{
show
:
false
,
editView
:
false
,
clickNotClose
:
false
,
showIndex
:
-
1
,
activeName
:
'attr'
,
...
...
frontend/src/views/panel/index.vue
浏览文件 @
2d7ad322
<
template
>
<de-container>
<de-aside-container>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
name=
"PanelList"
>
<span
slot=
"label"
><i
class=
"el-icon-document"
/>
列表
</span>
<panel-list
/>
</el-tab-pane>
<el-tab-pane
name=
"panels_star"
>
<span
slot=
"label"
><i
class=
"el-icon-star-off"
/>
收藏
</span>
开发中...
</el-tab-pane>
<el-tab-pane
name=
"panels_share"
:lazy=
"true"
>
<span
slot=
"label"
><i
class=
"el-icon-share"
/>
分享
</span>
<share-tree
v-if=
"showShare"
/>
</el-tab-pane>
</el-tabs>
</de-aside-container>
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
>
<de-main-container>
<component
:is=
"component"
:param=
"param"
/>
</de-main-container>
...
...
@@ -27,45 +7,42 @@
</
template
>
<
script
>
import
bus
from
'@/utils/bus'
import
DeMainContainer
from
'@/components/dataease/DeMainContainer'
import
DeContainer
from
'@/components/dataease/DeContainer'
import
DeAsideContainer
from
'@/components/dataease/DeAsideContainer'
// import Group from './group/Group'
import
PanelList
from
'./list/PanelList'
import
PanelViewShow
from
'./list/PanelViewShow'
import
ShareTree
from
'./GrantAuth/shareTree'
import
PanelMain
from
'@/views/panel/list/PanelMain'
import
ChartEdit
from
'@/views/chart/view/ChartEdit'
import
PanelEdit
from
'@/views/panel/edit'
export
default
{
name
:
'Panel'
,
components
:
{
DeMainContainer
,
DeContainer
,
DeAsideContainer
,
PanelList
,
PanelViewShow
,
ShareTree
},
components
:
{
DeMainContainer
,
DeContainer
,
PanelMain
,
ChartEdit
,
PanelEdit
},
data
()
{
return
{
component
:
PanelViewShow
,
param
:
{},
activeName
:
'PanelList'
,
showShare
:
false
component
:
PanelMain
,
param
:
{}
}
},
methods
:
{
handleClick
(
tab
,
event
)
{
// 点击分析面板需要刷新分享内容
if
(
tab
.
name
===
'panels_share'
)
{
this
.
refreshShare
()
mounted
()
{
bus
.
$on
(
'PanelSwitchComponent'
,
(
c
)
=>
{
debugger
console
.
log
(
c
)
this
.
param
=
c
.
param
switch
(
c
.
name
)
{
case
'PanelEdit'
:
this
.
component
=
PanelEdit
break
case
'ChartEdit'
:
this
.
component
=
ChartEdit
break
default
:
this
.
component
=
PanelMain
break
}
},
// switchComponent(c) {
// console.log(c)
// this.param = c.param
// switch (c.name) {
// case 'PanelViewShow':
// this.component = PanelViewShow
// break
// }
// },
refreshShare
()
{
this
.
showShare
=
false
this
.
$nextTick
(()
=>
(
this
.
showShare
=
true
))
}
})
},
methods
:
{
}
}
</
script
>
...
...
@@ -80,6 +57,7 @@ export default {
.ms-main-container
{
height
:
calc
(
100vh
-
56px
);
padding
:
0
;
}
</
style
>
frontend/src/views/panel/list/ChartViewEdit.vue
0 → 100644
浏览文件 @
2d7ad322
<
template
>
<el-row
style=
"height: 100%;overflow-y: hidden;width: 100%;"
>
<el-row
style=
"display: flex;height: 100%"
>
<el-col
class=
"panel-design"
>
<!--TODO 仪表盘设计公共设置区域-->
<el-row
class=
"panel-design-head"
>
<span
style=
"float: left;line-height: 40px; color: gray"
>
<span>
名称:
{{
panelInfo
.
name
||
'测试仪表板'
}}
</span>
</span>
<span
style=
"float: right;line-height: 40px;"
>
<el-tooltip
content=
"预览"
>
<el-button
class=
"el-icon-view"
size=
"mini"
circle
/>
</el-tooltip>
</span>
</el-row>
<!--TODO 仪表盘预览区域-->
<section>
<Preview
/>
</section>
</el-col>
</el-row>
</el-row>
</
template
>
<
script
>
import
ChartEdit
from
'@/views/chart/view/ChartEdit'
export
default
{
name
:
'ChartViewEdit'
,
components
:
{
ChartEdit
},
data
()
{
return
{
}
},
computed
:
{
panelInfo
()
{
return
this
.
$store
.
state
.
panel
.
panelInfo
}
},
mounted
()
{
},
methods
:
{
}
}
</
script
>
<
style
scoped
>
.view-list
{
height
:
100%
;
width
:
20%
;
min-width
:
180px
;
max-width
:
220px
;
border
:
1px
solid
#E6E6E6
;
border-left
:
0
solid
;
overflow-y
:
auto
;
}
.view-list-thumbnails-outline
{
height
:
100%
;
overflow-y
:
auto
;
}
.view-list-thumbnails
{
width
:
100%
;
padding
:
0px
15px
15px
0px
;
}
.panel-design
{
height
:
100%
;
min-width
:
500px
;
border-top
:
1px
solid
#E6E6E6
;
}
.panel-design-head
{
height
:
40px
;
}
.panel-design-show
{
height
:
100%
;
width
:
100%
;
border-top
:
1px
solid
#E6E6E6
;
}
.padding-lr
{
padding
:
0
6px
;
}
.itxst
{
margin
:
10px
;
text-align
:
left
;
}
.col
{
width
:
40%
;
flex
:
1
;
padding
:
10px
;
border
:
solid
1px
#eee
;
border-radius
:
5px
;
float
:
left
;
}
.col
+
.col
{
margin-left
:
10px
;
}
.item
{
padding
:
2px
12px
;
margin
:
3px
3px
0
3px
;
border
:
solid
1px
#eee
;
background-color
:
#f1f1f1
;
text-align
:
left
;
display
:
block
;
}
.item
+
.item
{
border-top
:
none
;
margin-top
:
3px
;
}
.item
:hover
{
background-color
:
#fdfdfd
;
cursor
:
pointer
;
}
.item-axis
{
padding
:
2px
12px
;
margin
:
3px
3px
0
3px
;
border
:
solid
1px
#eee
;
background-color
:
#f1f1f1
;
text-align
:
left
;
}
.item-axis
:hover
{
background-color
:
#fdfdfd
;
cursor
:
pointer
;
}
.el-form-item
{
margin-bottom
:
0
;
}
.container
{
width
:
100%
;
height
:
600px
;
border
:
1px
solid
#000
;
position
:
relative
;
box-sizing
:
border-box
;
}
span
{
font-size
:
12px
;
}
</
style
>
frontend/src/views/panel/list/PanelList.vue
浏览文件 @
2d7ad322
...
...
@@ -519,7 +519,7 @@ export default {
},
edit
(
data
)
{
this
.
$store
.
dispatch
(
'panel/setPanelInfo'
,
data
)
this
.
$router
.
replace
(
'/panelEdit'
)
bus
.
$emit
(
'PanelSwitchComponent'
,
{
name
:
'PanelEdit'
}
)
},
link
(
data
)
{
this
.
linkVisible
=
true
...
...
frontend/src/views/panel/list/PanelMain.vue
0 → 100644
浏览文件 @
2d7ad322
<
template
>
<de-container>
<de-aside-container>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
name=
"PanelList"
>
<span
slot=
"label"
><i
class=
"el-icon-document"
/>
列表
</span>
<panel-list
/>
</el-tab-pane>
<el-tab-pane
name=
"panels_star"
>
<span
slot=
"label"
><i
class=
"el-icon-star-off"
/>
收藏
</span>
开发中...
</el-tab-pane>
<el-tab-pane
name=
"panels_share"
:lazy=
"true"
>
<span
slot=
"label"
><i
class=
"el-icon-share"
/>
分享
</span>
<share-tree
v-if=
"showShare"
/>
</el-tab-pane>
</el-tabs>
</de-aside-container>
<de-main-container>
<PanelViewShow
/>
</de-main-container>
</de-container>
</
template
>
<
script
>
import
DeMainContainer
from
'@/components/dataease/DeMainContainer'
import
DeContainer
from
'@/components/dataease/DeContainer'
import
DeAsideContainer
from
'@/components/dataease/DeAsideContainer'
import
PanelList
from
'../list/PanelList'
import
PanelViewShow
from
'../list/PanelViewShow'
import
ShareTree
from
'../GrantAuth/shareTree'
export
default
{
name
:
'PanelMain'
,
components
:
{
DeMainContainer
,
DeContainer
,
DeAsideContainer
,
PanelList
,
PanelViewShow
,
ShareTree
},
data
()
{
return
{
activeName
:
'PanelList'
,
showShare
:
false
}
},
methods
:
{
handleClick
(
tab
,
event
)
{
// 点击分析面板需要刷新分享内容
if
(
tab
.
name
===
'panels_share'
)
{
this
.
refreshShare
()
}
},
refreshShare
()
{
this
.
showShare
=
false
this
.
$nextTick
(()
=>
(
this
.
showShare
=
true
))
}
}
}
</
script
>
<
style
scoped
>
.ms-aside-container
{
height
:
calc
(
100vh
-
56px
);
padding
:
15px
;
min-width
:
260px
;
max-width
:
460px
;
}
.ms-main-container
{
height
:
calc
(
100vh
-
56px
);
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论