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