|
@@ -63,7 +63,8 @@ onBeforeMount(async () => {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
apps.value = applist;
|
|
apps.value = applist;
|
|
- await fetchReportData('role', { appId: applist[0].id });
|
|
|
|
|
|
+ const ids = applist.map((item) => item.id).join(',');
|
|
|
|
+ await fetchReportData('role', { appIds: ids });
|
|
});
|
|
});
|
|
|
|
|
|
// 根据页签变化获取数据
|
|
// 根据页签变化获取数据
|
|
@@ -73,8 +74,8 @@ async function handleTabChange(key: string) {
|
|
if(!apps.value){
|
|
if(!apps.value){
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- console.log('切换页签app-----' + apps.value);
|
|
|
|
- await fetchReportData(key, {appId: apps.value[0].id});
|
|
|
|
|
|
+ const ids = apps.value.map((item) => item.id).join(',');
|
|
|
|
+ await fetchReportData(key, { appIds: ids });
|
|
} finally {
|
|
} finally {
|
|
tabtype.value = key;
|
|
tabtype.value = key;
|
|
loading.value = false;
|
|
loading.value = false;
|
|
@@ -84,11 +85,13 @@ async function handleTabChange(key: string) {
|
|
// 获取报表数据
|
|
// 获取报表数据
|
|
async function fetchReportData(type: string, params: object) {
|
|
async function fetchReportData(type: string, params: object) {
|
|
try {
|
|
try {
|
|
|
|
+ const ids = apps.value.map((item) => item.id).join(',');
|
|
const formparam = {
|
|
const formparam = {
|
|
type: type,
|
|
type: type,
|
|
permission: params.permission || '',
|
|
permission: params.permission || '',
|
|
appId: params.appId || '',
|
|
appId: params.appId || '',
|
|
business: params.business || '',
|
|
business: params.business || '',
|
|
|
|
+ appIds: params.appIds ||ids ||'',
|
|
};
|
|
};
|
|
const response = await report(formparam);
|
|
const response = await report(formparam);
|
|
if (type === 'role') {
|
|
if (type === 'role') {
|