diff --git a/frontend/src/models/projectManagement/menuManagement.ts b/frontend/src/models/projectManagement/menuManagement.ts index d7dca299bd..b406fd3503 100644 --- a/frontend/src/models/projectManagement/menuManagement.ts +++ b/frontend/src/models/projectManagement/menuManagement.ts @@ -43,8 +43,9 @@ export interface FakeTableListItem { export interface FakeTableOperationParams { projectId: string; excludeIds?: string[]; // 排除的id - selectedIds?: string[]; // 选中的id + selectIds?: string[]; // 选中的id selectAll: boolean; // 是否跨页全选 params?: TableQueryParams; // 查询参数 enable?: boolean; // 是否启用 + condition?: TableQueryParams; // 条件 } diff --git a/frontend/src/views/project-management/projectAndPermission/menuManagement/components/falseAlermRule.vue b/frontend/src/views/project-management/projectAndPermission/menuManagement/components/falseAlermRule.vue index b892c9dc11..d7e6267c77 100644 --- a/frontend/src/views/project-management/projectAndPermission/menuManagement/components/falseAlermRule.vue +++ b/frontend/src/views/project-management/projectAndPermission/menuManagement/components/falseAlermRule.vue @@ -124,10 +124,6 @@ const tableBatchActions = { baseAction: [ - { - label: 'common.batchModify', - eventTag: 'batchModify', - }, { label: 'common.enable', eventTag: 'batchEnable', @@ -194,7 +190,7 @@ }, ]; - const { propsRes, propsEvent, loadList, setKeyword, setLoadListParams } = useTable( + const { propsRes, propsEvent, loadList, setKeyword, setLoadListParams, resetSelector } = useTable( postFakeTableList, { scroll: { x: 1200 }, @@ -218,6 +214,7 @@ const fetchData = async () => { setKeyword(keyword.value); await loadList(); + resetSelector(); }; const handleDelete = (v: string | BatchActionQueryParams) => { @@ -228,11 +225,14 @@ try { if (typeof v === 'string') { // 单个删除 - await getDeleteFake({ selectedIds: [v], projectId: currentProjectId.value, selectAll: false }); + await getDeleteFake({ selectIds: [v], projectId: currentProjectId.value, selectAll: false }); } else { // 批量删除 await getDeleteFake({ - ...v, + selectIds: v.selectedIds, + selectAll: v.selectAll, + excludeIds: v.excludeIds, + condition: v.params, projectId: currentProjectId.value, }); } @@ -275,7 +275,7 @@ if (typeof v === 'string') { // 单个启用/禁用 await postUpdateEnableFake({ - selectedIds: [v], + selectIds: [v], projectId: currentProjectId.value, enable: isEnable, selectAll: false, @@ -283,7 +283,10 @@ } else { // 批量启用/禁用 await postUpdateEnableFake({ - ...v, + selectIds: v.selectedIds, + selectAll: v.selectAll, + excludeIds: v.excludeIds, + condition: v.params, projectId: currentProjectId.value, enable: isEnable, });