fix(测试用例&工作台): 修复测试用例关联报无权限&工作台接口卡片限制跳转bug

This commit is contained in:
xinxin.wu 2024-12-16 16:03:58 +08:00 committed by Craftsman
parent 6fd28f362b
commit dca4a854cd
2 changed files with 6 additions and 3 deletions

View File

@ -843,7 +843,7 @@
watch( watch(
() => activeFolder.value, () => activeFolder.value,
() => { () => {
if (!isAdvancedSearchMode.value) { if (!isAdvancedSearchMode.value && innerProject.value) {
searchCase(); searchCase();
} }
} }

View File

@ -36,7 +36,7 @@
<div class="case-count-item-title">{{ ele.name }}</div> <div class="case-count-item-title">{{ ele.name }}</div>
<div <div
:class="`case-count-item-number ${index !== 0 ? 'cursor-pointer text-[rgb(var(--primary-5))]' : ''}`" :class="`case-count-item-number ${index !== 0 ? 'cursor-pointer text-[rgb(var(--primary-5))]' : ''}`"
@click="goNavigation" @click="goNavigation(index)"
> >
{{ hasPermission ? addCommasToNumber(ele.count as number) : '-' }} {{ hasPermission ? addCommasToNumber(ele.count as number) : '-' }}
</div> </div>
@ -364,7 +364,10 @@
}); });
} }
function goNavigation() { function goNavigation(index: number) {
if (index === 0) {
return;
}
const route = const route =
props.item.key === WorkCardEnum.API_CASE_COUNT props.item.key === WorkCardEnum.API_CASE_COUNT
? ApiTestRouteEnum.API_TEST_MANAGEMENT ? ApiTestRouteEnum.API_TEST_MANAGEMENT