fix(缺陷管理): 缺陷列表详情抽屉问题修复
This commit is contained in:
parent
d69fefcfd9
commit
28535c078d
|
@ -257,6 +257,7 @@
|
|||
const rightLoading = ref(false);
|
||||
const detailLoading = ref(false);
|
||||
const activeTab = ref<string>('detail');
|
||||
const currentDetailId = ref(props.detailId);
|
||||
|
||||
const commentInputRef = ref<InstanceType<typeof CommentInput>>();
|
||||
const commentInputIsActive = computed(() => commentInputRef.value?.isActive);
|
||||
|
@ -311,6 +312,7 @@
|
|||
};
|
||||
// TODO:: Record<string, any>
|
||||
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<boolean>(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 {
|
||||
|
|
|
@ -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<FilterResult>({ accordBelow: 'AND', combine: {} });
|
||||
const licenseStore = useLicenseStore();
|
||||
const isXpack = computed(() => licenseStore.hasLicense());
|
||||
const { openDeleteModal } = useModal();
|
||||
const route = useRoute();
|
||||
const severityFilterOptions = ref<BugOptionItem[]>([]);
|
||||
|
|
Loading…
Reference in New Issue