fix(用例管理): 详情页面编辑自定义字段问题

--bug=1038303 --user=王旭 【功能用例】设置自定义字段必填,列表点击ID,自定义属性非必填 https://www.tapd.cn/55049933/s/1487085
This commit is contained in:
WangXu10 2024-04-03 11:06:46 +08:00 committed by 刘瑞斌
parent cffa60193c
commit d77405ea25
2 changed files with 12 additions and 6 deletions

View File

@ -131,6 +131,7 @@
:form="detailInfo"
:allow-edit="true"
:form-rules="formItem"
:form-api="fApi"
@update-success="updateSuccess"
/>
</template>

View File

@ -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;
}