Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
eaf256ee
提交
eaf256ee
authored
10月 10, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 修复画板部分拖拽问题,增加位置交换动画效果等
上级
549bf0da
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
43 行增加
和
11 行删除
+43
-11
index.vue
frontend/src/components/DeDrag/index.vue
+15
-3
EditBar.vue
frontend/src/components/canvas/components/Editor/EditBar.vue
+5
-2
PGrid.vue
frontend/src/components/canvas/components/Editor/PGrid.vue
+1
-0
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+0
-0
copy.js
frontend/src/components/canvas/store/copy.js
+2
-0
index.js
frontend/src/store/index.js
+8
-6
index.vue
frontend/src/views/panel/edit/index.vue
+8
-0
PanelList.vue
frontend/src/views/panel/list/PanelList.vue
+4
-0
没有找到文件。
frontend/src/components/DeDrag/index.vue
浏览文件 @
eaf256ee
...
@@ -11,7 +11,8 @@
...
@@ -11,7 +11,8 @@
[classNameRotating]: rotating,
[classNameRotating]: rotating,
[classNameRotatable]: rotatable,
[classNameRotatable]: rotatable,
[classNameMouseOn]: mouseOn || active,
[classNameMouseOn]: mouseOn || active,
['linkageSetting']:linkageActive
['linkageSetting']:linkageActive,
['positionChange']:!(dragging || resizing||rotating)
},
},
className
className
]"
]"
...
@@ -595,7 +596,7 @@ export default {
...
@@ -595,7 +596,7 @@ export default {
this
.
maxH
=
val
this
.
maxH
=
val
},
},
w
(
val
)
{
w
(
val
)
{
//
console.log('changeWidthCK:' + this.resizing)
console
.
log
(
'changeWidthCK:'
+
this
.
resizing
)
if
(
this
.
resizing
||
this
.
dragging
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
return
...
@@ -1576,12 +1577,17 @@ export default {
...
@@ -1576,12 +1577,17 @@ export default {
},
},
// 记录当前样式 跟随阴影位置 矩阵处理
// 记录当前样式 跟随阴影位置 矩阵处理
recordMatrixCurShadowStyle
()
{
recordMatrixCurShadowStyle
()
{
// console.log('recordMatrixCurShadowStyle')
// debugger
// debugger
const
left
=
(
this
.
element
.
x
-
1
)
*
this
.
curCanvasScale
.
matrixStyleWidth
const
left
=
(
this
.
element
.
x
-
1
)
*
this
.
curCanvasScale
.
matrixStyleWidth
const
top
=
(
this
.
element
.
y
-
1
)
*
this
.
curCanvasScale
.
matrixStyleHeight
const
top
=
(
this
.
element
.
y
-
1
)
*
this
.
curCanvasScale
.
matrixStyleHeight
const
width
=
this
.
element
.
sizex
*
this
.
curCanvasScale
.
matrixStyleWidth
const
width
=
this
.
element
.
sizex
*
this
.
curCanvasScale
.
matrixStyleWidth
const
height
=
this
.
element
.
sizey
*
this
.
curCanvasScale
.
matrixStyleHeight
const
height
=
this
.
element
.
sizey
*
this
.
curCanvasScale
.
matrixStyleHeight
// const t1 = Math.round(this.width / this.curCanvasScale.matrixStyleWidth)
// const left = Math.round(this.left / this.curCanvasScale.matrixStyleWidth) * this.curCanvasScale.matrixStyleWidth
// const top = Math.round(this.top / this.curCanvasScale.matrixStyleHeight) * this.curCanvasScale.matrixStyleHeight
// const width = t1 * this.curCanvasScale.matrixStyleWidth
// const height = Math.round(this.height / this.curCanvasScale.matrixStyleHeight) * this.curCanvasScale.matrixStyleHeight
const
style
=
{
const
style
=
{
...
this
.
defaultStyle
...
this
.
defaultStyle
}
}
...
@@ -1591,6 +1597,8 @@ export default {
...
@@ -1591,6 +1597,8 @@ export default {
style
.
height
=
height
style
.
height
=
height
style
.
rotate
=
this
.
rotate
style
.
rotate
=
this
.
rotate
// this.hasMove = true
// this.hasMove = true
// console.log('recordMatrixCurShadowStyle:t1:' + t1 + ';mw:' + this.curCanvasScale.matrixStyleWidth + ';width:' + width)
this
.
$store
.
commit
(
'setShapeStyle'
,
style
)
this
.
$store
.
commit
(
'setShapeStyle'
,
style
)
// resize
// resize
...
@@ -1757,6 +1765,10 @@ export default {
...
@@ -1757,6 +1765,10 @@ export default {
opacity
:
0.5
;
opacity
:
0.5
;
}
}
.positionChange
{
transition
:
0.2s
}
.gap_class
{
.gap_class
{
padding
:
5px
;
padding
:
5px
;
}
}
...
...
frontend/src/components/canvas/components/Editor/EditBar.vue
浏览文件 @
eaf256ee
...
@@ -26,6 +26,9 @@
...
@@ -26,6 +26,9 @@
<span
:title=
"$t('panel.cancel_linkage')"
>
<span
:title=
"$t('panel.cancel_linkage')"
>
<i
v-if=
"curComponent.type==='view'&&existLinkage"
class=
"icon iconfont icon-quxiaoliandong"
@
click
.
stop=
"clearLinkage"
/>
<i
v-if=
"curComponent.type==='view'&&existLinkage"
class=
"icon iconfont icon-quxiaoliandong"
@
click
.
stop=
"clearLinkage"
/>
</span>
</span>
<!--
<spa>
-->
<!--
{{
curComponent
.
x
}}
-
{{
curComponent
.
y
}}
--
{{
curComponent
.
sizex
}}
-
{{
curComponent
.
sizey
}}
-->
<!--
</spa>
-->
</div>
</div>
</div>
</div>
...
@@ -69,7 +72,7 @@ export default {
...
@@ -69,7 +72,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
createTimer
()
//
this.createTimer()
},
},
computed
:
{
computed
:
{
existLinkage
()
{
existLinkage
()
{
...
@@ -102,7 +105,7 @@ export default {
...
@@ -102,7 +105,7 @@ export default {
])
])
},
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
destroyTimer
()
//
this.destroyTimer()
},
},
methods
:
{
methods
:
{
createTimer
()
{
createTimer
()
{
...
...
frontend/src/components/canvas/components/Editor/PGrid.vue
浏览文件 @
eaf256ee
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<!--
<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 ;"
>
-->
{{
xItem
.
el
?
1
:
0
}}
{{
xItem
.
el
?
1
:
0
}}
</div>
</div>
</div>
</div>
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
eaf256ee
frontend/src/components/canvas/store/copy.js
浏览文件 @
eaf256ee
...
@@ -27,8 +27,10 @@ export default {
...
@@ -27,8 +27,10 @@ export default {
}
}
const
data
=
state
.
copyData
.
data
const
data
=
state
.
copyData
.
data
if
(
!
state
.
curComponent
.
auxiliaryMatrix
)
{
data
.
style
.
top
+=
20
data
.
style
.
top
+=
20
data
.
style
.
left
+=
20
data
.
style
.
left
+=
20
}
// if (isMouse) {
// if (isMouse) {
// data.style.top = state.menuTop
// data.style.top = state.menuTop
...
...
frontend/src/store/index.js
浏览文件 @
eaf256ee
...
@@ -98,7 +98,7 @@ const data = {
...
@@ -98,7 +98,7 @@ const data = {
state
.
styleChangeTimes
=
0
state
.
styleChangeTimes
=
0
state
.
curComponent
=
component
state
.
curComponent
=
component
state
.
curComponentIndex
=
index
state
.
curComponentIndex
=
index
console
.
log
(
'setCurComponent:'
+
JSON
.
stringify
(
component
))
//
console.log('setCurComponent:' + JSON.stringify(component))
},
},
setCurCanvasScale
(
state
,
curCanvasScale
)
{
setCurCanvasScale
(
state
,
curCanvasScale
)
{
...
@@ -115,13 +115,15 @@ const data = {
...
@@ -115,13 +115,15 @@ const data = {
// },
// },
setShapeStyle
({
curComponent
,
canvasStyleData
,
curCanvasScale
},
{
top
,
left
,
width
,
height
,
rotate
})
{
setShapeStyle
({
curComponent
,
canvasStyleData
,
curCanvasScale
},
{
top
,
left
,
width
,
height
,
rotate
})
{
// console.log('setShapeStyle:width=' + width + ';height=' + height)
console
.
log
(
'cw:'
+
curComponent
.
style
.
width
+
';w:'
+
width
+
';sp:'
+
curCanvasScale
.
scalePointWidth
)
if
(
top
||
top
===
0
)
curComponent
.
style
.
top
=
top
/
curCanvasScale
.
scalePointHeight
const
ow
=
curComponent
.
style
.
width
if
(
left
||
left
===
0
)
curComponent
.
style
.
left
=
left
/
curCanvasScale
.
scalePointWidth
if
(
top
||
top
===
0
)
curComponent
.
style
.
top
=
(
top
/
curCanvasScale
.
scalePointHeight
)
+
0.0000001
if
(
width
||
width
===
0
)
curComponent
.
style
.
width
=
width
/
curCanvasScale
.
scalePointWidth
if
(
left
||
left
===
0
)
curComponent
.
style
.
left
=
(
left
/
curCanvasScale
.
scalePointWidth
)
+
0.0000001
if
(
height
||
height
===
0
)
curComponent
.
style
.
height
=
height
/
curCanvasScale
.
scalePointHeight
if
(
width
||
width
===
0
)
curComponent
.
style
.
width
=
(
width
/
curCanvasScale
.
scalePointWidth
+
0.0000001
)
if
(
height
||
height
===
0
)
curComponent
.
style
.
height
=
(
height
/
curCanvasScale
.
scalePointHeight
)
+
0.0000001
if
(
rotate
||
rotate
===
0
)
curComponent
.
style
.
rotate
=
rotate
if
(
rotate
||
rotate
===
0
)
curComponent
.
style
.
rotate
=
rotate
// console.log('setShapeStyle:curComponent' + 'top:' + top + ';left:' + left + '====' + JSON.stringify(curComponent))
// console.log('setShapeStyle:curComponent' + 'top:' + top + ';left:' + left + '====' + JSON.stringify(curComponent))
console
.
log
(
'setShapeStyle:curComponent'
+
'w:'
+
curComponent
.
style
.
width
+
';ow:'
+
ow
)
},
},
setShapeSingleStyle
({
curComponent
},
{
key
,
value
})
{
setShapeSingleStyle
({
curComponent
},
{
key
,
value
})
{
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
eaf256ee
...
@@ -387,6 +387,10 @@ export default {
...
@@ -387,6 +387,10 @@ export default {
item
.
filters
=
(
item
.
filters
||
[])
item
.
filters
=
(
item
.
filters
||
[])
item
.
linkageFilters
=
(
item
.
linkageFilters
||
[])
item
.
linkageFilters
=
(
item
.
linkageFilters
||
[])
item
.
auxiliaryMatrix
=
(
item
.
auxiliaryMatrix
||
false
)
item
.
auxiliaryMatrix
=
(
item
.
auxiliaryMatrix
||
false
)
item
.
x
=
(
item
.
x
||
1
)
item
.
y
=
(
item
.
y
||
1
)
item
.
sizex
=
(
item
.
sizex
||
5
)
item
.
sizey
=
(
item
.
sizey
||
5
)
})
})
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
componentDatas
))
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
componentDatas
))
// this.$store.commit('setComponentData', this.resetID(JSON.parse(componentDataTemp)))
// this.$store.commit('setComponentData', this.resetID(JSON.parse(componentDataTemp)))
...
@@ -401,6 +405,10 @@ export default {
...
@@ -401,6 +405,10 @@ export default {
item
.
filters
=
(
item
.
filters
||
[])
item
.
filters
=
(
item
.
filters
||
[])
item
.
linkageFilters
=
(
item
.
linkageFilters
||
[])
item
.
linkageFilters
=
(
item
.
linkageFilters
||
[])
item
.
auxiliaryMatrix
=
(
item
.
auxiliaryMatrix
||
false
)
item
.
auxiliaryMatrix
=
(
item
.
auxiliaryMatrix
||
false
)
item
.
x
=
(
item
.
x
||
1
)
item
.
y
=
(
item
.
y
||
1
)
item
.
sizex
=
(
item
.
sizex
||
5
)
item
.
sizey
=
(
item
.
sizey
||
5
)
})
})
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
componentDatas
))
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
componentDatas
))
// this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData)))
// this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData)))
...
...
frontend/src/views/panel/list/PanelList.vue
浏览文件 @
eaf256ee
...
@@ -622,6 +622,10 @@ export default {
...
@@ -622,6 +622,10 @@ export default {
item
.
filters
=
(
item
.
filters
||
[])
item
.
filters
=
(
item
.
filters
||
[])
item
.
linkageFilters
=
(
item
.
linkageFilters
||
[])
item
.
linkageFilters
=
(
item
.
linkageFilters
||
[])
item
.
auxiliaryMatrix
=
(
item
.
auxiliaryMatrix
||
false
)
item
.
auxiliaryMatrix
=
(
item
.
auxiliaryMatrix
||
false
)
item
.
x
=
(
item
.
x
||
1
)
item
.
y
=
(
item
.
y
||
1
)
item
.
sizex
=
(
item
.
sizex
||
5
)
item
.
sizey
=
(
item
.
sizey
||
5
)
})
})
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
componentDatas
))
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
componentDatas
))
// this.$store.commit('setComponentData', sourceInfo.type === 'custom' ? sourceInfo : this.resetID(sourceInfo))
// this.$store.commit('setComponentData', sourceInfo.type === 'custom' ? sourceInfo : this.resetID(sourceInfo))
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论