fix: 创建/修改流程页面-恢复填写流程标识与流程名称才可以切换到第三步逻辑

pull/624/MERGE
GoldenZqqqq 2024-12-14 15:43:06 +08:00
parent 21c28c3665
commit 746aeaff35
2 changed files with 17 additions and 25 deletions

View File

@ -245,10 +245,3 @@ watch(
}
)
</script>
<style lang="scss">
.process-panel__container {
position: absolute;
top: 90px;
right: 60px;
}
</style>

View File

@ -550,34 +550,33 @@ const handleDesignSuccess = (bpmnXml?: string) => {
const handleStepClick = async (index: number) => {
// keyname
if (index === 2) {
if (!formData.value.id) {
//
try {
await formRef.value?.validateField(['key', 'name'])
//
await nextTick()
} catch (error) {
message.warning('请先填写流程标识和流程名称')
return
}
if (!formData.value.key || !formData.value.name) {
message.warning('请先填写流程标识和流程名称')
return
}
//
await nextTick()
}
currentStep.value = index
}
//
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) => {
if (newStep === 2) {
await nextTick()
}
}, { immediate: false })
watch(
() => currentStep.value,
async (newStep) => {
if (newStep === 2) {
await nextTick()
}
},
{ immediate: false }
)
//
onBeforeUnmount(() => {