瀏覽代碼

Merge branch 'ZL' into dev

ZL 2 月之前
父節點
當前提交
b9e844cd5b
共有 1 個文件被更改,包括 6 次插入3 次删除
  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') {