Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
1f6f8503
提交
1f6f8503
authored
3月 17, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:增加仪表盘设计组件及设计 增加面板中 view 删除功能
上级
7f4a9d6b
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
26 行增加
和
19 行删除
+26
-19
index.vue
frontend/src/components/vue-drag-resize-rotate/index.vue
+9
-0
panel.js
frontend/src/store/modules/panel.js
+12
-1
PanelList.vue
frontend/src/views/panel/list/PanelList.vue
+2
-5
PanelViewShow.vue
frontend/src/views/panel/list/PanelViewShow.vue
+3
-13
没有找到文件。
frontend/src/components/vue-drag-resize-rotate/index.vue
浏览文件 @
1f6f8503
...
@@ -69,6 +69,10 @@ export default {
...
@@ -69,6 +69,10 @@ export default {
replace
:
true
,
replace
:
true
,
name
:
'VueDragResizeRotate'
,
name
:
'VueDragResizeRotate'
,
props
:
{
props
:
{
viewId
:
{
type
:
String
,
default
:
''
},
className
:
{
className
:
{
type
:
String
,
type
:
String
,
default
:
'vdr'
default
:
'vdr'
...
@@ -596,6 +600,11 @@ export default {
...
@@ -596,6 +600,11 @@ export default {
},
},
methods
:
{
methods
:
{
removeView
(){
debugger
console
.
log
(
this
.
viewId
);
this
.
$emit
(
'removeView'
,
this
.
viewId
)
},
// 重置边界和鼠标状态
// 重置边界和鼠标状态
resetBoundsAndMouseState
()
{
resetBoundsAndMouseState
()
{
this
.
mouseClickPosition
=
{
mouseX
:
0
,
mouseY
:
0
,
x
:
0
,
y
:
0
,
w
:
0
,
h
:
0
}
this
.
mouseClickPosition
=
{
mouseX
:
0
,
mouseY
:
0
,
x
:
0
,
y
:
0
,
w
:
0
,
h
:
0
}
...
...
frontend/src/store/modules/panel.js
浏览文件 @
1f6f8503
const
getDefaultState
=
()
=>
{
const
getDefaultState
=
()
=>
{
return
{
return
{
panelName
:
''
panelName
:
''
,
panelInfo
:{
name
:
''
}
}
}
}
}
...
@@ -10,12 +13,20 @@ const state = getDefaultState()
...
@@ -10,12 +13,20 @@ const state = getDefaultState()
const
mutations
=
{
const
mutations
=
{
setPanelName
:
(
state
,
panelName
)
=>
{
setPanelName
:
(
state
,
panelName
)
=>
{
state
.
panelName
=
panelName
state
.
panelName
=
panelName
},
setPanelInfo
:
(
state
,
panelInfo
)
=>
{
debugger
state
.
panelInfo
=
panelInfo
}
}
}
}
const
actions
=
{
const
actions
=
{
setPanelName
({
commit
},
panelName
)
{
setPanelName
({
commit
},
panelName
)
{
commit
(
'setPanelName'
,
panelName
)
commit
(
'setPanelName'
,
panelName
)
},
setPanelInfo
({
commit
},
panelInfo
)
{
debugger
commit
(
'setPanelInfo'
,
panelInfo
)
}
}
}
}
...
...
frontend/src/views/panel/list/PanelList.vue
浏览文件 @
1f6f8503
...
@@ -389,12 +389,9 @@ export default {
...
@@ -389,12 +389,9 @@ export default {
},
},
nodeClick
(
data
,
node
)
{
nodeClick
(
data
,
node
)
{
// console.log(data);
// console.log(node);
if
(
data
.
nodeType
===
'panel'
)
{
if
(
data
.
nodeType
===
'panel'
)
{
this
.
sceneMode
=
true
this
.
currGroup
=
data
this
.
currGroup
=
data
this
.
$store
.
dispatch
(
'
dataset/setSceneData'
,
this
.
currGroup
.
id
)
this
.
$store
.
dispatch
(
'
panel/setPanelInfo'
,
data
)
}
}
if
(
node
.
expanded
)
{
if
(
node
.
expanded
)
{
this
.
expandedArray
.
push
(
data
.
id
)
this
.
expandedArray
.
push
(
data
.
id
)
...
@@ -477,7 +474,7 @@ export default {
...
@@ -477,7 +474,7 @@ export default {
panelDefaultClick
(
data
,
node
)
{
panelDefaultClick
(
data
,
node
)
{
console
.
log
(
data
)
console
.
log
(
data
)
console
.
log
(
node
)
console
.
log
(
node
)
this
.
$store
.
dispatch
(
'panel/setPanel
Name'
,
data
.
name
)
this
.
$store
.
dispatch
(
'panel/setPanel
Info'
,
data
)
// 切换view
// 切换view
this
.
$emit
(
'switchComponent'
,
{
name
:
'PanelView'
})
this
.
$emit
(
'switchComponent'
,
{
name
:
'PanelView'
})
},
},
...
...
frontend/src/views/panel/list/PanelViewShow.vue
浏览文件 @
1f6f8503
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
<el-col
class=
"panel-design"
>
<el-col
class=
"panel-design"
>
<!--TODO 仪表盘设计公共设置区域-->
<!--TODO 仪表盘设计公共设置区域-->
<el-row
class=
"panel-design-head"
>
<el-row
class=
"panel-design-head"
>
<span
style=
"float: left;line-height: 40px; color: gray"
>
名称:
{{
panelInfo
.
name
}}
</span>
<span
style=
"float: right;line-height: 40px;"
>
<span
style=
"float: right;line-height: 40px;"
>
<el-button
size=
"mini"
>
<el-button
size=
"mini"
>
背景图
背景图
...
@@ -126,19 +127,8 @@ export default {
...
@@ -126,19 +127,8 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
tableId
()
{
panelInfo
()
{
// console.log(this.$store.state.chart.tableId);
return
this
.
$store
.
state
.
panel
.
panelInfo
this
.
initTableData
(
this
.
$store
.
state
.
chart
.
tableId
)
return
this
.
$store
.
state
.
chart
.
tableId
},
sceneId
()
{
// console.log(this.$store.state.chart.sceneId);
return
this
.
$store
.
state
.
chart
.
sceneId
},
vId
()
{
// console.log(this.$store.state.chart.viewId);
this
.
getData
(
this
.
$store
.
state
.
chart
.
viewId
)
return
this
.
$store
.
state
.
chart
.
viewId
}
}
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论