306132416@qq.com пре 4 година
родитељ
комит
605b43f680

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
boniu/.eslintcache


+ 1 - 0
boniu/debug.log

@@ -2,3 +2,4 @@
 [0125/192439.680:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
 [0126/021042.433:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
 [0127/055324.038:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
+[0128/055324.054:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)

+ 24 - 2
boniu/src/components/Navbar/navbar.jsx

@@ -2,7 +2,7 @@ import React, { Component } from "react";
 import { Route, Switch, Link, withRouter } from "react-router-dom";
 import Overview from "../../components/Overview/overview";
 import indexBasicInfo from "../../components/indexBasicInfo/indexBasicInfo";
-import stocksInfo from '../../components/StocksInfo/stocksInfo'
+import stocksInfo from "../../components/StocksInfo/stocksInfo";
 import stocksApiList from "../../StocksApiList";
 import indexApiList from "../../IndexApiList";
 import "antd/dist/antd.css";
@@ -19,7 +19,8 @@ class NavBar extends Component {
   constructor(props) {
     super(props);
     this.state = {
-      userInfo: {}
+      userInfo: {},
+      openSubmenu: ["overview"]
     };
   }
   render() {
@@ -39,6 +40,27 @@ class NavBar extends Component {
               defaultOpenKeys={["overview"]}
               style={{ height: "100%", borderRight: 0 }}
               selectedKeys={pathNames}
+              onOpenChange={(item) => {
+                  console.log(item)
+                if (item.length < this.state.openSubmenu.length) {
+                  this.setState({
+                      openSubmenu: item
+                  });
+                  return;
+                }
+                this.setState({
+                    openSubmenu: item
+                });
+                item.slice(-1)[0] === "indexApi"
+                  ? this.props.history.push({
+                      pathname: indexApiList[0].url,
+                      state: indexApiList[0]
+                    })
+                  : this.props.history.push({
+                      pathname: stocksApiList[0].url,
+                      state: stocksApiList[0]
+                    });
+              }}
             >
               <Menu.Item key="overview" icon={<UserOutlined />}>
                 <Link to="/overview">总体说明</Link>

+ 3 - 0
boniu/src/components/Overview/overview.css

@@ -15,3 +15,6 @@
 .margin-top-20 {
     margin-top: 1.2em;
 }
+.err-table .ant-table-cell {
+  padding-left: 0 !important;
+}

Разлика између датотеке није приказан због своје велике величине
+ 5 - 5
boniu/src/components/Overview/overview.jsx


+ 26 - 0
boniu/src/components/StocksInfo/stocksInfo.css

@@ -12,3 +12,29 @@
   border-radius: 3px;
   background-color: #00c0ff;
 }
+.ant-table-cell {
+  padding-left: 25px !important;
+}
+
+.no-tab .ant-table-cell {
+  padding-left: 0 !important;
+}
+
+.ant-table-thead .ant-table-cell:nth-child(1) {
+  padding-left: 25px !important;
+}
+.first-table tr {
+  display: flex;
+}
+.first-table .ant-table-cell:nth-child(1) {
+  flex: 2;
+}
+.first-table .ant-table-cell:nth-child(2) {
+  flex: 1;
+}
+.second-table tr {
+  display: flex;
+}
+.second-table .ant-table-cell {
+  flex: 1;
+}

+ 15 - 5
boniu/src/components/StocksInfo/stocksInfo.jsx

@@ -12,9 +12,20 @@ const StocksInfo = (props) => {
   const paramsInfo = props.location.state.data.paramsInfo
   const url = props.location.state.data.url
   const download = props.location.state.data.download
+
+  const hasClass = () => {
+    let flag = false
+    outPutList.forEach(item => {
+      if (item.children) {
+        flag = true
+      }
+    })
+    return flag
+  }
+
   return (
     <div>
-      <Title level={4}>{title}</Title>
+      <Title level={3}>{title}</Title>
       <div>
         <Title className="stocks-title" level={5}>
           输入参数:
@@ -34,13 +45,11 @@ const StocksInfo = (props) => {
         </div>
       </div>
       <div>
-        <Title className="stocks-title" level={5}>
-          输出结果:
-        </Title>
+        <Title className="stocks-title" level={5}>输出结果:</Title>
         {/* 这里需要二级表格 */}
         <Table
           columns={columns}
-          // expandable
+          className={{ 'no-tab': hasClass(), 'first-table': true }}
           dataSource={outPutList}
           pagination={false}
           size="small"
@@ -51,6 +60,7 @@ const StocksInfo = (props) => {
           输出结果异常:
         </Title>
         <Table
+          className="second-table"
           columns={errColumns}
           dataSource={errorList}
           pagination={false}

+ 31 - 2
boniu/src/components/indexBasicInfo/indexBasicInfo.css

@@ -12,6 +12,35 @@
   border-radius: 3px;
   background-color: #00c0ff;
 }
-.ant-typography {
-  display: block;
+.ant-table-cell {
+  padding-left: 25px !important;
+}
+
+.no-tab .ant-table-cell {
+  padding-left: 0 !important;
+}
+
+.ant-table-thead .ant-table-cell:nth-child(1) {
+  padding-left: 25px !important;
+}
+.first-table tr {
+  display: flex;
+}
+.first-table .ant-table-cell:nth-child(1) {
+  flex: 2;
+}
+.first-table .ant-table-cell:nth-child(2) {
+  flex: 1;
+}
+.second-table tr {
+  display: flex;
+}
+.second-table .ant-table-cell {
+  flex: 1;
+}
+.indent-level-1 {
+  padding-left: 0 !important;
+}
+h4.ant-typography {
+  font-size: 24px !important;
 }

+ 11 - 2
boniu/src/components/indexBasicInfo/indexBasicInfo.jsx

@@ -3,7 +3,15 @@ import "./indexBasicInfo.css";
 import { Typography, Table, Button } from "antd";
 
 const { Text, Title, Link } = Typography;
-
+function hasClass(para) {
+  let flag = false;
+  para.forEach((item) => {
+    if (item.children) {
+      flag = true;
+    }
+  });
+  return flag;
+}
 class indexBasicInfo extends React.Component {
   constructor(props) {
     super(props);
@@ -33,6 +41,7 @@ class indexBasicInfo extends React.Component {
             输出结果:
           </Title>
           <Table
+            className={{ "no-tab": hasClass(outPutList), "first-table": true }}
             columns={columns}
             dataSource={outPutList}
             pagination={false}
@@ -40,7 +49,7 @@ class indexBasicInfo extends React.Component {
           />
         </div>
         <div>
-          <Title className="stocks-title" level={5}>
+          <Title className={"stocks-title"} level={5}>
             输出结果异常:
           </Title>
           <Table