扩展假数据
This commit is contained in:
		
							parent
							
								
									c42d48ebfb
								
							
						
					
					
						commit
						44142f71f2
					
				@ -9,6 +9,7 @@ import {
 | 
			
		||||
  extendOrder,
 | 
			
		||||
  extend,
 | 
			
		||||
  initQueryFilter,
 | 
			
		||||
  getSixMonth
 | 
			
		||||
} from "../../../utils/common";
 | 
			
		||||
import {
 | 
			
		||||
  Table,
 | 
			
		||||
@ -28,7 +29,161 @@ class BI001HomeDetail extends React.Component {
 | 
			
		||||
    super(props);
 | 
			
		||||
    this.state = {
 | 
			
		||||
      pagination: {},
 | 
			
		||||
      retData: [],
 | 
			
		||||
      retData: [
 | 
			
		||||
        {
 | 
			
		||||
          shopDoneCount: 1541,
 | 
			
		||||
          shopDoneRate: 99.94,
 | 
			
		||||
          shopId: "b53266f6-2ba9-9b30-e96f-f9893a48376d",
 | 
			
		||||
          shopName: "安环科",
 | 
			
		||||
          shopOntimeCount: 1437,
 | 
			
		||||
          shopOverDoneRate: 93.19,
 | 
			
		||||
          shopTotalCount: 1542,
 | 
			
		||||
          teamDoneCount: 1541,
 | 
			
		||||
          teamDoneRate: 99.94,
 | 
			
		||||
          teamId: "45aba808-c12c-b785-fa09-f9acd9922785",
 | 
			
		||||
          teamName: "民爆储存库班组",
 | 
			
		||||
          teamOntimeCount: 1437,
 | 
			
		||||
          teamOverDoneRate: 93.19,
 | 
			
		||||
          teamTotalCount: 1542,
 | 
			
		||||
          teamUndoneCount: 1,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          shopDoneCount: 2792,
 | 
			
		||||
          shopDoneRate: 99.29,
 | 
			
		||||
          shopId: "72e83a49-5319-0784-d1ed-025d309b87eb",
 | 
			
		||||
          shopName: "穿爆车间",
 | 
			
		||||
          shopOntimeCount: 2080,
 | 
			
		||||
          shopOverDoneRate: 73.97,
 | 
			
		||||
          shopTotalCount: 2812,
 | 
			
		||||
          teamDoneCount: 1466,
 | 
			
		||||
          teamDoneRate: 99.93,
 | 
			
		||||
          teamId: "c671778d-dd76-080f-51d1-5dc5ca698419",
 | 
			
		||||
          teamName: "爆破班组",
 | 
			
		||||
          teamOntimeCount: 1286,
 | 
			
		||||
          teamOverDoneRate: 87.66,
 | 
			
		||||
          teamTotalCount: 1467,
 | 
			
		||||
          teamUndoneCount: 1,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          shopDoneCount: 2792,
 | 
			
		||||
          shopDoneRate: 99.29,
 | 
			
		||||
          shopId: "72e83a49-5319-0784-d1ed-025d309b87eb",
 | 
			
		||||
          shopName: "穿爆车间",
 | 
			
		||||
          shopOntimeCount: 2080,
 | 
			
		||||
          shopOverDoneRate: 73.97,
 | 
			
		||||
          shopTotalCount: 2812,
 | 
			
		||||
          teamDoneCount: 1326,
 | 
			
		||||
          teamDoneRate: 98.59,
 | 
			
		||||
          teamId: "821a4fe3-5513-681e-ed3c-e61836b29638",
 | 
			
		||||
          teamName: "穿孔班组",
 | 
			
		||||
          teamOntimeCount: 794,
 | 
			
		||||
          teamOverDoneRate: 59.03,
 | 
			
		||||
          teamTotalCount: 1345,
 | 
			
		||||
          teamUndoneCount: 19,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          shopDoneCount: 15056,
 | 
			
		||||
          shopDoneRate: 99.87,
 | 
			
		||||
          shopId: "30ce4b63-9971-c8d3-a2b4-ca4f51cf0fab",
 | 
			
		||||
          shopName: "金宇宁化分公司",
 | 
			
		||||
          shopOntimeCount: 9755,
 | 
			
		||||
          shopOverDoneRate: 64.71,
 | 
			
		||||
          shopTotalCount: 15075,
 | 
			
		||||
          teamDoneCount: 1768,
 | 
			
		||||
          teamDoneRate: 100,
 | 
			
		||||
          teamId: "bcdca284-6373-6862-083e-645030a2315d",
 | 
			
		||||
          teamName: "维修班组",
 | 
			
		||||
          teamOntimeCount: 1254,
 | 
			
		||||
          teamOverDoneRate: 70.93,
 | 
			
		||||
          teamTotalCount: 1768,
 | 
			
		||||
          teamUndoneCount: 0,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          shopDoneCount: 15056,
 | 
			
		||||
          shopDoneRate: 99.87,
 | 
			
		||||
          shopId: "30ce4b63-9971-c8d3-a2b4-ca4f51cf0fab",
 | 
			
		||||
          shopName: "金宇宁化分公司",
 | 
			
		||||
          shopOntimeCount: 9755,
 | 
			
		||||
          shopOverDoneRate: 64.71,
 | 
			
		||||
          shopTotalCount: 15075,
 | 
			
		||||
          teamDoneCount: 4927,
 | 
			
		||||
          teamDoneRate: 99.78,
 | 
			
		||||
          teamId: "0270fa34-4849-4429-35e8-5fb8b98c9fc9",
 | 
			
		||||
          teamName: "金宇现场",
 | 
			
		||||
          teamOntimeCount: 3482,
 | 
			
		||||
          teamOverDoneRate: 70.51,
 | 
			
		||||
          teamTotalCount: 4938,
 | 
			
		||||
          teamUndoneCount: 11,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          shopDoneCount: 15056,
 | 
			
		||||
          shopDoneRate: 99.87,
 | 
			
		||||
          shopId: "30ce4b63-9971-c8d3-a2b4-ca4f51cf0fab",
 | 
			
		||||
          shopName: "金宇宁化分公司",
 | 
			
		||||
          shopOntimeCount: 9755,
 | 
			
		||||
          shopOverDoneRate: 64.71,
 | 
			
		||||
          shopTotalCount: 15075,
 | 
			
		||||
          teamDoneCount: 2903,
 | 
			
		||||
          teamDoneRate: 99.93,
 | 
			
		||||
          teamId: "8ba1fb97-540b-d451-881a-39f632700975",
 | 
			
		||||
          teamName: "运输二班",
 | 
			
		||||
          teamOntimeCount: 1854,
 | 
			
		||||
          teamOverDoneRate: 63.82,
 | 
			
		||||
          teamTotalCount: 2905,
 | 
			
		||||
          teamUndoneCount: 2,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          shopDoneCount: 15056,
 | 
			
		||||
          shopDoneRate: 99.87,
 | 
			
		||||
          shopId: "30ce4b63-9971-c8d3-a2b4-ca4f51cf0fab",
 | 
			
		||||
          shopName: "金宇宁化分公司",
 | 
			
		||||
          shopOntimeCount: 9755,
 | 
			
		||||
          shopOverDoneRate: 64.71,
 | 
			
		||||
          shopTotalCount: 15075,
 | 
			
		||||
          teamDoneCount: 5458,
 | 
			
		||||
          teamDoneRate: 99.89,
 | 
			
		||||
          teamId: "db1ccb4a-0ffa-63c9-9384-c3d9139e8c8f",
 | 
			
		||||
          teamName: "运输一班",
 | 
			
		||||
          teamOntimeCount: 3165,
 | 
			
		||||
          teamOverDoneRate: 57.92,
 | 
			
		||||
          teamTotalCount: 5464,
 | 
			
		||||
          teamUndoneCount: 6,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          shopDoneCount: 2066,
 | 
			
		||||
          shopDoneRate: 100,
 | 
			
		||||
          shopId: "4adbdf10-3cce-ac8a-4abf-104bc12f882a",
 | 
			
		||||
          shopName: "生产技术科",
 | 
			
		||||
          shopOntimeCount: 1969,
 | 
			
		||||
          shopOverDoneRate: 95.3,
 | 
			
		||||
          shopTotalCount: 2066,
 | 
			
		||||
          teamDoneCount: 2066,
 | 
			
		||||
          teamDoneRate: 100,
 | 
			
		||||
          teamId: "91f40319-fd33-6b72-dfb5-b51b21abac54",
 | 
			
		||||
          teamName: "生产班",
 | 
			
		||||
          teamOntimeCount: 1969,
 | 
			
		||||
          teamOverDoneRate: 95.3,
 | 
			
		||||
          teamTotalCount: 2066,
 | 
			
		||||
          teamUndoneCount: 0,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          shopDoneCount: 2253,
 | 
			
		||||
          shopDoneRate: 99.96,
 | 
			
		||||
          shopId: "a144c298-17ef-e105-5cb7-34991ca7b3c2",
 | 
			
		||||
          shopName: "综合组",
 | 
			
		||||
          shopOntimeCount: 1488,
 | 
			
		||||
          shopOverDoneRate: 66.02,
 | 
			
		||||
          shopTotalCount: 2254,
 | 
			
		||||
          teamDoneCount: 2253,
 | 
			
		||||
          teamDoneRate: 99.96,
 | 
			
		||||
          teamId: "9e171704-f1af-9de4-0287-476216371c16",
 | 
			
		||||
          teamName: "综合班组",
 | 
			
		||||
          teamOntimeCount: 1488,
 | 
			
		||||
          teamOverDoneRate: 66.02,
 | 
			
		||||
          teamTotalCount: 2254,
 | 
			
		||||
          teamUndoneCount: 1,
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
      columns1: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     title: '序号',
 | 
			
		||||
@ -147,7 +302,7 @@ class BI001HomeDetail extends React.Component {
 | 
			
		||||
        {
 | 
			
		||||
          title: "班组",
 | 
			
		||||
          dataIndex: "teamName",
 | 
			
		||||
         onCell:()=>this.renderSpeedColumn()
 | 
			
		||||
          onCell: () => this.renderSpeedColumn(),
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "总任务数",
 | 
			
		||||
@ -203,45 +358,37 @@ class BI001HomeDetail extends React.Component {
 | 
			
		||||
    this.loadData();
 | 
			
		||||
  }
 | 
			
		||||
  renderSpeedColumn = () => {
 | 
			
		||||
    return { className: 'redTableCell'} 
 | 
			
		||||
  }
 | 
			
		||||
    return { className: "redTableCell" };
 | 
			
		||||
  };
 | 
			
		||||
  loadData = () => {
 | 
			
		||||
    this.state.showLoading = true;
 | 
			
		||||
    let param = this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS;
 | 
			
		||||
    this.chart1();
 | 
			
		||||
    this.chartReal();
 | 
			
		||||
  };
 | 
			
		||||
  //矿山
 | 
			
		||||
  chart1 = () => {
 | 
			
		||||
    let json = initFilter(this.props.login.OrgId);
 | 
			
		||||
    // extendRule(json, 'DEPARTMENT_NAME', 1, "矿山部");
 | 
			
		||||
    // extendOrder(json, "MONTH", 0);
 | 
			
		||||
    this.props.dispatch({
 | 
			
		||||
      type: "app/getDataByPost",
 | 
			
		||||
      url: "BI/BIStatiscialAnalysisController/GetClassCompletionSort",
 | 
			
		||||
      payload: json,
 | 
			
		||||
      onlyData: false,
 | 
			
		||||
      onComplete: (data) => {
 | 
			
		||||
        if (data && data.IsSuccessful && data.Data && data.Data.rateData) {
 | 
			
		||||
  chartReal = () => {
 | 
			
		||||
    let month = [];
 | 
			
		||||
          let company = [];
 | 
			
		||||
          let department = [];
 | 
			
		||||
          data.Data.rateData.forEach((item) => {
 | 
			
		||||
            month.push(item.MONTHStr);
 | 
			
		||||
            company.push(item.FINISH_RATE);
 | 
			
		||||
            department.push(item.NORMAL_FINISH_RATE);
 | 
			
		||||
          });
 | 
			
		||||
    let company = [
 | 
			
		||||
      100, 100, 100, 99.69, 99.86, 100, 99.94, 100, 100, 99.57, 99.56, 99.17,
 | 
			
		||||
    ];
 | 
			
		||||
    let department = [
 | 
			
		||||
      68.79, 58.8, 56.28, 69.59, 69.03, 71.58, 71.08, 75.05, 76.26, 77.09,
 | 
			
		||||
      77.84, 80.51,
 | 
			
		||||
    ];
 | 
			
		||||
    for (let i = 0; i < 12; i++) {
 | 
			
		||||
      month.unshift(getSixMonth(-i, "-", ""));
 | 
			
		||||
    }
 | 
			
		||||
    let myChart = echarts.init(document.getElementById("chartClass"));
 | 
			
		||||
    myChart.setOption({
 | 
			
		||||
      tooltip: {
 | 
			
		||||
        trigger: "axis",
 | 
			
		||||
        formatter: function (params) {
 | 
			
		||||
                let temp=''
 | 
			
		||||
                params.forEach(t=>{
 | 
			
		||||
                    temp=temp+t.marker + t.seriesName +":"+t.value+"%"+'<br />';
 | 
			
		||||
                   
 | 
			
		||||
                })
 | 
			
		||||
          let temp = "";
 | 
			
		||||
          params.forEach((t) => {
 | 
			
		||||
            temp =
 | 
			
		||||
              temp + t.marker + t.seriesName + ":" + t.value + "%" + "<br />";
 | 
			
		||||
          });
 | 
			
		||||
          return temp;
 | 
			
		||||
              }
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      title: {
 | 
			
		||||
        text: "班组活动任务完成走势图",
 | 
			
		||||
@ -300,21 +447,146 @@ class BI001HomeDetail extends React.Component {
 | 
			
		||||
          areaStyle: {},
 | 
			
		||||
          areaStyle: {
 | 
			
		||||
            color: {
 | 
			
		||||
                      type: 'linear',
 | 
			
		||||
              type: "linear",
 | 
			
		||||
              x: 0,
 | 
			
		||||
              y: 0,
 | 
			
		||||
              x2: 0,
 | 
			
		||||
              y2: 1,
 | 
			
		||||
                      colorStops: [{
 | 
			
		||||
                          offset: 0, color: "#FCD149" // 0% 处的颜色
 | 
			
		||||
                      }, {
 | 
			
		||||
                          offset: 1, color: '#fff' // 100% 处的颜色
 | 
			
		||||
                      }],
 | 
			
		||||
                      global: false
 | 
			
		||||
                  }
 | 
			
		||||
              colorStops: [
 | 
			
		||||
                {
 | 
			
		||||
                  offset: 0,
 | 
			
		||||
                  color: "#FCD149", // 0% 处的颜色
 | 
			
		||||
                },
 | 
			
		||||
                {
 | 
			
		||||
                  offset: 1,
 | 
			
		||||
                  color: "#fff", // 100% 处的颜色
 | 
			
		||||
                },
 | 
			
		||||
              ],
 | 
			
		||||
              global: false,
 | 
			
		||||
            },
 | 
			
		||||
          },
 | 
			
		||||
          smooth: true,
 | 
			
		||||
                symbol:'circle', 
 | 
			
		||||
          symbol: "circle",
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    });
 | 
			
		||||
  };
 | 
			
		||||
  //矿山
 | 
			
		||||
  chart1 = () => {
 | 
			
		||||
    let json = initFilter(this.props.login.OrgId);
 | 
			
		||||
    // extendRule(json, 'DEPARTMENT_NAME', 1, "矿山部");
 | 
			
		||||
    // extendOrder(json, "MONTH", 0);
 | 
			
		||||
    this.props.dispatch({
 | 
			
		||||
      type: "app/getDataByPost",
 | 
			
		||||
      url: "BI/BIStatiscialAnalysisController/GetClassCompletionSort",
 | 
			
		||||
      payload: json,
 | 
			
		||||
      onlyData: false,
 | 
			
		||||
      onComplete: (data) => {
 | 
			
		||||
        if (data && data.IsSuccessful && data.Data && data.Data.rateData) {
 | 
			
		||||
          let month = [];
 | 
			
		||||
          let company = [];
 | 
			
		||||
          let department = [];
 | 
			
		||||
          data.Data.rateData.forEach((item) => {
 | 
			
		||||
            month.push(item.MONTHStr);
 | 
			
		||||
            company.push(item.FINISH_RATE);
 | 
			
		||||
            department.push(item.NORMAL_FINISH_RATE);
 | 
			
		||||
          });
 | 
			
		||||
          let myChart = echarts.init(document.getElementById("chartClass"));
 | 
			
		||||
          myChart.setOption({
 | 
			
		||||
            tooltip: {
 | 
			
		||||
              trigger: "axis",
 | 
			
		||||
              formatter: function (params) {
 | 
			
		||||
                let temp = "";
 | 
			
		||||
                params.forEach((t) => {
 | 
			
		||||
                  temp =
 | 
			
		||||
                    temp +
 | 
			
		||||
                    t.marker +
 | 
			
		||||
                    t.seriesName +
 | 
			
		||||
                    ":" +
 | 
			
		||||
                    t.value +
 | 
			
		||||
                    "%" +
 | 
			
		||||
                    "<br />";
 | 
			
		||||
                });
 | 
			
		||||
                return temp;
 | 
			
		||||
              },
 | 
			
		||||
            },
 | 
			
		||||
            title: {
 | 
			
		||||
              text: "班组活动任务完成走势图",
 | 
			
		||||
              left: "center",
 | 
			
		||||
              top: "5%",
 | 
			
		||||
            },
 | 
			
		||||
            // label: {
 | 
			
		||||
            //   show: true,
 | 
			
		||||
            //   position: 'top'
 | 
			
		||||
            // },
 | 
			
		||||
            legend: {
 | 
			
		||||
              // data: ['部门'],
 | 
			
		||||
              data: ["完成率", "及时完成率"],
 | 
			
		||||
              bottom: "10px",
 | 
			
		||||
            },
 | 
			
		||||
            grid: {
 | 
			
		||||
              left: "3%",
 | 
			
		||||
              right: "4%",
 | 
			
		||||
              top: "15%",
 | 
			
		||||
              containLabel: true,
 | 
			
		||||
            },
 | 
			
		||||
            toolbox: {
 | 
			
		||||
              feature: {
 | 
			
		||||
                // saveAsImage: {}
 | 
			
		||||
              },
 | 
			
		||||
            },
 | 
			
		||||
            xAxis: {
 | 
			
		||||
              type: "category",
 | 
			
		||||
              data: month,
 | 
			
		||||
              axisLabel: {
 | 
			
		||||
                showMaxLabel: true,
 | 
			
		||||
              },
 | 
			
		||||
            },
 | 
			
		||||
            yAxis: {
 | 
			
		||||
              type: "value",
 | 
			
		||||
              axisLabel: {
 | 
			
		||||
                formatter: function (val) {
 | 
			
		||||
                  return val + "%";
 | 
			
		||||
                },
 | 
			
		||||
              },
 | 
			
		||||
            },
 | 
			
		||||
            series: [
 | 
			
		||||
              {
 | 
			
		||||
                name: "完成率",
 | 
			
		||||
                type: "line",
 | 
			
		||||
                color: "#4b9bf3",
 | 
			
		||||
                data: company,
 | 
			
		||||
                smooth: true,
 | 
			
		||||
                // symbol:'none',
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                name: "及时完成率",
 | 
			
		||||
                type: "line",
 | 
			
		||||
                color: "#FCD149",
 | 
			
		||||
                data: department,
 | 
			
		||||
                areaStyle: {},
 | 
			
		||||
                areaStyle: {
 | 
			
		||||
                  color: {
 | 
			
		||||
                    type: "linear",
 | 
			
		||||
                    x: 0,
 | 
			
		||||
                    y: 0,
 | 
			
		||||
                    x2: 0,
 | 
			
		||||
                    y2: 1,
 | 
			
		||||
                    colorStops: [
 | 
			
		||||
                      {
 | 
			
		||||
                        offset: 0,
 | 
			
		||||
                        color: "#FCD149", // 0% 处的颜色
 | 
			
		||||
                      },
 | 
			
		||||
                      {
 | 
			
		||||
                        offset: 1,
 | 
			
		||||
                        color: "#fff", // 100% 处的颜色
 | 
			
		||||
                      },
 | 
			
		||||
                    ],
 | 
			
		||||
                    global: false,
 | 
			
		||||
                  },
 | 
			
		||||
                },
 | 
			
		||||
                smooth: true,
 | 
			
		||||
                symbol: "circle",
 | 
			
		||||
              },
 | 
			
		||||
            ],
 | 
			
		||||
          });
 | 
			
		||||
@ -360,10 +632,13 @@ class BI001HomeDetail extends React.Component {
 | 
			
		||||
            <div
 | 
			
		||||
              // className="dashboard-div-style"
 | 
			
		||||
              style={{
 | 
			
		||||
                border: "1px solid rgb(232,232,232)" 
 | 
			
		||||
                border: "1px solid rgb(232,232,232)",
 | 
			
		||||
              }}
 | 
			
		||||
            >
 | 
			
		||||
              <div id="chartClass" style={{ width: "100%", height: "350px" }}></div>
 | 
			
		||||
              <div
 | 
			
		||||
                id="chartClass"
 | 
			
		||||
                style={{ width: "100%", height: "350px" }}
 | 
			
		||||
              ></div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </Col>
 | 
			
		||||
          <Col span={1}></Col>
 | 
			
		||||
@ -374,9 +649,11 @@ class BI001HomeDetail extends React.Component {
 | 
			
		||||
          <Col span={22} style={{ height: "100%" }}>
 | 
			
		||||
            <div
 | 
			
		||||
              className="bi001-table"
 | 
			
		||||
              style={{
 | 
			
		||||
              style={
 | 
			
		||||
                {
 | 
			
		||||
                  //  border: "1px solid rgb(232,232,232)"
 | 
			
		||||
                 }}
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            >
 | 
			
		||||
              <Table
 | 
			
		||||
                dataSource={this.state.retData}
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,20 @@
 | 
			
		||||
import React from 'react'
 | 
			
		||||
import { connect } from 'dva'
 | 
			
		||||
import { initFilter, extendRule, extendInclude, getIsPC, openNotificationMobile } from "../../../utils/common"
 | 
			
		||||
import { ChartBarShow_Vertical, LineShow } from "../../../utils/commonEcharsShow"
 | 
			
		||||
import { notification, Button, Descriptions, Table, Row, Col } from 'antd';
 | 
			
		||||
import echarts from 'echarts';
 | 
			
		||||
import styles from '../HI/StepForm.css';
 | 
			
		||||
import React from "react";
 | 
			
		||||
import { connect } from "dva";
 | 
			
		||||
import {
 | 
			
		||||
  initFilter,
 | 
			
		||||
  extendRule,
 | 
			
		||||
  extendInclude,
 | 
			
		||||
  getIsPC,
 | 
			
		||||
  openNotificationMobile,
 | 
			
		||||
  getSixMonth,
 | 
			
		||||
} from "../../../utils/common";
 | 
			
		||||
import {
 | 
			
		||||
  ChartBarShow_Vertical,
 | 
			
		||||
  LineShow,
 | 
			
		||||
} from "../../../utils/commonEcharsShow";
 | 
			
		||||
import { notification, Button, Descriptions, Table, Row, Col } from "antd";
 | 
			
		||||
import echarts from "echarts";
 | 
			
		||||
import styles from "../HI/StepForm.css";
 | 
			
		||||
 | 
			
		||||
const formItemLayout = {
 | 
			
		||||
  labelCol: { span: 6 },
 | 
			
		||||
@ -13,7 +23,6 @@ const formItemLayout = {
 | 
			
		||||
 | 
			
		||||
// 安全检查次数统计明细(首页)
 | 
			
		||||
class BI054HomeDetail extends React.Component {
 | 
			
		||||
 | 
			
		||||
  constructor(props) {
 | 
			
		||||
    super(props);
 | 
			
		||||
    this.state = {
 | 
			
		||||
@ -28,44 +37,276 @@ class BI054HomeDetail extends React.Component {
 | 
			
		||||
      // listSafeCheckTypeYear: [],
 | 
			
		||||
      // listCheckTypeYear: [],
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  componenthidMount() {
 | 
			
		||||
    if (!getIsPC()) {
 | 
			
		||||
      openNotificationMobile('bottomRight', notification)
 | 
			
		||||
      this.state.displayStr = 'none';
 | 
			
		||||
      openNotificationMobile("bottomRight", notification);
 | 
			
		||||
      this.state.displayStr = "none";
 | 
			
		||||
      this.state.displayNum = 24;
 | 
			
		||||
      //alert('手机');
 | 
			
		||||
    } else {
 | 
			
		||||
      this.state.displayStr = '';
 | 
			
		||||
      this.state.displayStr = "";
 | 
			
		||||
      this.state.displayNum = 16;
 | 
			
		||||
      //alert('PC');
 | 
			
		||||
    }
 | 
			
		||||
    this.loadData()
 | 
			
		||||
    this.loadData();
 | 
			
		||||
    //定时器功能,暂时不开启
 | 
			
		||||
    // this.timerID = setInterval(() => this.getBaseInfoData(1, this.state.tableKey, 5), 120000);
 | 
			
		||||
  };
 | 
			
		||||
  }
 | 
			
		||||
  componentDidMount() {
 | 
			
		||||
    this.loadData()
 | 
			
		||||
    // this.loadData()
 | 
			
		||||
    this.hiddenDangerTotal();
 | 
			
		||||
    this.loadReal();
 | 
			
		||||
  }
 | 
			
		||||
  componentWillUnmount() {
 | 
			
		||||
    // this.timerID && clearTimeout(this.timerID);
 | 
			
		||||
  }
 | 
			
		||||
  loadReal = () => {
 | 
			
		||||
    let result = {
 | 
			
		||||
      ListSafeCheckCountDepartment: [
 | 
			
		||||
        {
 | 
			
		||||
          DepartmentName: "穿孔班组",
 | 
			
		||||
          DepartmentType: 2,
 | 
			
		||||
          NUM: 1,
 | 
			
		||||
          Parent: {
 | 
			
		||||
            DepartmentName: "穿爆车间",
 | 
			
		||||
            RowCount: 2,
 | 
			
		||||
            listCount: [51, 751, 0, 0, 0],
 | 
			
		||||
          },
 | 
			
		||||
          Percent: 0,
 | 
			
		||||
          RowCount: 1,
 | 
			
		||||
          listCount: [0, 350, 0, 0, 0],
 | 
			
		||||
          listName: [
 | 
			
		||||
            "巡回检查",
 | 
			
		||||
            "例行检查",
 | 
			
		||||
            "专业检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          DepartmentName: "爆破班组",
 | 
			
		||||
          DepartmentType: 2,
 | 
			
		||||
          NUM: 2,
 | 
			
		||||
          Parent: {
 | 
			
		||||
            DepartmentName: "穿爆车间",
 | 
			
		||||
            RowCount: 2,
 | 
			
		||||
            listCount: [51, 751, 0, 0, 0],
 | 
			
		||||
          },
 | 
			
		||||
          Percent: 0,
 | 
			
		||||
          RowCount: 1,
 | 
			
		||||
          listCount: [0, 350, 0, 0, 0],
 | 
			
		||||
          listName: [
 | 
			
		||||
            "巡回检查",
 | 
			
		||||
            "例行检查",
 | 
			
		||||
            "专业检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          DepartmentName: "生产班",
 | 
			
		||||
          DepartmentType: 2,
 | 
			
		||||
          Department_ID: "97ee9944-74e6-6c99-d4c3-9e48f29beb98",
 | 
			
		||||
          NUM: 3,
 | 
			
		||||
          PARENT_ID: "72e83a49-5319-0784-d1ed-025d309b87eb",
 | 
			
		||||
          Parent: {
 | 
			
		||||
            DepartmentName: "生产技术科",
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [51, 522, 0, 0, 0],
 | 
			
		||||
          },
 | 
			
		||||
          Percent: 0,
 | 
			
		||||
          RowCount: 1,
 | 
			
		||||
          listCount:  [0, 349, 0, 0, 0],
 | 
			
		||||
          listName: [
 | 
			
		||||
            "巡回检查",
 | 
			
		||||
            "例行检查",
 | 
			
		||||
            "专业检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          DepartmentName: "综合班组",
 | 
			
		||||
          DepartmentType: 2,
 | 
			
		||||
          NUM: 4,
 | 
			
		||||
          Parent: {
 | 
			
		||||
            DepartmentName: "综合组",
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [0, 349, 0, 0, 0],
 | 
			
		||||
          },
 | 
			
		||||
          Percent: 0,
 | 
			
		||||
          RowCount: 1,
 | 
			
		||||
          listCount:  [0, 349, 0, 0, 0],
 | 
			
		||||
          listName: [
 | 
			
		||||
            "巡回检查",
 | 
			
		||||
            "例行检查",
 | 
			
		||||
            "专业检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          DepartmentName: "采制样班",
 | 
			
		||||
          DepartmentType: 2,
 | 
			
		||||
          NUM: 5,
 | 
			
		||||
          Parent: {
 | 
			
		||||
            DepartmentName: "试验化验室",
 | 
			
		||||
            RowCount: 2,
 | 
			
		||||
            listCount: [0, 0, 0, 0, 0],
 | 
			
		||||
          },
 | 
			
		||||
          Percent: 0,
 | 
			
		||||
          RowCount: 1,
 | 
			
		||||
          listCount: [0, 0, 0, 0, 0],
 | 
			
		||||
          listName: [
 | 
			
		||||
            "巡回检查",
 | 
			
		||||
            "例行检查",
 | 
			
		||||
            "专业检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          DepartmentName: "化验班",
 | 
			
		||||
          DepartmentType: 2,
 | 
			
		||||
          Department_ID: "97ee9944-74e6-6c99-d4c3-9e48f29beb98",
 | 
			
		||||
          NUM: 6,
 | 
			
		||||
          PARENT_ID: "72e83a49-5319-0784-d1ed-025d309b87eb",
 | 
			
		||||
          Parent: {
 | 
			
		||||
            DepartmentName: "试验化验室",
 | 
			
		||||
            RowCount: 2,
 | 
			
		||||
            listCount: [0, 0, 0, 0, 0],
 | 
			
		||||
          },
 | 
			
		||||
          Percent: 0,
 | 
			
		||||
          RowCount: 1,
 | 
			
		||||
          listCount:[0, 0, 0, 0, 0],
 | 
			
		||||
          listName: [
 | 
			
		||||
            "巡回检查",
 | 
			
		||||
            "例行检查",
 | 
			
		||||
            "专业检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          DepartmentName: "维修班组",
 | 
			
		||||
          DepartmentType: 2,
 | 
			
		||||
          Department_ID: "97ee9944-74e6-6c99-d4c3-9e48f29beb98",
 | 
			
		||||
          NUM: 7,
 | 
			
		||||
          PARENT_ID: "72e83a49-5319-0784-d1ed-025d309b87eb",
 | 
			
		||||
          Parent: {
 | 
			
		||||
            DepartmentName: "金宇宁化分公司",
 | 
			
		||||
            RowCount: 4,
 | 
			
		||||
            listCount: [51, 1452, 0, 0, 0],
 | 
			
		||||
          },
 | 
			
		||||
          Percent: 0,
 | 
			
		||||
          RowCount: 1,
 | 
			
		||||
          listCount: [0, 351, 0, 0, 0],
 | 
			
		||||
          listName: [
 | 
			
		||||
            "巡回检查",
 | 
			
		||||
            "例行检查",
 | 
			
		||||
            "专业检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          DepartmentName: "金宇现场",
 | 
			
		||||
          DepartmentType: 2,
 | 
			
		||||
          Department_ID: "97ee9944-74e6-6c99-d4c3-9e48f29beb98",
 | 
			
		||||
          NUM: 8,
 | 
			
		||||
          PARENT_ID: "72e83a49-5319-0784-d1ed-025d309b87eb",
 | 
			
		||||
          Parent: {
 | 
			
		||||
            DepartmentName: "金宇宁化分公司",
 | 
			
		||||
            RowCount: 4,
 | 
			
		||||
            listCount: [51, 1452, 0, 0, 0],
 | 
			
		||||
          },
 | 
			
		||||
          Percent: 0,
 | 
			
		||||
          RowCount: 1,
 | 
			
		||||
          listCount: [0, 350, 0, 0, 0],
 | 
			
		||||
          listName: [
 | 
			
		||||
            "巡回检查",
 | 
			
		||||
            "例行检查",
 | 
			
		||||
            "专业检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          DepartmentName: "运输二班",
 | 
			
		||||
          DepartmentType: 2,
 | 
			
		||||
          Department_ID: "97ee9944-74e6-6c99-d4c3-9e48f29beb98",
 | 
			
		||||
          NUM: 9,
 | 
			
		||||
          PARENT_ID: "72e83a49-5319-0784-d1ed-025d309b87eb",
 | 
			
		||||
          Parent: {
 | 
			
		||||
            DepartmentName: "金宇宁化分公司",
 | 
			
		||||
            RowCount: 4,
 | 
			
		||||
            listCount: [51, 1452, 0, 0, 0],
 | 
			
		||||
          },
 | 
			
		||||
          Percent: 0,
 | 
			
		||||
          RowCount: 1,
 | 
			
		||||
          listCount: [0, 350, 0, 0, 0],
 | 
			
		||||
          listName: [
 | 
			
		||||
            "巡回检查",
 | 
			
		||||
            "例行检查",
 | 
			
		||||
            "专业检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          DepartmentName: "运输一班",
 | 
			
		||||
          DepartmentType: 2,
 | 
			
		||||
          Department_ID: "97ee9944-74e6-6c99-d4c3-9e48f29beb98",
 | 
			
		||||
          NUM: 10,
 | 
			
		||||
          PARENT_ID: "72e83a49-5319-0784-d1ed-025d309b87eb",
 | 
			
		||||
          Parent: {
 | 
			
		||||
            DepartmentName: "金宇宁化分公司",
 | 
			
		||||
            RowCount: 4,
 | 
			
		||||
            listCount: [51, 1452, 0, 0, 0],
 | 
			
		||||
          },
 | 
			
		||||
          Percent: 0,
 | 
			
		||||
          RowCount: 1,
 | 
			
		||||
          listCount: [0, 350, 0, 0, 0],
 | 
			
		||||
          listName: [
 | 
			
		||||
            "巡回检查",
 | 
			
		||||
            "例行检查",
 | 
			
		||||
            "专业检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          DepartmentName: "民爆储存库班组",
 | 
			
		||||
          DepartmentType: 2,
 | 
			
		||||
          Department_ID: "97ee9944-74e6-6c99-d4c3-9e48f29beb98",
 | 
			
		||||
          NUM: 11,
 | 
			
		||||
          PARENT_ID: "72e83a49-5319-0784-d1ed-025d309b87eb",
 | 
			
		||||
          Parent: {
 | 
			
		||||
            DepartmentName: "安环科",
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [52, 400, 2, 1, 1],
 | 
			
		||||
          },
 | 
			
		||||
          Percent: 0,
 | 
			
		||||
          RowCount: 1,
 | 
			
		||||
          listCount: [0, 349, 0, 0, 0],
 | 
			
		||||
          listName: [
 | 
			
		||||
            "巡回检查",
 | 
			
		||||
            "例行检查",
 | 
			
		||||
            "专业检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
            "综合检查",
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        
 | 
			
		||||
  //加载数据赋值
 | 
			
		||||
  loadData = () => {
 | 
			
		||||
    this.state.showLoading = true;
 | 
			
		||||
    // let json = initFilter(this.props.login.OrgId, this.props.data.mineType, "NUM");
 | 
			
		||||
    let json = initFilter(this.props.login.OrgId,'', "NUM");
 | 
			
		||||
 | 
			
		||||
    this.props.dispatch({
 | 
			
		||||
      type: 'app/getDataByPost',
 | 
			
		||||
      payload: json,
 | 
			
		||||
      url: 'BI/BIHome/GetHomeDetailMonthCheckType',
 | 
			
		||||
      onComplete: (result) => {
 | 
			
		||||
        if (result) {
 | 
			
		||||
          // let listName = []
 | 
			
		||||
          if (result.ListSafeCheckCountDepartment != null && result.ListSafeCheckCountDepartment.length > 0) {
 | 
			
		||||
      ],
 | 
			
		||||
      ListSafeCheckYearMonth: [],
 | 
			
		||||
    };
 | 
			
		||||
    if (
 | 
			
		||||
      result.ListSafeCheckCountDepartment != null &&
 | 
			
		||||
      result.ListSafeCheckCountDepartment.length > 0
 | 
			
		||||
    ) {
 | 
			
		||||
      // listName.push('车间名称')
 | 
			
		||||
      // result.ListSafeCheckCountDepartment[0].listName.forEach((e, i) => {
 | 
			
		||||
      //   listName.push(e)
 | 
			
		||||
@ -76,21 +317,24 @@ class BI054HomeDetail extends React.Component {
 | 
			
		||||
      //   listName.push(e)
 | 
			
		||||
      // })
 | 
			
		||||
 | 
			
		||||
            var countTypeTitle = []
 | 
			
		||||
            var columnsTb = []
 | 
			
		||||
            if (result.ListSafeCheckCountDepartment != null && result.ListSafeCheckCountDepartment.length > 0) {
 | 
			
		||||
              countTypeTitle = result.ListSafeCheckCountDepartment[0].listName
 | 
			
		||||
      var countTypeTitle = [];
 | 
			
		||||
      var columnsTb = [];
 | 
			
		||||
      if (
 | 
			
		||||
        result.ListSafeCheckCountDepartment != null &&
 | 
			
		||||
        result.ListSafeCheckCountDepartment.length > 0
 | 
			
		||||
      ) {
 | 
			
		||||
        countTypeTitle = result.ListSafeCheckCountDepartment[0].listName;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (countTypeTitle.length < 1) {
 | 
			
		||||
              countTypeTitle.push('巡回检查')
 | 
			
		||||
              countTypeTitle.push('例行检查')
 | 
			
		||||
              countTypeTitle.push('专业检查')
 | 
			
		||||
              countTypeTitle.push('综合检查')
 | 
			
		||||
        countTypeTitle.push("巡回检查");
 | 
			
		||||
        countTypeTitle.push("例行检查");
 | 
			
		||||
        countTypeTitle.push("专业检查");
 | 
			
		||||
        countTypeTitle.push("综合检查");
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
            var typeName = ['车间名称', '班组名称']
 | 
			
		||||
            var RowCount = 0
 | 
			
		||||
      var typeName = ["车间名称", "班组名称"];
 | 
			
		||||
      var RowCount = 0;
 | 
			
		||||
 | 
			
		||||
      for (let i = 0; i < 2; i++) {
 | 
			
		||||
        for (let j = 0; j < countTypeTitle.length; j++) {
 | 
			
		||||
@ -100,21 +344,25 @@ class BI054HomeDetail extends React.Component {
 | 
			
		||||
              columnsTb.push({
 | 
			
		||||
                title: typeName[i],
 | 
			
		||||
                dataIndex: "NUM",
 | 
			
		||||
                      key: (i * 10 + j),
 | 
			
		||||
                key: i * 10 + j,
 | 
			
		||||
                render: (value, record, index) => {
 | 
			
		||||
                        RowCount = record.Parent.RowCount
 | 
			
		||||
                        if (index > 0 && result.ListSafeCheckCountDepartment[index - 1].Parent.DepartmentName == record.Parent.DepartmentName) {
 | 
			
		||||
                          RowCount = 0
 | 
			
		||||
                  RowCount = record.Parent.RowCount;
 | 
			
		||||
                  if (
 | 
			
		||||
                    index > 0 &&
 | 
			
		||||
                    result.ListSafeCheckCountDepartment[index - 1].Parent
 | 
			
		||||
                      .DepartmentName == record.Parent.DepartmentName
 | 
			
		||||
                  ) {
 | 
			
		||||
                    RowCount = 0;
 | 
			
		||||
                  }
 | 
			
		||||
                  const obj = {
 | 
			
		||||
                    children: record.Parent.DepartmentName,
 | 
			
		||||
                    props: {
 | 
			
		||||
                            'rowSpan': RowCount
 | 
			
		||||
                      rowSpan: RowCount,
 | 
			
		||||
                    },
 | 
			
		||||
                  };
 | 
			
		||||
                  return obj;
 | 
			
		||||
                      }
 | 
			
		||||
                    })
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            //非头部
 | 
			
		||||
@ -122,54 +370,54 @@ class BI054HomeDetail extends React.Component {
 | 
			
		||||
            columnsTb.push({
 | 
			
		||||
              title: countTypeTitle[j],
 | 
			
		||||
              dataIndex: "NUM",
 | 
			
		||||
                    key: (i * 10 + j),
 | 
			
		||||
              key: i * 10 + j,
 | 
			
		||||
              render: (value, record, index) => {
 | 
			
		||||
                      RowCount = record.Parent.RowCount
 | 
			
		||||
                      if (index > 0 && result.ListSafeCheckCountDepartment[index - 1].Parent.DepartmentName == record.Parent.DepartmentName) {
 | 
			
		||||
                        RowCount = 0
 | 
			
		||||
                RowCount = record.Parent.RowCount;
 | 
			
		||||
                if (
 | 
			
		||||
                  index > 0 &&
 | 
			
		||||
                  result.ListSafeCheckCountDepartment[index - 1].Parent
 | 
			
		||||
                    .DepartmentName == record.Parent.DepartmentName
 | 
			
		||||
                ) {
 | 
			
		||||
                  RowCount = 0;
 | 
			
		||||
                }
 | 
			
		||||
                const obj = {
 | 
			
		||||
                  children: record.Parent.listCount[j],
 | 
			
		||||
                  props: {
 | 
			
		||||
                          'rowSpan': RowCount
 | 
			
		||||
                    rowSpan: RowCount,
 | 
			
		||||
                  },
 | 
			
		||||
                };
 | 
			
		||||
                return obj;
 | 
			
		||||
                    }
 | 
			
		||||
                  })
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          } else {
 | 
			
		||||
            //班组
 | 
			
		||||
            if (j == 0) {
 | 
			
		||||
              columnsTb.push({
 | 
			
		||||
                title: typeName[i],
 | 
			
		||||
                      key: (i * 10 + j),
 | 
			
		||||
                key: i * 10 + j,
 | 
			
		||||
                render: (value, record, index) => {
 | 
			
		||||
                  const obj = {
 | 
			
		||||
                    children: record.DepartmentName,
 | 
			
		||||
                  };
 | 
			
		||||
                  return obj;
 | 
			
		||||
                      }
 | 
			
		||||
                    })
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            columnsTb.push({
 | 
			
		||||
              title: countTypeTitle[j],
 | 
			
		||||
                    key: (i * 10 + j),
 | 
			
		||||
              key: i * 10 + j,
 | 
			
		||||
              render: (value, record, index) => {
 | 
			
		||||
                const obj = {
 | 
			
		||||
                  children: record.listCount[j],
 | 
			
		||||
                };
 | 
			
		||||
                return obj;
 | 
			
		||||
                    }
 | 
			
		||||
                  })
 | 
			
		||||
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      this.setState({
 | 
			
		||||
        data: {
 | 
			
		||||
          countTypeTitle: countTypeTitle,
 | 
			
		||||
@ -177,46 +425,197 @@ class BI054HomeDetail extends React.Component {
 | 
			
		||||
          // listName: listName,
 | 
			
		||||
          ListSafeCheckYearMonth: result.ListSafeCheckYearMonth,
 | 
			
		||||
          ListSafeCheckCountDepartment: result.ListSafeCheckCountDepartment, //车间 子集是 班组
 | 
			
		||||
        },
 | 
			
		||||
      });
 | 
			
		||||
    }
 | 
			
		||||
            })
 | 
			
		||||
            this.hiddenDangerTotal()
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  //加载数据赋值
 | 
			
		||||
  loadData = () => {
 | 
			
		||||
    this.state.showLoading = true;
 | 
			
		||||
    // let json = initFilter(this.props.login.OrgId, this.props.data.mineType, "NUM");
 | 
			
		||||
    let json = initFilter(this.props.login.OrgId, "", "NUM");
 | 
			
		||||
 | 
			
		||||
    this.props.dispatch({
 | 
			
		||||
      type: "app/getDataByPost",
 | 
			
		||||
      payload: json,
 | 
			
		||||
      url: "BI/BIHome/GetHomeDetailMonthCheckType",
 | 
			
		||||
      onComplete: (result) => {
 | 
			
		||||
        if (result) {
 | 
			
		||||
          // let listName = []
 | 
			
		||||
          if (
 | 
			
		||||
            result.ListSafeCheckCountDepartment != null &&
 | 
			
		||||
            result.ListSafeCheckCountDepartment.length > 0
 | 
			
		||||
          ) {
 | 
			
		||||
            // listName.push('车间名称')
 | 
			
		||||
            // result.ListSafeCheckCountDepartment[0].listName.forEach((e, i) => {
 | 
			
		||||
            //   listName.push(e)
 | 
			
		||||
            // })
 | 
			
		||||
 | 
			
		||||
            // listName.push('班组名称')
 | 
			
		||||
            // result.ListSafeCheckCountDepartment[0].listChild[0].listName.forEach(e => {
 | 
			
		||||
            //   listName.push(e)
 | 
			
		||||
            // })
 | 
			
		||||
 | 
			
		||||
            var countTypeTitle = [];
 | 
			
		||||
            var columnsTb = [];
 | 
			
		||||
            if (
 | 
			
		||||
              result.ListSafeCheckCountDepartment != null &&
 | 
			
		||||
              result.ListSafeCheckCountDepartment.length > 0
 | 
			
		||||
            ) {
 | 
			
		||||
              countTypeTitle = result.ListSafeCheckCountDepartment[0].listName;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    this.state.showLoading = false;
 | 
			
		||||
            if (countTypeTitle.length < 1) {
 | 
			
		||||
              countTypeTitle.push("巡回检查");
 | 
			
		||||
              countTypeTitle.push("例行检查");
 | 
			
		||||
              countTypeTitle.push("专业检查");
 | 
			
		||||
              countTypeTitle.push("综合检查");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
  hiddenDangerTotal = () => {
 | 
			
		||||
    if (this.state.data.ListSafeCheckYearMonth) {
 | 
			
		||||
      let data = this.state.data.ListSafeCheckYearMonth;
 | 
			
		||||
      let xData = [];
 | 
			
		||||
      let data1 = [];
 | 
			
		||||
      let data2 = [];
 | 
			
		||||
      let data3 = [];
 | 
			
		||||
      let seriesName = [];
 | 
			
		||||
      data.map((item) => {
 | 
			
		||||
        if (item.MONTH>9){
 | 
			
		||||
          xData.push(item.YEAR+'-'+ item.MONTH);
 | 
			
		||||
            var typeName = ["车间名称", "班组名称"];
 | 
			
		||||
            var RowCount = 0;
 | 
			
		||||
 | 
			
		||||
            for (let i = 0; i < 2; i++) {
 | 
			
		||||
              for (let j = 0; j < countTypeTitle.length; j++) {
 | 
			
		||||
                if (i == 0) {
 | 
			
		||||
                  if (j == 0) {
 | 
			
		||||
                    //头部
 | 
			
		||||
                    columnsTb.push({
 | 
			
		||||
                      title: typeName[i],
 | 
			
		||||
                      dataIndex: "NUM",
 | 
			
		||||
                      key: i * 10 + j,
 | 
			
		||||
                      render: (value, record, index) => {
 | 
			
		||||
                        RowCount = record.Parent.RowCount;
 | 
			
		||||
                        if (
 | 
			
		||||
                          index > 0 &&
 | 
			
		||||
                          result.ListSafeCheckCountDepartment[index - 1].Parent
 | 
			
		||||
                            .DepartmentName == record.Parent.DepartmentName
 | 
			
		||||
                        ) {
 | 
			
		||||
                          RowCount = 0;
 | 
			
		||||
                        }
 | 
			
		||||
                        const obj = {
 | 
			
		||||
                          children: record.Parent.DepartmentName,
 | 
			
		||||
                          props: {
 | 
			
		||||
                            rowSpan: RowCount,
 | 
			
		||||
                          },
 | 
			
		||||
                        };
 | 
			
		||||
                        return obj;
 | 
			
		||||
                      },
 | 
			
		||||
                    });
 | 
			
		||||
                  }
 | 
			
		||||
 | 
			
		||||
                  //非头部
 | 
			
		||||
 | 
			
		||||
                  columnsTb.push({
 | 
			
		||||
                    title: countTypeTitle[j],
 | 
			
		||||
                    dataIndex: "NUM",
 | 
			
		||||
                    key: i * 10 + j,
 | 
			
		||||
                    render: (value, record, index) => {
 | 
			
		||||
                      RowCount = record.Parent.RowCount;
 | 
			
		||||
                      if (
 | 
			
		||||
                        index > 0 &&
 | 
			
		||||
                        result.ListSafeCheckCountDepartment[index - 1].Parent
 | 
			
		||||
                          .DepartmentName == record.Parent.DepartmentName
 | 
			
		||||
                      ) {
 | 
			
		||||
                        RowCount = 0;
 | 
			
		||||
                      }
 | 
			
		||||
                      const obj = {
 | 
			
		||||
                        children: record.Parent.listCount[j],
 | 
			
		||||
                        props: {
 | 
			
		||||
                          rowSpan: RowCount,
 | 
			
		||||
                        },
 | 
			
		||||
                      };
 | 
			
		||||
                      return obj;
 | 
			
		||||
                    },
 | 
			
		||||
                  });
 | 
			
		||||
                } else {
 | 
			
		||||
          xData.push(item.YEAR+'-0'+ item.MONTH);
 | 
			
		||||
                  //班组
 | 
			
		||||
                  if (j == 0) {
 | 
			
		||||
                    columnsTb.push({
 | 
			
		||||
                      title: typeName[i],
 | 
			
		||||
                      key: i * 10 + j,
 | 
			
		||||
                      render: (value, record, index) => {
 | 
			
		||||
                        const obj = {
 | 
			
		||||
                          children: record.DepartmentName,
 | 
			
		||||
                        };
 | 
			
		||||
                        return obj;
 | 
			
		||||
                      },
 | 
			
		||||
                    });
 | 
			
		||||
                  }
 | 
			
		||||
        seriesName = item.listSOURCENAME;
 | 
			
		||||
        data1.push(item.listListCount);
 | 
			
		||||
 | 
			
		||||
                  columnsTb.push({
 | 
			
		||||
                    title: countTypeTitle[j],
 | 
			
		||||
                    key: i * 10 + j,
 | 
			
		||||
                    render: (value, record, index) => {
 | 
			
		||||
                      const obj = {
 | 
			
		||||
                        children: record.listCount[j],
 | 
			
		||||
                      };
 | 
			
		||||
                      return obj;
 | 
			
		||||
                    },
 | 
			
		||||
                  });
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            this.setState({
 | 
			
		||||
              data: {
 | 
			
		||||
                countTypeTitle: countTypeTitle,
 | 
			
		||||
                columnsTb: columnsTb,
 | 
			
		||||
                // listName: listName,
 | 
			
		||||
                ListSafeCheckYearMonth: result.ListSafeCheckYearMonth,
 | 
			
		||||
                ListSafeCheckCountDepartment:
 | 
			
		||||
                  result.ListSafeCheckCountDepartment, //车间 子集是 班组
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
            this.hiddenDangerTotal();
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
      for (var i = 0; i < data[0].listListCount.length; i++) {
 | 
			
		||||
        for (var j = 0; j < data.length; j++) {
 | 
			
		||||
          data2.push(data1[j][i]);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    this.state.showLoading = false;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
      for (var i = 0; i < data2.length; i += data.length) {
 | 
			
		||||
        data3.push(data2.slice(i, i + data.length));
 | 
			
		||||
      }
 | 
			
		||||
  hiddenDangerTotal = () => {
 | 
			
		||||
    
 | 
			
		||||
      let xData = [];
 | 
			
		||||
      let data3 = [
 | 
			
		||||
        [17, 20, 16, 20, 16, 16, 20, 16, 16, 20, 16, 12],
 | 
			
		||||
        [317, 330, 316, 330, 292, 286, 299, 286, 295, 299, 223, 201],
 | 
			
		||||
        [0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0],
 | 
			
		||||
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
 | 
			
		||||
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
 | 
			
		||||
      ];
 | 
			
		||||
      for (let i = 0; i < 12; i++) {
 | 
			
		||||
        xData.unshift(getSixMonth(-i, "-", ""));
 | 
			
		||||
      }
 | 
			
		||||
      let seriesName = [
 | 
			
		||||
        "巡回检查",
 | 
			
		||||
        "例行检查",
 | 
			
		||||
        "专业检查",
 | 
			
		||||
        "综合检查",
 | 
			
		||||
        "综合检查",
 | 
			
		||||
      ];
 | 
			
		||||
      // data.map((item) => {
 | 
			
		||||
      //   if (item.MONTH>9){
 | 
			
		||||
      //     xData.push(item.YEAR+'-'+ item.MONTH);
 | 
			
		||||
      //   }else{
 | 
			
		||||
      //     xData.push(item.YEAR+'-0'+ item.MONTH);
 | 
			
		||||
      //   }
 | 
			
		||||
      //   seriesName = item.listSOURCENAME;
 | 
			
		||||
      //   data1.push(item.listListCount);
 | 
			
		||||
      // });
 | 
			
		||||
 | 
			
		||||
      // for (var i = 0; i < data[0].listListCount.length; i++) {
 | 
			
		||||
      //   for (var j = 0; j < data.length; j++) {
 | 
			
		||||
      //     data2.push(data1[j][i]);
 | 
			
		||||
      //   }
 | 
			
		||||
      // }
 | 
			
		||||
 | 
			
		||||
      // for (var i = 0; i < data2.length; i += data.length) {
 | 
			
		||||
      //   data3.push(data2.slice(i, i + data.length));
 | 
			
		||||
      // }
 | 
			
		||||
      let series = [];
 | 
			
		||||
      for (let i = 0; i < data3.length; i++) {
 | 
			
		||||
        series.push({
 | 
			
		||||
@ -301,19 +700,34 @@ class BI054HomeDetail extends React.Component {
 | 
			
		||||
          series: series,
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  render() {
 | 
			
		||||
    const { data } = this.state;
 | 
			
		||||
    return <div style={{
 | 
			
		||||
      backgroundColor: "white", width: "1200px", top: "0", bottom: "0", left: "0", right: "0", margin: "auto", borderStyle: "solid", borderColor: "#ccc", borderWidth: "1px"
 | 
			
		||||
    }}  >
 | 
			
		||||
    return (
 | 
			
		||||
      <div
 | 
			
		||||
        style={{
 | 
			
		||||
          backgroundColor: "white",
 | 
			
		||||
          width: "1200px",
 | 
			
		||||
          top: "0",
 | 
			
		||||
          bottom: "0",
 | 
			
		||||
          left: "0",
 | 
			
		||||
          right: "0",
 | 
			
		||||
          margin: "auto",
 | 
			
		||||
          borderStyle: "solid",
 | 
			
		||||
          borderColor: "#ccc",
 | 
			
		||||
          borderWidth: "1px",
 | 
			
		||||
        }}
 | 
			
		||||
      >
 | 
			
		||||
        <Row gutter={10} style={{ marginTop: "44px" }}>
 | 
			
		||||
          <Col span={1}> </Col>
 | 
			
		||||
          <Col span={22}>
 | 
			
		||||
            <div style={{ border: "1px solid rgb(232,232,232)" }}>
 | 
			
		||||
            <div id="dangerTotal2" style={{ width: "100%", height: "350px" }}></div>
 | 
			
		||||
              <div
 | 
			
		||||
                id="dangerTotal2"
 | 
			
		||||
                style={{ width: "100%", height: "350px" }}
 | 
			
		||||
              ></div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </Col>
 | 
			
		||||
          <Col span={1}></Col>
 | 
			
		||||
@ -322,9 +736,16 @@ class BI054HomeDetail extends React.Component {
 | 
			
		||||
        <Row gutter={10} style={{ marginTop: "14px" }}>
 | 
			
		||||
          <Col span={1}></Col>
 | 
			
		||||
          <Col span={22} style={{ height: "100%" }}>
 | 
			
		||||
 | 
			
		||||
            <div className="bi001-table">
 | 
			
		||||
            <Table dataSource={this.state.data.ListSafeCheckCountDepartment} columns={this.state.data.columnsTb} pagination={false} bordered loading={this.state.data.showLoading} size="small" rowKey="1" />
 | 
			
		||||
              <Table
 | 
			
		||||
                dataSource={this.state.data.ListSafeCheckCountDepartment}
 | 
			
		||||
                columns={this.state.data.columnsTb}
 | 
			
		||||
                pagination={false}
 | 
			
		||||
                bordered
 | 
			
		||||
                loading={this.state.data.showLoading}
 | 
			
		||||
                size="small"
 | 
			
		||||
                rowKey="1"
 | 
			
		||||
              />
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            {/* <div style={{ display: "flex", alignItems: "center", justifyContent: "center" }}   >
 | 
			
		||||
@ -386,12 +807,12 @@ class BI054HomeDetail extends React.Component {
 | 
			
		||||
              </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
          </div> */}
 | 
			
		||||
 | 
			
		||||
          </Col>
 | 
			
		||||
          <Col span={1}></Col>
 | 
			
		||||
        </Row>
 | 
			
		||||
        <br />
 | 
			
		||||
      </div>
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
export default connect(({ login, app }) => ({ login, app }))(BI054HomeDetail)
 | 
			
		||||
export default connect(({ login, app }) => ({ login, app }))(BI054HomeDetail);
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,20 @@
 | 
			
		||||
import React from 'react'
 | 
			
		||||
import { connect } from 'dva'
 | 
			
		||||
import { initFilter, extendRule, extendInclude, getIsPC, openNotificationMobile } from "../../../utils/common"
 | 
			
		||||
import { ChartBarShow_Vertical, LineShow } from "../../../utils/commonEcharsShow"
 | 
			
		||||
import { Table, Row, Progress, Col } from 'antd';
 | 
			
		||||
import echarts from 'echarts';
 | 
			
		||||
import styles from '../HI/StepForm.css';
 | 
			
		||||
import React from "react";
 | 
			
		||||
import { connect } from "dva";
 | 
			
		||||
import {
 | 
			
		||||
  initFilter,
 | 
			
		||||
  extendRule,
 | 
			
		||||
  extendInclude,
 | 
			
		||||
  getIsPC,
 | 
			
		||||
  openNotificationMobile,
 | 
			
		||||
  getSixMonth,
 | 
			
		||||
} from "../../../utils/common";
 | 
			
		||||
import {
 | 
			
		||||
  ChartBarShow_Vertical,
 | 
			
		||||
  LineShow,
 | 
			
		||||
} from "../../../utils/commonEcharsShow";
 | 
			
		||||
import { Table, Row, Progress, Col } from "antd";
 | 
			
		||||
import echarts from "echarts";
 | 
			
		||||
import styles from "../HI/StepForm.css";
 | 
			
		||||
 | 
			
		||||
const formItemLayout = {
 | 
			
		||||
  labelCol: { span: 6 },
 | 
			
		||||
@ -27,25 +37,375 @@ class BI055HomeDetail extends React.Component {
 | 
			
		||||
 | 
			
		||||
  componenthidMount() {
 | 
			
		||||
    if (!getIsPC()) {
 | 
			
		||||
      openNotificationMobile('bottomRight', notification)
 | 
			
		||||
      this.state.displayStr = 'none';
 | 
			
		||||
      openNotificationMobile("bottomRight", notification);
 | 
			
		||||
      this.state.displayStr = "none";
 | 
			
		||||
      this.state.displayNum = 24;
 | 
			
		||||
    } else {
 | 
			
		||||
      this.state.displayStr = '';
 | 
			
		||||
      this.state.displayStr = "";
 | 
			
		||||
      this.state.displayNum = 16;
 | 
			
		||||
    }
 | 
			
		||||
    this.loadData()
 | 
			
		||||
    this.loadReal();
 | 
			
		||||
    //定时器功能,暂时不开启
 | 
			
		||||
    // this.timerID = setInterval(() => this.getBaseInfoData(1, this.state.tableKey, 5), 120000);
 | 
			
		||||
  };
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  componentDidMount() {
 | 
			
		||||
    this.loadData();
 | 
			
		||||
    this.loadReal();
 | 
			
		||||
  }
 | 
			
		||||
  loadReal = () => {
 | 
			
		||||
    let data = {
 | 
			
		||||
      IsSuccessful: true,
 | 
			
		||||
      Data: {
 | 
			
		||||
        ListC: [],
 | 
			
		||||
        ListSafeCheckYearMonth: [
 | 
			
		||||
          {
 | 
			
		||||
            DepartmentName: "穿孔班组",
 | 
			
		||||
            NUM: 1,
 | 
			
		||||
            Parent: {
 | 
			
		||||
              DepartmentName: "穿爆车间",
 | 
			
		||||
              RowCount: 2,
 | 
			
		||||
              listCount: [0, 0, 0, 10000],
 | 
			
		||||
            },
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [0, 0, 0, 10000],
 | 
			
		||||
            listName: [
 | 
			
		||||
              "按时整改隐患",
 | 
			
		||||
              "超期整改隐患",
 | 
			
		||||
              "未整改隐患",
 | 
			
		||||
              "隐患整改率",
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            DepartmentName: "爆破班组",
 | 
			
		||||
            NUM: 2,
 | 
			
		||||
            Parent: {
 | 
			
		||||
              DepartmentName: "穿爆车间",
 | 
			
		||||
              RowCount: 2,
 | 
			
		||||
              listCount: [0, 0, 0, 10000],
 | 
			
		||||
            },
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [0, 0, 0, 10000],
 | 
			
		||||
            listName: [
 | 
			
		||||
              "按时整改隐患",
 | 
			
		||||
              "超期整改隐患",
 | 
			
		||||
              "未整改隐患",
 | 
			
		||||
              "隐患整改率",
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            DepartmentName: "生产班",
 | 
			
		||||
            NUM: 3,
 | 
			
		||||
            Parent: {
 | 
			
		||||
              DepartmentName: "生产技术科",
 | 
			
		||||
              RowCount: 1,
 | 
			
		||||
              listCount: [6, 4, 0, 10000],
 | 
			
		||||
            },
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [4, 1, 0, 10000],
 | 
			
		||||
            listName: [
 | 
			
		||||
              "按时整改隐患",
 | 
			
		||||
              "超期整改隐患",
 | 
			
		||||
              "未整改隐患",
 | 
			
		||||
              "隐患整改率",
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            DepartmentName: "综合班组",
 | 
			
		||||
            NUM: 4,
 | 
			
		||||
            Parent: {
 | 
			
		||||
              DepartmentName: "综合组",
 | 
			
		||||
              RowCount: 1,
 | 
			
		||||
              listCount: [3, 4, 0, 10000],
 | 
			
		||||
            },
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [3, 4, 0, 10000],
 | 
			
		||||
            listName: [
 | 
			
		||||
              "按时整改隐患",
 | 
			
		||||
              "超期整改隐患",
 | 
			
		||||
              "未整改隐患",
 | 
			
		||||
              "隐患整改率",
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            DepartmentName: "采制样班",
 | 
			
		||||
            NUM: 5,
 | 
			
		||||
            Parent: {
 | 
			
		||||
              DepartmentName: "试验化验室",
 | 
			
		||||
              RowCount: 2,
 | 
			
		||||
              listCount: [0, 0, 0, 10000],
 | 
			
		||||
            },
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [0, 0, 0, 10000],
 | 
			
		||||
            listName: [
 | 
			
		||||
              "按时整改隐患",
 | 
			
		||||
              "超期整改隐患",
 | 
			
		||||
              "未整改隐患",
 | 
			
		||||
              "隐患整改率",
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            DepartmentName: "化验班",
 | 
			
		||||
            NUM: 6,
 | 
			
		||||
            Parent: {
 | 
			
		||||
              DepartmentName: "试验化验室",
 | 
			
		||||
              RowCount: 2,
 | 
			
		||||
              listCount: [0, 0, 0, 10000],
 | 
			
		||||
            },
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [0, 0, 0, 10000],
 | 
			
		||||
            listName: [
 | 
			
		||||
              "按时整改隐患",
 | 
			
		||||
              "超期整改隐患",
 | 
			
		||||
              "未整改隐患",
 | 
			
		||||
              "隐患整改率",
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            DepartmentName: "维修班组",
 | 
			
		||||
            NUM: 7,
 | 
			
		||||
            Parent: {
 | 
			
		||||
              DepartmentName: "金宇宁化分公司",
 | 
			
		||||
              RowCount: 4,
 | 
			
		||||
              listCount: [6, 7, 0, 10000],
 | 
			
		||||
            },
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [0, 0, 0, 10000],
 | 
			
		||||
            listName: [
 | 
			
		||||
              "按时整改隐患",
 | 
			
		||||
              "超期整改隐患",
 | 
			
		||||
              "未整改隐患",
 | 
			
		||||
              "隐患整改率",
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            DepartmentName: "金宇现场",
 | 
			
		||||
            NUM: 8,
 | 
			
		||||
            Parent: {
 | 
			
		||||
              DepartmentName: "金宇宁化分公司",
 | 
			
		||||
              RowCount: 4,
 | 
			
		||||
              listCount: [6, 7, 0, 10000],
 | 
			
		||||
            },
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [2, 0, 0, 10000],
 | 
			
		||||
            listName: [
 | 
			
		||||
              "按时整改隐患",
 | 
			
		||||
              "超期整改隐患",
 | 
			
		||||
              "未整改隐患",
 | 
			
		||||
              "隐患整改率",
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            DepartmentName: "运输二班",
 | 
			
		||||
            NUM: 9,
 | 
			
		||||
            Parent: {
 | 
			
		||||
              DepartmentName: "金宇宁化分公司",
 | 
			
		||||
              RowCount: 4,
 | 
			
		||||
              listCount: [6, 7, 0, 10000],
 | 
			
		||||
            },
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [1, 1, 0, 10000],
 | 
			
		||||
            listName: [
 | 
			
		||||
              "按时整改隐患",
 | 
			
		||||
              "超期整改隐患",
 | 
			
		||||
              "未整改隐患",
 | 
			
		||||
              "隐患整改率",
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            DepartmentName: "运输一班",
 | 
			
		||||
            NUM: 10,
 | 
			
		||||
            Parent: {
 | 
			
		||||
              DepartmentName: "金宇宁化分公司",
 | 
			
		||||
              RowCount: 4,
 | 
			
		||||
              listCount: [6, 7, 0, 10000],
 | 
			
		||||
            },
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [1, 0, 0, 10000],
 | 
			
		||||
            listName: [
 | 
			
		||||
              "按时整改隐患",
 | 
			
		||||
              "超期整改隐患",
 | 
			
		||||
              "未整改隐患",
 | 
			
		||||
              "隐患整改率",
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            DepartmentName: "民爆储存库班组",
 | 
			
		||||
            NUM: 11,
 | 
			
		||||
            Parent: {
 | 
			
		||||
              DepartmentName: "安环科",
 | 
			
		||||
              RowCount: 1,
 | 
			
		||||
              listCount: [2, 1, 0, 10000],
 | 
			
		||||
            },
 | 
			
		||||
            RowCount: 1,
 | 
			
		||||
            listCount: [0, 0, 0, 10000],
 | 
			
		||||
            listName: [
 | 
			
		||||
              "按时整改隐患",
 | 
			
		||||
              "超期整改隐患",
 | 
			
		||||
              "未整改隐患",
 | 
			
		||||
              "隐患整改率",
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
    var countTypeTitle = [];
 | 
			
		||||
    var countTypeDataIndex = [];
 | 
			
		||||
    var columnsTb = [];
 | 
			
		||||
    if (
 | 
			
		||||
      data.Data.ListSafeCheckYearMonth != null &&
 | 
			
		||||
      data.Data.ListSafeCheckYearMonth.length > 0
 | 
			
		||||
    ) {
 | 
			
		||||
      countTypeTitle = data.Data.ListSafeCheckYearMonth[0].listName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  renderSpeedColumn = () => {
 | 
			
		||||
    return { className: 'redTableCell' }
 | 
			
		||||
    if (countTypeTitle.length < 1) {
 | 
			
		||||
      countTypeTitle.push("按时整改隐患");
 | 
			
		||||
      countTypeTitle.push("超期整改隐患");
 | 
			
		||||
      countTypeTitle.push("未整改隐患");
 | 
			
		||||
      countTypeTitle.push("隐患整改率");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    var typeName = ["车间名称", "班组名称"];
 | 
			
		||||
    var RowCount = 0;
 | 
			
		||||
    for (let i = 0; i < 2; i++) {
 | 
			
		||||
      for (let j = 0; j < countTypeTitle.length; j++) {
 | 
			
		||||
        countTypeDataIndex.push(j);
 | 
			
		||||
        if (i == 0) {
 | 
			
		||||
          if (j == 0) {
 | 
			
		||||
            //头部
 | 
			
		||||
            columnsTb.push({
 | 
			
		||||
              title: typeName[i],
 | 
			
		||||
              dataIndex: "NUM",
 | 
			
		||||
              key: i * 10 + j,
 | 
			
		||||
              render: (value, record, index) => {
 | 
			
		||||
                RowCount = record.Parent.RowCount;
 | 
			
		||||
                if (
 | 
			
		||||
                  index > 0 &&
 | 
			
		||||
                  this.state.ListSafeCheckYearMonth[index - 1].Parent
 | 
			
		||||
                    .DepartmentName == record.Parent.DepartmentName
 | 
			
		||||
                ) {
 | 
			
		||||
                  RowCount = 0;
 | 
			
		||||
                }
 | 
			
		||||
                const obj = {
 | 
			
		||||
                  children: record.Parent.DepartmentName,
 | 
			
		||||
                  props: {
 | 
			
		||||
                    rowSpan: RowCount,
 | 
			
		||||
                  },
 | 
			
		||||
                };
 | 
			
		||||
                return obj;
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          //非头部
 | 
			
		||||
          if (countTypeTitle[j].indexOf("率") > -1) {
 | 
			
		||||
            columnsTb.push({
 | 
			
		||||
              title: countTypeTitle[j],
 | 
			
		||||
              dataIndex: "NUM",
 | 
			
		||||
              key: i * 10 + j,
 | 
			
		||||
              render: (value, record, index) => {
 | 
			
		||||
                RowCount = record.Parent.RowCount;
 | 
			
		||||
                if (
 | 
			
		||||
                  index > 0 &&
 | 
			
		||||
                  this.state.ListSafeCheckYearMonth[index - 1].Parent
 | 
			
		||||
                    .DepartmentName == record.Parent.DepartmentName
 | 
			
		||||
                ) {
 | 
			
		||||
                  RowCount = 0;
 | 
			
		||||
                }
 | 
			
		||||
                const obj = {
 | 
			
		||||
                  children: (
 | 
			
		||||
                    <Progress
 | 
			
		||||
                      percent={record.Parent.listCount[j] / 100}
 | 
			
		||||
                      status="active"
 | 
			
		||||
                      strokeColor={{ from: "#108ee9", to: "#108ee9" }}
 | 
			
		||||
                    />
 | 
			
		||||
                  ),
 | 
			
		||||
                  props: {
 | 
			
		||||
                    rowSpan: RowCount,
 | 
			
		||||
                  },
 | 
			
		||||
                };
 | 
			
		||||
                return obj;
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          } else {
 | 
			
		||||
            columnsTb.push({
 | 
			
		||||
              title: countTypeTitle[j],
 | 
			
		||||
              dataIndex: "NUM",
 | 
			
		||||
              key: i * 10 + j,
 | 
			
		||||
              render: (value, record, index) => {
 | 
			
		||||
                RowCount = record.Parent.RowCount;
 | 
			
		||||
                if (
 | 
			
		||||
                  index > 0 &&
 | 
			
		||||
                  this.state.ListSafeCheckYearMonth[index - 1].Parent
 | 
			
		||||
                    .DepartmentName == record.Parent.DepartmentName
 | 
			
		||||
                ) {
 | 
			
		||||
                  RowCount = 0;
 | 
			
		||||
                }
 | 
			
		||||
                const obj = {
 | 
			
		||||
                  children: record.Parent.listCount[j],
 | 
			
		||||
                  props: {
 | 
			
		||||
                    rowSpan: RowCount,
 | 
			
		||||
                  },
 | 
			
		||||
                };
 | 
			
		||||
                return obj;
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          }
 | 
			
		||||
        } else {
 | 
			
		||||
          //班组
 | 
			
		||||
          if (j == 0) {
 | 
			
		||||
            columnsTb.push({
 | 
			
		||||
              title: typeName[i],
 | 
			
		||||
              key: i * 10 + j,
 | 
			
		||||
              render: (value, record, index) => {
 | 
			
		||||
                const obj = {
 | 
			
		||||
                  children: record.DepartmentName,
 | 
			
		||||
                };
 | 
			
		||||
                return obj;
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          if (countTypeTitle[j].indexOf("率") > -1) {
 | 
			
		||||
            columnsTb.push({
 | 
			
		||||
              title: countTypeTitle[j],
 | 
			
		||||
              key: i * 10 + j,
 | 
			
		||||
              render: (text, record) => (
 | 
			
		||||
                <Progress
 | 
			
		||||
                  percent={record.listCount[j] / 100}
 | 
			
		||||
                  status="active"
 | 
			
		||||
                  strokeColor={{ from: "#108ee9", to: "#108ee9" }}
 | 
			
		||||
                />
 | 
			
		||||
              ),
 | 
			
		||||
            });
 | 
			
		||||
          } else {
 | 
			
		||||
            columnsTb.push({
 | 
			
		||||
              title: countTypeTitle[j],
 | 
			
		||||
              key: i * 10 + j,
 | 
			
		||||
              render: (value, record, index) => {
 | 
			
		||||
                const obj = {
 | 
			
		||||
                  children: record.listCount[j],
 | 
			
		||||
                };
 | 
			
		||||
                return obj;
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    this.setState({
 | 
			
		||||
      countTypeTitle: countTypeTitle,
 | 
			
		||||
      columnsTb: columnsTb,
 | 
			
		||||
      ListC: data.Data.ListC,
 | 
			
		||||
      ListSafeCheckYearMonth: data.Data.ListSafeCheckYearMonth,
 | 
			
		||||
    });
 | 
			
		||||
    this.safeChekDanger();
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  renderSpeedColumn = () => {
 | 
			
		||||
    return { className: "redTableCell" };
 | 
			
		||||
  };
 | 
			
		||||
  loadData = () => {
 | 
			
		||||
    this.state.showLoading = true;
 | 
			
		||||
    // var mineType = ''
 | 
			
		||||
@ -63,109 +423,134 @@ class BI055HomeDetail extends React.Component {
 | 
			
		||||
      payload: json,
 | 
			
		||||
      onlyData: false,
 | 
			
		||||
      onComplete: (data) => {
 | 
			
		||||
        if (data && data.IsSuccessful && data.Data && (data.Data.ListC || data.Data.ListSafeCheckYearMonth)) {
 | 
			
		||||
          var countTypeTitle = []
 | 
			
		||||
          var countTypeDataIndex = []
 | 
			
		||||
          var columnsTb = []
 | 
			
		||||
          if (data.Data.ListSafeCheckYearMonth != null && data.Data.ListSafeCheckYearMonth.length > 0) {
 | 
			
		||||
            countTypeTitle = data.Data.ListSafeCheckYearMonth[0].listName
 | 
			
		||||
        if (
 | 
			
		||||
          data &&
 | 
			
		||||
          data.IsSuccessful &&
 | 
			
		||||
          data.Data &&
 | 
			
		||||
          (data.Data.ListC || data.Data.ListSafeCheckYearMonth)
 | 
			
		||||
        ) {
 | 
			
		||||
          var countTypeTitle = [];
 | 
			
		||||
          var countTypeDataIndex = [];
 | 
			
		||||
          var columnsTb = [];
 | 
			
		||||
          if (
 | 
			
		||||
            data.Data.ListSafeCheckYearMonth != null &&
 | 
			
		||||
            data.Data.ListSafeCheckYearMonth.length > 0
 | 
			
		||||
          ) {
 | 
			
		||||
            countTypeTitle = data.Data.ListSafeCheckYearMonth[0].listName;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          if (countTypeTitle.length < 1) {
 | 
			
		||||
            countTypeTitle.push('按时整改隐患')
 | 
			
		||||
            countTypeTitle.push('超期整改隐患')
 | 
			
		||||
            countTypeTitle.push('未整改隐患')
 | 
			
		||||
            countTypeTitle.push('隐患整改率')
 | 
			
		||||
            countTypeTitle.push("按时整改隐患");
 | 
			
		||||
            countTypeTitle.push("超期整改隐患");
 | 
			
		||||
            countTypeTitle.push("未整改隐患");
 | 
			
		||||
            countTypeTitle.push("隐患整改率");
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          var typeName = ['车间名称', '班组名称']
 | 
			
		||||
          var RowCount = 0
 | 
			
		||||
          var typeName = ["车间名称", "班组名称"];
 | 
			
		||||
          var RowCount = 0;
 | 
			
		||||
          for (let i = 0; i < 2; i++) {
 | 
			
		||||
            for (let j = 0; j < countTypeTitle.length; j++) {
 | 
			
		||||
              countTypeDataIndex.push(j)
 | 
			
		||||
              countTypeDataIndex.push(j);
 | 
			
		||||
              if (i == 0) {
 | 
			
		||||
                if (j == 0) {
 | 
			
		||||
                  //头部
 | 
			
		||||
                  columnsTb.push({
 | 
			
		||||
                    title: typeName[i],
 | 
			
		||||
                    dataIndex: "NUM",
 | 
			
		||||
                    key: (i * 10 + j),
 | 
			
		||||
                    key: i * 10 + j,
 | 
			
		||||
                    render: (value, record, index) => {
 | 
			
		||||
                      RowCount = record.Parent.RowCount
 | 
			
		||||
                      if (index > 0 && this.state.ListSafeCheckYearMonth[index - 1].Parent.DepartmentName == record.Parent.DepartmentName) {
 | 
			
		||||
                        RowCount = 0
 | 
			
		||||
                      RowCount = record.Parent.RowCount;
 | 
			
		||||
                      if (
 | 
			
		||||
                        index > 0 &&
 | 
			
		||||
                        this.state.ListSafeCheckYearMonth[index - 1].Parent
 | 
			
		||||
                          .DepartmentName == record.Parent.DepartmentName
 | 
			
		||||
                      ) {
 | 
			
		||||
                        RowCount = 0;
 | 
			
		||||
                      }
 | 
			
		||||
                      const obj = {
 | 
			
		||||
                        children: record.Parent.DepartmentName,
 | 
			
		||||
                        props: {
 | 
			
		||||
                          'rowSpan': RowCount
 | 
			
		||||
                          rowSpan: RowCount,
 | 
			
		||||
                        },
 | 
			
		||||
                      };
 | 
			
		||||
                      return obj;
 | 
			
		||||
                    }
 | 
			
		||||
                  })
 | 
			
		||||
                    },
 | 
			
		||||
                  });
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                //非头部
 | 
			
		||||
                if (countTypeTitle[j].indexOf('率') > -1) {
 | 
			
		||||
                if (countTypeTitle[j].indexOf("率") > -1) {
 | 
			
		||||
                  columnsTb.push({
 | 
			
		||||
                    title: countTypeTitle[j],
 | 
			
		||||
                    dataIndex: "NUM",
 | 
			
		||||
                    key: (i * 10 + j),
 | 
			
		||||
                    key: i * 10 + j,
 | 
			
		||||
                    render: (value, record, index) => {
 | 
			
		||||
                      RowCount = record.Parent.RowCount
 | 
			
		||||
                      if (index > 0 && this.state.ListSafeCheckYearMonth[index - 1].Parent.DepartmentName == record.Parent.DepartmentName) {
 | 
			
		||||
                        RowCount = 0
 | 
			
		||||
                      RowCount = record.Parent.RowCount;
 | 
			
		||||
                      if (
 | 
			
		||||
                        index > 0 &&
 | 
			
		||||
                        this.state.ListSafeCheckYearMonth[index - 1].Parent
 | 
			
		||||
                          .DepartmentName == record.Parent.DepartmentName
 | 
			
		||||
                      ) {
 | 
			
		||||
                        RowCount = 0;
 | 
			
		||||
                      }
 | 
			
		||||
                      const obj = {
 | 
			
		||||
                        children: <Progress percent={record.Parent.listCount[j] / 100} status="active" strokeColor={{ from: "#108ee9", to: "#108ee9" }} />,
 | 
			
		||||
                        children: (
 | 
			
		||||
                          <Progress
 | 
			
		||||
                            percent={record.Parent.listCount[j] / 100}
 | 
			
		||||
                            status="active"
 | 
			
		||||
                            strokeColor={{ from: "#108ee9", to: "#108ee9" }}
 | 
			
		||||
                          />
 | 
			
		||||
                        ),
 | 
			
		||||
                        props: {
 | 
			
		||||
                          'rowSpan': RowCount,
 | 
			
		||||
                          rowSpan: RowCount,
 | 
			
		||||
                        },
 | 
			
		||||
                      };
 | 
			
		||||
                      return obj;
 | 
			
		||||
                    }
 | 
			
		||||
                  })
 | 
			
		||||
                    },
 | 
			
		||||
                  });
 | 
			
		||||
                } else {
 | 
			
		||||
                  columnsTb.push({
 | 
			
		||||
                    title: countTypeTitle[j],
 | 
			
		||||
                    dataIndex: "NUM",
 | 
			
		||||
                    key: (i * 10 + j),
 | 
			
		||||
                    key: i * 10 + j,
 | 
			
		||||
                    render: (value, record, index) => {
 | 
			
		||||
                      RowCount = record.Parent.RowCount
 | 
			
		||||
                      if (index > 0 && this.state.ListSafeCheckYearMonth[index - 1].Parent.DepartmentName == record.Parent.DepartmentName) {
 | 
			
		||||
                        RowCount = 0
 | 
			
		||||
                      RowCount = record.Parent.RowCount;
 | 
			
		||||
                      if (
 | 
			
		||||
                        index > 0 &&
 | 
			
		||||
                        this.state.ListSafeCheckYearMonth[index - 1].Parent
 | 
			
		||||
                          .DepartmentName == record.Parent.DepartmentName
 | 
			
		||||
                      ) {
 | 
			
		||||
                        RowCount = 0;
 | 
			
		||||
                      }
 | 
			
		||||
                      const obj = {
 | 
			
		||||
                        children: record.Parent.listCount[j],
 | 
			
		||||
                        props: {
 | 
			
		||||
                          'rowSpan': RowCount
 | 
			
		||||
                          rowSpan: RowCount,
 | 
			
		||||
                        },
 | 
			
		||||
                      };
 | 
			
		||||
                      return obj;
 | 
			
		||||
                    },
 | 
			
		||||
                  });
 | 
			
		||||
                }
 | 
			
		||||
                  })
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
              } else {
 | 
			
		||||
                //班组
 | 
			
		||||
                if (j == 0) {
 | 
			
		||||
                  columnsTb.push({
 | 
			
		||||
                    title: typeName[i],
 | 
			
		||||
                    key: (i * 10 + j),
 | 
			
		||||
                    key: i * 10 + j,
 | 
			
		||||
                    render: (value, record, index) => {
 | 
			
		||||
                      const obj = {
 | 
			
		||||
                        children: record.DepartmentName,
 | 
			
		||||
                      };
 | 
			
		||||
                      return obj;
 | 
			
		||||
                    }
 | 
			
		||||
                  })
 | 
			
		||||
                    },
 | 
			
		||||
                  });
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if (countTypeTitle[j].indexOf('率') > -1) {
 | 
			
		||||
                if (countTypeTitle[j].indexOf("率") > -1) {
 | 
			
		||||
                  columnsTb.push({
 | 
			
		||||
                    title: countTypeTitle[j],
 | 
			
		||||
                    key: (i * 10 + j),
 | 
			
		||||
                    key: i * 10 + j,
 | 
			
		||||
                    render: (text, record) => (
 | 
			
		||||
                      <Progress
 | 
			
		||||
                        percent={record.listCount[j] / 100}
 | 
			
		||||
@ -173,25 +558,22 @@ class BI055HomeDetail extends React.Component {
 | 
			
		||||
                        strokeColor={{ from: "#108ee9", to: "#108ee9" }}
 | 
			
		||||
                      />
 | 
			
		||||
                    ),
 | 
			
		||||
                  })
 | 
			
		||||
 | 
			
		||||
                  });
 | 
			
		||||
                } else {
 | 
			
		||||
                  columnsTb.push({
 | 
			
		||||
                    title: countTypeTitle[j],
 | 
			
		||||
                    key: (i * 10 + j),
 | 
			
		||||
                    key: i * 10 + j,
 | 
			
		||||
                    render: (value, record, index) => {
 | 
			
		||||
                      const obj = {
 | 
			
		||||
                        children: record.listCount[j],
 | 
			
		||||
                      };
 | 
			
		||||
                      return obj;
 | 
			
		||||
                    }
 | 
			
		||||
                  })
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                    },
 | 
			
		||||
                  });
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
          this.setState({
 | 
			
		||||
            countTypeTitle: countTypeTitle,
 | 
			
		||||
@ -200,8 +582,7 @@ class BI055HomeDetail extends React.Component {
 | 
			
		||||
            ListSafeCheckYearMonth: data.Data.ListSafeCheckYearMonth,
 | 
			
		||||
          });
 | 
			
		||||
 | 
			
		||||
          this.safeChekDanger()
 | 
			
		||||
 | 
			
		||||
          this.safeChekDanger();
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
    });
 | 
			
		||||
@ -218,16 +599,39 @@ class BI055HomeDetail extends React.Component {
 | 
			
		||||
  // 安全检查和隐患整改
 | 
			
		||||
  safeChekDanger = () => {
 | 
			
		||||
    let xData = [];
 | 
			
		||||
    let ydata = [];
 | 
			
		||||
    let sourceName = [];
 | 
			
		||||
    if (this.state.ListC) {
 | 
			
		||||
      this.state.ListC.map((item) => {
 | 
			
		||||
        let name = item.NAME.split(",");
 | 
			
		||||
        xData.push(name);
 | 
			
		||||
        sourceName.push(item.SOURCENAME);
 | 
			
		||||
        let valu = item.Val.split(",");
 | 
			
		||||
        ydata.push(valu);
 | 
			
		||||
      });
 | 
			
		||||
    for (let i = 0; i < 12; i++) {
 | 
			
		||||
      xData.unshift(getSixMonth(-i, "-", ""));
 | 
			
		||||
    }
 | 
			
		||||
    let ydata = [
 | 
			
		||||
      ["3", "2", "2", "3", "2", "0", "2", "5", "6", "8", "0", "5"],
 | 
			
		||||
      ["5", "4", "0", "1", "0", "0", "1", "7", "1", "0", "0", "2"],
 | 
			
		||||
      ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"],
 | 
			
		||||
      [
 | 
			
		||||
        "100.00",
 | 
			
		||||
        "100.00",
 | 
			
		||||
        "100.00",
 | 
			
		||||
        "100.00",
 | 
			
		||||
        "100.00",
 | 
			
		||||
        "100.00",
 | 
			
		||||
        "100.00",
 | 
			
		||||
        "100.00",
 | 
			
		||||
        "100.00",
 | 
			
		||||
        "100.00",
 | 
			
		||||
        "100.00",
 | 
			
		||||
        "100.00",
 | 
			
		||||
      ],
 | 
			
		||||
    ];
 | 
			
		||||
    let sourceName = [
 | 
			
		||||
      ["按时整改隐患", "超期整改隐患", "未整改隐患", "隐患整改率"],
 | 
			
		||||
    ];
 | 
			
		||||
    // if (this.state.ListC) {
 | 
			
		||||
    // this.state.ListC.map((item) => {
 | 
			
		||||
    //   let name = item.NAME.split(",");
 | 
			
		||||
    //   xData.push(name);
 | 
			
		||||
    //   sourceName.push(item.SOURCENAME);
 | 
			
		||||
    //   let valu = item.Val.split(",");
 | 
			
		||||
    //   ydata.push(valu);
 | 
			
		||||
    // });
 | 
			
		||||
    let safeInspections = document.getElementById("safeInspection2");
 | 
			
		||||
    if (safeInspections) {
 | 
			
		||||
      let myChart = echarts.init(safeInspections);
 | 
			
		||||
@ -278,7 +682,7 @@ class BI055HomeDetail extends React.Component {
 | 
			
		||||
          },
 | 
			
		||||
          xAxis: {
 | 
			
		||||
            type: "category",
 | 
			
		||||
              data: xData[0],
 | 
			
		||||
            data: xData,
 | 
			
		||||
            axisLine: {
 | 
			
		||||
              lineStyle: {
 | 
			
		||||
                color: "#0c3b71",
 | 
			
		||||
@ -381,21 +785,37 @@ class BI055HomeDetail extends React.Component {
 | 
			
		||||
              // zlevel:100,
 | 
			
		||||
            },
 | 
			
		||||
          ],
 | 
			
		||||
          }
 | 
			
		||||
          , true
 | 
			
		||||
        },
 | 
			
		||||
        true
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
    }
 | 
			
		||||
    // }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  render() {
 | 
			
		||||
    return (
 | 
			
		||||
      <div style={{ backgroundColor: "white", width: "1200px", top: "0", bottom: "0", left: "0", right: "0", margin: "auto", borderStyle: "solid", borderColor: "#ccc", borderWidth: "1px" }}  >
 | 
			
		||||
      <div
 | 
			
		||||
        style={{
 | 
			
		||||
          backgroundColor: "white",
 | 
			
		||||
          width: "1200px",
 | 
			
		||||
          top: "0",
 | 
			
		||||
          bottom: "0",
 | 
			
		||||
          left: "0",
 | 
			
		||||
          right: "0",
 | 
			
		||||
          margin: "auto",
 | 
			
		||||
          borderStyle: "solid",
 | 
			
		||||
          borderColor: "#ccc",
 | 
			
		||||
          borderWidth: "1px",
 | 
			
		||||
        }}
 | 
			
		||||
      >
 | 
			
		||||
        <Row gutter={10} style={{ marginTop: "44px" }}>
 | 
			
		||||
          <Col span={1}> </Col>
 | 
			
		||||
          <Col span={22}>
 | 
			
		||||
            <div style={{ border: "1px solid rgb(232,232,232)" }}>
 | 
			
		||||
              <div id="safeInspection2" style={{ width: "100%", height: "350px" }}></div>
 | 
			
		||||
              <div
 | 
			
		||||
                id="safeInspection2"
 | 
			
		||||
                style={{ width: "100%", height: "350px" }}
 | 
			
		||||
              ></div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </Col>
 | 
			
		||||
          <Col span={1}></Col>
 | 
			
		||||
@ -404,7 +824,15 @@ class BI055HomeDetail extends React.Component {
 | 
			
		||||
          <Col span={1}></Col>
 | 
			
		||||
          <Col span={22} style={{ height: "100%" }}>
 | 
			
		||||
            <div className="bi001-table">
 | 
			
		||||
              <Table dataSource={this.state.ListSafeCheckYearMonth} columns={this.state.columnsTb} pagination={false} bordered loading={this.state.showLoading} size="small" rowKey="1" />
 | 
			
		||||
              <Table
 | 
			
		||||
                dataSource={this.state.ListSafeCheckYearMonth}
 | 
			
		||||
                columns={this.state.columnsTb}
 | 
			
		||||
                pagination={false}
 | 
			
		||||
                bordered
 | 
			
		||||
                loading={this.state.showLoading}
 | 
			
		||||
                size="small"
 | 
			
		||||
                rowKey="1"
 | 
			
		||||
              />
 | 
			
		||||
            </div>
 | 
			
		||||
          </Col>
 | 
			
		||||
          <Col span={1}></Col>
 | 
			
		||||
@ -414,4 +842,4 @@ class BI055HomeDetail extends React.Component {
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
export default connect(({ login, app }) => ({ login, app }))(BI055HomeDetail)
 | 
			
		||||
export default connect(({ login, app }) => ({ login, app }))(BI055HomeDetail);
 | 
			
		||||
 | 
			
		||||
@ -10,6 +10,7 @@ import {
 | 
			
		||||
  extendRule,
 | 
			
		||||
  extend,
 | 
			
		||||
  extendOrder,
 | 
			
		||||
  getSixMonth
 | 
			
		||||
} from "../utils/common";
 | 
			
		||||
import "./home.less";
 | 
			
		||||
// 组件库
 | 
			
		||||
@ -189,10 +190,6 @@ class Home extends React.Component {
 | 
			
		||||
      currentpageIndex: "1",
 | 
			
		||||
      visibleStartTime: [],
 | 
			
		||||
      visibleEndTime: [],
 | 
			
		||||
      mineType:
 | 
			
		||||
        localStorage.getItem("currentMineType") === "20"
 | 
			
		||||
          ? "10"
 | 
			
		||||
          : localStorage.getItem("currentMineType"),
 | 
			
		||||
      detailForm: {
 | 
			
		||||
        isShow: false,
 | 
			
		||||
        formCode: "",
 | 
			
		||||
@ -250,16 +247,16 @@ class Home extends React.Component {
 | 
			
		||||
    this.dangerChange();
 | 
			
		||||
    this.getUser();
 | 
			
		||||
  }
 | 
			
		||||
  getSixMonth = (number, yearString = "", monthString = "") => {
 | 
			
		||||
    let nowdate = new Date();
 | 
			
		||||
    nowdate.setMonth(nowdate.getMonth() + number);
 | 
			
		||||
    let y = nowdate.getFullYear();
 | 
			
		||||
    let m = nowdate.getMonth() + 1;
 | 
			
		||||
    // let d = nowdate.getDate();
 | 
			
		||||
    let retrundate = y + yearString + m + monthString;
 | 
			
		||||
  // getSixMonth = (number, yearString = "", monthString = "") => {
 | 
			
		||||
  //   let nowdate = new Date();
 | 
			
		||||
  //   nowdate.setMonth(nowdate.getMonth() + number);
 | 
			
		||||
  //   let y = nowdate.getFullYear();
 | 
			
		||||
  //   let m = nowdate.getMonth() + 1;
 | 
			
		||||
  //   // let d = nowdate.getDate();
 | 
			
		||||
  //   let retrundate = y + yearString + m + monthString;
 | 
			
		||||
 | 
			
		||||
    return retrundate;
 | 
			
		||||
  };
 | 
			
		||||
  //   return retrundate;
 | 
			
		||||
  // };
 | 
			
		||||
  showAll = (key) => {
 | 
			
		||||
    const { tableData } = this.state;
 | 
			
		||||
 | 
			
		||||
@ -617,7 +614,7 @@ class Home extends React.Component {
 | 
			
		||||
    ];
 | 
			
		||||
    let xData = [];
 | 
			
		||||
    for (let i = 0; i < 12; i++) {
 | 
			
		||||
      xData.unshift(this.getSixMonth(-i, "年", "月"));
 | 
			
		||||
      xData.unshift(getSixMonth(-i, "年", "月"));
 | 
			
		||||
    }
 | 
			
		||||
    for (let i = 0; i < data3.length; i++) {
 | 
			
		||||
      series.push({
 | 
			
		||||
@ -727,7 +724,7 @@ class Home extends React.Component {
 | 
			
		||||
    let month = date.getMonth() + 1;
 | 
			
		||||
    let xData = [];
 | 
			
		||||
    for (let i = 0; i < 6; i++) {
 | 
			
		||||
      xData.unshift(this.getSixMonth(-i, "-", ""));
 | 
			
		||||
      xData.unshift(getSixMonth(-i, "-", ""));
 | 
			
		||||
    }
 | 
			
		||||
    let dangerChanges = document.getElementById("dangerChange");
 | 
			
		||||
    if (dangerChanges) {
 | 
			
		||||
@ -1217,13 +1214,8 @@ class Home extends React.Component {
 | 
			
		||||
  };
 | 
			
		||||
  ExpandCancel = () => {};
 | 
			
		||||
  showDetailModal = (formCode) => {
 | 
			
		||||
    console.log(this.state.mineType,'this.state.mineType')
 | 
			
		||||
    var titleTemp =
 | 
			
		||||
      this.state.mineType == 20
 | 
			
		||||
        ? "尾矿库"
 | 
			
		||||
        : this.state.mineType == 10
 | 
			
		||||
        ? "选矿厂"
 | 
			
		||||
        : "露天矿";
 | 
			
		||||
    var titleTemp =''
 | 
			
		||||
      
 | 
			
		||||
    if (formCode == "BI054_HOMEDETAIL") {
 | 
			
		||||
      titleTemp += "安全检查次数统计(近12月)";
 | 
			
		||||
    } else if (formCode == "BI055_HOMEDETAIL") {
 | 
			
		||||
@ -1239,7 +1231,6 @@ class Home extends React.Component {
 | 
			
		||||
    const newtmpData = {
 | 
			
		||||
      data: {
 | 
			
		||||
        id: guid(),
 | 
			
		||||
        mineType: this.state.mineType,
 | 
			
		||||
        onCancel: this.ExpandCancel,
 | 
			
		||||
        homeReload: true,
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1334
									
								
								src/utils/common.js
									
									
									
									
									
								
							
							
						
						
									
										1334
									
								
								src/utils/common.js
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user