diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue index c507509198..7e3838cfb0 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue @@ -131,6 +131,7 @@ :form="detailInfo" :allow-edit="true" :form-rules="formItem" + :form-api="fApi" @update-success="updateSuccess" /> diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue index 3b217fa020..e7e7ebdbcb 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue @@ -326,6 +326,7 @@ form: DetailCase; allowEdit?: boolean; // 是否允许编辑 formRules?: FormRuleItem[]; // 编辑表单 + formApi?: any; }>(), { allowEdit: true, // 是否允许编辑 @@ -504,13 +505,17 @@ caseFormRef.value?.validate().then(async (res: any) => { if (!res) { try { - confirmLoading.value = true; - await updateCaseRequest(getParams()); - Message.success(t('caseManagement.featureCase.editSuccess')); - isEditPreposition.value = false; - emit('updateSuccess'); + props.formApi?.validate().then(async (valid: any) => { + if (valid === true) { + confirmLoading.value = true; + await updateCaseRequest(getParams()); + Message.success(t('caseManagement.featureCase.editSuccess')); + isEditPreposition.value = false; + emit('updateSuccess'); + } + }); } catch (error) { - console.log(error); + // console.log(error); } finally { confirmLoading.value = false; }