Forráskód Böngészése

修复审批列表跳转至详情后没有审批按钮的问题

xjj 2 éve
szülő
commit
28022221da
2 módosított fájl, 15 hozzáadás és 14 törlés
  1. 12 13
      src/pages/Auth/Auth.js
  2. 3 1
      src/pages/List/List.js

+ 12 - 13
src/pages/Auth/Auth.js

@@ -57,21 +57,20 @@ function Auth(props) {
     let version = {};
     if (item.type == 'checked') {
       version = checkedVersionList.find(v => v.id == item.id);
+      localStorage.excelItem = JSON.stringify(version);
+      router.push(`/home/detail/${item.project_id}/${item.template_id}`);
     } else {
-      version = authVersionList.find(v => v.id == item.id);
+      //调用接口获取version信息
+      dispatch({
+        type: 'auth/queryVersionByNode',
+        payload: { template_node_id: item.node_id },
+        callback: checkedVersionList => {
+          let version = checkedVersionList.find(v => v.id == item.id) || {};
+          localStorage.excelItem = JSON.stringify(version);
+          router.push(`/home/detail/${item.project_id}/${item.template_id}`);
+        },
+      });
     }
-    localStorage.excelItem = JSON.stringify(version);
-    router.push(`/home/detail/${item.project_id}/${item.template_id}`);
-    //调用接口获取version信息
-    // dispatch({
-    //   type: 'auth/queryVersionByNode',
-    //   payload: { template_node_id: item.node_id },
-    //   callback: checkedVersionList => {
-    //     let version = checkedVersionList.find(v => v.id == item.id) || {};
-    //     localStorage.excelItem = JSON.stringify(version);
-    //     router.push(`/home/detail/${item.project_id}/${item.template_id}`);
-    //   },
-    // });
   };
 
   const renderUnauth = data => (

+ 3 - 1
src/pages/List/List.js

@@ -50,6 +50,7 @@ function List(props) {
     },
     {
       title: '操作',
+      width: 280,
       render: record => (
         <>
           <a
@@ -95,7 +96,7 @@ function List(props) {
               setVersionVisible(true);
             }}
           >
-            最新清单
+            当前节点清单
           </a>
         </>
       ),
@@ -107,6 +108,7 @@ function List(props) {
       type: 'list/queryProjectRecord',
       payload: {
         ...filter,
+        pageSize: 20,
         currentPage: filter.current,
       },
     });