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
a43bca57
authored
Oct 28, 2024
by
jason
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/bpm' of
https://gitee.com/yudaocode/yudao-ui-admin-vue3
into feature/bpm
parents
137b33e7
d599134d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
src/assets/svgs/bpm/end.svg
+2
-0
src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue
+15
-5
src/views/bpm/processInstance/detail/index.vue
+3
-3
No files found.
src/assets/svgs/bpm/end.svg
0 → 100644
View file @
a43bca57
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1729949323056"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"12570"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><path
d=
"M0 0h1024v1024H0z"
fill=
"#333333"
opacity=
".01"
p-id=
"12571"
></path><path
d=
"M512 0a32 32 0 0 0-32 32v448a32 32 0 0 0 64 0v-448A32 32 0 0 0 512 0zM282.688 109.696a32 32 0 0 0-44.544-7.936 480 480 0 1 0 549.12 0.96 32 32 0 1 0-36.8 52.352 416 416 0 1 1-475.776-0.832 32 32 0 0 0 8-44.544z"
fill=
"#e6e6e6"
p-id=
"12572"
data-spm-anchor-id=
"a313x.search_index.0.i5.3c163a81TFKD3L"
class=
"selected"
></path></svg>
\ No newline at end of file
src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue
View file @
a43bca57
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<el-timeline
class=
"pt-20px"
>
<el-timeline
class=
"pt-20px"
>
<!-- 遍历每个审批节点 -->
<!-- 遍历每个审批节点 -->
<el-timeline-item
<el-timeline-item
v-for=
"(activity, index) in a
pprove
Nodes"
v-for=
"(activity, index) in a
ctivity
Nodes"
:key=
"index"
:key=
"index"
size=
"large"
size=
"large"
:icon=
"getApprovalNodeIcon(activity.status, activity.nodeType)"
:icon=
"getApprovalNodeIcon(activity.status, activity.nodeType)"
...
@@ -107,7 +107,10 @@
...
@@ -107,7 +107,10 @@
</div>
</div>
</div>
</div>
<div
<div
v-if=
"task.reason && activity.nodeType === NodeType.USER_TASK_NODE"
v-if=
"
task.reason &&
[NodeType.USER_TASK_NODE, NodeType.END_EVENT_NODE].includes(activity.nodeType)
"
class=
"text-#a5a5a5 text-13px mt-1 w-full bg-#f8f8fa p2 rounded-md"
class=
"text-#a5a5a5 text-13px mt-1 w-full bg-#f8f8fa p2 rounded-md"
>
>
审批意见:{{ task.reason }}
审批意见:{{ task.reason }}
...
@@ -131,10 +134,11 @@ import auditorSvg from '@/assets/svgs/bpm/auditor.svg'
...
@@ -131,10 +134,11 @@ import auditorSvg from '@/assets/svgs/bpm/auditor.svg'
import
copySvg
from
'@/assets/svgs/bpm/copy.svg'
import
copySvg
from
'@/assets/svgs/bpm/copy.svg'
import
conditionSvg
from
'@/assets/svgs/bpm/condition.svg'
import
conditionSvg
from
'@/assets/svgs/bpm/condition.svg'
import
parallelSvg
from
'@/assets/svgs/bpm/parallel.svg'
import
parallelSvg
from
'@/assets/svgs/bpm/parallel.svg'
import
endSvg
from
'@/assets/svgs/bpm/end.svg'
defineOptions
({
name
:
'BpmProcessInstanceTimeline'
})
defineOptions
({
name
:
'BpmProcessInstanceTimeline'
})
defineProps
<
{
defineProps
<
{
a
pprove
Nodes
:
ProcessInstanceApi
.
ApprovalNodeInfo
[]
// 审批节点信息
a
ctivity
Nodes
:
ProcessInstanceApi
.
ApprovalNodeInfo
[]
// 审批节点信息
}
>
()
}
>
()
// 审批节点
// 审批节点
...
@@ -189,7 +193,9 @@ const nodeTypeSvgMap = {
...
@@ -189,7 +193,9 @@ const nodeTypeSvgMap = {
// 条件分支节点
// 条件分支节点
[
NodeType
.
CONDITION_NODE
]:
{
color
:
'#14bb83'
,
svg
:
conditionSvg
},
[
NodeType
.
CONDITION_NODE
]:
{
color
:
'#14bb83'
,
svg
:
conditionSvg
},
// 并行分支节点
// 并行分支节点
[
NodeType
.
PARALLEL_BRANCH_NODE
]:
{
color
:
'#14bb83'
,
svg
:
parallelSvg
}
[
NodeType
.
PARALLEL_BRANCH_NODE
]:
{
color
:
'#14bb83'
,
svg
:
parallelSvg
},
// 结束节点
[
NodeType
.
END_EVENT_NODE
]:
{
color
:
'#ffffff'
,
svg
:
endSvg
}
}
}
// 只有只有状态是 -1、0、1 才展示头像右小角状态小icon
// 只有只有状态是 -1、0、1 才展示头像右小角状态小icon
...
@@ -205,7 +211,11 @@ const getApprovalNodeIcon = (taskStatus: number, nodeType: NodeType) => {
...
@@ -205,7 +211,11 @@ const getApprovalNodeIcon = (taskStatus: number, nodeType: NodeType) => {
return
statusIconMap
[
taskStatus
]?.
icon
return
statusIconMap
[
taskStatus
]?.
icon
}
}
if
(
nodeType
===
NodeType
.
START_USER_NODE
||
nodeType
===
NodeType
.
USER_TASK_NODE
)
{
if
(
nodeType
===
NodeType
.
START_USER_NODE
||
nodeType
===
NodeType
.
USER_TASK_NODE
||
nodeType
===
NodeType
.
END_EVENT_NODE
)
{
return
statusIconMap
[
taskStatus
]?.
icon
return
statusIconMap
[
taskStatus
]?.
icon
}
}
}
}
...
...
src/views/bpm/processInstance/detail/index.vue
View file @
a43bca57
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
</el-col>
</el-col>
<el-col
:span=
"7"
>
<el-col
:span=
"7"
>
<!-- 审批记录时间线 -->
<!-- 审批记录时间线 -->
<ProcessInstanceTimeline
ref=
"timelineRef"
:a
pprove-nodes=
"approve
Nodes"
/>
<ProcessInstanceTimeline
ref=
"timelineRef"
:a
ctivity-nodes=
"activity
Nodes"
/>
</el-col>
</el-col>
</el-row>
</el-row>
</el-scrollbar>
</el-scrollbar>
...
@@ -229,7 +229,7 @@ const getApprovalDetail = async () => {
...
@@ -229,7 +229,7 @@ const getApprovalDetail = async () => {
}
}
// 获取审批节点,显示 Timeline 的数据
// 获取审批节点,显示 Timeline 的数据
a
pproveNodes
.
value
=
data
.
approve
Nodes
a
ctivityNodes
.
value
=
data
.
activity
Nodes
// 获取待办任务显示操作按钮
// 获取待办任务显示操作按钮
operationButtonRef
.
value
?.
loadTodoTask
(
data
.
todoTask
)
operationButtonRef
.
value
?.
loadTodoTask
(
data
.
todoTask
)
...
@@ -239,7 +239,7 @@ const getApprovalDetail = async () => {
...
@@ -239,7 +239,7 @@ const getApprovalDetail = async () => {
}
}
// 审批节点信息
// 审批节点信息
const
a
pprove
Nodes
=
ref
<
ProcessInstanceApi
.
ApprovalNodeInfo
[]
>
([])
const
a
ctivity
Nodes
=
ref
<
ProcessInstanceApi
.
ApprovalNodeInfo
[]
>
([])
/**
/**
* 设置表单权限
* 设置表单权限
*/
*/
...
...
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