明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_front
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
jt_front
Commits
662dde01
Commit
662dde01
authored
May 14, 2026
by
zhanghan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流程处理完成
parent
355db9e2
Pipeline
#111296
passed with stage
in 19 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
27 deletions
+64
-27
ProcessFlowChart.vue
src/components/common/ProcessFlowChart.vue
+64
-27
No files found.
src/components/common/ProcessFlowChart.vue
View file @
662dde01
...
...
@@ -21,18 +21,24 @@
<div
v-if=
"index
<
activeNodes
.
length
-
1
"
class=
"flow-arrow"
>
<div
class=
"arrow-line"
></div>
<div
class=
"arrow-head"
></div>
<div
v-if=
"hasBidirectional(index)"
class=
"bi-arrow"
>
<div
class=
"arrow-head"
style=
"transform: rotate(180deg)"
></div>
<div
class=
"arrow-line"
></div>
<div
class=
"arrow-head"
></div>
<span
class=
"bi-text"
>
提交/退回
</span>
</div>
</div>
</div>
</div>
<svg
v-if=
"
return
Paths.length"
v-if=
"
svg
Paths.length"
class=
"return-svg"
:width=
"svgWidth"
:height=
"svgHeight"
>
<defs>
<marker
id=
"arrow
Marker
"
id=
"arrow
End
"
markerWidth=
"8"
markerHeight=
"6"
refX=
"8"
...
...
@@ -42,14 +48,13 @@
<path
d=
"M0,0 L8,3 L0,6 Z"
fill=
"#909399"
/>
</marker>
</defs>
<g
v-for=
"(path, i) in
return
Paths"
:key=
"i"
>
<g
v-for=
"(path, i) in
svg
Paths"
:key=
"i"
>
<polyline
:points=
"path.points"
fill=
"none"
stroke=
"#909399"
stroke-width=
"1.5"
stroke-dasharray=
"4,3"
marker-end=
"url(#arrowMarker)"
marker-end=
"url(#arrowEnd)"
/>
<text
:x=
"path.textX"
...
...
@@ -58,9 +63,9 @@
fill=
"#909399"
text-anchor=
"middle"
dominant-baseline=
"middle"
:transform=
"
`rotate(-90, $
{path.textX}, ${path.textY})`
"
:transform=
"
path.textRotate
"
>
退回修改
{{
path
.
label
}}
</text>
</g>
</svg>
...
...
@@ -85,13 +90,14 @@ const props = defineProps({
const
complexNodes
=
[
{
label
:
"开始"
,
type
:
"terminal"
},
{
label
:
"所属单位员工发起"
},
{
label
:
"所属单位部门长核准"
,
annotation
:
"提交/退回"
},
{
label
:
"投管部正/副职指定经办人"
},
{
label
:
"投管部经办人初审"
},
{
label
:
"投管部正副职审核"
,
returnTo
:
2
},
{
label
:
"所属单位部门长核准"
},
{
label
:
"投管部经办人初审"
,
returnTo
:
1
},
{
label
:
"投管部正副职审核"
},
{
label
:
"结束"
,
type
:
"terminal"
},
];
const
complexBiIndices
=
new
Set
([
1
,
3
]);
const
simpleNodes
=
[
{
label
:
"开始"
,
type
:
"terminal"
},
{
label
:
"投管部员工发起"
},
...
...
@@ -99,18 +105,20 @@ const simpleNodes = [
{
label
:
"结束"
,
type
:
"terminal"
},
];
const
simpleBiIndices
=
new
Set
();
const
complexLevelMap
=
{
1
:
2
,
2
:
2
,
7
:
2
,
2
:
3
,
3
:
4
,
4
:
6
,
8
:
6
,
5
:
7
,
9
:
7
,
13
:
7
,
14
:
7
,
15
:
7
,
4
:
5
,
8
:
5
,
5
:
6
,
9
:
6
,
13
:
6
,
14
:
6
,
15
:
6
,
};
const
simpleLevelMap
=
{
...
...
@@ -125,6 +133,12 @@ const activeNodes = computed(() => {
return
props
.
flowType
===
"simple"
?
simpleNodes
:
complexNodes
;
});
const
hasBidirectional
=
(
index
)
=>
{
const
biSet
=
props
.
flowType
===
"simple"
?
simpleBiIndices
:
complexBiIndices
;
return
biSet
.
has
(
index
);
};
const
highlightLevel
=
computed
(()
=>
{
const
map
=
props
.
flowType
===
"simple"
?
simpleLevelMap
:
complexLevelMap
;
return
map
[
props
.
currentState
]
||
0
;
...
...
@@ -148,9 +162,9 @@ const bodyRef = ref(null);
const
nodeEls
=
ref
([]);
const
svgWidth
=
ref
(
0
);
const
svgHeight
=
ref
(
0
);
const
return
Paths
=
ref
([]);
const
svg
Paths
=
ref
([]);
const
calc
Return
Paths
=
()
=>
{
const
calc
Svg
Paths
=
()
=>
{
const
body
=
bodyRef
.
value
;
if
(
!
body
)
return
;
const
bodyRect
=
body
.
getBoundingClientRect
();
...
...
@@ -159,8 +173,8 @@ const calcReturnPaths = () => {
const
paths
=
[];
const
nodes
=
activeNodes
.
value
;
let
offsetX
=
0
;
let
leftOffset
=
0
;
nodes
.
forEach
((
node
,
index
)
=>
{
if
(
node
.
returnTo
===
undefined
)
return
;
const
sourceEl
=
nodeEls
.
value
[
index
];
...
...
@@ -178,27 +192,29 @@ const calcReturnPaths = () => {
const
targetY
=
targetRect
.
top
+
targetRect
.
height
/
2
-
bodyRect
.
top
;
const
nodeLeft
=
sourceRect
.
left
-
bodyRect
.
left
;
offsetX
+=
20
;
const
lineX
=
nodeLeft
-
offsetX
;
leftOffset
+=
20
;
const
lineX
=
nodeLeft
-
leftOffset
;
paths
.
push
({
points
:
`
${
nodeLeft
}
,
${
sourceY
}
${
lineX
}
,
${
sourceY
}
${
lineX
}
,
${
targetY
}
${
nodeLeft
}
,
${
targetY
}
`
,
textX
:
lineX
-
8
,
textY
:
(
sourceY
+
targetY
)
/
2
,
textRotate
:
`rotate(-90,
${
lineX
-
8
}
,
${(
sourceY
+
targetY
)
/
2
}
)`
,
label
:
"返回修改"
,
});
});
return
Paths
.
value
=
paths
;
svg
Paths
.
value
=
paths
;
};
onMounted
(()
=>
{
nextTick
(
calc
Return
Paths
);
nextTick
(
calc
Svg
Paths
);
});
watch
(
()
=>
[
props
.
flowType
,
props
.
currentState
],
()
=>
{
nextTick
(()
=>
nextTick
(
calc
Return
Paths
));
nextTick
(()
=>
nextTick
(
calc
Svg
Paths
));
},
);
</
script
>
...
...
@@ -312,6 +328,7 @@ watch(
flex-direction
:
column
;
align-items
:
center
;
height
:
28px
;
position
:
relative
;
.arrow-line
{
width
:
2px
;
...
...
@@ -327,4 +344,24 @@ watch(
border-top
:
6px
solid
#c0c4cc
;
}
}
.bi-arrow
{
position
:
absolute
;
left
:
calc
(
50%
+
-4px
);
top
:
0
;
bottom
:
0
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.bi-text
{
position
:
absolute
;
left
:
12px
;
top
:
50%
;
transform
:
translateY
(
-50%
);
font-size
:
9px
;
color
:
#909399
;
white-space
:
nowrap
;
}
}
</
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