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
746aeaff
authored
Dec 14, 2024
by
GoldenZqqqq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 创建/修改流程页面-恢复填写流程标识与流程名称才可以切换到第三步逻辑
parent
21c28c36
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
20 deletions
+12
-20
src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue
+0
-7
src/views/bpm/model/CreateUpdate.vue
+12
-13
No files found.
src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue
View file @
746aeaff
...
@@ -245,10 +245,3 @@ watch(
...
@@ -245,10 +245,3 @@ watch(
}
}
)
)
</
script
>
</
script
>
<
style
lang=
"scss"
>
.process-panel__container
{
position
:
absolute
;
top
:
90px
;
right
:
60px
;
}
</
style
>
src/views/bpm/model/CreateUpdate.vue
View file @
746aeaff
...
@@ -550,34 +550,33 @@ const handleDesignSuccess = (bpmnXml?: string) => {
...
@@ -550,34 +550,33 @@ const handleDesignSuccess = (bpmnXml?: string) => {
const
handleStepClick
=
async
(
index
:
number
)
=>
{
const
handleStepClick
=
async
(
index
:
number
)
=>
{
// 如果是切换到第三步(流程设计),需要校验key和name
// 如果是切换到第三步(流程设计),需要校验key和name
if
(
index
===
2
)
{
if
(
index
===
2
)
{
if
(
!
formData
.
value
.
id
)
{
if
(
!
formData
.
value
.
key
||
!
formData
.
value
.
name
)
{
// 新增时才校验
try
{
await
formRef
.
value
?.
validateField
([
'key'
,
'name'
])
// 确保数据已经准备好
await
nextTick
()
}
catch
(
error
)
{
message
.
warning
(
'请先填写流程标识和流程名称'
)
message
.
warning
(
'请先填写流程标识和流程名称'
)
return
return
}
}
}
}
// 确保数据已经准备好再切换
await
nextTick
()
}
currentStep
.
value
=
index
currentStep
.
value
=
index
}
}
// 添加一个计算属性来判断是否显示设计器
// 添加一个计算属性来判断是否显示设计器
const
showDesigner
=
computed
(()
=>
{
const
showDesigner
=
computed
(()
=>
{
return
currentStep
.
value
===
2
&&
Boolean
(
formData
.
value
.
id
||
(
formData
.
value
.
key
&&
formData
.
value
.
name
))
return
(
currentStep
.
value
===
2
&&
Boolean
(
formData
.
value
.
id
||
(
formData
.
value
.
key
&&
formData
.
value
.
name
))
)
})
})
// 监听步骤变化,确保数据准备完成
// 监听步骤变化,确保数据准备完成
watch
(()
=>
currentStep
.
value
,
async
(
newStep
)
=>
{
watch
(
()
=>
currentStep
.
value
,
async
(
newStep
)
=>
{
if
(
newStep
===
2
)
{
if
(
newStep
===
2
)
{
await
nextTick
()
await
nextTick
()
}
}
},
{
immediate
:
false
})
},
{
immediate
:
false
}
)
// 在组件卸载时清理
// 在组件卸载时清理
onBeforeUnmount
(()
=>
{
onBeforeUnmount
(()
=>
{
...
...
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