From a552405a0ab6ed054e075e16821d013a042068cf Mon Sep 17 00:00:00 2001 From: wjn Date: Mon, 15 Jul 2024 15:37:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=8A=A5=E8=A1=A8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomPages/BI/BI009RiskAnalysis.js | 28 +++++++------- .../CustomPages/BI/BI013RiskAnalysisModel.js | 16 ++++---- .../BI/BI014RiskPerformanceModel.js | 37 ++++++++----------- .../CustomPages/HM/HM061ShowPrint.js | 5 +++ 4 files changed, 42 insertions(+), 44 deletions(-) diff --git a/src/components/CustomPages/BI/BI009RiskAnalysis.js b/src/components/CustomPages/BI/BI009RiskAnalysis.js index 20b02e6..c194f00 100644 --- a/src/components/CustomPages/BI/BI009RiskAnalysis.js +++ b/src/components/CustomPages/BI/BI009RiskAnalysis.js @@ -39,19 +39,19 @@ class BI008RiskAnalysis extends React.Component { dataIndex: "NAME", }, { - title: "一级风险", + title: "重大风险", dataIndex: "LEVEL1", }, { - title: "二级风险", + title: "较大风险", dataIndex: "LEVEL2", }, { - title: "三级风险", + title: "一般风险", dataIndex: "LEVEL3", }, { - title: "四级风险", + title: "低风险", dataIndex: "LEVEL4", }, ]; @@ -70,8 +70,6 @@ class BI008RiskAnalysis extends React.Component { onlyData: false, onComplete: (ret) => { if (ret) { - console.log(ret); - // this.state.retData = ret?.Data.RISKLEVELCOUNTS; this.setState({ retData:ret.Data.RISKLEVELCOUNTS }) @@ -97,19 +95,19 @@ class BI008RiskAnalysis extends React.Component { this.chart2( ret?.Data.AREACOUNTS.filter((t) => t.AREATYPE == 0).slice(0, 10) ); - this.chart3( - ret?.Data.AREACOUNTS.filter((t) => t.AREATYPE == 1).slice(0, 10) - ); + // this.chart3( + // ret?.Data.AREACOUNTS.filter((t) => t.AREATYPE == 1).slice(0, 10) + // ); this.chart4(ret?.Data.DATECOUNTS); }, }); }; chart1 = () => { let showData = [ - { value: this.state.LEVEL1TOTAL, name: "一级风险" }, - { value: this.state.LEVEL2TOTAL, name: "二级风险" }, - { value: this.state.LEVEL3TOTAL, name: "三级风险" }, - { value: this.state.LEVEL4TOTAL, name: "四级风险" }, + { value: this.state.LEVEL1TOTAL, name: "重大风险" }, + { value: this.state.LEVEL2TOTAL, name: "较大风险" }, + { value: this.state.LEVEL3TOTAL, name: "一般风险" }, + { value: this.state.LEVEL4TOTAL, name: "低风险" }, ]; let chart1s = document.getElementById("chart1"); let myChart = echarts.init(chart1s); @@ -219,7 +217,7 @@ class BI008RiskAnalysis extends React.Component { let myChart = echarts.init(chart2s); myChart.setOption({ title: { - text: "矿山-风险区域统计TOP10", + text: "风险区域统计TOP10", left: "center", top: "2%", }, @@ -342,7 +340,7 @@ class BI008RiskAnalysis extends React.Component { let myChart = echarts.init(chart3s); myChart.setOption({ title: { - text: "选矿-风险区域统计TOP10", + text: "风险区域统计TOP10", left: "center", top: "2%", }, diff --git a/src/components/CustomPages/BI/BI013RiskAnalysisModel.js b/src/components/CustomPages/BI/BI013RiskAnalysisModel.js index fdff72f..c567c30 100644 --- a/src/components/CustomPages/BI/BI013RiskAnalysisModel.js +++ b/src/components/CustomPages/BI/BI013RiskAnalysisModel.js @@ -110,18 +110,18 @@ class BI013RiskAnalysisModel extends React.Component { let showData = []; let color = []; let allNum = 0; - showData.push({ value: this.state.LEVEL1TOTAL, name: "一级" }); - showData.push({ value: this.state.LEVEL2TOTAL, name: "二级" }); - showData.push({ value: this.state.LEVEL3TOTAL, name: "三级" }); - showData.push({ value: this.state.LEVEL4TOTAL, name: "四级" }); + showData.push({ value: this.state.LEVEL1TOTAL, name: "重大风险" }); + showData.push({ value: this.state.LEVEL2TOTAL, name: "较大风险" }); + showData.push({ value: this.state.LEVEL3TOTAL, name: "一般风险" }); + showData.push({ value: this.state.LEVEL4TOTAL, name: "低风险" }); showData.map((item) => { - if (item.name === "一级") { + if (item.name === "重大风险") { color.push("#c92a2a"); - } else if (item.name === "二级") { + } else if (item.name === "较大风险") { color.push("#ffa94d"); - } else if (item.name === "三级") { + } else if (item.name === "一般风险") { color.push("#ffe066"); - } else if (item.name === "四级") { + } else if (item.name === "低风险") { color.push("#4285F4"); } allNum = allNum + item.value; diff --git a/src/components/CustomPages/BI/BI014RiskPerformanceModel.js b/src/components/CustomPages/BI/BI014RiskPerformanceModel.js index 2e140f0..c0fec58 100644 --- a/src/components/CustomPages/BI/BI014RiskPerformanceModel.js +++ b/src/components/CustomPages/BI/BI014RiskPerformanceModel.js @@ -14,7 +14,6 @@ import { import echarts from "echarts"; import moment from "moment"; import IconFont from "../../../utils/iconFont"; -import { T } from "antd/lib/upload/utils"; class BI014RiskPerformanceModel extends React.Component { constructor(props) { super(props); @@ -62,8 +61,7 @@ class BI014RiskPerformanceModel extends React.Component { { NAME: ["一级", "二级", "三级", "四级"], LEVEL1: [3, 8, 181, 1112], - } - , + }, CHARTFXDJ2: [ { name: "一级", value: 3 }, { name: "二级", value: 8 }, @@ -267,7 +265,7 @@ class BI014RiskPerformanceModel extends React.Component { } componentDidMount() { - this.getBaseInfoData(); + this.getBaseInfoDataOnline(); } //获取数据 @@ -281,15 +279,17 @@ class BI014RiskPerformanceModel extends React.Component { payload: json2, onlyData: false, onComplete: (ret) => { + this.state.ret = ret; this.chart4(ret?.Data.DATECOUNTS); this.chartFXDJ1(ret?.Data.CHARTFXDJ1); this.chartFXDJ2(ret?.Data.CHARTFXDJ2); this.chartSCDY(ret?.Data.CHARTLIST[0]); this.chartFXLB1(ret?.Data.CHARTLIST[1]); - this.chartZRDW(ret?.Data.CHARTLIST[2]); this.chartCJ(ret?.Data.CHARTLIST[3]); - this.chartZYRW1(this.state.ret.Data.CHARTZYRW1); - this.chartZYRW2(this.state.ret.Data.CHARTZYRW2); + this.chartZRDW(ret?.Data.CHARTLIST[2]); + this.chartQY(ret?.Data.CHARTLIST[4]); + this.chartZYRW1(ret?.Data.CHARTZYRW1); + this.chartZYRW2(ret?.Data.CHARTZYRW2); }, }); }; @@ -2005,12 +2005,7 @@ class BI014RiskPerformanceModel extends React.Component { }; //显示详情弹窗 showDetailModal = (formCode) => { - var titleTemp = - this.state.mineType == 20 - ? "尾矿库" - : this.state.mineType == 10 - ? "选矿厂" - : "露天矿"; + var titleTemp =""; if (formCode == "风险类别1") { titleTemp += "风险类别"; this.chart25(this.state.ret.Data.CHARTLIST[1]); @@ -2026,17 +2021,17 @@ class BI014RiskPerformanceModel extends React.Component { else if (formCode == "生产单元") { this.setState({ isShow1: true }) titleTemp += "生产单元"; - this.chart21(this.state.ret.Data.CHARTLIST[3], "露天矿", "1", "2", "3", "4"); - this.chart22(this.state.ret.Data.CHARTLIST[3], "选矿厂", "1", "2", "3", "4"); - this.chart23(this.state.ret.Data.CHARTLIST[3], "尾矿库", "1", "2", "3", "4"); - this.chart24(this.state.ret.Data.CHARTLIST[3], "职能部门", "1", "2", "3", "4"); + this.chart21(this.state.ret.Data.SCDYLIST[0], "露天矿", "1", "2", "3", "4"); + this.chart22(this.state.ret.Data.SCDYLIST[1], "选矿厂", "1", "2", "3", "4"); + this.chart23(this.state.ret.Data.SCDYLIST[2], "尾矿库", "1", "2", "3", "4"); + this.chart24(this.state.ret.Data.SCDYLIST[3], "职能部门", "1", "2", "3", "4"); } else if (formCode == "层级") { this.setState({ isShow1: true }) titleTemp += "层级"; - this.chart21(this.state.ret.Data.CHARTLIST[0], "公司", "1", "2", "3", "4"); - this.chart22(this.state.ret.Data.CHARTLIST[0], "部门", "1", "2", "3", "4"); - this.chart23(this.state.ret.Data.CHARTLIST[0], "车间", "1", "2", "3", "4"); - this.chart24(this.state.ret.Data.CHARTLIST[0], "班组", "1", "2", "3", "4"); + this.chart21(this.state.ret.Data.CJLIST[0], "公司", "1", "2", "3", "4"); + this.chart22(this.state.ret.Data.CJLIST[1], "部门", "1", "2", "3", "4"); + this.chart23(this.state.ret.Data.CJLIST[2], "车间", "1", "2", "3", "4"); + this.chart24(this.state.ret.Data.CJLIST[3], "班组", "1", "2", "3", "4"); } else if (formCode == "责任单位") { this.setState({ isShow1: true }) titleTemp += "责任单位"; diff --git a/src/components/CustomPages/HM/HM061ShowPrint.js b/src/components/CustomPages/HM/HM061ShowPrint.js index 1da36c0..62e5c2f 100644 --- a/src/components/CustomPages/HM/HM061ShowPrint.js +++ b/src/components/CustomPages/HM/HM061ShowPrint.js @@ -51,6 +51,11 @@ class HM061ShowPrint extends React.Component { this.props.data.loadDataDeal(1); } this.onClickApprove(false); + for (let i = 0; i < ret.Nav_Detail.length; i++) { + ret.Nav_Detail.sort((a, b) => { + return a.LEVEL > b.LEVEL ? 1 : -1; + }); + } for (let i = 0; i < ret.Nav_Detail.length; i++) { ret.Nav_Detail[i].Nav_Users.sort((a, b) => { return a.ROW_NO > b.ROW_NO ? 1 : -1;