fix(缺陷管理): 修复缺陷紧急问题页面空白bug

This commit is contained in:
xinxin.wu 2024-03-13 12:47:50 +08:00 committed by 刘瑞斌
parent 63d905dc60
commit 64a8dccc8d
1 changed files with 22 additions and 13 deletions

View File

@ -247,7 +247,7 @@
tableParamsToRequestParams,
} from '@/utils';
import { BugEditCustomField, BugListItem, BugOptionItem, BugOptionListItem } from '@/models/bug-management';
import { BugEditCustomField, BugListItem, BugOptionItem } from '@/models/bug-management';
import { RouteEnum } from '@/enums/routeEnum';
import { TableKeyEnum } from '@/enums/tableEnum';
@ -474,18 +474,6 @@
width: 158,
},
];
const customColumns = await getCustomFieldColumns();
customColumns.forEach((item) => {
if (item.title === '严重程度' || item.title === 'Bug Degree') {
item.showInTable = true;
item.titleSlotName = 'severityFilter';
item.slotName = 'severity';
} else {
item.showInTable = false;
}
});
await tableStore.initColumn(TableKeyEnum.BUG_MANAGEMENT, columns.concat(customColumns), 'drawer');
const { propsRes, propsEvent, setKeyword, setAdvanceFilter, setLoadListParams, setProps, resetSelector, loadList } =
useTable(
@ -801,6 +789,27 @@
handleShowDetail(route.query.id as string, 0);
}
});
let customColumns: MsTableColumn = [];
async function getColumnHeaders() {
try {
customColumns = await getCustomFieldColumns();
customColumns.forEach((item) => {
if (item.title === '严重程度' || item.title === 'Bug Degree') {
item.showInTable = true;
item.titleSlotName = 'severityFilter';
item.slotName = 'severity';
} else {
item.showInTable = false;
}
});
} catch (error) {
console.log(error);
}
}
await getColumnHeaders();
await tableStore.initColumn(TableKeyEnum.BUG_MANAGEMENT, columns.concat(customColumns), 'drawer');
onUnmounted(() => {
//
pause();