Quellcode durchsuchen

Merge branch 'ZL' into dev

ZL vor 2 Monaten
Ursprung
Commit
b9e844cd5b
1 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen
  1. 6 3
      jeecgboot-vue3/src/views/system/menu/report/report.vue

+ 6 - 3
jeecgboot-vue3/src/views/system/menu/report/report.vue

@@ -63,7 +63,8 @@ onBeforeMount(async () => {
     return;
   }
   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){
       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 {
     tabtype.value = key;
     loading.value = false;
@@ -84,11 +85,13 @@ async function handleTabChange(key: string) {
 // 获取报表数据
 async function fetchReportData(type: string, params: object) {
   try {
+    const ids = apps.value.map((item) => item.id).join(',');
     const formparam = {
       type: type,
       permission: params.permission || '',
       appId: params.appId || '',
       business: params.business || '',
+      appIds: params.appIds  ||ids ||'',
     };
     const response = await report(formparam);
     if (type === 'role') {