Prechádzať zdrojové kódy

调整首页获取报表id接口

code4eat 2 rokov pred
rodič
commit
ea9d47f0b7
3 zmenil súbory, kde vykonal 17 pridanie a 8 odobranie
  1. 2 2
      src/app.tsx
  2. 5 5
      src/pages/index/index.tsx
  3. 10 1
      src/service/index.ts

+ 2 - 2
src/app.tsx

@@ -248,8 +248,8 @@ export const qiankun = fetch('/config').then(() => ({
     // },
     {
       name: 'budgetManaSystem', // 唯一 id
-      entry: '//localhost:8001',
-      //entry: '//120.27.235.181:5000/perform/',  //开发
+      //entry: '//localhost:8001',
+      entry: '//120.27.235.181:5000/perform/',  //开发
       //entry: '//47.96.149.190:5000/perform/', //演示
     },
     {

+ 5 - 5
src/pages/index/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-11-10 09:33:30
- * @LastEditTime: 2023-04-13 13:35:55
+ * @LastEditTime: 2023-04-13 18:25:35
  * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: /KC-MiddlePlatform/src/pages/index.tsx
@@ -16,7 +16,7 @@ import TopBar from '@/components/topBar';
 import { FastEntry, FastEntryTabType } from './components/FastEntry';
 import { RecentlyVisited, RecentlyVisitedItemsType } from './components/RecentlyVisited';
 import { todoItem, TodoList } from './components/TodoList';
-import { getUserIndexData, todoListAct, UserInfo } from '@/service';
+import { getAllParams, getUserIndexData, todoListAct, UserInfo } from '@/service';
 import { MsgRecord } from './components/MsgRecord';
 import { getParamsManaTableData } from '../platform/setting/paramsMana/service';
 
@@ -98,10 +98,10 @@ const IndexPage: React.FC<IndexPageType> = ({ location }) => {
 
   const setIframeUrl = async () => {
 
-    const resp = await getParamsManaTableData({ current: 1, pageSize: 100 });
+    const resp = await getAllParams();
 
     if (resp) {
-      const needItem = resp.list.filter((a: any) => a.id == 31);
+      const needItem = resp.filter((a: any) => a.id == 31);
       const userData = localStorage.getItem('userData');
       let token = '';
       if (userData) {
@@ -110,7 +110,7 @@ const IndexPage: React.FC<IndexPageType> = ({ location }) => {
       }
 
       if (needItem.length > 0) {
-        setspecialPageUrl(`http://eastern1.kcim-bi.163yun.com/dash/integration/56&rid=${needItem[0].value}&toolbar=[]&hideTitle=true&hideScaleBar=false&hidePageBar=false&token=${token}`);
+        setspecialPageUrl(`http://eastern1.kcim-bi.163yun.com/dash/integration/56?rid=${needItem[0].value}&toolbar=[]&hideTitle=true&hideScaleBar=false&hidePageBar=false&token=${token}`);
       }
     }
   }

+ 10 - 1
src/service/index.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-06-27 15:43:25
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-04-11 17:06:00
+ * @LastEditTime: 2023-04-13 18:25:20
  * @FilePath: /KC-MiddlePlatform/src/service/index.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -58,3 +58,12 @@ export const todoListAct = async (data:number[]) => {
     });
 };
 
+
+//查字典获取报表id,用于首页展示
+
+export const getAllParams = async () => {
+  return request('/centerSys/parameter', {
+    method: 'GET',
+  });
+};
+