处理报表显示问题
This commit is contained in:
		
							parent
							
								
									27607f7634
								
							
						
					
					
						commit
						a552405a0a
					
				@ -39,19 +39,19 @@ class BI008RiskAnalysis extends React.Component {
 | 
				
			|||||||
        dataIndex: "NAME",
 | 
					        dataIndex: "NAME",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        title: "一级风险",
 | 
					        title: "重大风险",
 | 
				
			||||||
        dataIndex: "LEVEL1",
 | 
					        dataIndex: "LEVEL1",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        title: "二级风险",
 | 
					        title: "较大风险",
 | 
				
			||||||
        dataIndex: "LEVEL2",
 | 
					        dataIndex: "LEVEL2",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        title: "三级风险",
 | 
					        title: "一般风险",
 | 
				
			||||||
        dataIndex: "LEVEL3",
 | 
					        dataIndex: "LEVEL3",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        title: "四级风险",
 | 
					        title: "低风险",
 | 
				
			||||||
        dataIndex: "LEVEL4",
 | 
					        dataIndex: "LEVEL4",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
@ -70,8 +70,6 @@ class BI008RiskAnalysis extends React.Component {
 | 
				
			|||||||
      onlyData: false,
 | 
					      onlyData: false,
 | 
				
			||||||
      onComplete: (ret) => {
 | 
					      onComplete: (ret) => {
 | 
				
			||||||
        if (ret) {
 | 
					        if (ret) {
 | 
				
			||||||
          console.log(ret);
 | 
					 | 
				
			||||||
          // this.state.retData = ret?.Data.RISKLEVELCOUNTS;
 | 
					 | 
				
			||||||
          this.setState({
 | 
					          this.setState({
 | 
				
			||||||
            retData:ret.Data.RISKLEVELCOUNTS
 | 
					            retData:ret.Data.RISKLEVELCOUNTS
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
@ -97,19 +95,19 @@ class BI008RiskAnalysis extends React.Component {
 | 
				
			|||||||
        this.chart2(
 | 
					        this.chart2(
 | 
				
			||||||
          ret?.Data.AREACOUNTS.filter((t) => t.AREATYPE == 0).slice(0, 10)
 | 
					          ret?.Data.AREACOUNTS.filter((t) => t.AREATYPE == 0).slice(0, 10)
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        this.chart3(
 | 
					        // this.chart3(
 | 
				
			||||||
          ret?.Data.AREACOUNTS.filter((t) => t.AREATYPE == 1).slice(0, 10)
 | 
					        //   ret?.Data.AREACOUNTS.filter((t) => t.AREATYPE == 1).slice(0, 10)
 | 
				
			||||||
        );
 | 
					        // );
 | 
				
			||||||
        this.chart4(ret?.Data.DATECOUNTS);
 | 
					        this.chart4(ret?.Data.DATECOUNTS);
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  chart1 = () => {
 | 
					  chart1 = () => {
 | 
				
			||||||
    let showData = [
 | 
					    let showData = [
 | 
				
			||||||
      { value: this.state.LEVEL1TOTAL, name: "一级风险" },
 | 
					      { value: this.state.LEVEL1TOTAL, name: "重大风险" },
 | 
				
			||||||
      { value: this.state.LEVEL2TOTAL, name: "二级风险" },
 | 
					      { value: this.state.LEVEL2TOTAL, name: "较大风险" },
 | 
				
			||||||
      { value: this.state.LEVEL3TOTAL, name: "三级风险" },
 | 
					      { value: this.state.LEVEL3TOTAL, name: "一般风险" },
 | 
				
			||||||
      { value: this.state.LEVEL4TOTAL, name: "四级风险" },
 | 
					      { value: this.state.LEVEL4TOTAL, name: "低风险" },
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
    let chart1s = document.getElementById("chart1");
 | 
					    let chart1s = document.getElementById("chart1");
 | 
				
			||||||
    let myChart = echarts.init(chart1s);
 | 
					    let myChart = echarts.init(chart1s);
 | 
				
			||||||
@ -219,7 +217,7 @@ class BI008RiskAnalysis extends React.Component {
 | 
				
			|||||||
      let myChart = echarts.init(chart2s);
 | 
					      let myChart = echarts.init(chart2s);
 | 
				
			||||||
      myChart.setOption({
 | 
					      myChart.setOption({
 | 
				
			||||||
        title: {
 | 
					        title: {
 | 
				
			||||||
          text: "矿山-风险区域统计TOP10",
 | 
					          text: "风险区域统计TOP10",
 | 
				
			||||||
          left: "center",
 | 
					          left: "center",
 | 
				
			||||||
          top: "2%",
 | 
					          top: "2%",
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
@ -342,7 +340,7 @@ class BI008RiskAnalysis extends React.Component {
 | 
				
			|||||||
      let myChart = echarts.init(chart3s);
 | 
					      let myChart = echarts.init(chart3s);
 | 
				
			||||||
      myChart.setOption({
 | 
					      myChart.setOption({
 | 
				
			||||||
        title: {
 | 
					        title: {
 | 
				
			||||||
          text: "选矿-风险区域统计TOP10",
 | 
					          text: "风险区域统计TOP10",
 | 
				
			||||||
          left: "center",
 | 
					          left: "center",
 | 
				
			||||||
          top: "2%",
 | 
					          top: "2%",
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
				
			|||||||
@ -110,18 +110,18 @@ class BI013RiskAnalysisModel extends React.Component {
 | 
				
			|||||||
    let showData = [];
 | 
					    let showData = [];
 | 
				
			||||||
    let color = [];
 | 
					    let color = [];
 | 
				
			||||||
    let allNum = 0;
 | 
					    let allNum = 0;
 | 
				
			||||||
    showData.push({ value: this.state.LEVEL1TOTAL, name: "一级" });
 | 
					    showData.push({ value: this.state.LEVEL1TOTAL, name: "重大风险" });
 | 
				
			||||||
    showData.push({ value: this.state.LEVEL2TOTAL, name: "二级" });
 | 
					    showData.push({ value: this.state.LEVEL2TOTAL, name: "较大风险" });
 | 
				
			||||||
    showData.push({ value: this.state.LEVEL3TOTAL, name: "三级" });
 | 
					    showData.push({ value: this.state.LEVEL3TOTAL, name: "一般风险" });
 | 
				
			||||||
    showData.push({ value: this.state.LEVEL4TOTAL, name: "四级" });
 | 
					    showData.push({ value: this.state.LEVEL4TOTAL, name: "低风险" });
 | 
				
			||||||
    showData.map((item) => {
 | 
					    showData.map((item) => {
 | 
				
			||||||
      if (item.name === "一级") {
 | 
					      if (item.name === "重大风险") {
 | 
				
			||||||
        color.push("#c92a2a");
 | 
					        color.push("#c92a2a");
 | 
				
			||||||
      } else if (item.name === "二级") {
 | 
					      } else if (item.name === "较大风险") {
 | 
				
			||||||
        color.push("#ffa94d");
 | 
					        color.push("#ffa94d");
 | 
				
			||||||
      } else if (item.name === "三级") {
 | 
					      } else if (item.name === "一般风险") {
 | 
				
			||||||
        color.push("#ffe066");
 | 
					        color.push("#ffe066");
 | 
				
			||||||
      } else if (item.name === "四级") {
 | 
					      } else if (item.name === "低风险") {
 | 
				
			||||||
        color.push("#4285F4");
 | 
					        color.push("#4285F4");
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      allNum = allNum + item.value;
 | 
					      allNum = allNum + item.value;
 | 
				
			||||||
 | 
				
			|||||||
@ -14,7 +14,6 @@ import {
 | 
				
			|||||||
import echarts from "echarts";
 | 
					import echarts from "echarts";
 | 
				
			||||||
import moment from "moment";
 | 
					import moment from "moment";
 | 
				
			||||||
import IconFont from "../../../utils/iconFont";
 | 
					import IconFont from "../../../utils/iconFont";
 | 
				
			||||||
import { T } from "antd/lib/upload/utils";
 | 
					 | 
				
			||||||
class BI014RiskPerformanceModel extends React.Component {
 | 
					class BI014RiskPerformanceModel extends React.Component {
 | 
				
			||||||
  constructor(props) {
 | 
					  constructor(props) {
 | 
				
			||||||
    super(props);
 | 
					    super(props);
 | 
				
			||||||
@ -62,8 +61,7 @@ class BI014RiskPerformanceModel extends React.Component {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            NAME: ["一级", "二级", "三级", "四级"],
 | 
					            NAME: ["一级", "二级", "三级", "四级"],
 | 
				
			||||||
            LEVEL1: [3, 8, 181, 1112],
 | 
					            LEVEL1: [3, 8, 181, 1112],
 | 
				
			||||||
          }
 | 
					          },
 | 
				
			||||||
          ,
 | 
					 | 
				
			||||||
          CHARTFXDJ2: [
 | 
					          CHARTFXDJ2: [
 | 
				
			||||||
            { name: "一级", value: 3 },
 | 
					            { name: "一级", value: 3 },
 | 
				
			||||||
            { name: "二级", value: 8 },
 | 
					            { name: "二级", value: 8 },
 | 
				
			||||||
@ -267,7 +265,7 @@ class BI014RiskPerformanceModel extends React.Component {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  componentDidMount() {
 | 
					  componentDidMount() {
 | 
				
			||||||
    this.getBaseInfoData();
 | 
					    this.getBaseInfoDataOnline();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  //获取数据
 | 
					  //获取数据
 | 
				
			||||||
@ -281,15 +279,17 @@ class BI014RiskPerformanceModel extends React.Component {
 | 
				
			|||||||
      payload: json2,
 | 
					      payload: json2,
 | 
				
			||||||
      onlyData: false,
 | 
					      onlyData: false,
 | 
				
			||||||
      onComplete: (ret) => {
 | 
					      onComplete: (ret) => {
 | 
				
			||||||
 | 
					        this.state.ret = ret;
 | 
				
			||||||
        this.chart4(ret?.Data.DATECOUNTS);
 | 
					        this.chart4(ret?.Data.DATECOUNTS);
 | 
				
			||||||
        this.chartFXDJ1(ret?.Data.CHARTFXDJ1);
 | 
					        this.chartFXDJ1(ret?.Data.CHARTFXDJ1);
 | 
				
			||||||
        this.chartFXDJ2(ret?.Data.CHARTFXDJ2);
 | 
					        this.chartFXDJ2(ret?.Data.CHARTFXDJ2);
 | 
				
			||||||
        this.chartSCDY(ret?.Data.CHARTLIST[0]);
 | 
					        this.chartSCDY(ret?.Data.CHARTLIST[0]);
 | 
				
			||||||
        this.chartFXLB1(ret?.Data.CHARTLIST[1]);
 | 
					        this.chartFXLB1(ret?.Data.CHARTLIST[1]);
 | 
				
			||||||
        this.chartZRDW(ret?.Data.CHARTLIST[2]);
 | 
					 | 
				
			||||||
        this.chartCJ(ret?.Data.CHARTLIST[3]);
 | 
					        this.chartCJ(ret?.Data.CHARTLIST[3]);
 | 
				
			||||||
        this.chartZYRW1(this.state.ret.Data.CHARTZYRW1);
 | 
					        this.chartZRDW(ret?.Data.CHARTLIST[2]);
 | 
				
			||||||
        this.chartZYRW2(this.state.ret.Data.CHARTZYRW2);
 | 
					        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) => {
 | 
					  showDetailModal = (formCode) => {
 | 
				
			||||||
    var titleTemp =
 | 
					    var titleTemp ="";
 | 
				
			||||||
      this.state.mineType == 20
 | 
					 | 
				
			||||||
        ? "尾矿库"
 | 
					 | 
				
			||||||
        : this.state.mineType == 10
 | 
					 | 
				
			||||||
          ? "选矿厂"
 | 
					 | 
				
			||||||
          : "露天矿";
 | 
					 | 
				
			||||||
    if (formCode == "风险类别1") {
 | 
					    if (formCode == "风险类别1") {
 | 
				
			||||||
      titleTemp += "风险类别";
 | 
					      titleTemp += "风险类别";
 | 
				
			||||||
      this.chart25(this.state.ret.Data.CHARTLIST[1]);
 | 
					      this.chart25(this.state.ret.Data.CHARTLIST[1]);
 | 
				
			||||||
@ -2026,17 +2021,17 @@ class BI014RiskPerformanceModel extends React.Component {
 | 
				
			|||||||
    else if (formCode == "生产单元") {
 | 
					    else if (formCode == "生产单元") {
 | 
				
			||||||
      this.setState({ isShow1: true })
 | 
					      this.setState({ isShow1: true })
 | 
				
			||||||
      titleTemp += "生产单元";
 | 
					      titleTemp += "生产单元";
 | 
				
			||||||
      this.chart21(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.CHARTLIST[3], "选矿厂", "1", "2", "3", "4");
 | 
					      this.chart22(this.state.ret.Data.SCDYLIST[1], "选矿厂", "1", "2", "3", "4");
 | 
				
			||||||
      this.chart23(this.state.ret.Data.CHARTLIST[3], "尾矿库", "1", "2", "3", "4");
 | 
					      this.chart23(this.state.ret.Data.SCDYLIST[2], "尾矿库", "1", "2", "3", "4");
 | 
				
			||||||
      this.chart24(this.state.ret.Data.CHARTLIST[3], "职能部门", "1", "2", "3", "4");
 | 
					      this.chart24(this.state.ret.Data.SCDYLIST[3], "职能部门", "1", "2", "3", "4");
 | 
				
			||||||
    } else if (formCode == "层级") {
 | 
					    } else if (formCode == "层级") {
 | 
				
			||||||
      this.setState({ isShow1: true })
 | 
					      this.setState({ isShow1: true })
 | 
				
			||||||
      titleTemp += "层级";
 | 
					      titleTemp += "层级";
 | 
				
			||||||
      this.chart21(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.CHARTLIST[0], "部门", "1", "2", "3", "4");
 | 
					      this.chart22(this.state.ret.Data.CJLIST[1], "部门", "1", "2", "3", "4");
 | 
				
			||||||
      this.chart23(this.state.ret.Data.CHARTLIST[0], "车间", "1", "2", "3", "4");
 | 
					      this.chart23(this.state.ret.Data.CJLIST[2], "车间", "1", "2", "3", "4");
 | 
				
			||||||
      this.chart24(this.state.ret.Data.CHARTLIST[0], "班组", "1", "2", "3", "4");
 | 
					      this.chart24(this.state.ret.Data.CJLIST[3], "班组", "1", "2", "3", "4");
 | 
				
			||||||
    } else if (formCode == "责任单位") {
 | 
					    } else if (formCode == "责任单位") {
 | 
				
			||||||
      this.setState({ isShow1: true })
 | 
					      this.setState({ isShow1: true })
 | 
				
			||||||
      titleTemp += "责任单位";
 | 
					      titleTemp += "责任单位";
 | 
				
			||||||
 | 
				
			|||||||
@ -51,6 +51,11 @@ class HM061ShowPrint extends React.Component {
 | 
				
			|||||||
                        this.props.data.loadDataDeal(1);
 | 
					                        this.props.data.loadDataDeal(1);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    this.onClickApprove(false);
 | 
					                    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++) {
 | 
					                    for (let i = 0; i < ret.Nav_Detail.length; i++) {
 | 
				
			||||||
                        ret.Nav_Detail[i].Nav_Users.sort((a, b) => {
 | 
					                        ret.Nav_Detail[i].Nav_Users.sort((a, b) => {
 | 
				
			||||||
                            return a.ROW_NO > b.ROW_NO ? 1 : -1;
 | 
					                            return a.ROW_NO > b.ROW_NO ? 1 : -1;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user