Csy817 7 年 前
コミット
30de233cab
2 ファイル変更3 行追加5 行削除
  1. 2 2
      src/components/app/App.jsx
  2. 1 3
      src/components/common/schema/Table.js

+ 2 - 2
src/components/app/App.jsx

@@ -13,7 +13,7 @@ import WechatService from "../wechatService/WechatService";
 import QuantService from "../quantService/QuantService";
 import TrialCase from "../trialCase/TrialCase";
 import Login from "../login/Login";
-import Column from '../common/schema/Column.jsx';
+import Table from '../common/schema/Table';
 import '../common/graphql/index.css';
 import './index.css'
 import Create from "../common/schema/Create";
@@ -259,7 +259,7 @@ class App extends Component {
                                 <Route path="/graphql-service/:sidebar" component={TrialCase}/>
                                 <Route path="/wechat-service/:sidebar" component={WechatService}/>
                                 <Route path="/quant-service/" component={QuantService}/>
-                                <Route path="/table" component={Column}/>
+                                <Route path="/table" component={Table}/>
                                 <Route path="/login" component={Login}/>
                                 <Redirect path="*" to="/"/>
                             </Switch>

+ 1 - 3
src/components/common/schema/Table.js

@@ -101,13 +101,11 @@ class Table extends Component {
     };
 
     render() {
-
         // console.log('columns',this.state.columns);
-        let schemaID = this.props.schemaID || this.props.location.search.substr(this.props.location.search.indexOf("=")+1);
+        let {schemaId:schemaID,schemaName} = this.props.history.location.state;
         let userID = this.props.userID || getCookie('user_id');
         // console.log('schemaID',schemaID,'userID',userID);
 
-
         return (
             <div>
                 <div className="column-menu" onClick={()=>this.props.history.goBack()}>