diff --git a/frontend/src/views/bug-management/components/bug-detail-drawer.vue b/frontend/src/views/bug-management/components/bug-detail-drawer.vue index c1f8845f83..31100a388e 100644 --- a/frontend/src/views/bug-management/components/bug-detail-drawer.vue +++ b/frontend/src/views/bug-management/components/bug-detail-drawer.vue @@ -257,6 +257,7 @@ const rightLoading = ref(false); const detailLoading = ref(false); const activeTab = ref('detail'); + const currentDetailId = ref(props.detailId); const commentInputRef = ref>(); const commentInputIsActive = computed(() => commentInputRef.value?.isActive); @@ -311,6 +312,7 @@ }; // TODO:: Record async function loadedBug(detail: BugEditFormObject) { + currentDetailId.value = detail.id; // 是否平台默认模板 isPlatformDefaultTemplate.value = detail.platformDefault; // 关闭loading @@ -350,7 +352,6 @@ } else if (item.type === 'INT' || item.type === 'FLOAT') { tmpObj[item.id] = Number(item.value); } else if (item.type === 'CASCADER') { - console.log(item.value === ''); if (item.value !== '') { const arr = JSON.parse(item.value); if (arr && arr instanceof Array && arr.length > 0) { @@ -407,7 +408,7 @@ const editLoading = ref(false); async function getDetail() { - const res = await getBugDetail(props.detailId); + const res = await getBugDetail(currentDetailId.value); loadedBug(res); } @@ -479,13 +480,13 @@ followLoading.value = true; try { await followBug(detailInfo.value.id, detailInfo.value.followFlag); - updateSuccess(); Message.success( detailInfo.value.followFlag ? t('caseManagement.featureCase.cancelFollowSuccess') : t('caseManagement.featureCase.followSuccess') ); detailInfo.value.followFlag = !detailInfo.value.followFlag; + emit('submit'); } catch (error) { // eslint-disable-next-line no-console console.log(error); @@ -509,7 +510,7 @@ }; await deleteSingleBug(params); Message.success(t('common.deleteSuccess')); - updateSuccess(); + emit('submit'); if (!props.pagination && !props.tableData) { showDrawerVisible.value = false; } else { diff --git a/frontend/src/views/bug-management/index.vue b/frontend/src/views/bug-management/index.vue index 0ca1310d56..6529711ade 100644 --- a/frontend/src/views/bug-management/index.vue +++ b/frontend/src/views/bug-management/index.vue @@ -196,7 +196,6 @@ import useModal from '@/hooks/useModal'; import router from '@/router'; import { useAppStore, useTableStore } from '@/store'; - import useLicenseStore from '@/store/modules/setting/license'; import { customFieldDataToTableData, customFieldToColumns, downloadByteFile } from '@/utils'; import { hasAnyPermission } from '@/utils/permission'; @@ -231,8 +230,6 @@ const batchEditVisible = ref(false); const keyword = ref(''); const filterResult = ref({ accordBelow: 'AND', combine: {} }); - const licenseStore = useLicenseStore(); - const isXpack = computed(() => licenseStore.hasLicense()); const { openDeleteModal } = useModal(); const route = useRoute(); const severityFilterOptions = ref([]);