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
c304d456
authored
Feb 28, 2025
by
Lesan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 代码评审修改
parent
d0b0c8d5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
19 deletions
+18
-19
src/components/SimpleProcessDesignerV2/src/consts.ts
+6
-6
src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue
+12
-13
No files found.
src/components/SimpleProcessDesignerV2/src/consts.ts
View file @
c304d456
...
@@ -838,7 +838,7 @@ export type TimeoutSetting = {
...
@@ -838,7 +838,7 @@ export type TimeoutSetting = {
export
type
MultiInstanceSetting
=
{
export
type
MultiInstanceSetting
=
{
enable
:
boolean
enable
:
boolean
sequential
?:
boolean
sequential
?:
boolean
complet
eRatio
?:
number
approv
eRatio
?:
number
sourceType
?:
ChildProcessMultiInstanceSourceTypeEnum
sourceType
?:
ChildProcessMultiInstanceSourceTypeEnum
source
?:
string
source
?:
string
}
}
...
@@ -883,14 +883,14 @@ export enum ChildProcessMultiInstanceSourceTypeEnum {
...
@@ -883,14 +883,14 @@ export enum ChildProcessMultiInstanceSourceTypeEnum {
/**
/**
* 数字表单
* 数字表单
*/
*/
DIGITAL
_FORM
=
2
,
NUMBER
_FORM
=
2
,
/**
/**
* 多
项
表单
* 多
选
表单
*/
*/
MULTI_FORM
=
3
MULTI
PLE
_FORM
=
3
}
}
export
const
CHILD_PROCESS_MULTI_INSTANCE_SOURCE_TYPE
=
[
export
const
CHILD_PROCESS_MULTI_INSTANCE_SOURCE_TYPE
=
[
{
label
:
'固定数量'
,
value
:
ChildProcessMultiInstanceSourceTypeEnum
.
FIXED_QUANTITY
},
{
label
:
'固定数量'
,
value
:
ChildProcessMultiInstanceSourceTypeEnum
.
FIXED_QUANTITY
},
{
label
:
'数字表单'
,
value
:
ChildProcessMultiInstanceSourceTypeEnum
.
DIGITAL_FORM
},
// TODO @lesan:DIGITAL 改成 NUMBER,和 Element plus 更接近?
{
label
:
'数字表单'
,
value
:
ChildProcessMultiInstanceSourceTypeEnum
.
NUMBER_FORM
},
{
label
:
'多
项表单'
,
value
:
ChildProcessMultiInstanceSourceTypeEnum
.
MULTI_FORM
}
// TODO @lesan:多选表单?multiple 是这个解释。另外 MULTI => MULTIPLE
{
label
:
'多
选表单'
,
value
:
ChildProcessMultiInstanceSourceTypeEnum
.
MULTIPLE_FORM
}
]
]
src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue
View file @
c304d456
...
@@ -270,11 +270,11 @@
...
@@ -270,11 +270,11 @@
inactive-text=
"并行"
inactive-text=
"并行"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"
complet
eRatio"
>
<el-form-item
prop=
"
approv
eRatio"
>
<el-text>
完成比例(%)
</el-text>
<el-text>
完成比例(%)
</el-text>
<el-input-number
<el-input-number
class=
"ml-10px"
class=
"ml-10px"
v-model=
"configForm.
complet
eRatio"
v-model=
"configForm.
approv
eRatio"
:min=
"10"
:min=
"10"
:max=
"100"
:max=
"100"
:step=
"10"
:step=
"10"
...
@@ -295,11 +295,10 @@
...
@@ -295,11 +295,10 @@
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<!-- TODO @lesan:枚举 -->
<el-form-item
v-if=
"configForm.multiInstanceSourceType === ChildProcessMultiInstanceSourceTypeEnum.FIXED_QUANTITY"
>
<el-form-item
v-if=
"configForm.multiInstanceSourceType === 1"
>
<el-input-number
v-model=
"configForm.multiInstanceSource"
:min=
"1"
/>
<el-input-number
v-model=
"configForm.multiInstanceSource"
:min=
"1"
/>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"configForm.multiInstanceSourceType ===
2
"
>
<el-form-item
v-if=
"configForm.multiInstanceSourceType ===
ChildProcessMultiInstanceSourceTypeEnum.NUMBER_FORM
"
>
<el-select
class=
"w-200px!"
v-model=
"configForm.multiInstanceSource"
>
<el-select
class=
"w-200px!"
v-model=
"configForm.multiInstanceSource"
>
<el-option
<el-option
v-for=
"(field, fIdx) in digitalFormFieldOptions"
v-for=
"(field, fIdx) in digitalFormFieldOptions"
...
@@ -309,7 +308,7 @@
...
@@ -309,7 +308,7 @@
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"configForm.multiInstanceSourceType ===
3
"
>
<el-form-item
v-if=
"configForm.multiInstanceSourceType ===
ChildProcessMultiInstanceSourceTypeEnum.MULTIPLE_FORM
"
>
<el-select
class=
"w-200px!"
v-model=
"configForm.multiInstanceSource"
>
<el-select
class=
"w-200px!"
v-model=
"configForm.multiInstanceSource"
>
<el-option
<el-option
v-for=
"(field, fIdx) in multiFormFieldOptions"
v-for=
"(field, fIdx) in multiFormFieldOptions"
...
@@ -407,7 +406,7 @@ type ChildProcessFormType = {
...
@@ -407,7 +406,7 @@ type ChildProcessFormType = {
dateTime
:
string
dateTime
:
string
multiInstanceEnable
:
boolean
multiInstanceEnable
:
boolean
sequential
:
boolean
sequential
:
boolean
complet
eRatio
:
number
approv
eRatio
:
number
multiInstanceSourceType
:
ChildProcessMultiInstanceSourceTypeEnum
multiInstanceSourceType
:
ChildProcessMultiInstanceSourceTypeEnum
multiInstanceSource
:
string
multiInstanceSource
:
string
}
}
...
@@ -427,7 +426,7 @@ const configForm = ref<ChildProcessFormType>({
...
@@ -427,7 +426,7 @@ const configForm = ref<ChildProcessFormType>({
dateTime
:
''
,
dateTime
:
''
,
multiInstanceEnable
:
false
,
multiInstanceEnable
:
false
,
sequential
:
false
,
sequential
:
false
,
complet
eRatio
:
100
,
approv
eRatio
:
100
,
multiInstanceSourceType
:
ChildProcessMultiInstanceSourceTypeEnum
.
FIXED_QUANTITY
,
multiInstanceSourceType
:
ChildProcessMultiInstanceSourceTypeEnum
.
FIXED_QUANTITY
,
multiInstanceSource
:
''
multiInstanceSource
:
''
})
})
...
@@ -490,8 +489,8 @@ const saveConfig = async () => {
...
@@ -490,8 +489,8 @@ const saveConfig = async () => {
if
(
configForm
.
value
.
multiInstanceEnable
)
{
if
(
configForm
.
value
.
multiInstanceEnable
)
{
currentNode
.
value
.
childProcessSetting
.
multiInstanceSetting
.
sequential
=
currentNode
.
value
.
childProcessSetting
.
multiInstanceSetting
.
sequential
=
configForm
.
value
.
sequential
configForm
.
value
.
sequential
currentNode
.
value
.
childProcessSetting
.
multiInstanceSetting
.
complet
eRatio
=
currentNode
.
value
.
childProcessSetting
.
multiInstanceSetting
.
approv
eRatio
=
configForm
.
value
.
complet
eRatio
configForm
.
value
.
approv
eRatio
currentNode
.
value
.
childProcessSetting
.
multiInstanceSetting
.
sourceType
=
currentNode
.
value
.
childProcessSetting
.
multiInstanceSetting
.
sourceType
=
configForm
.
value
.
multiInstanceSourceType
configForm
.
value
.
multiInstanceSourceType
currentNode
.
value
.
childProcessSetting
.
multiInstanceSetting
.
source
=
currentNode
.
value
.
childProcessSetting
.
multiInstanceSetting
.
source
=
...
@@ -520,7 +519,7 @@ const showChildProcessNodeConfig = (node: SimpleFlowNode) => {
...
@@ -520,7 +519,7 @@ const showChildProcessNodeConfig = (node: SimpleFlowNode) => {
configForm
.
value
.
outVariables
=
node
.
childProcessSetting
.
outVariables
configForm
.
value
.
outVariables
=
node
.
childProcessSetting
.
outVariables
// 6. 发起人设置
// 6. 发起人设置
configForm
.
value
.
startUserType
=
node
.
childProcessSetting
.
startUserSetting
.
type
configForm
.
value
.
startUserType
=
node
.
childProcessSetting
.
startUserSetting
.
type
configForm
.
value
.
startUserEmptyType
=
node
.
childProcessSetting
.
startUserSetting
.
emptyType
??
1
configForm
.
value
.
startUserEmptyType
=
node
.
childProcessSetting
.
startUserSetting
.
emptyType
??
ChildProcessStartUserEmptyTypeEnum
.
MAIN_PROCESS_START_USER
configForm
.
value
.
startUserFormField
=
node
.
childProcessSetting
.
startUserSetting
.
formField
??
''
configForm
.
value
.
startUserFormField
=
node
.
childProcessSetting
.
startUserSetting
.
formField
??
''
// 7. 超时设置
// 7. 超时设置
configForm
.
value
.
timeoutEnable
=
node
.
childProcessSetting
.
timeoutSetting
.
enable
??
false
configForm
.
value
.
timeoutEnable
=
node
.
childProcessSetting
.
timeoutSetting
.
enable
??
false
...
@@ -546,8 +545,8 @@ const showChildProcessNodeConfig = (node: SimpleFlowNode) => {
...
@@ -546,8 +545,8 @@ const showChildProcessNodeConfig = (node: SimpleFlowNode) => {
if
(
configForm
.
value
.
multiInstanceEnable
)
{
if
(
configForm
.
value
.
multiInstanceEnable
)
{
configForm
.
value
.
sequential
=
configForm
.
value
.
sequential
=
node
.
childProcessSetting
.
multiInstanceSetting
.
sequential
??
false
node
.
childProcessSetting
.
multiInstanceSetting
.
sequential
??
false
configForm
.
value
.
complet
eRatio
=
configForm
.
value
.
approv
eRatio
=
node
.
childProcessSetting
.
multiInstanceSetting
.
complet
eRatio
??
100
node
.
childProcessSetting
.
multiInstanceSetting
.
approv
eRatio
??
100
configForm
.
value
.
multiInstanceSourceType
=
configForm
.
value
.
multiInstanceSourceType
=
node
.
childProcessSetting
.
multiInstanceSetting
.
sourceType
??
node
.
childProcessSetting
.
multiInstanceSetting
.
sourceType
??
ChildProcessMultiInstanceSourceTypeEnum
.
FIXED_QUANTITY
ChildProcessMultiInstanceSourceTypeEnum
.
FIXED_QUANTITY
...
...
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