Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Pangea-Agent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gavin-Group
Pangea-Agent
Commits
bbc9fd63
Commit
bbc9fd63
authored
Dec 25, 2025
by
高如斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐藏字段设置为伪真实值
parent
1582b695
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
FormRender.vue
frontend/src/components/FormRender.vue
+9
-2
No files found.
frontend/src/components/FormRender.vue
View file @
bbc9fd63
...
@@ -26,11 +26,18 @@ const templateRef = ref();
...
@@ -26,11 +26,18 @@ const templateRef = ref();
const
submit
=
()
=>
{
const
submit
=
()
=>
{
templateRef
.
value
?.
ctx
.
validate
(
1
,
(
isValid
:
boolean
,
formData
:
any
)
=>
{
templateRef
.
value
?.
ctx
.
validate
(
1
,
(
isValid
:
boolean
,
formData
:
any
)
=>
{
if
(
isValid
)
{
if
(
isValid
)
{
//
临时处理:
追加隐藏字段到表单数据
// 追加隐藏字段到表单数据
const
hiddenFields
=
formStore
.
hiddenFields
;
const
hiddenFields
=
formStore
.
hiddenFields
;
hiddenFields
.
forEach
((
field
)
=>
{
hiddenFields
.
forEach
((
field
)
=>
{
if
(
field
.
name
)
{
if
(
field
.
name
)
{
formData
[
field
.
name
]
=
"none"
;
// 根据字段 title 设置不同的值
if
(
field
.
title
===
"接访员工姓名"
)
{
formData
[
field
.
name
]
=
"张益达"
;
}
else
if
(
field
.
title
===
"接访员工手机号"
)
{
formData
[
field
.
name
]
=
"13611111111"
;
}
else
{
formData
[
field
.
name
]
=
"none"
;
}
}
}
});
});
...
...
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