shaogen1995 1 year ago
parent
commit
81a4881bc8
2 changed files with 2 additions and 1 deletions
  1. 1 0
      src/components/AuthCom.tsx
  2. 1 1
      src/pages/A1Project/index.tsx

+ 1 - 0
src/components/AuthCom.tsx

@@ -8,6 +8,7 @@ type Props = {
 };
 
 function AuthCom({ aId, children }: Props) {
+  // 从仓库获取有权限的id集合,已经整理了数据,格式为 ['1','2',...]
   const arr = useSelector((state: RootState) => state.A4Role.A4RoleAll);
 
   return <>{arr.find((v) => v === aId) || aId === "-1" ? children : null}</>;

+ 1 - 1
src/pages/A1Project/index.tsx

@@ -37,7 +37,7 @@ function A1Project() {
 
   const pmUserIdArr = useMemo(() => {
     const arr1 = A3UserList.filter((v) => v.userName !== "admin");
-    const arr2: { value: number; label: string }[] = arr1.map((v: any) => ({
+    const arr2: { value: number; label: string }[] = arr1.map((v) => ({
       value: v.id,
       label: v.userName + " - " + v.realName,
     }));