Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f9c74461
authored
Feb 18, 2025
by
Lemon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加流程图 小手功能 增加重置功能 移动流程位置后恢复原位置
parent
0212ef48
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletions
+20
-1
src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue
+20
-1
No files found.
src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue
View file @
f9c74461
<
template
>
<div
class=
"simple-process-model-container position-relative"
>
<div
class=
"position-absolute top-0px right-0px bg-#fff"
>
<div
class=
"position-absolute top-0px right-0px bg-#fff
z-index-button-group
"
>
<el-row
type=
"flex"
justify=
"end"
>
<el-button-group
key=
"scale-control"
size=
"default"
>
<el-button
v-if=
"!readonly"
size=
"default"
@
click=
"exportJson"
>
...
...
@@ -23,6 +23,7 @@
<el-button
size=
"default"
:plain=
"true"
:icon=
"ZoomOut"
@
click=
"zoomOut()"
/>
<el-button
size=
"default"
class=
"w-80px"
>
{{
scaleValue
}}
%
</el-button>
<el-button
size=
"default"
:plain=
"true"
:icon=
"ZoomIn"
@
click=
"zoomIn()"
/>
<el-button
size=
"default"
@
click=
"resetPosition"
>
重置
</el-button>
</el-button-group>
</el-row>
</div>
...
...
@@ -93,6 +94,8 @@ const startX = ref(0)
const
startY
=
ref
(
0
)
const
currentX
=
ref
(
0
)
const
currentY
=
ref
(
0
)
const
initialX
=
ref
(
0
)
const
initialY
=
ref
(
0
)
const
setGrabCursor
=
()
=>
{
document
.
body
.
style
.
cursor
=
'grab'
;
...
...
@@ -238,6 +241,18 @@ const zoomOut = () => {
const
processReZoom
=
()
=>
{
scaleValue
.
value
=
100
}
// 在组件初始化时记录初始位置
onMounted
(()
=>
{
initialX
.
value
=
currentX
.
value
initialY
.
value
=
currentY
.
value
})
// 重置位置的函数
const
resetPosition
=
()
=>
{
currentX
.
value
=
initialX
.
value
currentY
.
value
=
initialY
.
value
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -253,4 +268,8 @@ const processReZoom = () => {
min-width
:
100%
;
//
确保宽度为100%
min-height
:
100%
;
//
确保高度为100%
}
.z-index-button-group
{
z-index
:
10
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment