Explorar o código

解开流程管理限制

xjj %!s(int64=2) %!d(string=hai) anos
pai
achega
c7f1132975
Modificáronse 1 ficheiros con 13 adicións e 13 borrados
  1. 13 13
      src/pages/Index.js

+ 13 - 13
src/pages/Index.js

@@ -28,18 +28,18 @@ function LayoutDetail(props) {
     });
   }, []);
 
-  // useEffect(() => {
-  //   if (!currentUser.ID) return;
-  //   clearInterval(timer);
-  //   timer = setInterval(() => {
-  //     dispatch({
-  //       type: 'authList/queryAuthList',
-  //       payload: { user_id: currentUser.ID },
-  //     });
-  //   }, 10000);
+  useEffect(() => {
+    if (!currentUser.ID) return;
+    clearInterval(timer);
+    timer = setInterval(() => {
+      dispatch({
+        type: 'authList/queryAuthList',
+        payload: { user_id: currentUser.ID },
+      });
+    }, 10000);
 
-  //   return () => clearInterval(timer);
-  // }, [currentUser.ID]);
+    return () => clearInterval(timer);
+  }, [currentUser.ID]);
 
   return (
     <Layout>
@@ -59,13 +59,13 @@ function LayoutDetail(props) {
               <Menu.Item key="/home/flow-list">
                 <Link to="/home/flow-list">流程管理</Link>
               </Menu.Item>
-              {/* <Menu.Item key="/home/auth">
+              <Menu.Item key="/home/auth">
                 <Link to="/home/auth">
                   <Badge count={authList.length} className={styles.badge}>
                     审核列表
                   </Badge>
                 </Link>
-              </Menu.Item> */}
+              </Menu.Item>
             </Menu>
           </div>
           <RightContent />