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
09e40661
authored
Jan 23, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码评审】Bpm:更多设置-自定义标题
parent
a96873ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
src/views/bpm/model/form/ExtraSettings.vue
+13
-12
No files found.
src/views/bpm/model/form/ExtraSettings.vue
View file @
09e40661
...
...
@@ -113,13 +113,14 @@
<
script
setup
lang=
"ts"
>
import
dayjs
from
'dayjs'
import
{
BpmAutoApproveType
}
from
'@/utils/constants'
import
{
BpmAutoApproveType
,
BpmModelFormType
}
from
'@/utils/constants'
import
*
as
FormApi
from
'@/api/bpm/form'
import
{
parseFormFields
}
from
'@/components/FormCreate/src/utils
/index
'
import
{
ProcessVariableEnum
}
from
"@/components/SimpleProcessDesignerV2/src/consts"
;
import
{
parseFormFields
}
from
'@/components/FormCreate/src/utils'
import
{
ProcessVariableEnum
}
from
'@/components/SimpleProcessDesignerV2/src/consts'
const
modelData
=
defineModel
<
any
>
()
/** 自定义 ID 流程编码 */
const
timeOptions
=
ref
([
{
value
:
''
,
...
...
@@ -142,7 +143,6 @@ const timeOptions = ref([
label
:
'精确到秒'
}
])
const
numberExample
=
computed
(()
=>
{
if
(
modelData
.
value
.
processIdRule
.
enable
)
{
let
infix
=
''
...
...
@@ -173,20 +173,21 @@ const numberExample = computed(() => {
}
})
const
formField
=
ref
([])
const
formFieldOptions
=
computed
(()
=>
{
/** 表单选项 */
const
formField
=
ref
<
Array
<
{
field
:
ProcessVariableEnum
;
title
:
string
}
>>
([])
const
formFieldOptions
=
computed
(()
=>
{
// 固定添加发起人 ID 字段
formField
.
value
.
unshift
({
field
:
ProcessVariableEnum
.
PROCESS_DEFINITION_NAME
,
title
:
'流程名称'
,
title
:
'流程名称'
})
formField
.
value
.
unshift
({
field
:
ProcessVariableEnum
.
START_TIME
,
title
:
'发起时间'
,
title
:
'发起时间'
})
formField
.
value
.
unshift
({
field
:
ProcessVariableEnum
.
START_USER_ID
,
title
:
'发起人'
,
title
:
'发起人'
})
return
formField
.
value
.
map
((
item
)
=>
{
return
{
...
...
@@ -219,13 +220,13 @@ const initData = () => {
}
defineExpose
({
initData
})
/
/ 监听表单ID变化,加载表单数据
/
** 监听表单 ID 变化,加载表单数据 */
watch
(
()
=>
modelData
.
value
.
formId
,
async
(
newFormId
)
=>
{
if
(
newFormId
&&
modelData
.
value
.
formType
===
10
)
{
if
(
newFormId
&&
modelData
.
value
.
formType
===
BpmModelFormType
.
CUSTOM
)
{
const
data
=
await
FormApi
.
getForm
(
newFormId
)
const
result
:
Array
<
Record
<
string
,
any
>
>
=
[]
const
result
:
Array
<
{
field
:
ProcessVariableEnum
;
title
:
string
}
>
=
[]
if
(
data
.
fields
)
{
data
.
fields
.
forEach
((
fieldStr
:
string
)
=>
{
parseFormFields
(
JSON
.
parse
(
fieldStr
),
result
)
...
...
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