mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-11-30 11:08:38 +08:00
fix(工作台): 修复工作台接口数量卡片切换无权限项目资源错误
This commit is contained in:
parent
e744f1ed38
commit
3fc583ecfe
@ -296,10 +296,12 @@
|
||||
}
|
||||
|
||||
function changeProject() {
|
||||
nextTick(() => {
|
||||
initApiOrScenarioCount();
|
||||
nextTick(async () => {
|
||||
await initApiOrScenarioCount();
|
||||
emit('change');
|
||||
if (hasPermission.value) {
|
||||
initApiCountRate();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -146,6 +146,8 @@
|
||||
coverOptions.value = { ...covOptions };
|
||||
}
|
||||
async function initApiCountRate() {
|
||||
console.log(hasPermission.value);
|
||||
|
||||
try {
|
||||
loading.value = true;
|
||||
const detail = await workApiCountCoverRage(projectId.value);
|
||||
@ -191,10 +193,12 @@
|
||||
}
|
||||
|
||||
function changeProject() {
|
||||
nextTick(() => {
|
||||
initApiCount();
|
||||
nextTick(async () => {
|
||||
await initApiCount();
|
||||
emit('change');
|
||||
if (hasPermission.value) {
|
||||
initApiCountRate();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<NoData
|
||||
v-if="showNoData || !defaultWorkList.length"
|
||||
v-if="!defaultWorkList.length"
|
||||
:no-res-permission="!appStore.projectList.length"
|
||||
:all-screen="!defaultWorkList.length"
|
||||
height="h-[calc(100vh-110px)]"
|
||||
@ -249,8 +249,6 @@
|
||||
|
||||
const defaultWorkList = ref<SelectedCardItem[]>([]);
|
||||
|
||||
const showNoData = ref(false);
|
||||
|
||||
// 用来存储每个请求的结果,key 是项目ID
|
||||
const requestResults = ref<Record<string, ApiCoverageData>>({});
|
||||
// 用来存储已请求过的项目
|
||||
@ -301,9 +299,6 @@
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error);
|
||||
} finally {
|
||||
if (!defaultWorkList.value.length) {
|
||||
showNoData.value = true;
|
||||
}
|
||||
appStore.hideLoading();
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ export const colorMapConfig: Record<string, string[]> = {
|
||||
[WorkCardEnum.ASSOCIATE_CASE_COUNT]: ['#00C261', '#3370FF'],
|
||||
[WorkCardEnum.REVIEW_CASE_COUNT]: ['#D4D4D8', '#3370FF', '#00C261', '#ED0303', '#FFA200'],
|
||||
[WorkCardEnum.TEST_PLAN_COUNT]: ['#9441B1', '#3370FF', '#00C261', '#D4D4D8'],
|
||||
[WorkCardEnum.PLAN_LEGACY_BUG]: ['#9441B1', '#3370FF', '#00C261', '#D4D4D8'],
|
||||
[WorkCardEnum.PLAN_LEGACY_BUG]: ['#9441B1', '#3370FF', '#00C261', '#D4D4D8', ...getColorScheme(12)],
|
||||
[WorkCardEnum.BUG_COUNT]: ['#FFA200', '#3370FF', '#D4D4D8', '#00C261', ...getColorScheme(13)],
|
||||
[WorkCardEnum.HANDLE_BUG_BY_ME]: ['#9441B1', '#3370FF', '#00C261', '#D4D4D8'],
|
||||
[WorkCardEnum.CREATE_BY_ME]: ['#9441B1', '#3370FF', '#00C261', '#D4D4D8'],
|
||||
|
Loading…
Reference in New Issue
Block a user