From 99821d98be50c0c040f6a6d69934619089dfe9dc Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Wed, 30 Oct 2024 12:58:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B5=84=E6=BA=90=E6=B1=A0=E5=AE=B9=E9=87=8F?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=AD=97=E6=AE=B5=E5=B1=95=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/capacityDrawer.vue | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/frontend/src/views/setting/system/resourcePool/components/capacityDrawer.vue b/frontend/src/views/setting/system/resourcePool/components/capacityDrawer.vue index cca429aa66..a2866dff6f 100644 --- a/frontend/src/views/setting/system/resourcePool/components/capacityDrawer.vue +++ b/frontend/src/views/setting/system/resourcePool/components/capacityDrawer.vue @@ -92,6 +92,7 @@ import ExecStatus from '@/views/test-plan/report/component/execStatus.vue'; import { getCapacityDetail, getCapacityTaskList } from '@/api/modules/setting/resourcePool'; + import { systemOrgOptions, systemProjectOptions } from '@/api/modules/taskCenter/system'; import { useI18n } from '@/hooks/useI18n'; import { useTableStore } from '@/store'; @@ -257,6 +258,50 @@ }, ]; + async function initProjectAndOrgs() { + try { + const projects = await systemProjectOptions(); + const orgs = await systemOrgOptions(); + columns.splice( + 2, + 0, + { + title: 'common.belongProject', + dataIndex: 'projectName', + showTooltip: true, + showDrag: true, + width: 200, + filterConfig: { + options: projects.map((item) => ({ + label: item.name, + value: item.id, + })), + filterSlotName: FilterSlotNameEnum.GLOBAL_TASK_CENTER_BELONG_PROJECT, + }, + }, + { + title: 'common.belongOrg', + dataIndex: 'organizationName', + showTooltip: true, + showDrag: true, + width: 200, + filterConfig: { + options: orgs.map((item) => ({ + label: item.name, + value: item.id, + })), + filterSlotName: FilterSlotNameEnum.GLOBAL_TASK_CENTER_BELONG_PROJECT, + }, + } + ); + } catch (error) { + // eslint-disable-next-line no-console + console.log(error); + } + } + + await initProjectAndOrgs(); + const { propsRes, propsEvent, loadList, setLoadListParams } = useTable( getCapacityTaskList, {