diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/addDefectDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/addDefectDrawer.vue index af0e97ccb0..56eec316ad 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/addDefectDrawer.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/addDefectDrawer.vue @@ -67,6 +67,7 @@ const { t } = useI18n(); const templateOptions = ref([]); + const defaultTemplateId = ref(''); // TODO缺陷类型 const initForm: any = { @@ -99,6 +100,7 @@ const drawerLoading = ref(false); function handleDrawerConfirm(isContinue: boolean) { + form.value.templateId = defaultTemplateId.value; formRef.value?.validate(async (errors: undefined | Record) => { if (!errors) { drawerLoading.value = true; @@ -126,6 +128,7 @@ try { templateOptions.value = await getTemplateOption(appStore.currentProjectId); form.value.templateId = templateOptions.value.find((item) => item.enableDefault)?.id as string; + defaultTemplateId.value = templateOptions.value.find((item) => item.enableDefault)?.id as string; const result = await getTemplateDetailInfo({ id: form.value.templateId, projectId: appStore.currentProjectId }); templateCustomFields.value = result.customFields.map((item: any) => { return {