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