From 2722abdc61025576c99473f2fca12a0369d70d56 Mon Sep 17 00:00:00 2001 From: xlsea Date: Fri, 28 Jun 2024 10:06:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(sj=5Fmap=5Freduce):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8=E5=B1=95=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common}/job-task-list-table.vue | 14 +- .../workflow/modules/common/detail-card.vue | 136 +----------------- .../workflow/modules/detail/start-detail.vue | 11 +- .../workflow/modules/nodes/task-node.vue | 8 +- src/components/workflow/styles/index.scss | 12 +- .../batch/modules/job-batch-detail-drawer.vue | 1 - 6 files changed, 37 insertions(+), 145 deletions(-) rename src/{views/job/batch/modules => components/common}/job-task-list-table.vue (94%) diff --git a/src/views/job/batch/modules/job-task-list-table.vue b/src/components/common/job-task-list-table.vue similarity index 94% rename from src/views/job/batch/modules/job-task-list-table.vue rename to src/components/common/job-task-list-table.vue index b462c45..874345c 100644 --- a/src/views/job/batch/modules/job-task-list-table.vue +++ b/src/components/common/job-task-list-table.vue @@ -31,7 +31,7 @@ const emit = defineEmits(); const expandedRowKeys = ref([]); -const { columns, data, loading, mobilePagination } = useTable({ +const { columns, columnChecks, data, loading, mobilePagination } = useTable({ apiFn: fetchGetJobTaskList, apiParams: { page: 1, @@ -187,6 +187,18 @@ const onExpandedRowKeys = (keys: DataTableRowKey[]) => { const onUpdatePage = (_: number) => { expandedRowKeys.value = []; }; + +const init = () => { + columnChecks.value = columnChecks.value.filter(column => { + if (!['4', '5'].includes(String(props.rowData?.taskType) || '-1')) { + return column.key !== 'taskName'; + } + + return true; + }); +}; + +init();