|
@@ -9,7 +9,9 @@ function Auth(props) {
|
|
|
const {
|
|
|
dispatch,
|
|
|
authList,
|
|
|
+ authVersionList,
|
|
|
checkedList,
|
|
|
+ checkedVersionList,
|
|
|
checkedPagination,
|
|
|
typeOptions,
|
|
|
currentUser,
|
|
@@ -51,16 +53,25 @@ function Auth(props) {
|
|
|
];
|
|
|
|
|
|
const loadNode = item => {
|
|
|
+ //直接从未处理的列表获取version,下面注释的请求得到的不全。大部分没有;
|
|
|
+ let version = {};
|
|
|
+ if (item.type == 'checked') {
|
|
|
+ version = checkedVersionList.find(v => v.id == item.id);
|
|
|
+ } else {
|
|
|
+ version = authVersionList.find(v => v.id == item.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: versionList => {
|
|
|
- let version = versionList.find(v => v.id == item.id) || {};
|
|
|
- localStorage.excelItem = JSON.stringify(version);
|
|
|
- router.push(`/home/detail/${item.project_id}/${item.template_id}`);
|
|
|
- },
|
|
|
- });
|
|
|
+ // 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 => (
|
|
@@ -99,6 +110,8 @@ function Auth(props) {
|
|
|
|
|
|
export default connect(({ auth, authList, loading, user }) => ({
|
|
|
authList: authList.authList,
|
|
|
+ authVersionList: authList.authVersionList,
|
|
|
+ checkedVersionList: auth.checkedVersionList,
|
|
|
checkedList: auth.checkedList.list,
|
|
|
checkedPagination: auth.checkedList.pagination,
|
|
|
typeOptions: auth.typeOptions,
|