From b559401911ba2b85fb65ac096a15110b099adb4f Mon Sep 17 00:00:00 2001 From: yunkexin <760754045@qq.com> Date: Tue, 26 Mar 2024 11:37:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomPages/BI/BI001HomeDetail.js | 11 +- .../CustomPages/BI/BI054HomeDetail.js | 2 +- .../CustomPages/BI/BI055HomeDetail.js | 4 +- src/layout/Sider.js | 4 +- src/routes/Home.js | 155 ++++++++++++++++-- src/routes/dashboard.css | 1 + 6 files changed, 154 insertions(+), 23 deletions(-) diff --git a/src/components/CustomPages/BI/BI001HomeDetail.js b/src/components/CustomPages/BI/BI001HomeDetail.js index 02419f5..341b1d1 100644 --- a/src/components/CustomPages/BI/BI001HomeDetail.js +++ b/src/components/CustomPages/BI/BI001HomeDetail.js @@ -207,17 +207,12 @@ class BI001HomeDetail extends React.Component { } loadData = () => { this.state.showLoading = true; - let mineType = this.props.data.mineType; let param = this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS; - if (param) { - mineType = param === "选矿厂" ? "10" : param === "尾矿库" ? "20" : "30"; - this.props.data.mineType = mineType; - } - this.chart1(mineType); + this.chart1(); }; //矿山 - chart1 = (mineType) => { - let json = initFilter(this.props.login.OrgId, mineType); + chart1 = () => { + let json = initFilter(this.props.login.OrgId); // extendRule(json, 'DEPARTMENT_NAME', 1, "矿山部"); // extendOrder(json, "MONTH", 0); this.props.dispatch({ diff --git a/src/components/CustomPages/BI/BI054HomeDetail.js b/src/components/CustomPages/BI/BI054HomeDetail.js index c1fc74a..0d2d509 100644 --- a/src/components/CustomPages/BI/BI054HomeDetail.js +++ b/src/components/CustomPages/BI/BI054HomeDetail.js @@ -56,7 +56,7 @@ class BI054HomeDetail extends React.Component { loadData = () => { this.state.showLoading = true; // let json = initFilter(this.props.login.OrgId, this.props.data.mineType, "NUM"); - let json = initFilter(this.props.login.OrgId, (this.props.data.mineType == null ? this.props.formParam.mineType : this.props.data.mineType), "NUM"); + let json = initFilter(this.props.login.OrgId,'', "NUM"); this.props.dispatch({ type: 'app/getDataByPost', diff --git a/src/components/CustomPages/BI/BI055HomeDetail.js b/src/components/CustomPages/BI/BI055HomeDetail.js index 362a645..28c1077 100644 --- a/src/components/CustomPages/BI/BI055HomeDetail.js +++ b/src/components/CustomPages/BI/BI055HomeDetail.js @@ -55,8 +55,8 @@ class BI055HomeDetail extends React.Component { // } else { // mineType = this.props.formParam.mineType; // } - debugger - let json = initFilter(this.props.login.OrgId, (this.props.data.mineType == null ? this.props.formParam.mineType : this.props.data.mineType)); + + let json = initFilter(this.props.login.OrgId); this.props.dispatch({ type: "app/getDataByPost", url: "BI/BIHome/GetHomeDetailMonthRisk", diff --git a/src/layout/Sider.js b/src/layout/Sider.js index 775729c..996313f 100644 --- a/src/layout/Sider.js +++ b/src/layout/Sider.js @@ -163,8 +163,8 @@ const Sider = (props) => { setCollapsed(!collapsed); }; useEffect(() => { - if (collapsed == false) { - setCollapsed(true); + if (MenuShow == true) { + setMenuShow(false); } }, [props.repost]); const menuCUR = topMenus.menus[mainSilder - 2]; diff --git a/src/routes/Home.js b/src/routes/Home.js index a910442..48a91e3 100644 --- a/src/routes/Home.js +++ b/src/routes/Home.js @@ -53,7 +53,7 @@ const AllTech = (props) => { span={6} className="home-tech-col" onClick={() => { - props.techClick() + props.techClick(); }} >