Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
a3ed8a3b
提交
a3ed8a3b
authored
10月 11, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 优化拖拽阴影动画效果等,设置仪表板视图相关背景参数默认值
上级
7db17563
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
35 行增加
和
20 行删除
+35
-20
index.vue
frontend/src/components/DeDrag/index.vue
+2
-2
shadow.vue
frontend/src/components/DeDrag/shadow.vue
+5
-5
PGrid.vue
frontend/src/components/canvas/components/Editor/PGrid.vue
+2
-2
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+16
-9
index.js
frontend/src/store/index.js
+5
-0
chart.js
frontend/src/views/chart/chart/chart.js
+2
-1
index.vue
frontend/src/views/panel/ViewSelect/index.vue
+1
-0
index.vue
frontend/src/views/panel/edit/index.vue
+1
-0
panel.js
frontend/src/views/panel/panel.js
+1
-1
没有找到文件。
frontend/src/components/DeDrag/index.vue
浏览文件 @
a3ed8a3b
...
@@ -449,7 +449,7 @@ export default {
...
@@ -449,7 +449,7 @@ export default {
return
{
return
{
width
:
this
.
computedWidth
,
width
:
this
.
computedWidth
,
height
:
this
.
computedHeight
,
height
:
this
.
computedHeight
,
opacity
:
0.
4
,
opacity
:
0.
2
,
background
:
'gray'
background
:
'gray'
}
}
},
},
...
@@ -1254,7 +1254,7 @@ export default {
...
@@ -1254,7 +1254,7 @@ export default {
// this.recordMatrixCurStyle()
// this.recordMatrixCurStyle()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
recordMatrixCurShadowStyle
()
this
.
recordMatrixCurShadowStyle
()
},
5
0
)
},
10
0
)
}
}
this
.
hasMove
&&
this
.
$store
.
commit
(
'recordSnapshot'
,
'handleUp'
)
this
.
hasMove
&&
this
.
$store
.
commit
(
'recordSnapshot'
,
'handleUp'
)
// 记录snapshot后 移动已记录设置为false
// 记录snapshot后 移动已记录设置为false
...
...
frontend/src/components/DeDrag/shadow.vue
浏览文件 @
a3ed8a3b
...
@@ -64,10 +64,7 @@ export default {
...
@@ -64,10 +64,7 @@ export default {
const
style
=
{
const
style
=
{
transform
:
`translate(
${
left
}
px,
${
top
}
px) rotate(0deg)`
,
transform
:
`translate(
${
left
}
px,
${
top
}
px) rotate(0deg)`
,
width
:
width
+
'px'
,
width
:
width
+
'px'
,
height
:
height
+
'px'
,
height
:
height
+
'px'
opacity
:
0.4
,
background
:
'gray'
,
position
:
'absolute'
}
}
// console.log('style=>' + JSON.stringify(style))
// console.log('style=>' + JSON.stringify(style))
// 记录外部拖拽进入仪表板时阴影区域宽高
// 记录外部拖拽进入仪表板时阴影区域宽高
...
@@ -110,7 +107,10 @@ export default {
...
@@ -110,7 +107,10 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.main-shadow
{
.main-shadow
{
/*transition: 0.2s;*/
transition
:
0.2s
;
opacity
:
0.4
;
background
:
#409eff
;
position
:
absolute
;
}
}
</
style
>
</
style
>
frontend/src/components/canvas/components/Editor/PGrid.vue
浏览文件 @
a3ed8a3b
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<!-- positionBox:
{{
positionBox
.
length
}}
-->
<!-- positionBox:
{{
positionBox
.
length
}}
-->
<!--
<div
v-for=
"(yItem, index) in positionBox"
v-if=
"index
<positionBox
.
length-5
"
:key=
"index+'y'"
style=
"float: left; width: 105%"
>
-->
<!--
<div
v-for=
"(yItem, index) in positionBox"
v-if=
"index
<positionBox
.
length-5
"
:key=
"index+'y'"
style=
"float: left; width: 105%"
>
-->
<div
v-for=
"(yItem, index) in positionBox"
:key=
"index+'y'"
style=
"float: left; width: 105%"
>
<div
v-for=
"(yItem, index) in positionBox"
:key=
"index+'y'"
style=
"float: left; width: 105%"
>
<div
v-for=
"(xItem, index) in yItem"
:key=
"index+'x'"
:style=
"classInfo"
style=
"float: left; border: 0.2px solid #b3d4fc ;color: #00feff"
>
<!--
<div
v-for=
"(xItem, index) in yItem"
:key=
"index+'x'"
:style=
"classInfo"
style=
"float: left; border: 0.2px solid #b3d4fc ;color: #00feff"
>
--
>
<!--
<div
v-for=
"(xItem, index) in yItem"
:key=
"index+'x'"
:style=
"classInfo"
style=
"float: left; border: 0.2px solid #b3d4fc ;"
>
--
>
<div
v-for=
"(xItem, index) in yItem"
:key=
"index+'x'"
:style=
"classInfo"
style=
"float: left; border: 0.2px solid #b3d4fc ;"
>
{{
xItem
.
el
?
1
:
0
}}
{{
xItem
.
el
?
1
:
0
}}
</div>
</div>
</div>
</div>
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
a3ed8a3b
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
@scroll="canvasScroll"
@scroll="canvasScroll"
>
>
<!-- 网格线 -->
<!-- 网格线 -->
<
!--
<Grid
v-if=
"canvasStyleData.auxiliaryMatrix&&!linkageSettingStatus"
:matrix-style=
"matrixStyle"
/>
--
>
<
Grid
v-if=
"psDebug&&canvasStyleData.auxiliaryMatrix&&!linkageSettingStatus"
:matrix-style=
"matrixStyle"
/
>
<!-- positionBox:
{{
positionBoxInfo
}}
-->
<!-- positionBox:
{{
positionBoxInfo
}}
-->
<!--
<PGrid
:position-box=
"positionBoxInfoArray"
:matrix-style=
"matrixStyle"
/>
--
>
<PGrid
v-if=
"psDebug"
:position-box=
"positionBoxInfoArray"
:matrix-style=
"matrixStyle"
/
>
<!-- 仪表板联动清除按钮-->
<!-- 仪表板联动清除按钮-->
<canvas-opt-bar
/>
<canvas-opt-bar
/>
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
</de-drag>
</de-drag>
<!--拖拽阴影部分-->
<!--拖拽阴影部分-->
<!--
<drag-shadow
v-if=
"(curComponent&&this.curComponent.optStatus.dragging)||dragComponentInfo"
/>
-->
<!--
<drag-shadow
v-if=
"(curComponent&&this.curComponent.optStatus.dragging)||dragComponentInfo"
/>
-->
<drag-shadow
v-if=
"(curComponent&&curComponent.auxiliaryMatrix)||(dragComponentInfo)"
/>
<drag-shadow
v-if=
"(curComponent&&curComponent.auxiliaryMatrix
&&(curComponent.optStatus.dragging||curComponent.optStatus.resizing)
)||(dragComponentInfo)"
/>
<!-- 右击菜单 -->
<!-- 右击菜单 -->
<ContextMenu
/>
<ContextMenu
/>
<!-- 标线 (临时去掉标线 吸附等功能)-->
<!-- 标线 (临时去掉标线 吸附等功能)-->
...
@@ -853,6 +853,7 @@ export default {
...
@@ -853,6 +853,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
psDebug
:
false
,
// 定位调试模式
editorX
:
0
,
editorX
:
0
,
editorY
:
0
,
editorY
:
0
,
start
:
{
// 选中区域的起点
start
:
{
// 选中区域的起点
...
@@ -1025,7 +1026,6 @@ export default {
...
@@ -1025,7 +1026,6 @@ export default {
mounted
()
{
mounted
()
{
// 获取编辑器元素
// 获取编辑器元素
this
.
$store
.
commit
(
'getEditor'
)
this
.
$store
.
commit
(
'getEditor'
)
const
_this
=
this
const
_this
=
this
// bus.$on('auxiliaryMatrixChange', this.initMatrix)
// bus.$on('auxiliaryMatrixChange', this.initMatrix)
bus
.
$on
(
'auxiliaryMatrixChange'
,
()
=>
{
bus
.
$on
(
'auxiliaryMatrixChange'
,
()
=>
{
...
@@ -1033,7 +1033,6 @@ export default {
...
@@ -1033,7 +1033,6 @@ export default {
_this
.
initMatrix
()
_this
.
initMatrix
()
})
})
})
})
eventBus
.
$on
(
'hideArea'
,
()
=>
{
eventBus
.
$on
(
'hideArea'
,
()
=>
{
this
.
hideArea
()
this
.
hideArea
()
})
})
...
@@ -1041,11 +1040,15 @@ export default {
...
@@ -1041,11 +1040,15 @@ export default {
// this.deleteCondition(condition)
// this.deleteCondition(condition)
// })
// })
eventBus
.
$on
(
'startMoveIn'
,
this
.
startMoveIn
)
eventBus
.
$on
(
'startMoveIn'
,
this
.
startMoveIn
)
eventBus
.
$on
(
'openChartDetailsDialog'
,
this
.
openChartDetailsDialog
)
eventBus
.
$on
(
'openChartDetailsDialog'
,
this
.
openChartDetailsDialog
)
setInterval
(()
=>
{
bus
.
$on
(
'onRemoveLastItem'
,
this
.
removeLastItem
)
_this
.
positionBoxInfoArray
=
positionBox
},
500
)
// 矩阵定位调试模式
if
(
this
.
psDebug
)
{
setInterval
(()
=>
{
_this
.
positionBoxInfoArray
=
positionBox
},
500
)
}
},
},
created
()
{
created
()
{
// this.$store.dispatch('conditions/clear')
// this.$store.dispatch('conditions/clear')
...
@@ -1675,6 +1678,10 @@ export default {
...
@@ -1675,6 +1678,10 @@ export default {
addItem
.
call
(
this
,
item
,
this
.
yourList
.
length
-
1
)
addItem
.
call
(
this
,
item
,
this
.
yourList
.
length
-
1
)
})
})
},
},
removeLastItem
()
{
console
.
log
(
'rlI:'
+
JSON
.
stringify
(
this
.
yourList
))
this
.
removeItem
(
this
.
yourList
.
length
-
1
)
},
startMoveIn
()
{
startMoveIn
()
{
if
(
this
.
canvasStyleData
.
auxiliaryMatrix
)
{
if
(
this
.
canvasStyleData
.
auxiliaryMatrix
)
{
const
moveInItemInfo
=
this
.
$store
.
state
.
dragComponentInfo
const
moveInItemInfo
=
this
.
$store
.
state
.
dragComponentInfo
...
...
frontend/src/store/index.js
浏览文件 @
a3ed8a3b
...
@@ -27,6 +27,7 @@ import { Condition } from '@/components/widget/bean/Condition'
...
@@ -27,6 +27,7 @@ import { Condition } from '@/components/widget/bean/Condition'
import
{
import
{
DEFAULT_COMMON_CANVAS_STYLE_STRING
DEFAULT_COMMON_CANVAS_STYLE_STRING
}
from
'@/views/panel/panel'
}
from
'@/views/panel/panel'
import
bus
from
'@/utils/bus'
Vue
.
use
(
Vuex
)
Vue
.
use
(
Vuex
)
...
@@ -280,6 +281,10 @@ const data = {
...
@@ -280,6 +281,10 @@ const data = {
state
.
dragComponentInfo
=
dragComponentInfo
state
.
dragComponentInfo
=
dragComponentInfo
},
},
clearDragComponentInfo
(
state
)
{
clearDragComponentInfo
(
state
)
{
// 如果当前没有拖拽的元素没有放置到画布 清理一下矩阵的占位符
if
(
state
.
dragComponentInfo
.
moveStatus
!==
'drop'
)
{
bus
.
$emit
(
'onRemoveLastItem'
)
}
state
.
dragComponentInfo
=
null
state
.
dragComponentInfo
=
null
}
}
},
},
...
...
frontend/src/views/chart/chart/chart.js
浏览文件 @
a3ed8a3b
...
@@ -184,7 +184,8 @@ export const DEFAULT_YAXIS_EXT_STYLE = {
...
@@ -184,7 +184,8 @@ export const DEFAULT_YAXIS_EXT_STYLE = {
}
}
export
const
DEFAULT_BACKGROUND_COLOR
=
{
export
const
DEFAULT_BACKGROUND_COLOR
=
{
color
:
'#ffffff'
,
color
:
'#ffffff'
,
alpha
:
0
alpha
:
100
,
borderRadius
:
5
}
}
export
const
DEFAULT_SPLIT
=
{
export
const
DEFAULT_SPLIT
=
{
name
:
{
name
:
{
...
...
frontend/src/views/panel/ViewSelect/index.vue
浏览文件 @
a3ed8a3b
...
@@ -188,6 +188,7 @@ export default {
...
@@ -188,6 +188,7 @@ export default {
}
}
})
})
component
.
auxiliaryMatrix
=
this
.
canvasStyleData
.
auxiliaryMatrix
component
.
auxiliaryMatrix
=
this
.
canvasStyleData
.
auxiliaryMatrix
component
.
moveStatus
=
'start'
return
component
return
component
}
}
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
a3ed8a3b
...
@@ -476,6 +476,7 @@ export default {
...
@@ -476,6 +476,7 @@ export default {
return
data
return
data
},
},
handleDrop
(
e
)
{
handleDrop
(
e
)
{
this
.
dragComponentInfo
.
moveStatus
=
'drop'
// 记录拖拽信息
// 记录拖拽信息
this
.
dropComponentInfo
=
deepCopy
(
this
.
dragComponentInfo
)
this
.
dropComponentInfo
=
deepCopy
(
this
.
dragComponentInfo
)
this
.
currentDropElement
=
e
this
.
currentDropElement
=
e
...
...
frontend/src/views/panel/panel.js
浏览文件 @
a3ed8a3b
...
@@ -7,7 +7,7 @@ export const DEFAULT_PANEL_STYLE = {
...
@@ -7,7 +7,7 @@ export const DEFAULT_PANEL_STYLE = {
color
:
'#ffffff'
,
color
:
'#ffffff'
,
imageUrl
:
null
,
imageUrl
:
null
,
backgroundType
:
'image'
,
backgroundType
:
'image'
,
gap
:
'
no
'
gap
:
'
yes
'
}
}
export
const
CANVAS_STYLE
=
{
export
const
CANVAS_STYLE
=
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论