|
@@ -20,12 +20,12 @@ function Auth(props) {
|
|
|
useEffect(() => {
|
|
|
if (!currentUser.ID) return;
|
|
|
dispatch({
|
|
|
- type: 'auth/queryAuthList',
|
|
|
+ type: 'authList/queryAuthList',
|
|
|
payload: { user_id: currentUser.ID },
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'auth/queryCheckedList',
|
|
|
- payload: { user_id: currentUser.ID, params: {} },
|
|
|
+ payload: { user_id: currentUser.ID, params: { page_size: 99999 } },
|
|
|
});
|
|
|
}, [currentUser]);
|
|
|
|
|
@@ -51,17 +51,15 @@ function Auth(props) {
|
|
|
];
|
|
|
|
|
|
const loadNode = item => {
|
|
|
- // localStorage.excelItem = JSON.stringify({ version_id: item.version_id });
|
|
|
//调用接口获取version信息
|
|
|
dispatch({
|
|
|
type: 'auth/queryVersionByNode',
|
|
|
callback: versionList => {
|
|
|
- let version = versionList.find(v => v.id == item.version_id) || {};
|
|
|
+ let version = versionList.find(v => v.id == item.id) || {};
|
|
|
localStorage.excelItem = JSON.stringify(version);
|
|
|
+ router.push(`/home/detail/${item.project_id}/${item.template_id}`);
|
|
|
},
|
|
|
});
|
|
|
-
|
|
|
- router.push(`/home/detail/${item.project_id}/${item.template_id}`);
|
|
|
};
|
|
|
|
|
|
const renderUnauth = data => (
|
|
@@ -69,7 +67,7 @@ function Auth(props) {
|
|
|
);
|
|
|
|
|
|
const renderAuth = data => (
|
|
|
- <Table columns={flowColumns} dataSource={data} pagination={checkedPagination} rowKey="id" />
|
|
|
+ <Table columns={flowColumns} dataSource={data} pagination={false} rowKey="id" />
|
|
|
);
|
|
|
|
|
|
return (
|
|
@@ -81,6 +79,7 @@ function Auth(props) {
|
|
|
expandable={{ expandedRowRender: record => renderUnauth(record.nodes) }}
|
|
|
pagination={false}
|
|
|
rowKey="key"
|
|
|
+ loading={loading.models.authList}
|
|
|
/>
|
|
|
</Panel>
|
|
|
<Panel header="已审批" key="1">
|
|
@@ -90,17 +89,18 @@ function Auth(props) {
|
|
|
expandable={{ expandedRowRender: record => renderAuth(record.nodes) }}
|
|
|
pagination={false}
|
|
|
rowKey="key"
|
|
|
+ loading={loading.models.auth}
|
|
|
/>
|
|
|
</Panel>
|
|
|
</Collapse>
|
|
|
);
|
|
|
}
|
|
|
|
|
|
-export default connect(({ auth, loading, user }) => ({
|
|
|
- authList: auth.authList,
|
|
|
+export default connect(({ auth, authList, loading, user }) => ({
|
|
|
+ authList: authList.authList,
|
|
|
checkedList: auth.checkedList.list,
|
|
|
checkedPagination: auth.checkedList.pagination,
|
|
|
typeOptions: auth.typeOptions,
|
|
|
- loading: loading.models.auth,
|
|
|
currentUser: user.currentUser,
|
|
|
+ loading,
|
|
|
}))(Auth);
|