Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
a7be6312
Unverified
提交
a7be6312
authored
12月 24, 2021
作者:
fit2cloud-chenyw
提交者:
GitHub
12月 24, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1517 from dataease/pr@dev@fix_filters_logic
fix: 过滤组件逻辑
上级
f6a82359
26047142
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
12 行增加
和
96 行删除
+12
-96
PreviewEject.vue
.../src/components/canvas/components/Editor/PreviewEject.vue
+4
-1
Toolbar.vue
frontend/src/components/canvas/components/Toolbar.vue
+6
-1
PreviewMobile.vue
frontend/src/components/canvas/mobile/PreviewMobile.vue
+0
-93
utils.js
frontend/src/components/canvas/utils/utils.js
+2
-1
没有找到文件。
frontend/src/components/canvas/components/Editor/PreviewEject.vue
浏览文件 @
a7be6312
...
...
@@ -9,6 +9,7 @@ import { uuid } from 'vue-uuid'
import
{
findOne
}
from
'@/api/panel/panel'
import
{
getPanelAllLinkageInfo
}
from
'@/api/panel/linkage'
import
{
queryPanelJumpInfo
,
queryTargetPanelJumpInfo
}
from
'@/api/panel/linkJump'
import
{
panelInit
}
from
'@/components/canvas/utils/utils'
export
default
{
components
:
{
Preview
},
...
...
@@ -43,8 +44,10 @@ export default {
}
// 加载视图数据
findOne
(
this
.
panelId
).
then
(
response
=>
{
const
componentDatas
=
JSON
.
parse
(
response
.
data
.
panelData
)
panelInit
(
componentDatas
)
this
.
dataLoading
=
false
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
JSON
.
parse
(
response
.
data
.
panelData
)
))
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
componentDatas
))
this
.
$store
.
commit
(
'setCanvasStyle'
,
JSON
.
parse
(
response
.
data
.
panelStyle
))
const
data
=
{
id
:
response
.
data
.
id
,
...
...
frontend/src/components/canvas/components/Toolbar.vue
浏览文件 @
a7be6312
...
...
@@ -75,7 +75,6 @@ import { deepCopy, mobile2MainCanvas } from '@/components/canvas/utils/utils'
import
{
panelSave
}
from
'@/api/panel/panel'
import
{
saveLinkage
,
getPanelAllLinkageInfo
}
from
'@/api/panel/linkage'
import
bus
from
'@/utils/bus'
import
{
DEFAULT_COMMON_CANVAS_STYLE_STRING
}
from
'@/views/panel/panel'
...
...
@@ -266,6 +265,12 @@ export default {
panelStyle
:
JSON
.
stringify
(
this
.
canvasStyleData
),
panelData
:
JSON
.
stringify
(
this
.
componentData
)
}
const
components
=
deepCopy
(
this
.
componentData
)
components
.
forEach
(
view
=>
{
if
(
view
.
filters
&&
view
.
filters
.
length
>
0
)
{
view
.
filters
=
[]
}
})
// 无需保存条件
requestInfo
.
panelData
=
JSON
.
stringify
(
components
)
panelSave
(
requestInfo
).
then
(
response
=>
{
this
.
$store
.
commit
(
'refreshSaveStatus'
)
this
.
$message
({
...
...
frontend/src/components/canvas/mobile/PreviewMobile.vue
deleted
100644 → 0
浏览文件 @
f6a82359
<
template
>
<div
v-loading=
"dataLoading"
class=
"bg"
>
<Preview
v-if=
"!dataLoading"
/>
</div>
</
template
>
<
script
>
import
Preview
from
'./Preview'
import
{
uuid
}
from
'vue-uuid'
import
{
findOne
}
from
'@/api/panel/panel'
import
{
getPanelAllLinkageInfo
}
from
'@/api/panel/linkage'
import
{
queryPanelJumpInfo
,
queryTargetPanelJumpInfo
}
from
'@/api/panel/linkJump'
export
default
{
components
:
{
Preview
},
props
:
{
panelId
:
{
type
:
String
,
require
:
true
}
},
data
()
{
return
{
dataLoading
:
false
}
},
mounted
()
{
this
.
restore
()
},
methods
:
{
restore
()
{
this
.
dataLoading
=
true
// 加载视图数据
findOne
(
this
.
panelId
).
then
(
response
=>
{
this
.
dataLoading
=
false
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
JSON
.
parse
(
response
.
data
.
panelData
)))
this
.
$store
.
commit
(
'setCanvasStyle'
,
JSON
.
parse
(
response
.
data
.
panelStyle
))
const
data
=
{
id
:
response
.
data
.
id
,
name
:
response
.
data
.
name
}
// 刷新联动信息
getPanelAllLinkageInfo
(
this
.
panelId
).
then
(
rsp
=>
{
this
.
$store
.
commit
(
'setNowPanelTrackInfo'
,
rsp
.
data
)
})
// 刷新跳转信息
queryPanelJumpInfo
(
this
.
panelId
).
then
(
rsp
=>
{
this
.
$store
.
commit
(
'setNowPanelJumpInfo'
,
rsp
.
data
)
})
// 如果含有跳转参数 进行触发
const
tempParam
=
localStorage
.
getItem
(
'jumpInfoParam'
)
if
(
tempParam
)
{
localStorage
.
removeItem
(
'jumpInfoParam'
)
const
jumpParam
=
JSON
.
parse
(
tempParam
)
const
jumpRequestParam
=
{
sourcePanelId
:
jumpParam
.
sourcePanelId
,
sourceViewId
:
jumpParam
.
sourceViewId
,
sourceFieldId
:
jumpParam
.
sourceFieldId
,
targetPanelId
:
this
.
panelId
}
this
.
dataLoading
=
true
// 刷新跳转目标仪表板联动信息
queryTargetPanelJumpInfo
(
jumpRequestParam
).
then
(
rsp
=>
{
this
.
dataLoading
=
false
this
.
$store
.
commit
(
'setNowTargetPanelJumpInfo'
,
rsp
.
data
)
this
.
$store
.
commit
(
'addViewTrackFilter'
,
jumpParam
)
})
}
this
.
$store
.
dispatch
(
'panel/setPanelInfo'
,
data
)
})
},
resetID
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
item
.
type
!==
'custom'
&&
(
item
.
id
=
uuid
.
v1
())
})
}
return
data
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.bg
{
width
:
100%
;
height
:
100vh
!
important
;
min-width
:
800px
;
min-height
:
600px
;
background-color
:
#f7f8fa
;
}
</
style
>
frontend/src/components/canvas/utils/utils.js
浏览文件 @
a7be6312
...
...
@@ -60,7 +60,8 @@ export function mobile2MainCanvas(mainSource, mobileSource) {
export
function
panelInit
(
componentDatas
)
{
componentDatas
.
forEach
(
item
=>
{
item
.
filters
=
(
item
.
filters
||
[])
/* item.filters = (item.filters || []) */
item
.
filters
=
[]
item
.
linkageFilters
=
(
item
.
linkageFilters
||
[])
item
.
auxiliaryMatrix
=
(
item
.
auxiliaryMatrix
||
false
)
item
.
x
=
(
item
.
x
||
1
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论