|
@@ -2,7 +2,7 @@
|
|
|
* @Author: code4eat awesomedema@gmail.com
|
|
|
* @Date: 2022-12-14 14:14:32
|
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
|
- * @LastEditTime: 2023-07-24 10:27:31
|
|
|
+ * @LastEditTime: 2023-07-24 13:49:17
|
|
|
* @FilePath: /BudgetManaSystem/src/pages/Home/index.tsx
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
|
|
@@ -23,7 +23,7 @@ import img6 from '../../../static/wenzichatu6.png';
|
|
|
import img7 from '../../../static/wenzichatu7.png';
|
|
|
|
|
|
import './style.less';
|
|
|
-import { getComputeDate, getIndexData } from './service';
|
|
|
+import { getComputeDate, getIndexData, getReportPath } from './service';
|
|
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
|
import { useAccess } from '@umijs/max';
|
|
|
|
|
@@ -117,7 +117,7 @@ const HomePage: React.FC = () => {
|
|
|
set_currentComputeDate(resp);
|
|
|
}
|
|
|
|
|
|
- const goPageHandle = (num: number) => {
|
|
|
+ const goPageHandle = async (num: number) => {
|
|
|
let flag = true;
|
|
|
if (num == 1) {
|
|
|
let path = '/budgetMana/monthlySet';
|
|
@@ -184,7 +184,14 @@ const HomePage: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
if (num == 9) {
|
|
|
- let path = '/secondaryDistribute/secondaryDitriCheck';
|
|
|
+ let path = '/undefined';
|
|
|
+
|
|
|
+ const resp = await getReportPath({pageSize:500,current:1});
|
|
|
+ if(resp){
|
|
|
+ const result = resp.list.filter((a:any)=>a.code == '1663015052728475648');
|
|
|
+ if(result.length>0)path = result[0].value
|
|
|
+ }
|
|
|
+
|
|
|
if(access.canIReadThisPage(path)){
|
|
|
history.push(path);
|
|
|
}else{
|
|
@@ -192,10 +199,34 @@ const HomePage: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
if (num == 10) {
|
|
|
- //history.push('/secondaryDistribute/secondaryDitriCheck');
|
|
|
+ let path = '/undefined';
|
|
|
+
|
|
|
+ const resp = await getReportPath({pageSize:500,current:1});
|
|
|
+ if(resp){
|
|
|
+ const result = resp.list.filter((a:any)=>a.code == '1663015712702210048');
|
|
|
+ if(result.length>0)path = result[0].value
|
|
|
+ }
|
|
|
+
|
|
|
+ if(access.canIReadThisPage(path)){
|
|
|
+ history.push(path);
|
|
|
+ }else{
|
|
|
+ flag = false
|
|
|
+ }
|
|
|
}
|
|
|
if (num == 11) {
|
|
|
- //history.push('/secondaryDistribute/secondaryDitriCheck');
|
|
|
+ let path = '/undefined';
|
|
|
+
|
|
|
+ const resp = await getReportPath({pageSize:500,current:1});
|
|
|
+ if(resp){
|
|
|
+ const result = resp.list.filter((a:any)=>a.code == '1663015814632185856');
|
|
|
+ if(result.length>0)path = result[0].value
|
|
|
+ }
|
|
|
+
|
|
|
+ if(access.canIReadThisPage(path)){
|
|
|
+ history.push(path);
|
|
|
+ }else{
|
|
|
+ flag = false
|
|
|
+ }
|
|
|
}
|
|
|
if (num == 12) {
|
|
|
//history.push('/secondaryDistribute/secondaryDitriCheck');
|