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
35a0e69c
authored
Jan 08, 2025
by
Lesan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 部分文件更名
parent
2144034e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
35 deletions
+35
-35
src/components/SimpleProcessDesignerV2/src/consts.ts
+5
-5
src/components/SimpleProcessDesignerV2/src/node.ts
+7
-7
src/components/SimpleProcessDesignerV2/src/nodes-config/RouteNodeConfig.vue
+12
-12
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
+11
-11
No files found.
src/components/SimpleProcessDesignerV2/src/consts.ts
View file @
35a0e69c
...
...
@@ -116,7 +116,7 @@ export interface SimpleFlowNode {
// 延迟设置
delaySetting
?:
DelaySetting
// 路由分支
routeGroups
?:
RouteCondition
[]
route
r
Groups
?:
RouteCondition
[]
defaultFlowId
?:
string
}
// 候选人策略枚举 ( 用于审批节点。抄送节点 )
...
...
@@ -241,15 +241,15 @@ export type AssignEmptyHandler = {
export
type
ListenerHandler
=
{
enable
:
boolean
path
?:
string
header
?:
Listener
Map
[]
body
?:
Listener
Map
[]
header
?:
Listener
Param
[]
body
?:
Listener
Param
[]
}
export
type
Listener
Map
=
{
export
type
Listener
Param
=
{
key
:
string
type
:
number
value
:
string
}
export
enum
Listener
Map
TypeEnum
{
export
enum
Listener
Param
TypeEnum
{
/**
* 固定值
*/
...
...
src/components/SimpleProcessDesignerV2/src/node.ts
View file @
35a0e69c
...
...
@@ -15,7 +15,7 @@ import {
AssignStartUserHandlerType
,
AssignEmptyHandlerType
,
FieldPermissionType
,
Listener
Map
Listener
Param
}
from
'./consts'
import
{
parseFormFields
}
from
'@/components/FormCreate/src/utils/index'
export
function
useWatchNode
(
props
:
{
flowNode
:
SimpleFlowNode
}):
Ref
<
SimpleFlowNode
>
{
...
...
@@ -139,16 +139,16 @@ export type UserTaskFormType = {
buttonsSetting
:
any
[]
taskCreateListenerEnable
?:
boolean
taskCreateListenerPath
?:
string
taskCreateListenerHeader
?:
Listener
Map
[]
taskCreateListenerBody
?:
Listener
Map
[]
taskCreateListenerHeader
?:
Listener
Param
[]
taskCreateListenerBody
?:
Listener
Param
[]
taskAssignListenerEnable
?:
boolean
taskAssignListenerPath
?:
string
taskAssignListenerHeader
?:
Listener
Map
[]
taskAssignListenerBody
?:
Listener
Map
[]
taskAssignListenerHeader
?:
Listener
Param
[]
taskAssignListenerBody
?:
Listener
Param
[]
taskCompleteListenerEnable
?:
boolean
taskCompleteListenerPath
?:
string
taskCompleteListenerHeader
?:
Listener
Map
[]
taskCompleteListenerBody
?:
Listener
Map
[]
taskCompleteListenerHeader
?:
Listener
Param
[]
taskCompleteListenerBody
?:
Listener
Param
[]
}
export
type
CopyTaskFormType
=
{
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/RouteNodeConfig.vue
View file @
35a0e69c
...
...
@@ -25,7 +25,7 @@
</
template
>
<div>
<el-form
label-position=
"top"
>
<el-card
class=
"mb-15px"
v-for=
"(item, index) in routeGroups"
:key=
"index"
>
<el-card
class=
"mb-15px"
v-for=
"(item, index) in route
r
Groups"
:key=
"index"
>
<
template
#
header
>
<div
class=
"flex flex-items-center"
>
<el-text
size=
"large"
>
路由
{{
index
+
1
}}
</el-text>
...
...
@@ -42,7 +42,7 @@
>
</div>
</
template
>
<Condition
v-model=
"routeGroups[index]"
/>
<Condition
v-model=
"route
r
Groups[index]"
/>
</el-card>
</el-form>
...
...
@@ -81,7 +81,7 @@ const { settingVisible, closeDrawer, openDrawer } = useDrawer()
const
currentNode
=
useWatchNode
(
props
)
// 节点名称
const
{
nodeName
,
showInput
,
clickIcon
,
blurEvent
}
=
useNodeName
(
NodeType
.
ROUTE_BRANCH_NODE
)
const
routeGroups
=
ref
<
RouteCondition
[]
>
([])
const
route
r
Groups
=
ref
<
RouteCondition
[]
>
([])
const
nodeOptions
=
ref
()
// 保存配置
...
...
@@ -90,26 +90,26 @@ const saveConfig = async () => {
if
(
!
showText
)
return
false
currentNode
.
value
.
name
=
nodeName
.
value
!
currentNode
.
value
.
showText
=
showText
currentNode
.
value
.
route
Groups
=
route
Groups
.
value
currentNode
.
value
.
route
rGroups
=
router
Groups
.
value
settingVisible
.
value
=
false
return
true
}
// 显示路由分支节点配置, 由父组件传过来
const
showRouteNodeConfig
=
(
node
:
SimpleFlowNode
)
=>
{
getRoutableNode
()
routeGroups
.
value
=
[]
route
r
Groups
.
value
=
[]
nodeName
.
value
=
node
.
name
if
(
node
.
routeGroups
)
{
route
Groups
.
value
=
node
.
route
Groups
if
(
node
.
route
r
Groups
)
{
route
rGroups
.
value
=
node
.
router
Groups
}
}
const
getShowText
=
()
=>
{
if
(
!
route
Groups
.
value
||
!
Array
.
isArray
(
routeGroups
.
value
)
||
route
Groups
.
value
.
length
<=
0
)
{
if
(
!
route
rGroups
.
value
||
!
Array
.
isArray
(
routerGroups
.
value
)
||
router
Groups
.
value
.
length
<=
0
)
{
message
.
warning
(
'请配置路由!'
)
return
''
}
for
(
const
route
of
routeGroups
.
value
)
{
for
(
const
route
of
route
r
Groups
.
value
)
{
if
(
!
route
.
nodeId
||
!
route
.
conditionType
)
{
message
.
warning
(
'请完善路由配置项!'
)
return
''
...
...
@@ -129,11 +129,11 @@ const getShowText = () => {
}
}
}
return
`
${
routeGroups
.
value
.
length
}
条路由分支`
return
`
${
route
r
Groups
.
value
.
length
}
条路由分支`
}
const
addRouteGroup
=
()
=>
{
routeGroups
.
value
.
push
({
route
r
Groups
.
value
.
push
({
nodeId
:
''
,
conditionType
:
ConditionType
.
RULE
,
conditionExpression
:
''
,
...
...
@@ -158,7 +158,7 @@ const addRouteGroup = () => {
}
const
deleteRouteGroup
=
(
index
)
=>
{
routeGroups
.
value
.
splice
(
index
,
1
)
route
r
Groups
.
value
.
splice
(
index
,
1
)
}
const
getRoutableNode
=
()
=>
{
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
View file @
35a0e69c
...
...
@@ -482,12 +482,12 @@
</div>
<div
class=
"mr-2"
>
<el-input
v-if=
"item.type === Listener
Map
TypeEnum.FIXED_VALUE"
v-if=
"item.type === Listener
Param
TypeEnum.FIXED_VALUE"
class=
"w-160px"
v-model=
"item.value"
/>
<el-select
v-if=
"item.type === Listener
Map
TypeEnum.FROM_FORM"
v-if=
"item.type === Listener
Param
TypeEnum.FROM_FORM"
class=
"w-160px!"
v-model=
"item.value"
>
...
...
@@ -505,7 +505,7 @@
icon=
"ep:delete"
:size=
"18"
@
click=
"
deleteTaskListener
Map
(
deleteTaskListener
Param
(
configForm[`task${listener.type}ListenerHeader`],
index
)
...
...
@@ -516,7 +516,7 @@
<el-button
type=
"primary"
text
@
click=
"addTaskListener
Map
(configForm[`task${listener.type}ListenerHeader`])"
@
click=
"addTaskListener
Param
(configForm[`task${listener.type}ListenerHeader`])"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
添加一行
</el-button>
...
...
@@ -542,12 +542,12 @@
</div>
<div
class=
"mr-2"
>
<el-input
v-if=
"item.type === Listener
Map
TypeEnum.FIXED_VALUE"
v-if=
"item.type === Listener
Param
TypeEnum.FIXED_VALUE"
class=
"w-160px"
v-model=
"item.value"
/>
<el-select
v-if=
"item.type === Listener
Map
TypeEnum.FROM_FORM"
v-if=
"item.type === Listener
Param
TypeEnum.FROM_FORM"
class=
"w-160px!"
v-model=
"item.value"
>
...
...
@@ -565,7 +565,7 @@
icon=
"ep:delete"
:size=
"18"
@
click=
"
deleteTaskListener
Map
(
deleteTaskListener
Param
(
configForm[`task${listener.type}ListenerBody`],
index
)
...
...
@@ -576,7 +576,7 @@
<el-button
type=
"primary"
text
@
click=
"addTaskListener
Map
(configForm[`task${listener.type}ListenerBody`])"
@
click=
"addTaskListener
Param
(configForm[`task${listener.type}ListenerBody`])"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
添加一行
</el-button>
...
...
@@ -623,7 +623,7 @@ import {
FieldPermissionType
,
ProcessVariableEnum
,
LISTENER_MAP_TYPES
,
Listener
Map
TypeEnum
Listener
Param
TypeEnum
}
from
'../consts'
import
{
...
...
@@ -1032,14 +1032,14 @@ function useTimeoutHandler() {
}
}
const
addTaskListener
Map
=
(
arr
)
=>
{
const
addTaskListener
Param
=
(
arr
)
=>
{
arr
.
push
({
key
:
''
,
type
:
1
,
value
:
''
})
}
const
deleteTaskListener
Map
=
(
arr
,
index
)
=>
{
const
deleteTaskListener
Param
=
(
arr
,
index
)
=>
{
arr
.
splice
(
index
,
1
)
}
</
script
>
...
...
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