Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
918ba6b0
提交
918ba6b0
authored
6月 24, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/main' into main
上级
51d94ba3
74006adc
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
41 行增加
和
16 行删除
+41
-16
index.vue
frontend/src/components/DeDrag/index.vue
+6
-0
DeComplexInput.vue
...rc/components/business/condition-table/DeComplexInput.vue
+2
-0
DeComplexOperator.vue
...components/business/condition-table/DeComplexOperator.vue
+3
-0
Area.vue
frontend/src/components/canvas/components/Editor/Area.vue
+6
-3
Grid.vue
frontend/src/components/canvas/components/Editor/Grid.vue
+1
-0
Group.vue
frontend/src/components/canvas/custom-component/Group.vue
+1
-0
Picture.vue
frontend/src/components/canvas/custom-component/Picture.vue
+1
-0
RectShape.vue
...tend/src/components/canvas/custom-component/RectShape.vue
+1
-0
VText.vue
frontend/src/components/canvas/custom-component/VText.vue
+5
-3
index.vue
frontend/src/components/canvas/index.vue
+4
-2
compose.js
frontend/src/components/canvas/store/compose.js
+1
-1
shortcutKey.js
frontend/src/components/canvas/utils/shortcutKey.js
+4
-4
style.js
frontend/src/components/canvas/utils/style.js
+1
-1
index.js
frontend/src/directive/DataPermission/index.js
+2
-0
link-router.js
frontend/src/link/link-router.js
+1
-2
index.js
frontend/src/utils/index.js
+1
-0
util.js
frontend/src/views/chart/chart/util.js
+1
-0
没有找到文件。
frontend/src/components/DeDrag/index.vue
浏览文件 @
918ba6b0
...
...
@@ -911,6 +911,7 @@ export default {
},
// 外部传参改动x
moveHorizontally
(
val
)
{
// eslint-disable-next-line no-unused-vars
const
[
deltaX
,
_
]
=
snapToGrid
(
this
.
grid
,
val
,
this
.
top
,
this
.
scale
)
const
left
=
restrictToBounds
(
deltaX
,
this
.
bounds
.
minLeft
,
this
.
bounds
.
maxLeft
)
this
.
left
=
left
...
...
@@ -918,6 +919,7 @@ export default {
},
// 外部传参改动y
moveVertically
(
val
)
{
// eslint-disable-next-line no-unused-vars
const
[
_
,
deltaY
]
=
snapToGrid
(
this
.
grid
,
this
.
left
,
val
,
this
.
scale
)
const
top
=
restrictToBounds
(
deltaY
,
this
.
bounds
.
minTop
,
this
.
bounds
.
maxTop
)
this
.
top
=
top
...
...
@@ -926,6 +928,7 @@ export default {
// 控制柄移动
handleResize
(
e
)
{
const
handle
=
this
.
handle
// eslint-disable-next-line no-unused-vars
const
scaleRatio
=
this
.
scaleRatio
const
{
TL
,
TR
,
BL
,
BR
}
=
this
let
{
x
:
mouseX
,
y
:
mouseY
}
=
this
.
getMouseCoordinate
(
e
)
...
...
@@ -1085,6 +1088,7 @@ export default {
changeWidth
(
val
)
{
// console.log('parentWidth', this.parentWidth)
// console.log('parentHeight', this.parentHeight)
// eslint-disable-next-line no-unused-vars
const
[
newWidth
,
_
]
=
snapToGrid
(
this
.
grid
,
val
,
0
,
this
.
scale
)
// const right = restrictToBounds(this.parentWidth - newWidth - this.left, this.bounds.minRight, this.bounds.maxRight)
// private 将 this.bounds.minRight 设置为0
...
...
@@ -1102,6 +1106,7 @@ export default {
this
.
height
=
height
},
changeHeight
(
val
)
{
// eslint-disable-next-line no-unused-vars
const
[
_
,
newHeight
]
=
snapToGrid
(
this
.
grid
,
0
,
val
,
this
.
scale
)
// const bottom = restrictToBounds(this.parentHeight - newHeight - this.top, this.bounds.minBottom, this.bounds.maxBottom)
// private 将 this.bounds.minBottom 设置为0
...
...
@@ -1418,6 +1423,7 @@ export default {
},
// 修复 正则获取left与top
formatTransformVal
(
string
)
{
// eslint-disable-next-line prefer-const
let
[
left
,
top
,
rotate
=
0
]
=
string
.
match
(
/
[\d
|
\.]
+/g
)
if
(
top
===
undefined
)
top
=
0
return
[
Number
(
left
),
Number
(
top
),
rotate
]
...
...
frontend/src/components/business/condition-table/DeComplexInput.vue
浏览文件 @
918ba6b0
...
...
@@ -14,7 +14,9 @@ export default {
components
:
{
DeComplexOperator
},
// mixins: [mixins],
props
:
{
// eslint-disable-next-line vue/require-default-prop
field
:
String
,
// eslint-disable-next-line vue/require-default-prop
label
:
String
,
defaultOperator
:
{
type
:
String
,
...
...
frontend/src/components/business/condition-table/DeComplexOperator.vue
浏览文件 @
918ba6b0
...
...
@@ -30,8 +30,11 @@ export default {
event
:
'change'
},
props
:
{
// eslint-disable-next-line vue/require-default-prop
label
:
String
,
// eslint-disable-next-line vue/require-default-prop
operator
:
String
,
// eslint-disable-next-line vue/require-default-prop
operators
:
Array
},
data
()
{
...
...
frontend/src/components/canvas/components/Editor/Area.vue
浏览文件 @
918ba6b0
...
...
@@ -14,13 +14,16 @@
export
default
{
props
:
{
start
:
{
type
:
Object
type
:
Object
,
default
:
null
},
width
:
{
type
:
Number
type
:
Number
,
default
:
null
},
height
:
{
type
:
Number
type
:
Number
,
default
:
null
}
}
}
...
...
frontend/src/components/canvas/components/Editor/Grid.vue
浏览文件 @
918ba6b0
...
...
@@ -27,6 +27,7 @@
export
default
{
props
:
{
// eslint-disable-next-line vue/require-default-prop
matrixStyle
:
{
type
:
Object
}
...
...
frontend/src/components/canvas/custom-component/Group.vue
浏览文件 @
918ba6b0
...
...
@@ -25,6 +25,7 @@ export default {
type
:
Array
,
default
:
()
=>
[]
},
// eslint-disable-next-line vue/require-default-prop
element
:
{
type
:
Object
}
...
...
frontend/src/components/canvas/custom-component/Picture.vue
浏览文件 @
918ba6b0
...
...
@@ -7,6 +7,7 @@
<
script
>
export
default
{
props
:
{
// eslint-disable-next-line vue/require-default-prop
propValue
:
{
type
:
String
,
require
:
true
...
...
frontend/src/components/canvas/custom-component/RectShape.vue
浏览文件 @
918ba6b0
...
...
@@ -7,6 +7,7 @@
<
script
>
export
default
{
props
:
{
// eslint-disable-next-line vue/require-default-prop
element
:
{
type
:
Object
}
...
...
frontend/src/components/canvas/custom-component/VText.vue
浏览文件 @
918ba6b0
...
...
@@ -25,10 +25,12 @@ import { keycodes } from '@/components/canvas/utils/shortcutKey.js'
export
default
{
props
:
{
// eslint-disable-next-line vue/require-default-prop
propValue
:
{
type
:
String
,
require
:
true
},
// eslint-disable-next-line vue/require-default-prop
element
:
{
type
:
Object
},
...
...
@@ -68,17 +70,17 @@ export default {
},
handleKeydown
(
e
)
{
if
(
e
.
keyCode
==
this
.
ctrlKey
)
{
if
(
e
.
keyCode
==
=
this
.
ctrlKey
)
{
this
.
isCtrlDown
=
true
}
else
if
(
this
.
isCtrlDown
&&
this
.
canEdit
&&
keycodes
.
includes
(
e
.
keyCode
))
{
e
.
stopPropagation
()
}
else
if
(
e
.
keyCode
==
46
)
{
// deleteKey
}
else
if
(
e
.
keyCode
==
=
46
)
{
// deleteKey
e
.
stopPropagation
()
}
},
handleKeyup
(
e
)
{
if
(
e
.
keyCode
==
this
.
ctrlKey
)
{
if
(
e
.
keyCode
==
=
this
.
ctrlKey
)
{
this
.
isCtrlDown
=
false
}
},
...
...
frontend/src/components/canvas/index.vue
浏览文件 @
918ba6b0
...
...
@@ -38,6 +38,7 @@ import generateID from '@/utils/generateID'
import
{
listenGlobalKeyDown
}
from
'@/utils/shortcutKey'
export
default
{
// eslint-disable-next-line vue/no-unused-components
components
:
{
Editor
,
ComponentList
,
AttrList
,
AnimationList
,
EventList
,
Toolbar
},
data
()
{
return
{
...
...
@@ -71,6 +72,7 @@ export default {
resetID
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
// eslint-disable-next-line no-undef
item
.
type
!==
'custom'
&&
(
item
.
id
=
uuid
.
v1
())
})
}
...
...
@@ -85,7 +87,7 @@ export default {
let
component
const
id
=
e
.
dataTransfer
.
getData
(
'componentId'
)
componentList
.
forEach
(
componentTemp
=>
{
if
(
id
==
componentTemp
.
id
)
{
if
(
id
==
=
componentTemp
.
id
)
{
component
=
deepCopy
(
componentTemp
)
}
})
...
...
@@ -112,7 +114,7 @@ export default {
}
// 0 左击 1 滚轮 2 右击
if
(
e
.
button
!=
2
)
{
if
(
e
.
button
!=
=
2
)
{
this
.
$store
.
commit
(
'hideContextMenu'
)
}
}
...
...
frontend/src/components/canvas/store/compose.js
浏览文件 @
918ba6b0
...
...
@@ -77,7 +77,7 @@ export default {
batchDeleteComponent
({
componentData
},
deleteData
)
{
deleteData
.
forEach
(
component
=>
{
for
(
let
i
=
0
,
len
=
componentData
.
length
;
i
<
len
;
i
++
)
{
if
(
component
.
id
==
componentData
[
i
].
id
)
{
if
(
component
.
id
==
=
componentData
[
i
].
id
)
{
componentData
.
splice
(
i
,
1
)
break
}
...
...
frontend/src/components/canvas/utils/shortcutKey.js
浏览文件 @
918ba6b0
...
...
@@ -56,9 +56,9 @@ let isCtrlDown = false
export
function
listenGlobalKeyDown
()
{
window
.
onkeydown
=
(
e
)
=>
{
const
{
curComponent
}
=
store
.
state
if
(
e
.
keyCode
==
ctrlKey
)
{
if
(
e
.
keyCode
==
=
ctrlKey
)
{
isCtrlDown
=
true
}
else
if
(
e
.
keyCode
==
deleteKey
&&
curComponent
)
{
}
else
if
(
e
.
keyCode
==
=
deleteKey
&&
curComponent
)
{
store
.
commit
(
'deleteComponent'
)
store
.
commit
(
'recordSnapshot'
)
}
else
if
(
isCtrlDown
)
{
...
...
@@ -73,7 +73,7 @@ export function listenGlobalKeyDown() {
}
window
.
onkeyup
=
(
e
)
=>
{
if
(
e
.
keyCode
==
ctrlKey
)
{
if
(
e
.
keyCode
==
=
ctrlKey
)
{
isCtrlDown
=
false
}
}
...
...
@@ -109,7 +109,7 @@ function compose() {
function
decompose
()
{
const
curComponent
=
store
.
state
.
curComponent
if
(
curComponent
&&
!
curComponent
.
isLock
&&
curComponent
.
component
==
'Group'
)
{
if
(
curComponent
&&
!
curComponent
.
isLock
&&
curComponent
.
component
==
=
'Group'
)
{
store
.
commit
(
'decompose'
)
store
.
commit
(
'recordSnapshot'
)
}
...
...
frontend/src/components/canvas/utils/style.js
浏览文件 @
918ba6b0
...
...
@@ -33,7 +33,7 @@ export function getStyle(style, filter = []) {
// 获取一个组件旋转 rotate 后的样式
export
function
getComponentRotatedStyle
(
style
)
{
style
=
{
...
style
}
if
(
style
.
rotate
!=
0
)
{
if
(
style
.
rotate
!=
=
0
)
{
const
newWidth
=
style
.
width
*
cos
(
style
.
rotate
)
+
style
.
height
*
sin
(
style
.
rotate
)
const
diffX
=
(
style
.
width
-
newWidth
)
/
2
// 旋转后范围变小是正值,变大是负值
style
.
left
+=
diffX
...
...
frontend/src/directive/DataPermission/index.js
浏览文件 @
918ba6b0
function
checkDataPermission
(
el
,
binding
,
vnode
)
{
// eslint-disable-next-line no-unused-vars
const
dataPermission
=
vnode
.
privileges
// eslint-disable-next-line no-unused-vars
const
{
value
}
=
binding
// // 数据授权采用并集的方式 部门 角色 用户 有一个有权限即可
// if (value && value instanceof Array) {
...
...
frontend/src/link/link-router.js
浏览文件 @
918ba6b0
...
...
@@ -8,8 +8,7 @@ export default new Router({
{
path
:
'/'
,
name
:
'home'
,
component
:
()
=>
import
(
'../views/link/index.vue'
),
component
:
()
=>
import
(
'../views/link/index.vue'
),
meta
:
{
title
:
'首页'
}
...
...
frontend/src/utils/index.js
浏览文件 @
918ba6b0
...
...
@@ -213,6 +213,7 @@ export function formatCondition(param) {
return
null
}
const
result
=
{
conditions
:
[]
}
// eslint-disable-next-line no-unused-vars
for
(
const
[
key
,
value
]
of
Object
.
entries
(
param
))
{
result
.
conditions
.
push
(
value
)
}
...
...
frontend/src/views/chart/chart/util.js
浏览文件 @
918ba6b0
...
...
@@ -9,6 +9,7 @@ export function hexColorToRGBA(hex, alpha) {
}
if
(
/^#
[
0-9A-F
]{6}
$/i
.
test
(
hex
))
{
// 判断传入是否为#六位十六进制数
hex
.
replace
(
/
[
0-9A-F
]{2}
/ig
,
function
(
kw
)
{
// eslint-disable-next-line no-eval
rgb
.
push
(
eval
(
'0x'
+
kw
))
// 十六进制转化为十进制并存如数组
})
return
`rgba(
${
rgb
.
join
(
','
)}
,
${
alpha
/
100
}
)`
// 输出RGB格式颜色
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论