Browse Source

报表分享链接添加pathname

zhuth 6 years ago
parent
commit
1335a0eb88
1 changed files with 1 additions and 11 deletions
  1. 1 11
      src/components/dashboard/list.jsx

+ 1 - 11
src/components/dashboard/list.jsx

@@ -186,15 +186,6 @@ class DashboardList extends React.Component {
         })
     }
 
-    // generateCurrentMenu = () => {
-    //     const { currentMenuParents } = this.props.dashboard;
-    //     let arr = [];
-    //     for(let i = currentMenuParents.length - 1; i >= 0; i--) {
-    //         arr.push();
-    //     }
-    //     return arr;
-    // }
-
     render() {
         const { dispatch, dashboard, main } = this.props;
         const { visibleShareBox, shareUrl, visibleDistributeBox, visibleTransferBox, visibleDeleteBox,
@@ -209,7 +200,7 @@ class DashboardList extends React.Component {
             <Menu className='menu-operation'>
                 { selectedRecord && (currentUser.code === selectedRecord.creatorCode || currentUser.role === 'superAdmin') && <Menu.Item onClick={() => {
                     dispatch({ type: 'dashboard/getShareKey', record: selectedRecord, delay: 7 }).then((key) => {
-                        let obj = { visibleShareBox: true, shareUrl: window.location.origin + '/#/dashboard/share_key/' + key };
+                        let obj = { visibleShareBox: true, shareUrl: window.location.origin + window.location.pathname + '#/dashboard/share_key/' + key };
                         obj['visibleOperatingMenu' + selectedRecord.code] = false;
                         this.setState(obj);
                     });
@@ -349,7 +340,6 @@ class DashboardList extends React.Component {
                     <Card bordered={false} className="dashboard-body" title={
                         <Row className='dashboard-tools' type='flex' justify='space-between'>
                             <Col className='menus' style={{ display: 'flex' }}>
-                                {/* { this.generateCurrentMenu() } */}
                                 { [].concat(currentMenuParents).reverse().map(m => m.name).join(' > ') }
                             </Col>
                             <Col className='search'>