feat(接口测试): 接口定义页面回收站后增加统计数量展示

https://www.tapd.cn/55049933/s/1504569
This commit is contained in:
Jianguo-Genius 2024-04-22 14:54:10 +08:00 committed by 刘瑞斌
parent 65a6a27f3b
commit 109960a9a8
5 changed files with 27 additions and 0 deletions

View File

@ -409,6 +409,7 @@
},
fixed: 'left',
width: 100,
columnSelectorDisabled: true,
},
{
title: 'apiTestManagement.apiName',
@ -419,6 +420,7 @@
sorter: true,
},
width: 200,
columnSelectorDisabled: true,
},
{
title: 'apiTestManagement.apiType',

View File

@ -462,6 +462,7 @@
width: 130,
ellipsis: true,
showTooltip: true,
columnSelectorDisabled: true,
},
{
title: 'case.caseName',
@ -472,6 +473,7 @@
sorter: true,
},
width: 180,
columnSelectorDisabled: true,
},
{
title: 'case.caseLevel',

View File

@ -188,6 +188,7 @@
sorter: true,
},
fixed: 'left',
columnSelectorDisabled: true,
width: 100,
},
{
@ -199,6 +200,7 @@
sorter: true,
},
width: 200,
columnSelectorDisabled: true,
},
{
title: 'apiTestManagement.apiType',

View File

@ -266,6 +266,7 @@
},
fixed: 'left',
width: 100,
columnSelectorDisabled: true,
},
{
title: 'case.caseName',
@ -276,6 +277,7 @@
sorter: true,
},
width: 180,
columnSelectorDisabled: true,
},
{
title: 'case.caseLevel',

View File

@ -28,6 +28,7 @@
>
<MsIcon type="icon-icon_delete-trash_outlined" class="folder-icon" />
<div class="folder-name mx-[4px]">{{ t('caseManagement.featureCase.recycle') }}</div>
<div class="folder-count">({{ recycleModulesCount || 0 }})</div>
</div>
</div>
</div>
@ -76,12 +77,15 @@
import management from './components/management/index.vue';
import moduleTree from './components/moduleTree.vue';
import { getTrashModuleCount } from '@/api/modules/api-test/management';
import { useI18n } from '@/hooks/useI18n';
import { ApiDefinitionGetModuleParams } from '@/models/apiTest/management';
import { ModuleTreeNode } from '@/models/common';
import { ApiTestRouteEnum } from '@/enums/routeEnum';
import useAppStore from '../../../store/modules/app';
const route = useRoute();
const { t } = useI18n();
const router = useRouter();
@ -128,8 +132,22 @@
protocol.value = val;
}
const appStore = useAppStore();
const recycleModulesCount = ref(0);
async function selectRecycleCount() {
const res = await getTrashModuleCount({
projectId: appStore.currentProjectId,
keyword: '',
moduleIds: [],
protocol: protocol.value,
});
recycleModulesCount.value = res.all;
}
function refreshModuleTree() {
moduleTreeRef.value?.refresh();
//
selectRecycleCount();
}
function refreshModuleTreeCount(params: ApiDefinitionGetModuleParams) {
@ -161,6 +179,7 @@
// cId tab
managementRef.value?.newCaseTab(route.query.cId as string);
}
selectRecycleCount();
});
//