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
ab11818c
authored
Dec 24, 2024
by
GoldenZqqqq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化切换步骤时的必填校验,限制往后切换时才触发必填校验优化用户体验
parent
a6461da0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
+8
-1
src/views/bpm/model/CreateUpdate.vue
+0
-0
src/views/bpm/model/form/index.vue
+8
-1
No files found.
src/views/bpm/model/CreateUpdate.vue
deleted
100644 → 0
View file @
a6461da0
This diff is collapsed.
Click to expand it.
src/views/bpm/model/form/index.vue
View file @
ab11818c
...
@@ -228,7 +228,9 @@ const handleStepClick = async (index: number) => {
...
@@ -228,7 +228,9 @@ const handleStepClick = async (index: number) => {
return
return
}
}
}
}
// 校验当前步骤
// 只有在向后切换时才进行校验
if
(
index
>
currentStep
.
value
)
{
try
{
try
{
if
(
typeof
steps
[
currentStep
.
value
].
validator
===
'function'
)
{
if
(
typeof
steps
[
currentStep
.
value
].
validator
===
'function'
)
{
await
steps
[
currentStep
.
value
].
validator
()
await
steps
[
currentStep
.
value
].
validator
()
...
@@ -237,6 +239,10 @@ const handleStepClick = async (index: number) => {
...
@@ -237,6 +239,10 @@ const handleStepClick = async (index: number) => {
}
catch
(
error
)
{
}
catch
(
error
)
{
message
.
warning
(
'请先完善当前步骤必填信息'
)
message
.
warning
(
'请先完善当前步骤必填信息'
)
}
}
}
else
{
// 向前切换时直接切换
currentStep
.
value
=
index
}
}
}
/** 处理设计器保存成功 */
/** 处理设计器保存成功 */
...
@@ -244,6 +250,7 @@ const handleDesignSuccess = (bpmnXml?: string) => {
...
@@ -244,6 +250,7 @@ const handleDesignSuccess = (bpmnXml?: string) => {
if
(
bpmnXml
)
{
if
(
bpmnXml
)
{
formData
.
value
.
bpmnXml
=
bpmnXml
formData
.
value
.
bpmnXml
=
bpmnXml
}
}
handleSave
()
// 自动保存
message
.
success
(
'保存成功'
)
message
.
success
(
'保存成功'
)
}
}
...
...
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