diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue index 2d36362a98..b3a1ab4ed8 100644 --- a/frontend/src/components/pure/ms-table/base-table.vue +++ b/frontend/src/components/pure/ms-table/base-table.vue @@ -33,6 +33,8 @@ v-if="attrs.selectorType === 'checkbox'" :total="attrs.showPagination ? (attrs.msPagination as MsPaginationI).total : (attrs.data as MsTableDataItem[]).length" :selected-keys="props.selectedKeys" + :selector-status="props.selectorStatus" + :exclude-keys="[...props.excludeKeys]" :current-data="attrs.data as Record[]" :show-select-all="!!attrs.showPagination && props.showSelectorAll" :disabled="(attrs.data as []).length === 0" @@ -50,6 +52,7 @@ v-model:model-value="record.tableChecked" @change="(val) => handleRadioChange(val as boolean, record)" /> +
>[]; showSelectAll: boolean; disabled: boolean; + selectorStatus: SelectAllEnum; + excludeKeys: string[]; }>(), { current: 0, @@ -52,7 +54,14 @@ const checked = computed({ get: () => { - return props.selectedKeys.size > 0 && props.selectedKeys.size === props.total; + if (props.selectorStatus !== 'all') { + return props.selectedKeys.size > 0 && props.selectedKeys.size === props.total; + } + if (props.selectorStatus === 'all') { + return !props.excludeKeys?.length + ? true + : props.selectedKeys.size > 0 && props.selectedKeys.size === props.total; + } }, set: (value) => { return value; @@ -60,7 +69,12 @@ }); const indeterminate = computed(() => { // 已选中的数量大于 0 且小于总数时是半选状态 - return props.selectedKeys.size > 0 && props.selectedKeys.size < props.total; + if (props.selectorStatus === 'current') { + return props.selectedKeys.size > 0 && props.selectedKeys.size < props.total; + } + if (props.selectorStatus === 'all') { + return !props.excludeKeys?.length ? false : props.selectedKeys.size > 0 && props.selectedKeys.size < props.total; + } }); const handleSelect = (v: string | number | Record | undefined) => { diff --git a/frontend/src/views/project-management/taskCenter/component/apiCase.vue b/frontend/src/views/project-management/taskCenter/component/apiCase.vue index f96270b379..b0017010e8 100644 --- a/frontend/src/views/project-management/taskCenter/component/apiCase.vue +++ b/frontend/src/views/project-management/taskCenter/component/apiCase.vue @@ -203,6 +203,8 @@ sortIndex: 1, fixed: 'left', showTooltip: true, + showDrag: false, + columnSelectorDisabled: true, }, { title: 'project.taskCenter.resourceName', @@ -211,6 +213,7 @@ width: 300, showDrag: false, showTooltip: true, + columnSelectorDisabled: true, }, { title: 'system.project.name', @@ -219,6 +222,7 @@ showTooltip: true, showDrag: true, width: 200, + showInTable: false, }, { title: 'system.organization.organizationName', @@ -227,6 +231,7 @@ showTooltip: true, showDrag: true, width: 200, + showInTable: false, }, { title: 'project.taskCenter.executionResult', @@ -257,6 +262,7 @@ showInTable: true, showDrag: true, showTooltip: true, + width: 200, }, { title: 'project.taskCenter.operator', @@ -265,6 +271,7 @@ showInTable: true, showDrag: true, showTooltip: true, + width: 200, }, { title: 'project.taskCenter.operating', @@ -287,7 +294,7 @@ { tableKey: TableKeyEnum.TASK_API_CASE, scroll: { - x: '100%', + x: 1400, }, showSetting: true, selectable: true, diff --git a/frontend/src/views/project-management/taskCenter/component/scheduledTask.vue b/frontend/src/views/project-management/taskCenter/component/scheduledTask.vue index 51bb4dd109..5a6e1879a2 100644 --- a/frontend/src/views/project-management/taskCenter/component/scheduledTask.vue +++ b/frontend/src/views/project-management/taskCenter/component/scheduledTask.vue @@ -123,6 +123,7 @@ width: 140, showInTable: true, showTooltip: true, + columnSelectorDisabled: true, }, { title: 'project.taskCenter.resourceName', @@ -131,6 +132,7 @@ width: 200, showDrag: true, showTooltip: true, + columnSelectorDisabled: true, }, { title: 'project.taskCenter.resourceClassification',