diff --git a/src/components/CustomPages/BI/BI056Dilg1_1.js b/src/components/CustomPages/BI/BI056Dilg1_1.js new file mode 100644 index 0000000..1d7e0f0 --- /dev/null +++ b/src/components/CustomPages/BI/BI056Dilg1_1.js @@ -0,0 +1,656 @@ +import React, { useState, useEffect, useRef, Component } from "react"; +import { connect } from "dva"; +import { initFilter, extendOrder, guid } from "../../../utils/common"; +import { Row, Col, Modal, Table, Button, Select, DatePicker, message } from "antd"; +import echarts from "echarts"; +import moment from "moment"; +import IconFont from "../../../utils/iconFont"; +import { T } from "antd/lib/upload/utils"; + +// 年度安全检查统计 弹窗 年度安全检查统计 按月 按生产单元 +class BI056Dilg1_1 extends React.Component { + constructor(props) { + super(props); + this.state = { + ColorShow: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"], + isShow1: false, + isShow2: false, + dtStart: null,//开始时间 + dtEnd: null,//结束时间 + mineType: 0,//生产单元 + detailForm: { + formCode: "", + title: "", + }, + ret: { + IsSuccessful: true, + Data: { + checkMineType1_1: { + mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"], + legendName: ["公司级", "部门级", "车间级", "班组级"], + axisLabelMonth: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + checkCountMonth: [ + //公司级 各生产单元mineTypeName 1月~12月 + [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]], + //部门级 各生产单元mineTypeName 1月~12月 + [[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]], + //车间级 各生产单元mineTypeName 1月~12月 + [[9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]], + //班组级 各生产单元mineTypeName 1月~12月 + [[12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12], [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12], [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12], [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12]], + ], + + checkCount: [ + [[1, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]], + [[2, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]], + [[3, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]], + [[4, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]] + // , + // [[5, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]], + // [[6, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]] + // [[7, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]], + // [[8, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]], + // [[9, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]], + // [[10, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]], + // [[11, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]], + // [[12, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]], + ] + , + // axisLabelMonth: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + // checkCount: [[3, 3, 3, 3,3, 3, 3, 3,3, 3, 3, 3], [12, 12, 12, 6,12, 12, 12, 6,12, 12, 12, 6], [24, 24, 24, 12,24, 24, 24, 12,24, 24, 24, 12], [90, 90, 120, 36,90, 90, 120, 36,90, 90, 120, 36]], + // checkCount: [[3, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36], [90, 90, 120, 36], [90, 90, 120, 36], [90, 90, 120, 36], [90, 90, 120, 36], [90, 90, 120, 36], [90, 90, 120, 36], [90, 90, 120, 36]], + + }, + + // riskMineType1_2: { + // legendName: ["露天矿", "选矿厂", "尾矿库", "职能部门"], + // riskCount: [16, 23, 8, 1], + // }, + // riskDealMonth2_1: { + // legendName: ['已整改', '未整改', '整改率'], + // xAxisName: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + // countDeal: [5, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6], + // countNotDeal: [0, 1, 1, 2, 3, 2, 0, 1, 3, 3, 3, 2], + // linePercent: [100.00, 90.00, 87.5, 60.00, 75.00, 86.67, 100.00, 88.89, 62.50, 70.00, 72.73, 66.67] + // }, + // riskTop2_2: { + // yAxisName: ["隐患名称", "电机车轨道枕木下沉", "电机车刹车闸瓦磨损", "电机车导线线夹断裂", "电机车轨道断裂", "电机车刹车泵漏气"], + // count: [31, 22, 19, 15, 8, 5], + // }, + // checkTypeMineType3_1: { + // legendName: ["露天矿", "选矿厂", "尾矿库", "职能部门"], + // xAxisName: ["巡回检查", "例行检查", "专业检查", "综合检查", "日常巡检", "防洪安全检查", "坝体安全检查", "库区安全检查", "重大事故隐患专项排查"], + // arrayCount: [[1200, 1200, 300, 500, 0, 0, 0, 0, 100], [500, 1500, 300, 500, 0, 0, 0, 0, 0], [0, 0, 100, 10, 800, 800, 800, 500, 100], [30, 30, 60, 50, 20, 10, 0, 0, 0]], + // }, + // checkTypeRiskMineType3_2: { + // legendName: ["露天矿", "选矿厂", "尾矿库", "职能部门"], + // xAxisName: ["巡回检查", "例行检查", "专业检查", "综合检查", "日常巡检", "防洪安全检查", "坝体安全检查", "库区安全检查", "重大事故隐患专项排查"], + // arrayCount: [[10, 10, 3, 5, 0, 0, 0, 0, 1], [15, 15, 3, 5, 0, 0, 0, 0, 0], [0, 0, 1, 10, 20, 10, 9, 5, 1], [1, 2, 3, 2, 0, 0, 0, 0, 0]] + // } + } + } + } + } + + componentDidMount() { + this.getBaseInfoData(); + } + + //获取数据 + getBaseInfoDataOnline = (mineType) => { + const json2 = initFilter(this.props.login.OrgId); + extendOrder(json2, "CREATE_TIME", 1); + json2.Parameter1 = mineType; + this.props.dispatch({ + type: "app/getDataByPost", + url: "BI/BIController/getRiskPerformanceData", + payload: json2, + onlyData: false, + onComplete: (ret) => { + this.CheckCount1_1(ret?.Data.checkMineType1_1); + // this.RiskCount1_2(ret?.Data.riskMineType1_2, this.state.ColorShow); + // this.RiskCount1_22(ret?.Data.riskMineType1_2, this.state.ColorShow); + // this.RiskTop2_2(ret?.Data.riskTop2_2, this.state.ColorShow); + // this.CheckTypeCount3(ret?.Data.checkTypeMineType3_1, "divCheckTypeCount3_1"); + // this.CheckTypeCount3(ret?.Data.checkTypeRiskMineType3_2, "divCheckTypeRiskCount3_2"); + }, + }); + }; + getBaseInfoData = (mineType) => { + // this.CheckCount1_1(this.state.ret.Data.checkMineType1_1); + this.CheckCount(this.state.ret.Data.checkMineType1_1); + // this.RiskCount1_2(this.state.ret.Data.riskMineType1_2, this.state.ColorShow); + // this.RiskCount1_22(this.state.ret.Data.riskMineType1_2, this.state.ColorShow); + + // //动态处理数据 + // var countDeal = [] + // var countNotDeal = [] + // var linePercent = [] + // var month = (new Date()).getMonth() + 1//取当前月 + // for (var i = 0; i < month; i++) { + // countDeal.push(this.state.ret.Data.riskDealMonth2_1.countDeal[i]) + // countNotDeal.push(this.state.ret.Data.riskDealMonth2_1.countNotDeal[i]) + // linePercent.push(this.state.ret.Data.riskDealMonth2_1.linePercent[i]) + // } + // this.state.ret.Data.riskDealMonth2_1.countDeal = countDeal + // this.state.ret.Data.riskDealMonth2_1.countNotDeal = countNotDeal + // this.state.ret.Data.riskDealMonth2_1.linePercent = linePercent + // this.RiskDeal2_1(this.state.ret.Data.riskDealMonth2_1); + // //动态处理数据 + + // this.RiskTop2_2(this.state.ret.Data.riskTop2_2, this.state.ColorShow); + // this.CheckTypeCount3(this.state.ret.Data.checkTypeMineType3_1, "divCheckTypeCount3_1"); + // this.CheckTypeCount3(this.state.ret.Data.checkTypeRiskMineType3_2, "divCheckTypeRiskCount3_2"); + }; + + CheckCount1_1 = (Data) => { + let divCheckCount = document.getElementById("divCheckCount"); + if (divCheckCount) { + let myChart = echarts.init(divCheckCount); + + var seriesShow = [] + var month = 4 + var legendNameCount = Data.legendName.length + var axisLabelMonth = [] + for (var i = 0; i < month; i++) { + axisLabelMonth.push(Data.axisLabelMonth[i]) + } + debugger + + + for (var i = 0; i < month; i++) { + + for (var j = 0; j < legendNameCount; j++) { + + series.push({ + name: Data.legendName[i], + type: "bar", + stack: "总量", + label: { + show: true, + position: "insideRight", + }, + data: Data.arrayCount[i],//.slice(0, 10), + itemStyle: { color: this.state.ColorShow[i] }, + barWidth: 30 + }) + + // seriesShow.push({ + // name: Data.legendName[j], + // type: "bar", + // data: Data.checkCount[i][j], + // itemStyle: { color: this.state.ColorShow[j] }, + // barWidth: 25,//横轴的柱状图宽度 + // label: { + // normal: { + // show: true, + // position: 'top', // 或者 'inside'(内部)、'insideLeft'、'insideRight' 等其他位置 + // formatter: '{c}', // 使用变量 {c} 表示数值,也可以自定义格式化函数 + // textStyle: { + // fontSize: 12, // 字体大小 + // color: '#333', // 字体颜色 + // }, + // }, + // }, + // }) + } + } + myChart.setOption( + { + // title: { + // text: "生产单元", + // left: "center", + // }, + tooltip: { + trigger: "axis", + axisPointer: { + // 坐标轴指示器,坐标轴触发有效 + type: "shadow", // 默认为直线,可选为:'line' | 'shadow' + }, + + + formatter: function (value) { + var tooltipShow = '' + if (value.length > 0) { + tooltipShow += value[0].axisValueLabel + '
' + for (var i = 0; i < value.length; i++) { + tooltipShow += value[i].marker + value[i].seriesName + ":" + value[i].value + if (i > 0 && (i + 1) % 4 == 0) + tooltipShow += "
" + else + tooltipShow += "  " + // if (value[i].componentSubType == "bar") { + // tooltipShow += value[i].marker + value[i].seriesName + ":" + value[i].value + "
" + // } else { + // tooltipShow += value[i].marker + value[i].seriesName + ":" + value[i].value + "%" + // } + } + } + return tooltipShow + } + + + + }, + legend: { + left: "center", + align: "left", + bottom: "2%", + textStyle: { + color: "#000", + }, + itemWidth: 10, + itemHeight: 10, + data: Data.legendName, + }, + grid: { + left: "3%", + right: "3%", + bottom: "12%", + top: "10%", + containLabel: true, + }, + xAxis: [ + { + type: "category", + data: Data.mineTypeName, + } + , { + position: 'bottom', // 将分组x轴位置定至底部,不然默认在顶部 + offset: 70, // 向下偏移,使分组文字显示位置不与原x轴重叠 + axisLine: { + show: false // 隐藏分组x轴的轴线 + }, + axisTick: { + show: false, + length: 55, // 延长刻度线做分组线 + inside: true, // 使刻度线相对轴线在上面与原x轴相接,默认在轴线下方 + lineStyle: { + color: '#ff9800' + }, // 非必须,仅为了演示,明显标示出分组刻度线 + + }, + axisLabel: { + inside: true, // 使刻度名称相对轴线在上面与原x轴相接,默认在轴线下方 + interval: 0, // 强制显示全部刻度名 + formatter: function (val, index) { + // console.log('测试999 val--- ', val); + // console.log('测试999 index--- ', index); + return ' ' + val // 这儿可以根据 返回 空字符串,来调整 第二个 x 轴值出现的位置。 + } + }, + data: axisLabelMonth// ['20日', '21日', '22日', '23日'] + } + ], + yAxis: [ + { + type: "value", + }, + ], + series: seriesShow + // [ + // { + // // name: "公司级", + // type: "bar", + // data: Data.checkCount[0], + // itemStyle: { color: this.state.ColorShow[0] }, + // barWidth: 15,//横轴的柱状图宽度 + // label: { + // normal: { + // show: true, + // position: 'top', // 或者 'inside'(内部)、'insideLeft'、'insideRight' 等其他位置 + // formatter: '{c}', // 使用变量 {c} 表示数值,也可以自定义格式化函数 + // textStyle: { + // fontSize: 12, // 字体大小 + // color: '#333', // 字体颜色 + // }, + // }, + // }, + // // barWidth: 30 + // }, + // { + // // name: "部门级", + // type: "bar", + // data: Data.checkCount[1], + // barWidth: 15,//横轴的柱状图宽度 + // itemStyle: { color: this.state.ColorShow[1] }, + // label: { + // normal: { + // show: true, + // position: 'top', // 或者 'inside'(内部)、'insideLeft'、'insideRight' 等其他位置 + // formatter: '{c}', // 使用变量 {c} 表示数值,也可以自定义格式化函数 + // textStyle: { + // fontSize: 12, // 字体大小 + // color: '#333', // 字体颜色 + // }, + // }, + // }, + // }, + // { + // // name: "车间级", + // type: "bar", + // data: Data.checkCount[2], + // barWidth: 15,//横轴的柱状图宽度 + // itemStyle: { color: this.state.ColorShow[2] }, + // label: { + // normal: { + // show: true, + // position: 'top', // 或者 'inside'(内部)、'insideLeft'、'insideRight' 等其他位置 + // formatter: '{c}', // 使用变量 {c} 表示数值,也可以自定义格式化函数 + // textStyle: { + // fontSize: 12, // 字体大小 + // color: '#333', // 字体颜色 + // }, + // }, + // }, + // }, + // { + // // name: "班组级", + // type: "bar", + // data: Data.checkCount[3], + // barWidth: 15,//横轴的柱状图宽度 + // itemStyle: { color: this.state.ColorShow[3] }, + // label: { + // normal: { + // show: true, + // position: 'top', // 或者 'inside'(内部)、'insideLeft'、'insideRight' 等其他位置 + // formatter: '{c}', // 使用变量 {c} 表示数值,也可以自定义格式化函数 + // textStyle: { + // fontSize: 12, // 字体大小 + // color: '#333', // 字体颜色 + // }, + // }, + // }, + // }, + // ], + }, + true + ); + } + }; + + + CheckCount = (Data) => { + let divShow = document.getElementById("divCheckCount"); + if (divShow) { + let myChart = echarts.init(divShow); + + + + + var series = [] + for (let i = 0; i < Data.legendName.length; i++) { + series.push({ + name: Data.legendName[i], + type: "bar", + stack: "总量", + label: { + show: true, + position: "insideRight", + }, + data: Data.checkCountMonth[i],//.slice(0, 10), + itemStyle: { color: this.state.ColorShow[i] }, + barWidth: 30 + }) + } + + myChart.setOption( + { + tooltip: { + trigger: "axis", + axisPointer: { + // 坐标轴指示器,坐标轴触发有效 + type: "shadow", // 默认为直线,可选为:'line' | 'shadow' + }, + }, + legend: { + left: "center", + align: "left", + bottom: "2%", + textStyle: { + color: "#000", + }, + itemWidth: 10, + itemHeight: 10, + data: Data.legendName, + }, + grid: { + left: "3%", + right: "5%", + bottom: "12%", + top: "10%", + containLabel: true, + }, + xAxis: { + type: "category", + data: Data.xAxisName,//.slice(0, 10), + axisLabel: { + interval: 0, + rotate: 20, + formatter: function (value) { + return value + } + } + }, + yAxis: { + type: "value", + }, + series: series + }, + true + ); + } + }; + + + + + + + + + + // https://echarts.apache.org/examples/zh/editor.html?c=bar-label-rotation + // const posList = [ + // 'left', + // 'right', + // 'top', + // 'bottom', + // 'inside', + // 'insideTop', + // 'insideLeft', + // 'insideRight', + // 'insideBottom', + // 'insideTopLeft', + // 'insideTopRight', + // 'insideBottomLeft', + // 'insideBottomRight' + // ]; + // app.configParameters = { + // rotate: { + // min: -90, + // max: 90 + // }, + // align: { + // options: { + // left: 'left', + // center: 'center', + // right: 'right' + // } + // }, + // verticalAlign: { + // options: { + // top: 'top', + // middle: 'middle', + // bottom: 'bottom' + // } + // }, + // position: { + // options: posList.reduce(function (map, pos) { + // map[pos] = pos; + // return map; + // }, {}) + // }, + // distance: { + // min: 0, + // max: 100 + // } + // }; + // app.config = { + // rotate: 90, + // align: 'left', + // verticalAlign: 'middle', + // position: 'insideBottom', + // distance: 15, + // onChange: function () { + // const labelOption = { + // rotate: app.config.rotate, + // align: app.config.align, + // verticalAlign: app.config.verticalAlign, + // position: app.config.position, + // distance: app.config.distance + // }; + // myChart.setOption({ + // series: [ + // { + // label: labelOption + // }, + // { + // label: labelOption + // }, + // { + // label: labelOption + // }, + // { + // label: labelOption + // } + // ] + // }); + // } + // }; + // const labelOption = { + // show: true, + // position: app.config.position, + // distance: app.config.distance, + // align: app.config.align, + // verticalAlign: app.config.verticalAlign, + // rotate: app.config.rotate, + // formatter: '{c} {name|{a}}', + // fontSize: 16, + // rich: { + // name: {} + // } + // }; + // option = { + // tooltip: { + // trigger: 'axis', + // axisPointer: { + // type: 'shadow' + // } + // }, + // legend: { + // data: ['Forest', 'Steppe', 'Desert', 'Wetland']//, 'Forest2', 'Steppe2', 'Desert2', 'Wetland2' + // }, + // toolbox: { + // show: true, + // orient: 'vertical', + // left: 'right', + // top: 'center', + // feature: { + // mark: { show: true }, + // dataView: { show: true, readOnly: false }, + // magicType: { show: true, type: ['line', 'bar', 'stack'] }, + // restore: { show: true }, + // saveAsImage: { show: true } + // } + // }, + // xAxis: [ + // { + // type: 'category', + // axisTick: { show: false }, + // data: ['2012', '2013', '2014', '2015' , '2016' ,'2022', '2023', '2024', '2025', '2026']//'2012', '2013', '2014', '2015' + // } + // ], + // yAxis: [ + // { + // type: 'value' + // } + // ], + // series: [ + // { + // name: 'Forest', + // type: 'bar', + // barGap: 0, + // label: labelOption, + // emphasis: { + // focus: 'series' + // }, + // data: [320, 332, 301, 334, 390 ,320, 332, 301, 334, 390] + // }, + // { + // name: 'Steppe', + // type: 'bar', + // label: labelOption, + // emphasis: { + // focus: 'series' + // }, + // data: [220, 182, 191, 234, 290 ,220, 182, 191, 234, 290] + // }, + // { + // name: 'Desert', + // type: 'bar', + // label: labelOption, + // emphasis: { + // focus: 'series' + // }, + // data: [150, 232, 201, 154, 190 ,150, 232, 201, 154, 190] + // }, + // { + // name: 'Wetland', + // type: 'bar', + // label: labelOption, + // emphasis: { + // focus: 'series' + // }, + // data: [98, 77, 101, 99, 40 ,98, 77, 101, 99, 40] + // }, + // ] + // }; + + + + render() { + return ( +
+ + {/* 第一行 */} + + +
+
+
+
安全检查次数统计
+
+
+
+ +
+ +
+
+ ); + } +} +export default connect(({ login, app }) => ({ login, app }))(BI056Dilg1_1); \ No newline at end of file diff --git a/src/components/CustomPages/BI/BI056Performance.js b/src/components/CustomPages/BI/BI056Performance.js index 30859a3..ef2c036 100644 --- a/src/components/CustomPages/BI/BI056Performance.js +++ b/src/components/CustomPages/BI/BI056Performance.js @@ -5,21 +5,20 @@ import { Row, Col, Modal, Table, Button, Select, DatePicker, message } from "ant import echarts from "echarts"; import moment from "moment"; import IconFont from "../../../utils/iconFont"; -import { T } from "antd/lib/upload/utils"; +import FormPage from '../../../components/FormPage' class BI056Performance extends React.Component { constructor(props) { super(props); this.state = { ColorShow: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"], - isShow1: false, - isShow2: false, dtStart: null,//开始时间 dtEnd: null,//结束时间 mineType: 0,//生产单元 detailForm: { formCode: "", title: "", + isShow: false, }, ret: { IsSuccessful: true, @@ -357,7 +356,6 @@ class BI056Performance extends React.Component { type: "shadow", // 默认为直线,可选为:'line' | 'shadow' }, formatter: function (value) { - debugger var tooltipShow = '' if (value.length > 0) { tooltipShow += value[0].axisValueLabel + '
' @@ -708,84 +706,59 @@ class BI056Performance extends React.Component { } }; - //显示详情弹窗 + //显示详情弹窗 参考 BS064ShowPrint showDetailModal = (formCode) => { - var titleTemp = - this.state.mineType == 20 - ? "尾矿库" - : this.state.mineType == 10 - ? "选矿厂" - : "露天矿"; - if (formCode == "风险类别1") { - titleTemp += "风险类别"; - this.chart25(this.state.ret.Data.CHARTLIST[1]); - this.setState({ isShow2: true }) - } else if (formCode == "风险类别2") { - titleTemp += "风险类别"; - this.chart21(this.state.ret.Data.RISKTYPELIST[0], "露天矿", "1", "1", "1", "1"); - this.chart22(this.state.ret.Data.RISKTYPELIST[1], "选矿厂", "1", "1", "1", "1"); - this.chart23(this.state.ret.Data.RISKTYPELIST[2], "尾矿库", "1", "1", "1", "1"); - this.chart24(this.state.ret.Data.RISKTYPELIST[3], "职能部门", "1", "1", "1", "1"); - this.setState({ isShow1: true }) - } - else if (formCode == "生产单元") { - this.setState({ isShow1: true }) - titleTemp += "生产单元"; - this.chart21(this.state.ret.Data.CHARTLIST[3], "露天矿", "1", "2", "3", "4"); - this.chart22(this.state.ret.Data.CHARTLIST[3], "选矿厂", "1", "2", "3", "4"); - this.chart23(this.state.ret.Data.CHARTLIST[3], "尾矿库", "1", "2", "3", "4"); - this.chart24(this.state.ret.Data.CHARTLIST[3], "职能部门", "1", "2", "3", "4"); - } else if (formCode == "层级") { - this.setState({ isShow1: true }) - titleTemp += "层级"; - this.chart21(this.state.ret.Data.CHARTLIST[0], "公司", "1", "2", "3", "4"); - this.chart22(this.state.ret.Data.CHARTLIST[0], "部门", "1", "2", "3", "4"); - this.chart23(this.state.ret.Data.CHARTLIST[0], "车间", "1", "2", "3", "4"); - this.chart24(this.state.ret.Data.CHARTLIST[0], "班组", "1", "2", "3", "4"); - } else if (formCode == "责任单位") { - this.setState({ isShow1: true }) - titleTemp += "责任单位"; - this.chart21(this.state.ret.Data.TEAMLIST[0], "露天矿", "1", "1", "1", "1"); - this.chart22(this.state.ret.Data.TEAMLIST[1], "选矿厂", "1", "1", "1", "1"); - this.chart23(this.state.ret.Data.TEAMLIST[2], "尾矿库", "1", "1", "1", "1"); - this.chart24(this.state.ret.Data.TEAMLIST[3], "职能部门", "1", "1", "1", "1"); - } else if (formCode == "区域") { - this.setState({ isShow1: true }) - titleTemp += "区域"; - this.chart21(this.state.ret.Data.AREALIST[0], "露天矿", "1", "1", "1", "1"); - this.chart22(this.state.ret.Data.AREALIST[1], "选矿厂", "1", "1", "1", "1"); - this.chart23(this.state.ret.Data.AREALIST[2], "尾矿库", "1", "1", "1", "1"); - this.chart24(this.state.ret.Data.AREALIST[3], "职能部门", "1", "1", "1", "1"); - } - + var titleTemp = "年度安全检查明细" const newtmpData = { data: { id: guid(), mineType: this.state.mineType, - onCancel: this.handleCancel, + dtStart: this.state.dtStart, + dtEnd: this.state.dtEnd, homeReload: true, }, formCode: formCode, }; this.setState({ tmpData: newtmpData }, () => { var detailForm = { - formCode: formCode, title: titleTemp, + isShow: true }; this.setState({ detailForm: detailForm, }); }); }; + + // //显示详情弹窗 + // showDetailModal = (SUBMIT_CONTENT_ID) => { + // const newtmpData = { + // data: { + // id: SUBMIT_CONTENT_ID,//必须动态参数 这个会影响页面去后台操作数据 '00000000-0000-0000-0000-000000000000' 或者 ''都不行 + // SUBMIT_CONTENT_ID: SUBMIT_CONTENT_ID, + // }, + // formCode: "BS044_SHOWPRINT", + // }; + // this.setState({ tmpData: newtmpData }, () => { + // var detailForm = { + // isShow: true, + // title: "隐患整改单", + // }; + // this.setState({ + // detailForm: detailForm, + // }); + // }); + // }; + + //详情弹窗关闭(隐藏) detailFormClose = () => { var detailForm = { formCode: "", title: "", + isShow: false }; this.setState({ - isShow1: false, - isShow2: false, detailForm: detailForm, }); }; @@ -806,7 +779,7 @@ class BI056Performance extends React.Component { }} >
-
- + */} -
+
@@ -850,7 +823,7 @@ class BI056Performance extends React.Component {
年度安全检查统计
-
this.showDetailModal("年度安全检查统计")}> +
this.showDetailModal("BI056_DILG1_1")}>
diff --git a/src/components/CustomPages/CM/CM023ShowPrint.js b/src/components/CustomPages/CM/CM023ShowPrint.js index 033515f..ad31425 100644 --- a/src/components/CustomPages/CM/CM023ShowPrint.js +++ b/src/components/CustomPages/CM/CM023ShowPrint.js @@ -77,10 +77,10 @@ class CM023ShowPrint extends React.Component { extendInclude(json, 'Nav_User') extendInclude(json, 'Nav_UserReport') extendInclude(json, 'Nav_DepartmentReport') - extendInclude(json, 'Nav_AccidentType') + // extendInclude(json, 'Nav_AccidentType') extendInclude(json, 'Nav_ListJoin.Nav_User') extendInclude(json, 'Nav_ListRspConditions.Nav_RspEstimateCondition') - extendInclude(json, 'Nav_ListEventKind.Nav_RspAccdentKind') + // extendInclude(json, 'Nav_ListEventKind.Nav_RspAccdentKind') extendInclude(json, 'Nav_ListEstimate.Nav_User.Nav_UserSignFiles.Nav_ImgFile.Nav_File') extendInclude(json, 'Nav_Approve.Nav_ApproveDetails.Nav_ApproveUser.Nav_UserSignFiles.Nav_ImgFile.Nav_File') extendIgnoreDataRule(json) @@ -151,10 +151,10 @@ class CM023ShowPrint extends React.Component { {data.ACCIDENT_PLACE} {data.Nav_UserReport.NAME} {data.Nav_DepartmentReport.NAME} - {data.Nav_ListEventKind?.map((item, i) => { + {/* {data.Nav_ListEventKind?.map((item, i) => { return (i > 0 ? ',' : '') + item.Nav_RspAccdentKind.NAME - })} - {data.Nav_AccidentType.NAME} + })} */} + {/* {data.Nav_AccidentType.NAME} */} {enums.AEAccidentLevel.enums[data.ACCIDENT_LEVEL]} {data.DESC} {data.RSP_START_TIME} diff --git a/src/files/edit/CM023.js b/src/files/edit/CM023.js index c0fc24f..01e90f2 100644 --- a/src/files/edit/CM023.js +++ b/src/files/edit/CM023.js @@ -56,23 +56,24 @@ export default { } }, - onChange: ({ stateData, login, setRowFieldVisible, value, colInfo, setFieldVisible, setFieldValue, dispatch, setFieldValueByBatch, getSubTableData, updateSubTableData }) => { - if (colInfo != null && colInfo.FIELD_NAME == "EVENT_NAME") { - //选择事故事件 - let json = initFilter(login.OrgId); - extendRule(json, 'EventID', 1, stateData.EVENT_ID); - extendRule(json, 'ID', 1, stateData.ID); - dispatch({ - type: 'app/getDataByPost', - url: 'CM/CMRspEstimate/GetEventKinds', - payload: json, - onlyData: false, - onComplete: (ret) => { - if (ret && ret.IsSuccessful && ret.Data) { - stateData.Nav_ListEventKind = ret.Data - } - } - }) - } - } + //没法关联事故事件 + // onChange: ({ stateData, login, setRowFieldVisible, value, colInfo, setFieldVisible, setFieldValue, dispatch, setFieldValueByBatch, getSubTableData, updateSubTableData }) => { + // if (colInfo != null && colInfo.FIELD_NAME == "EVENT_NAME") { + // //选择事故事件 + // let json = initFilter(login.OrgId); + // extendRule(json, 'EventID', 1, stateData.EVENT_ID); + // extendRule(json, 'ID', 1, stateData.ID); + // dispatch({ + // type: 'app/getDataByPost', + // url: 'CM/CMRspEstimate/GetEventKinds', + // payload: json, + // onlyData: false, + // onComplete: (ret) => { + // if (ret && ret.IsSuccessful && ret.Data) { + // stateData.Nav_ListEventKind = ret.Data + // } + // } + // }) + // } + // } } diff --git a/src/utils/customConfig.js b/src/utils/customConfig.js index bb0059c..70e0bcf 100644 --- a/src/utils/customConfig.js +++ b/src/utils/customConfig.js @@ -671,6 +671,10 @@ const BI056Performance = Loadable({ loader: () => import('../components/CustomPages/BI/BI056Performance'), loading: () =>
}) +const BI056Dilg1_1 = Loadable({ + loader: () => import('../components/CustomPages/BI/BI056Dilg1_1'), + loading: () =>
+}) const BI003StatiscialAnalysis = Loadable({ loader: () => import('../components/CustomPages/BI/BI003StatiscialAnalysis'), loading: () =>
@@ -925,6 +929,7 @@ export default function (componentName, formId, formParam, data, formCode, formD BI054HomeDetail: , BI055HomeDetail: , BI056Performance: , + BI056Dilg1_1: , BI003StatiscialAnalysis: , BI001HomeDetail: , BI002HomeDetail: , diff --git a/src/utils/customConfig1.js b/src/utils/customConfig1.js index 23b02f2..0567072 100644 --- a/src/utils/customConfig1.js +++ b/src/utils/customConfig1.js @@ -29,6 +29,10 @@ const BI056Performance = Loadable({ loader: () => import('../components/CustomPages/BI/BI056Performance'), loading: () =>
}) +const BI056Dilg1_1 = Loadable({ + loader: () => import('../components/CustomPages/BI/BI056Dilg1_1'), + loading: () =>
+}) const SC028ShowPrint = Loadable({ loader: () => import('../components/CustomPages/SC/SC028ShowPrint'), @@ -253,6 +257,7 @@ export default function (componentName, formId, formParam, data, formCode, formD BI054HomeDetail: , BI055HomeDetail: , BI056Performance: , + BI056Dilg1_1: , SC028ShowPrint: , SC022Import: ,