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
4ea25f3d
authored
Feb 12, 2025
by
Lesan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 办理人节点
parent
b0d4e39e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
6 deletions
+33
-6
src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
+9
-3
src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue
+5
-1
src/components/SimpleProcessDesignerV2/src/consts.ts
+17
-0
src/components/SimpleProcessDesignerV2/src/node.ts
+1
-1
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
+0
-0
src/components/SimpleProcessDesignerV2/src/nodes/UserTaskNode.vue
+1
-1
No files found.
src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
View file @
4ea25f3d
...
...
@@ -15,6 +15,12 @@
</div>
<div
class=
"handler-item-text"
>
审批人
</div>
</div>
<div
class=
"handler-item"
@
click=
"addNode(NodeType.TRANSACTOR_NODE)"
>
<div
class=
"approve handler-item-icon"
>
<span
class=
"iconfont icon-approve icon-size"
></span>
</div>
<div
class=
"handler-item-text"
>
办理人
</div>
</div>
<div
class=
"handler-item"
@
click=
"addNode(NodeType.COPY_TASK_NODE)"
>
<div
class=
"handler-item-icon copy"
>
<span
class=
"iconfont icon-size icon-copy"
></span>
...
...
@@ -114,13 +120,13 @@ const addNode = (type: number) => {
}
popoverShow
.
value
=
false
if
(
type
===
NodeType
.
USER_TASK_NODE
)
{
if
(
type
===
NodeType
.
USER_TASK_NODE
||
type
===
NodeType
.
TRANSACTOR_NODE
)
{
const
id
=
'Activity_'
+
generateUUID
()
const
data
:
SimpleFlowNode
=
{
id
:
id
,
name
:
NODE_DEFAULT_NAME
.
get
(
NodeType
.
USER_TASK_NODE
)
as
string
,
name
:
NODE_DEFAULT_NAME
.
get
(
type
)
as
string
,
showText
:
''
,
type
:
NodeType
.
USER_TASK_NODE
,
type
:
type
,
approveMethod
:
ApproveMethodType
.
SEQUENTIAL_APPROVE
,
// 超时处理
rejectHandler
:
{
...
...
src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue
View file @
4ea25f3d
...
...
@@ -6,7 +6,11 @@
/>
<!-- 审批节点 -->
<UserTaskNode
v-if=
"currentNode && currentNode.type === NodeType.USER_TASK_NODE"
v-if=
"
currentNode &&
(currentNode.type === NodeType.USER_TASK_NODE ||
currentNode.type === NodeType.TRANSACTOR_NODE)
"
:flow-node=
"currentNode"
@
update:flow-node=
"handleModelValueUpdate"
@
find:parent-node=
"findFromParentNode"
...
...
src/components/SimpleProcessDesignerV2/src/consts.ts
View file @
4ea25f3d
...
...
@@ -24,6 +24,11 @@ export enum NodeType {
COPY_TASK_NODE
=
12
,
/**
* 办理人节点
*/
TRANSACTOR_NODE
=
13
,
/**
* 延迟器节点
*/
DELAY_TIMER_NODE
=
14
,
...
...
@@ -506,6 +511,7 @@ NODE_DEFAULT_TEXT.set(NodeType.START_USER_NODE, '请设置发起人')
NODE_DEFAULT_TEXT
.
set
(
NodeType
.
DELAY_TIMER_NODE
,
'请设置延迟器'
)
NODE_DEFAULT_TEXT
.
set
(
NodeType
.
ROUTER_BRANCH_NODE
,
'请设置路由节点'
)
NODE_DEFAULT_TEXT
.
set
(
NodeType
.
TRIGGER_NODE
,
'请设置触发器'
)
NODE_DEFAULT_TEXT
.
set
(
NodeType
.
TRANSACTOR_NODE
,
'请设置办理人'
)
export
const
NODE_DEFAULT_NAME
=
new
Map
<
number
,
string
>
()
NODE_DEFAULT_NAME
.
set
(
NodeType
.
USER_TASK_NODE
,
'审批人'
)
...
...
@@ -515,6 +521,7 @@ NODE_DEFAULT_NAME.set(NodeType.START_USER_NODE, '发起人')
NODE_DEFAULT_NAME
.
set
(
NodeType
.
DELAY_TIMER_NODE
,
'延迟器'
)
NODE_DEFAULT_NAME
.
set
(
NodeType
.
ROUTER_BRANCH_NODE
,
'路由分支'
)
NODE_DEFAULT_NAME
.
set
(
NodeType
.
TRIGGER_NODE
,
'触发器'
)
NODE_DEFAULT_NAME
.
set
(
NodeType
.
TRANSACTOR_NODE
,
'办理人'
)
// 候选人策略。暂时不从字典中取。 后续可能调整。控制显示顺序
export
const
CANDIDATE_STRATEGY
:
DictDataVO
[]
=
[
...
...
@@ -627,6 +634,16 @@ export const DEFAULT_BUTTON_SETTING: ButtonSetting[] = [
{
id
:
OperationButtonType
.
RETURN
,
displayName
:
'退回'
,
enable
:
true
}
]
// 办理人默认的按钮权限设置
export
const
TRANSACTOR_DEFAULT_BUTTON_SETTING
:
ButtonSetting
[]
=
[
{
id
:
OperationButtonType
.
APPROVE
,
displayName
:
'办理'
,
enable
:
true
},
{
id
:
OperationButtonType
.
REJECT
,
displayName
:
'拒绝'
,
enable
:
false
},
{
id
:
OperationButtonType
.
TRANSFER
,
displayName
:
'转办'
,
enable
:
false
},
{
id
:
OperationButtonType
.
DELEGATE
,
displayName
:
'委派'
,
enable
:
false
},
{
id
:
OperationButtonType
.
ADD_SIGN
,
displayName
:
'加签'
,
enable
:
false
},
{
id
:
OperationButtonType
.
RETURN
,
displayName
:
'退回'
,
enable
:
false
}
]
// 发起人的按钮权限。暂时定死,不可以编辑
export
const
START_USER_BUTTON_SETTING
:
ButtonSetting
[]
=
[
{
id
:
OperationButtonType
.
APPROVE
,
displayName
:
'提交'
,
enable
:
true
},
...
...
src/components/SimpleProcessDesignerV2/src/node.ts
View file @
4ea25f3d
...
...
@@ -201,7 +201,7 @@ export function useNodeForm(nodeType: NodeType) {
const
deptTreeOptions
=
inject
(
'deptTree'
,
ref
())
// 部门树
const
formFields
=
inject
<
Ref
<
string
[]
>>
(
'formFields'
,
ref
([]))
// 流程表单字段
const
configForm
=
ref
<
UserTaskFormType
|
CopyTaskFormType
>
()
if
(
nodeType
===
NodeType
.
USER_TASK_NODE
)
{
if
(
nodeType
===
NodeType
.
USER_TASK_NODE
||
nodeType
===
NodeType
.
TRANSACTOR_NODE
)
{
configForm
.
value
=
{
candidateStrategy
:
CandidateStrategy
.
USER
,
approveMethod
:
ApproveMethodType
.
SEQUENTIAL_APPROVE
,
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
View file @
4ea25f3d
This diff is collapsed.
Click to expand it.
src/components/SimpleProcessDesignerV2/src/nodes/UserTaskNode.vue
View file @
4ea25f3d
...
...
@@ -28,7 +28,7 @@
{{
currentNode
.
showText
}}
</div>
<div
class=
"node-text"
v-else
>
{{
NODE_DEFAULT_TEXT
.
get
(
NodeType
.
USER_TASK_NODE
)
}}
{{
NODE_DEFAULT_TEXT
.
get
(
currentNode
.
type
)
}}
</div>
<Icon
icon=
"ep:arrow-right-bold"
v-if=
"!readonly"
/>
</div>
...
...
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