diff --git a/src/components/CustomPages/BI/BI056Dilg1_2.js b/src/components/CustomPages/BI/BI056Dilg1_2.js
index 327800a..d7aa6ef 100644
--- a/src/components/CustomPages/BI/BI056Dilg1_2.js
+++ b/src/components/CustomPages/BI/BI056Dilg1_2.js
@@ -10,7 +10,7 @@ class BI056Dilg1_2 extends React.Component {
constructor(props) {
super(props);
this.state = {
- ColorShow: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
+ ColorShow:this.props.data.ColorShow,//: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
barWidth: this.props.barWidth,
isShow1: false,
isShow2: false,
@@ -21,46 +21,49 @@ class BI056Dilg1_2 extends React.Component {
formCode: "",
title: "",
},
- ret: {
- IsSuccessful: true,
- Data: {
- axisLabelMonth: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
- legendName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
- //各生产单元 1~12 月数量 时间未到为空 没有数量就为0
- checkrisk: [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]],
- }
+ Data: {
+ axisLabelMonth: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ legendName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
+ //各生产单元 1~12 月数量 时间未到为空 没有数量就为0
+ checkrisk: [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]],
}
}
}
-
componenthidMount() {
- this.getBaseInfoData();
+ //this.CheckCount(this.state.Data)
+ this.getBaseInfoDataOnline();
}
componentDidMount() {
- this.getBaseInfoData();
+ //this.CheckCount(this.state.Data)
+ this.getBaseInfoDataOnline();
}
//获取数据
getBaseInfoDataOnline = (mineType) => {
- const json2 = initFilter(this.props.login.OrgId);
- extendOrder(json2, "CREATE_TIME", 1);
- json2.Parameter1 = mineType;
+ const json = initFilter(this.props.login.OrgId);
+ extendOrder(json, "CREATE_TIME", 1);
+ json.Parameter1 = mineType;
this.props.dispatch({
type: "app/getDataByPost",
- url: "BI/BIController/getRiskPerformanceData",
- payload: json2,
+ url: "BI/BISafe/GetBI056_1_2",
+ payload: json,
onlyData: false,
onComplete: (ret) => {
- this.CheckCount(this.state.ret.Data)
+ if (ret && ret.IsSuccessful) {
+ this.setState({
+ Data: Object.assign({}, this.state.Data, { "legendName": ret.Data.lisMineTypeOrder, "checkrisk": ret.Data.ListCount })
+ })
+ this.CheckCount(this.state.Data)
+ } else {
+ message.error("获取信息失败,请刷新后再试!");
+ }
},
});
};
- getBaseInfoData = (mineType) => {
- this.CheckCount(this.state.ret.Data)
- };
+
CheckCount = (Data) => {
let divRiskCount = document.getElementById("divRiskCount");
diff --git a/src/components/CustomPages/BI/BI056Dilg2_1.js b/src/components/CustomPages/BI/BI056Dilg2_1.js
index 82f7d56..5b97125 100644
--- a/src/components/CustomPages/BI/BI056Dilg2_1.js
+++ b/src/components/CustomPages/BI/BI056Dilg2_1.js
@@ -10,7 +10,7 @@ class BI056Dilg2_1 extends React.Component {
constructor(props) {
super(props);
this.state = {
- ColorShow: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
+ ColorShow:this.props.data.ColorShow,//: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
barWidth: this.props.barWidth,
isShow1: false,
isShow2: false,
@@ -21,49 +21,64 @@ class BI056Dilg2_1 extends React.Component {
formCode: "",
title: "",
},
- ret: {
- IsSuccessful: true,
- Data: {
- legendName: ['已整改', '未整改', '整改率'],
- titleMineType: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
- 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], [7, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6], [13, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6], [15, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6]],
- countNotDeal: [[1, 1, 1, 2, 3, 2, 0, 1, 3, 3, 3, 2], [2, 1, 1, 2, 3, 2, 0, 1, 3, 3, 3, 2], [3, 1, 1, 2, 3, 2, 0, 1, 3, 3, 3, 2], [4, 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], [70.00, 90.00, 87.5, 60.00, 75.00, 86.67, 100.00, 88.89, 62.50, 70.00, 72.73, 66.67], [80.00, 90.00, 87.5, 60.00, 75.00, 86.67, 100.00, 88.89, 62.50, 70.00, 72.73, 90], [90.00, 90.00, 87.5, 60.00, 75.00, 86.67, 100.00, 88.89, 62.50, 70.00, 72.73, 80]],
- }
+ IsSuccessful: true,
+ Data: {
+ legendName: ['已整改', '未整改', '整改率'],
+ xAxisName: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ titleMineType: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
+ countDeal: [[5, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6], [7, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6], [13, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6], [15, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6]],
+ countNotDeal: [[1, 1, 1, 2, 3, 2, 0, 1, 3, 3, 3, 2], [2, 1, 1, 2, 3, 2, 0, 1, 3, 3, 3, 2], [3, 1, 1, 2, 3, 2, 0, 1, 3, 3, 3, 2], [4, 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], [70.00, 90.00, 87.5, 60.00, 75.00, 86.67, 100.00, 88.89, 62.50, 70.00, 72.73, 66.67], [80.00, 90.00, 87.5, 60.00, 75.00, 86.67, 100.00, 88.89, 62.50, 70.00, 72.73, 90], [90.00, 90.00, 87.5, 60.00, 75.00, 86.67, 100.00, 88.89, 62.50, 70.00, 72.73, 80]],
}
}
}
componenthidMount() {
- this.getBaseInfoData();
+ // this.getBaseInfoData();
+ this.getBaseInfoDataOnline();
}
componentDidMount() {
- this.getBaseInfoData();
+ // this.getBaseInfoData();
+ this.getBaseInfoDataOnline();
}
//获取数据
getBaseInfoDataOnline = (mineType) => {
- const json2 = initFilter(this.props.login.OrgId);
- extendOrder(json2, "CREATE_TIME", 1);
- json2.Parameter1 = mineType;
+ const json = initFilter(this.props.login.OrgId);
+ extendOrder(json, "CREATE_TIME", 1);
+ json.Parameter1 = mineType;
this.props.dispatch({
type: "app/getDataByPost",
- url: "BI/BIController/getRiskPerformanceData",
- payload: json2,
+ url: "BI/BISafe/GetBI056_2_1",
+ payload: json,
onlyData: false,
onComplete: (ret) => {
- this.CheckCount(this.state.ret.Data)
+ if (ret && ret.IsSuccessful) {
+ this.setState({
+ Data: Object.assign({}, this.state.Data, { "titleMineType": ret.Data.lisMineTypeOrder, "countDeal": ret.Data.listFinish2_1, "countNotDeal": ret.Data.listNotFinish2_1, "linePercent": ret.Data.listFinish2_1Percent })
+ })
+ this.getBaseInfoData()
+ } else {
+ message.error("获取信息失败,请刷新后再试!");
+ }
+ // Data: {
+ // legendName: ['已整改', '未整改', '整改率'],
+ // xAxisName: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ // titleMineType: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
+ // countDeal: [[5, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6], [7, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6], [13, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6], [15, 10, 8, 5, 12, 15, 10, 9, 8, 10, 11, 6]],
+ // countNotDeal: [[1, 1, 1, 2, 3, 2, 0, 1, 3, 3, 3, 2], [2, 1, 1, 2, 3, 2, 0, 1, 3, 3, 3, 2], [3, 1, 1, 2, 3, 2, 0, 1, 3, 3, 3, 2], [4, 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], [70.00, 90.00, 87.5, 60.00, 75.00, 86.67, 100.00, 88.89, 62.50, 70.00, 72.73, 66.67], [80.00, 90.00, 87.5, 60.00, 75.00, 86.67, 100.00, 88.89, 62.50, 70.00, 72.73, 90], [90.00, 90.00, 87.5, 60.00, 75.00, 86.67, 100.00, 88.89, 62.50, 70.00, 72.73, 80]],
+ // }
},
});
};
getBaseInfoData = (mineType) => {
- this.RiskDeal(this.state.ret.Data, 1)
- this.RiskDeal(this.state.ret.Data, 2)
- this.RiskDeal(this.state.ret.Data, 3)
- this.RiskDeal(this.state.ret.Data, 4)
+ this.RiskDeal(this.state.Data, 1)
+ this.RiskDeal(this.state.Data, 2)
+ this.RiskDeal(this.state.Data, 3)
+ this.RiskDeal(this.state.Data, 4)
};
@@ -98,7 +113,8 @@ class BI056Dilg2_1 extends React.Component {
label: {
show: true,
position: "top",
- formatter: "{c}%"
+ formatter: "{c}%",
+ color: this.state.ColorShow[3]
},
lineStyle: {
color: "#ffb122"
diff --git a/src/components/CustomPages/BI/BI056Dilg2_2.js b/src/components/CustomPages/BI/BI056Dilg2_2.js
index bbdac93..a1b4425 100644
--- a/src/components/CustomPages/BI/BI056Dilg2_2.js
+++ b/src/components/CustomPages/BI/BI056Dilg2_2.js
@@ -12,7 +12,7 @@ class BI056Dilg2_2 extends React.Component {
constructor(props) {
super(props);
this.state = {
- ColorShow: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
+ ColorShow:this.props.data.ColorShow,//: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
barWidth: this.props.barWidth,
isShow1: false,
isShow2: false,
@@ -25,37 +25,37 @@ class BI056Dilg2_2 extends React.Component {
},
Data: {
mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
- riskTop: {
- yAxisName: [
- ["露天矿 隐患名称", "电机车轨道枕木下沉", "电机车刹车闸瓦磨损", "电机车导线线夹断裂", "电机车轨道断裂", "电机车刹车泵漏气"],
- ["选矿厂 隐患名称", "电车车轨道枕木下沉", "电机车刹车闸瓦磨损", "电机车导线线夹断裂", "电机车轨道断裂", "电机车刹车泵漏气"],
- ["尾矿库 隐患名称", "电机车轨道枕木下沉", "电机车刹车闸瓦磨损", "电机车导线线夹断裂", "电机车轨道断裂", "电机车刹车泵漏气"],
- ["职能部门 隐患名称", "电机车轨道枕木下沉", "电机车刹车闸瓦磨损", "电机车导线线夹断裂", "电机车轨道断裂", "电机车刹车泵漏气"]
- ],
- count: [
- [31, 22, 18, 15, 8, 5],
- [29, 20, 17, 16, 8, 5],
- [26, 21, 15, 13, 3, 2],
- [25, 21, 13, 10, 3, 1]
- ]
- }
+ yAxisName: [
+ ["露天矿 隐患名称", "电机车轨道枕木下沉", "电机车刹车闸瓦磨损", "电机车导线线夹断裂", "电机车轨道断裂", "电机车刹车泵漏气"],
+ ["选矿厂 隐患名称", "电车车轨道枕木下沉", "电机车刹车闸瓦磨损", "电机车导线线夹断裂", "电机车轨道断裂", "电机车刹车泵漏气"],
+ ["尾矿库 隐患名称", "电机车轨道枕木下沉", "电机车刹车闸瓦磨损", "电机车导线线夹断裂", "电机车轨道断裂", "电机车刹车泵漏气"],
+ ["职能部门 隐患名称", "电机车轨道枕木下沉", "电机车刹车闸瓦磨损", "电机车导线线夹断裂", "电机车轨道断裂", "电机车刹车泵漏气"]
+ ],
+ count: [
+ [31, 22, 18, 15, 8, 5],
+ [29, 20, 17, 16, 8, 5],
+ [26, 21, 15, 13, 3, 2],
+ [25, 21, 13, 10, 3, 1]
+ ]
}
}
}
componenthidMount() {
- this.getBaseInfoData();
+ // this.getBaseInfoData();
+ this.getBaseInfoDataOnline();
}
componentDidMount() {
- this.getBaseInfoData();
+ // this.getBaseInfoData();
+ this.getBaseInfoDataOnline();
}
getBaseInfoData = (mineType) => {
- this.RiskTop(this.state.Data.riskTop, 0);
- this.RiskTop(this.state.Data.riskTop, 1);
- this.RiskTop(this.state.Data.riskTop, 2);
- this.RiskTop(this.state.Data.riskTop, 3);
+ this.RiskTop(this.state.Data, 0);
+ this.RiskTop(this.state.Data, 1);
+ this.RiskTop(this.state.Data, 2);
+ this.RiskTop(this.state.Data, 3);
}
RiskTop = (Data, idIndex) => {
@@ -128,6 +128,36 @@ class BI056Dilg2_2 extends React.Component {
}
};
+ getBaseInfoDataOnline = (mineType) => {
+ const json = initFilter(this.props.login.OrgId);
+ extendOrder(json, "CREATE_TIME", 1);
+ json.Parameter1 = mineType;
+ this.props.dispatch({
+ type: "app/getDataByPost",
+ url: "BI/BISafe/GetBI056_2_2",
+ payload: json,
+ onlyData: false,
+ onComplete: (ret) => {
+ if (ret && ret.IsSuccessful) {
+ this.setState({ //设置setState全局变量
+ Data: {
+ mineTypeName: ret.Data.lisMineTypeOrder,// ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ yAxisName: ret.Data.ListDescreption,//["露天矿", "选矿厂", "尾矿库", "职能部门"],
+ count: ret.Data.ListCount
+ }, //将ret对象赋值给data, data供页面调用
+ })
+ this.RiskTop(this.state.Data, 0);
+ this.RiskTop(this.state.Data, 1);
+ this.RiskTop(this.state.Data, 2);
+ this.RiskTop(this.state.Data, 3);
+ } else {
+ message.error("获取信息失败,请刷新后再试!");
+ }
+ },
+ });
+ };
+
+
render() {
return (
diff --git a/src/components/CustomPages/BI/BI056Dilg3_1.js b/src/components/CustomPages/BI/BI056Dilg3_1.js
index 323a468..4ca7748 100644
--- a/src/components/CustomPages/BI/BI056Dilg3_1.js
+++ b/src/components/CustomPages/BI/BI056Dilg3_1.js
@@ -12,7 +12,7 @@ class BI056Dilg3_1 extends React.Component {
constructor(props) {
super(props);
this.state = {
- ColorShow: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
+ ColorShow:this.props.data.ColorShow,//: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
barWidth: this.props.barWidth,
isShow1: false,
isShow2: false,
@@ -25,44 +25,64 @@ class BI056Dilg3_1 extends React.Component {
},
Data: {
axisLabelMonth: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
- checkTypeInfo: {
- mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
- listLegendName: [
- ['巡回检查', '例行检查', '专业检查', '综合检查', '重大事故隐患专项排查'],
- ['巡回检查', '例行检查', '专业检查', '综合检查'],
- ['日常巡检', '防洪安全检查', '坝体安全检查', '库区安全检查', '重大事故隐患专项排查'],
- ['巡回检查', '例行检查', '专业检查', '综合检查', '重大事故隐患专项排查']
- ],
- //每个生产单元 每种检查类型 1-12 月数量
- checkTypeCount1: [[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120], [90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
- checkTypeCount2: [[120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]],
- checkTypeCount3: [[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
- checkTypeCount4: [[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
- },
+ mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
+ listLegendName: [
+ ['巡回检查', '例行检查', '专业检查', '综合检查', '重大事故隐患专项排查'],
+ ['巡回检查', '例行检查', '专业检查', '综合检查'],
+ ['日常巡检', '防洪安全检查', '坝体安全检查', '库区安全检查', '重大事故隐患专项排查'],
+ ['巡回检查', '例行检查', '专业检查', '综合检查', '重大事故隐患专项排查']
+ ],
+ //每个生产单元 每种检查类型 1-12 月数量
+ checkTypeCount1: [[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120], [90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
+ checkTypeCount2: [[120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]],
+ checkTypeCount3: [[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
+ checkTypeCount4: [[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
+
}
}
}
componenthidMount() {
- this.getBaseInfoData();
+ // this.getBaseInfoData();
+ this.getBaseInfoDataOnline();
}
componentDidMount() {
- this.getBaseInfoData();
+ //this.getBaseInfoData();
+ this.getBaseInfoDataOnline();
}
//获取数据
getBaseInfoDataOnline = (mineType) => {
- const json2 = initFilter(this.props.login.OrgId);
- extendOrder(json2, "CREATE_TIME", 1);
- json2.Parameter1 = mineType;
+ const json = initFilter(this.props.login.OrgId);
+ extendOrder(json, "CREATE_TIME", 1);
+ json.Parameter1 = mineType;
this.props.dispatch({
type: "app/getDataByPost",
- url: "BI/BIController/getRiskPerformanceData",
- payload: json2,
+ url: "BI/BISafe/GetBI056_3_1",
+ payload: json,
onlyData: false,
onComplete: (ret) => {
- this.this.state.CheckCount(ret?.Data.checkMineType, "divCheckCount1");
+ if (ret && ret.IsSuccessful) {
+ this.setState({ //设置setState全局变量
+ Data: {
+ axisLabelMonth: this.state.Data.axisLabelMonth,// ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ mineTypeName: ret.Data.lisMineTypeOrder,//["露天矿", "选矿厂", "尾矿库", "职能部门"],
+ listLegendName: ret.Data.lisMineCheckTypeOrder,
+ checkTypeCount1: ret.Data.Count3_1.length >= 1 ? ret.Data.Count3_1[0] : null,// [[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120], [90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
+ checkTypeCount2: ret.Data.Count3_1.length >= 2 ? ret.Data.Count3_1[1] : null, //[[120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]],
+ checkTypeCount3: ret.Data.Count3_1.length >= 3 ? ret.Data.Count3_1[2] : null, //[[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
+ checkTypeCount4: ret.Data.Count3_1.length >= 4 ? ret.Data.Count3_1[3] : null,//[[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
+ }, //将ret对象赋值给data, data供页面调用
+ })
+
+ this.CheckCount(this.state.Data, "div1", 1);
+ this.CheckCount(this.state.Data, "div2", 2);
+ this.CheckCount(this.state.Data, "div3", 3);
+ this.CheckCount(this.state.Data, "div4", 4);
+ } else {
+ message.error("获取信息失败,请刷新后再试!");
+ }
},
});
};
@@ -89,25 +109,24 @@ class BI056Dilg3_1 extends React.Component {
color: '#333', // 字体颜色
}
};
- var title = Data.checkTypeInfo.mineTypeName[index - 1]
+ var title = Data.mineTypeName[index - 1]
var month = (new Date()).getMonth() + 1//取当前月
- // checkTypeInfo.mineTypeName[] mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
+ // mineTypeName[] mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
var dataList = []
switch (index) {
- case 1: dataList = Data.checkTypeInfo.checkTypeCount1
+ case 1: dataList = Data.checkTypeCount1
break;
- case 2: dataList = Data.checkTypeInfo.checkTypeCount2
+ case 2: dataList = Data.checkTypeCount2
break;
- case 3: dataList = Data.checkTypeInfo.checkTypeCount3
+ case 3: dataList = Data.checkTypeCount3
break;
- case 4: dataList = Data.checkTypeInfo.checkTypeCount4
+ case 4: dataList = Data.checkTypeCount4
break;
}
- var LegendName = Data.checkTypeInfo.listLegendName[index - 1]
+ var LegendName = Data.listLegendName[index - 1]
var seriesShow = []
for (let i = 0; i < LegendName.length; i++) {
- debugger
seriesShow.push({
name: LegendName[i],
barWidth: this.state.barWidth,
diff --git a/src/components/CustomPages/BI/BI056Dilg3_2.js b/src/components/CustomPages/BI/BI056Dilg3_2.js
index a385b29..aaf4d57 100644
--- a/src/components/CustomPages/BI/BI056Dilg3_2.js
+++ b/src/components/CustomPages/BI/BI056Dilg3_2.js
@@ -12,7 +12,7 @@ class BI056Dilg3_2 extends React.Component {
constructor(props) {
super(props);
this.state = {
- ColorShow: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
+ ColorShow:this.props.data.ColorShow,//: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
barWidth: this.props.barWidth,
isShow1: false,
isShow2: false,
@@ -25,45 +25,59 @@ class BI056Dilg3_2 extends React.Component {
},
Data: {
axisLabelMonth: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
- checkTypeInfo: {
- mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
- listLegendName: [
- ['巡回检查', '例行检查', '专业检查', '综合检查', '重大事故隐患专项排查'],
- ['巡回检查', '例行检查', '专业检查', '综合检查'],
- ['日常巡检', '防洪安全检查', '坝体安全检查', '库区安全检查', '重大事故隐患专项排查'],
- ['巡回检查', '例行检查', '专业检查', '综合检查', '重大事故隐患专项排查']
- ],
- //每个生产单元 每种检查类型 1-12 月数量
- checkTypeCount1: [[2, 3, 3, 5, 3, 2, 6, 2, 1, 0, 1, 2], [1, 2, 3, 3, 2, 4, 5, 3, 1, 0, 9, 8], [1, 2, 3, 4, 5, 3, 2, 4, 1, 1, 4, 0], [2, 1, 1, 0, 0, 3, 3, 2, 2, 0, 0, 1], [1, 1, 1, 3, 3, 1, 3, 1, 2, 2, 3, 4]],
- checkTypeCount2: [[2, 3, 6, 6, 3, 2, 6, 3, 8, 0, 1, 2], [1, 2, 7, 3, 5, 4, 5, 4, 1, 4, 9, 2], [1, 2, 8, 4, 5, 3, 2, 4, 3, 4, 0, 6], [2, 3, 1, 0, 3, 3, 3, 6, 3, 4, 6, 1]],
- checkTypeCount3: [[0, 0, 3, 3, 5, 5, 7, 7, 3, 4, 7, 1], [5, 7, 0, 0, 1, 1, 2, 1, 4, 0, 3, 6], [2, 2, 5, 7, 4, 0, 0, 4, 4, 0, 0, 4], [1, 5, 4, 2, 4, 0, 2, 0, 4, 0, 0, 4], [1, 1, 1, 0, 1, 0, 0, 5, 0, 0, 1, 0]],
- checkTypeCount4: [[4, 2, 2, 5, 4, 0, 2, 5, 0, 2, 4, 4], [4, 0, 4, 0, 0, 4, 0, 0, 4, 0, 4, 0], [1, 0, 3, 0, 1, 3, 0, 7, 2, 0, 3, 0], [1, 0, 3, 1, 1, 3, 3, 3, 2, 0, 3, 0], [1, 0, 3, 0, 1, 3, 0, 2, 2, 1, 0, 2]],
- },
+ mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
+ listLegendName: [
+ ['巡回检查', '例行检查', '专业检查', '综合检查', '重大事故隐患专项排查'],
+ ['巡回检查', '例行检查', '专业检查', '综合检查'],
+ ['日常巡检', '防洪安全检查', '坝体安全检查', '库区安全检查', '重大事故隐患专项排查'],
+ ['巡回检查', '例行检查', '专业检查', '综合检查', '重大事故隐患专项排查']
+ ],
+ //每个生产单元 每种检查类型 1-12 月数量
+ checkTypeCount1: [[2, 3, 3, 5, 3, 2, 6, 2, 1, 0, 1, 2], [1, 2, 3, 3, 2, 4, 5, 3, 1, 0, 9, 8], [1, 2, 3, 4, 5, 3, 2, 4, 1, 1, 4, 0], [2, 1, 1, 0, 0, 3, 3, 2, 2, 0, 0, 1], [1, 1, 1, 3, 3, 1, 3, 1, 2, 2, 3, 4]],
+ checkTypeCount2: [[2, 3, 6, 6, 3, 2, 6, 3, 8, 0, 1, 2], [1, 2, 7, 3, 5, 4, 5, 4, 1, 4, 9, 2], [1, 2, 8, 4, 5, 3, 2, 4, 3, 4, 0, 6], [2, 3, 1, 0, 3, 3, 3, 6, 3, 4, 6, 1]],
+ checkTypeCount3: [[0, 0, 3, 3, 5, 5, 7, 7, 3, 4, 7, 1], [5, 7, 0, 0, 1, 1, 2, 1, 4, 0, 3, 6], [2, 2, 5, 7, 4, 0, 0, 4, 4, 0, 0, 4], [1, 5, 4, 2, 4, 0, 2, 0, 4, 0, 0, 4], [1, 1, 1, 0, 1, 0, 0, 5, 0, 0, 1, 0]],
+ checkTypeCount4: [[4, 2, 2, 5, 4, 0, 2, 5, 0, 2, 4, 4], [4, 0, 4, 0, 0, 4, 0, 0, 4, 0, 4, 0], [1, 0, 3, 0, 1, 3, 0, 7, 2, 0, 3, 0], [1, 0, 3, 1, 1, 3, 3, 3, 2, 0, 3, 0], [1, 0, 3, 0, 1, 3, 0, 2, 2, 1, 0, 2]],
}
}
}
componenthidMount() {
- this.getBaseInfoData();
+ // this.getBaseInfoData();
+ this.getBaseInfoDataOnline();
}
componentDidMount() {
- this.getBaseInfoData();
+ // this.getBaseInfoData();
+ this.getBaseInfoDataOnline();
}
//获取数据
getBaseInfoDataOnline = (mineType) => {
- const json2 = initFilter(this.props.login.OrgId);
- extendOrder(json2, "CREATE_TIME", 1);
- json2.Parameter1 = mineType;
+ const json = initFilter(this.props.login.OrgId);
+ extendOrder(json, "CREATE_TIME", 1);
+ json.Parameter1 = mineType;
this.props.dispatch({
type: "app/getDataByPost",
- url: "BI/BIController/getRiskPerformanceData",
- payload: json2,
+ url: "BI/BISafe/GetBI056_3_2",
+ payload: json,
onlyData: false,
onComplete: (ret) => {
- this.this.state.CheckCount(ret?.Data.checkMineType, "divCheckCount1");
- },
+ if (ret && ret.IsSuccessful) {
+ this.setState({
+ Data: Object.assign({}, this.state.Data, {
+ "mineTypeName": ret.Data.lisMineTypeOrder,
+ "listLegendName": ret.Data.lisMineCheckType,
+ "checkTypeCount1": ret.Data.Count3_1.length >= 1 ? ret.Data.Count3_1[0] : null,
+ "checkTypeCount2": ret.Data.Count3_1.length >= 2 ? ret.Data.Count3_1[1] : null,
+ "checkTypeCount3": ret.Data.Count3_1.length >= 3 ? ret.Data.Count3_1[2] : null,
+ "checkTypeCount4": ret.Data.Count3_1.length >= 4 ? ret.Data.Count3_1[3] : null
+ })
+ })
+ this.getBaseInfoData();
+ } else {
+ message.error("获取信息失败,请刷新后再试!");
+ }
+ }
});
};
@@ -79,7 +93,6 @@ class BI056Dilg3_2 extends React.Component {
let divShow = document.getElementById(divId);
if (divShow) {
let myChart = echarts.init(divShow);
-
const labelOption = {
show: true,
position: 'top',
@@ -89,25 +102,24 @@ class BI056Dilg3_2 extends React.Component {
color: '#333', // 字体颜色
}
};
- var title = Data.checkTypeInfo.mineTypeName[index - 1]
+ var title = Data.mineTypeName[index - 1]
var month = (new Date()).getMonth() + 1//取当前月
- // checkTypeInfo.mineTypeName[] mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
+ // mineTypeName[] mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
var dataList = []
switch (index) {
- case 1: dataList = Data.checkTypeInfo.checkTypeCount1
+ case 1: dataList = Data.checkTypeCount1
break;
- case 2: dataList = Data.checkTypeInfo.checkTypeCount2
+ case 2: dataList = Data.checkTypeCount2
break;
- case 3: dataList = Data.checkTypeInfo.checkTypeCount3
+ case 3: dataList = Data.checkTypeCount3
break;
- case 4: dataList = Data.checkTypeInfo.checkTypeCount4
+ case 4: dataList = Data.checkTypeCount4
break;
}
- var LegendName = Data.checkTypeInfo.listLegendName[index - 1]
+ var LegendName = Data.listLegendName[index - 1]
var seriesShow = []
for (let i = 0; i < LegendName.length; i++) {
- debugger
seriesShow.push({
name: LegendName[i],
barWidth: this.state.barWidth,
diff --git a/src/components/CustomPages/BI/BI056Performance.js b/src/components/CustomPages/BI/BI056Performance.js
index 8621aa7..ea90019 100644
--- a/src/components/CustomPages/BI/BI056Performance.js
+++ b/src/components/CustomPages/BI/BI056Performance.js
@@ -10,83 +10,166 @@ import FormPage from '../../../components/FormPage'
class BI056Performance extends React.Component {
constructor(props) {
super(props);
+ var barWidth = 30
+ var windowWith = window.innerWidth;
+ if (windowWith <= 1250) {
+ barWidth = 10
+ } else if (windowWith >= 2300) {
+ barWidth = 30
+ } else {
+ barWidth = 20
+ }
+
this.state = {
ColorShow: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
dtStart: null,//开始时间
dtEnd: null,//结束时间
mineType: 0,//生产单元
+ barWidth: barWidth,
detailForm: {
formCode: "",
title: "",
isShow: false,
dilgWith: "90%"
},
- ret: {
- IsSuccessful: true,
- Data: {
- checkMineType1_1: {
- mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
- checkCount: [[3, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]],
- legendName: ["公司级", "部门级", "车间级", "班组级"],
- },
- 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]]
- }
+ Data: {
+ checkMineType1_1: {
+ mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
+ checkCount: [[3, 3, 3, 3], [12, 12, 12, 6], [24, 24, 24, 12], [90, 90, 120, 36]],
+ legendName: ["公司级", "部门级", "车间级", "班组级"],
+ },
+ 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();
+ this.getBaseInfoDataOnline();
+
+ // //比如账号 以XTC 开头采用此静态数据
+ // this.getBaseInfoData();
}
//获取数据
getBaseInfoDataOnline = (mineType) => {
- const json2 = initFilter(this.props.login.OrgId);
- extendOrder(json2, "CREATE_TIME", 1);
- json2.Parameter1 = mineType;
+
+ const json = initFilter(this.props.login.OrgId);
+ extendOrder(json, "CREATE_TIME", 1);
+ json.Parameter1 = mineType;
this.props.dispatch({
type: "app/getDataByPost",
- url: "BI/BIController/getRiskPerformanceData",
- payload: json2,
+ url: "BI/BISafe/GetBI056Main",
+ payload: json,
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");
+ if (ret && ret.IsSuccessful) {
+ var checkMineType1_1 = {
+ mineTypeName: ret.Data.lisMineTypeOrder,
+ checkCount: ret.Data.Count1_1,
+ legendName: ret.Data.lisLevelOrder
+ }
+
+ var riskMineType1_2 = {
+ legendName: ret.Data.lisMineTypeOrder,
+ riskCount: ret.Data.listRiskMineCount1_2,
+ }
+
+ var riskDealMonth2_1 = {
+ legendName: this.state.Data.riskDealMonth2_1.legendName,
+ xAxisName: this.state.Data.riskDealMonth2_1.xAxisName,//, ret.Data.listMonth,
+ countDeal: ret.Data.listFinish2_1,
+ countNotDeal: ret.Data.listNotFinish2_1,
+ linePercent: ret.Data.listFinish2_1Percent,
+ }
+
+ var riskTop2_2 = {
+ yAxisName: ret.Data.ListDescreption2_2,
+ count: ret.Data.Count2_2,
+ }
+
+ var checkTypeMineType3_1 = {
+ legendName: ret.Data.lisMineTypeOrder,
+ xAxisName: ret.Data.lisCheckTypeName,
+ arrayCount: ret.Data.Count3_1,
+ }
+
+ var checkTypeRiskMineType3_2 = {
+ legendName: ret.Data.lisMineTypeOrder,
+ xAxisName: ret.Data.lisCheckTypeName,
+ arrayCount: ret.Data.Count3_2,
+ }
+
+ var lineData = {
+ checkMineType1_1: checkMineType1_1,
+ riskMineType1_2: riskMineType1_2,
+ riskDealMonth2_1: riskDealMonth2_1,
+ riskTop2_2: riskTop2_2,
+ checkTypeMineType3_1: checkTypeMineType3_1,
+ checkTypeRiskMineType3_2: checkTypeRiskMineType3_2
+ }
+ this.setState({
+ Data: lineData
+ })
+
+ this.CheckCount1_1(this.state.Data.checkMineType1_1);
+ this.RiskCount1_2(this.state.Data.riskMineType1_2, this.state.ColorShow);
+ this.RiskCount1_22(this.state.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.Data.riskDealMonth2_1.countDeal[i])
+ // countNotDeal.push(this.state.Data.riskDealMonth2_1.countNotDeal[i])
+ // linePercent.push(this.state.Data.riskDealMonth2_1.linePercent[i])
+ // }
+ // this.state.Data.riskDealMonth2_1.countDeal = countDeal
+ // this.state.Data.riskDealMonth2_1.countNotDeal = countNotDeal
+ // this.state.Data.riskDealMonth2_1.linePercent = linePercent
+
+ this.RiskDeal2_1(this.state.Data.riskDealMonth2_1);
+ //动态处理数据
+
+ this.RiskTop2_2(this.state.Data.riskTop2_2, this.state.ColorShow);
+ this.CheckTypeCount3(this.state.Data.checkTypeMineType3_1, "divCheckTypeCount3_1");
+ this.CheckTypeCount3(this.state.Data.checkTypeRiskMineType3_2, "divCheckTypeRiskCount3_2");
+ } else {
+ message.error("获取信息失败,请刷新后再试!");
+ }
},
});
};
+
getBaseInfoData = (mineType) => {
- this.CheckCount1_1(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);
+ this.CheckCount1_1(this.state.Data.checkMineType1_1);
+ this.RiskCount1_2(this.state.Data.riskMineType1_2, this.state.ColorShow);
+ this.RiskCount1_22(this.state.Data.riskMineType1_2, this.state.ColorShow);
//动态处理数据
var countDeal = []
@@ -94,19 +177,19 @@ class BI056Performance extends React.Component {
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])
+ countDeal.push(this.state.Data.riskDealMonth2_1.countDeal[i])
+ countNotDeal.push(this.state.Data.riskDealMonth2_1.countNotDeal[i])
+ linePercent.push(this.state.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.state.Data.riskDealMonth2_1.countDeal = countDeal
+ this.state.Data.riskDealMonth2_1.countNotDeal = countNotDeal
+ this.state.Data.riskDealMonth2_1.linePercent = linePercent
+ this.RiskDeal2_1(this.state.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");
+ this.RiskTop2_2(this.state.Data.riskTop2_2, this.state.ColorShow);
+ this.CheckTypeCount3(this.state.Data.checkTypeMineType3_1, "divCheckTypeCount3_1");
+ this.CheckTypeCount3(this.state.Data.checkTypeRiskMineType3_2, "divCheckTypeRiskCount3_2");
};
CheckCount1_1 = (Data) => {
@@ -173,14 +256,15 @@ class BI056Performance extends React.Component {
},
},
},
- barWidth: 30
+
+ barWidth: this.state.barWidth,// 30
},
{
name: "部门级",
type: "bar",
data: Data.checkCount[1],
itemStyle: { color: this.state.ColorShow[1] },
- barWidth: 30,//横轴的柱状图宽度
+ barWidth: this.state.barWidth,// 30,//横轴的柱状图宽度
label: {
normal: {
show: true,
@@ -198,7 +282,7 @@ class BI056Performance extends React.Component {
type: "bar",
data: Data.checkCount[2],
itemStyle: { color: this.state.ColorShow[2] },
- barWidth: 30,//横轴的柱状图宽度
+ barWidth: this.state.barWidth,// 30,//横轴的柱状图宽度
label: {
normal: {
show: true,
@@ -215,7 +299,7 @@ class BI056Performance extends React.Component {
name: "班组级",
type: "bar",
data: Data.checkCount[3],
- barWidth: 30,//横轴的柱状图宽度
+ barWidth: this.state.barWidth,// 30,//横轴的柱状图宽度
itemStyle: { color: this.state.ColorShow[3] },
label: {
normal: {
@@ -271,7 +355,7 @@ class BI056Performance extends React.Component {
return ColorShow[params.dataIndex]
}
},
- barWidth: 30,
+ barWidth: this.state.barWidth,// 30,
label: {
normal: {
show: true,
@@ -444,7 +528,7 @@ class BI056Performance extends React.Component {
},
data: Data.countDeal,
itemStyle: { color: this.state.ColorShow[0] },
- barWidth: 30
+ barWidth: this.state.barWidth,// 30
},
{
name: "未整改",
@@ -463,10 +547,11 @@ class BI056Performance extends React.Component {
label: {
show: true,
position: "top",
- formatter: "{c}%"
+ formatter: "{c}%",
+ color: this.state.ColorShow[3]
},
lineStyle: {
- color: "#ffb122"
+ color: this.state.ColorShow[2],// "#ffb122"
},
data: Data.linePercent,
itemStyle: { color: this.state.ColorShow[2] },
@@ -519,7 +604,7 @@ class BI056Performance extends React.Component {
return ColorShow[params.dataIndex]
}
},
- barWidth: 30,//横轴的柱状图宽度
+ barWidth: this.state.barWidth,// 30,//横轴的柱状图宽度
label: {
normal: {
show: true,
@@ -555,7 +640,7 @@ class BI056Performance extends React.Component {
},
data: Data.arrayCount[i],//.slice(0, 10),
itemStyle: { color: this.state.ColorShow[i] },
- barWidth: 30
+ barWidth: this.state.barWidth,// 30
})
}
@@ -668,7 +753,7 @@ class BI056Performance extends React.Component {
},
data: Data.arrayCount[0],//.Count1.slice(0, 10),
itemStyle: { color: this.state.ColorShow[0] },
- barWidth: 30
+ barWidth: this.state.barWidth,// 30
},
{
name: "选矿厂",
@@ -750,7 +835,7 @@ class BI056Performance extends React.Component {
dtEnd: this.state.dtEnd,
homeReload: true,
barWidth: barWidth,
- // ColorShow: this.state.ColorShow
+ ColorShow: this.state.ColorShow
},
formCode: formCode,
};
@@ -758,7 +843,8 @@ class BI056Performance extends React.Component {
var detailForm = {
title: titleTemp,
isShow: true,
- dilgWith: dilgWith
+ dilgWith: dilgWith,
+ // ColorShow: this.state.ColorShow
};
this.setState({
detailForm: detailForm,
@@ -766,27 +852,6 @@ class BI056Performance extends React.Component {
});
};
- // //显示详情弹窗
- // 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 = {
@@ -847,7 +912,7 @@ class BI056Performance extends React.Component {
-
+
@@ -879,7 +944,7 @@ class BI056Performance extends React.Component {
-
+
@@ -914,7 +979,7 @@ class BI056Performance extends React.Component {
-
+
diff --git a/src/components/CustomPages/CM/CM030ShowPrint.js b/src/components/CustomPages/CM/CM030ShowPrint.js
index eb5c78b..ef40fcc 100644
--- a/src/components/CustomPages/CM/CM030ShowPrint.js
+++ b/src/components/CustomPages/CM/CM030ShowPrint.js
@@ -108,6 +108,7 @@ class CM030ShowPrint extends React.Component {
(this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.data.id}>
+
应急装备需求调查
{
data ?
diff --git a/src/feui/common/ExportToExcel.js b/src/feui/common/ExportToExcel.js
index a8e5dbf..d37d9c0 100644
--- a/src/feui/common/ExportToExcel.js
+++ b/src/feui/common/ExportToExcel.js
@@ -9,7 +9,7 @@ import { Table, Button, Dropdown, Menu, Icon, message } from 'antd'
// 工具库
import { renderExportCell } from '../utils/common'
-function ExportToExcel (props) {
+function ExportToExcel(props) {
/**
* 将真实 dom 中的 table 节点转换成 excel 并下载
* @param {*} tableEle table dom
@@ -93,6 +93,10 @@ function ExportToExcel (props) {
*/
const getData = (pagination, onlineDataSource, columns, selectedKeys) => {
const { dispatch, config } = props
+ if (config.customParams && config.url && config.customParams.indexOf('url:') > -1 && config.customParams.indexOf('/') > -1) {
+ // wyw 修改为自定义url导出 前提是 按钮配置参数为 url:xxx
+ config.url = config.customParams.replace('url:', '')
+ }
dispatch({
...config,
payload: {
@@ -104,21 +108,43 @@ function ExportToExcel (props) {
if (res && res.IsSuccessful) {
const { Data, TotalCount } = res
onlineDataSource = [...onlineDataSource, ...Data]
- const { Start, Limit, PageIndex } = pagination
- // 为保证服务器效率,分页加载
- if (Start + Limit < TotalCount) {
- pagination = {
- ...pagination,
- Start: PageIndex * Limit,
- PageIndex: PageIndex + 1
+ if (props.config.customParams && props.config.url && props.config.customParams.indexOf(props.config.url) > -1 && onlineDataSource && onlineDataSource.length == 1) {
+ //wyw 自定义参数方法 后续自定义必须相同返回结果
+ //考虑数据组装时使用大量缓存数据 故不做分页
+ var resultTemp = onlineDataSource[0]
+ // wyw 对 columns 与 filterDataSource 进行改造
+ //数据源从新赋值
+ let filterDataSource = resultTemp.listData
+ // columns 改造
+ if (resultTemp.listColDataIndex && resultTemp.listColDataIndex.length > 0 && resultTemp.listColDataIndex.length == resultTemp.listColDataTitle.length) {
+ var columnsNew = []
+ for (var i = 0; i < resultTemp.listColDataIndex.length; i++) {
+ var column = { title: resultTemp.listColDataTitle[i], dataIndex: resultTemp.listColDataIndex[i], render: (text, record) => { return renderExportCell(text, record, props.config, props.enums) } }
+ columnsNew.push(column)
+ }
+ columns = columnsNew
}
- getData(pagination, onlineDataSource, columns, selectedKeys)
- } else {
- let filterDataSource = onlineDataSource
if (selectedKeys && selectedKeys.length) {
filterDataSource = onlineDataSource.filter(ods => selectedKeys.indexOf(ods.ID) !== -1)
}
exportToExcel(columns, filterDataSource)
+ } else {
+ const { Start, Limit, PageIndex } = pagination
+ // 为保证服务器效率,分页加载
+ if (Start + Limit < TotalCount) {
+ pagination = {
+ ...pagination,
+ Start: PageIndex * Limit,
+ PageIndex: PageIndex + 1
+ }
+ getData(pagination, onlineDataSource, columns, selectedKeys)
+ } else {
+ let filterDataSource = onlineDataSource
+ if (selectedKeys && selectedKeys.length) {
+ filterDataSource = onlineDataSource.filter(ods => selectedKeys.indexOf(ods.ID) !== -1)
+ }
+ exportToExcel(columns, filterDataSource)
+ }
}
}
}
diff --git a/src/files/edit/BS006.js b/src/files/edit/BS006.js
index 99fc858..e9e9e00 100644
--- a/src/files/edit/BS006.js
+++ b/src/files/edit/BS006.js
@@ -24,6 +24,7 @@ export default {
}
if (stateData.Nav_ListRiskSubmitContent == null || stateData.Nav_ListRiskSubmitContent.length < 1) {
+ // Get => GetBS006 都不再进入了
//页面自检 报错 正常不会进来
let temps = [];
let json = initFilter(stateData.ORG_ID, getFieldValue("ID"), null, null, null, stateData.CHECK_ID);
diff --git a/src/files/edit/BS057.js b/src/files/edit/BS057.js
index 7abfe35..8e012bc 100644
--- a/src/files/edit/BS057.js
+++ b/src/files/edit/BS057.js
@@ -198,102 +198,6 @@ export default {
// }
// }
},
-
-
- // onSubChange: ({ row, setDataState, pageCode, record, colInfo, dispatch, stateData, props }) => {
- // //BS057
- // if (colInfo.FIELD_NAME == "Nav_ListCheckDetailQuestion") {
- // for (let i = 0; i < stateData.Nav_ListSafeCheckDetail.length; i++) {
- // if (record.ID == stateData.Nav_ListSafeCheckDetail[i].ID) {
- // var listQ = record.Nav_ListCheckDetailQuestion
- // var strDEMAND = ''
- // var LevelMain = ''
- // var CHECK_MAIN_ID = ''
- // var CHECKRESULT = 0 // 无 10 检查问题一致 20 其他 30
- // debugger
- // var checkedCount = 0
- // for (let j = 0; j < listQ.length; j++) {
- // if (listQ[j].IS_DELETED != undefined && listQ[j].IS_DELETED) {
- // continue
- // }
- // checkedCount++
- // // strDEMAND += (j > 0 ? ',' : '') + listQ[j].Nav_Question.DEMAND
- // if (listQ[j].SAFE_CHECK_QUESTION_ID == '55555555-5555-5555-5555-555555555555') {
- // // if (CHECKRESULT != 10 && CHECKRESULT != 0) {
- // // message.error("无或其他只能单选!")
- // // }
- // CHECKRESULT = 10
- // } else if (listQ[j].SAFE_CHECK_QUESTION_ID == '77777777-7777-7777-7777-777777777777') {
- // // if (CHECKRESULT != 30 && CHECKRESULT != 0) {
- // // message.error("无或其他只能单选!")
- // // }
- // CHECKRESULT = 30
- // } else {
- // strDEMAND += (strDEMAND.length > 0 ? ',' : '') + listQ[j].Nav_Question.DEMAND
- // // if (CHECKRESULT != 20 && CHECKRESULT != 0) {
- // // message.error("无或其他只能单选!")
- // // }
- // CHECKRESULT = 20
- // //取值修改 (准确)
- // if (LevelMain.length == '' && listQ[j].Nav_Main != null && listQ[j].Nav_Main.QUESTION_LEVEL != null) {
- // LevelMain = listQ[j].Nav_Main.QUESTION_LEVEL
- // CHECK_MAIN_ID = listQ[j].Nav_Main.ID
- // } else if (LevelMain == '' && listQ[j].QUESTION_LEVEL != null) {
- // LevelMain = listQ[j].QUESTION_LEVEL
- // CHECK_MAIN_ID = ''
- // }
- // }
- // }
- // if (checkedCount > 1) {
- // message.error("只能选择一个检查问题描述!")
- // }
- // if (CHECKRESULT == 10) {
- // record["QUESTION_LEVEL"] = null
- // record["Nav_ListCheckDetailQuestion.Nav_Question.DEMAND"] = null
- // record.QUESTION_LEVEL = null
- // stateData.Nav_ListSafeCheckDetail[i].QUESTION_LEVEL = null
- // stateData.Nav_ListSafeCheckDetail[i].DEMANDS = null
- // } else if (CHECKRESULT == 20) {
- // // 对应行 取第一个 未删除的 检查问题 显示 问题等级
- // record["Nav_ListCheckDetailQuestion.Nav_Question.DEMAND"] = strDEMAND
- // stateData.Nav_ListSafeCheckDetail[i].DEMANDS = strDEMAND
- // if (LevelMain != '' && LevelMain > 0) {
- // record["CHECK_MAIN_ID"] = CHECK_MAIN_ID
- // record["QUESTION_LEVEL"] = LevelMain// stateData.Nav_ListSafeCheckDetail[i].QUESTION_LEVEL_SAME
- // stateData.Nav_ListSafeCheckDetail[i].QUESTION_LEVEL = LevelMain// stateData.Nav_ListSafeCheckDetail[i].QUESTION_LEVEL_SAME
- // stateData.Nav_ListSafeCheckDetail[i].CHECK_MAIN_ID = CHECK_MAIN_ID
- // }
- // } else if (CHECKRESULT == 30) {
- // record["QUESTION_LEVEL"] = null
- // record["Nav_ListCheckDetailQuestion.Nav_Question.DEMAND"] = null
- // record.QUESTION_LEVEL = null
- // stateData.Nav_ListSafeCheckDetail[i].QUESTION_LEVEL = null
- // stateData.Nav_ListSafeCheckDetail[i].DEMANDS = null
- // } else if (CHECKRESULT == 0) {
- // record["QUESTION_LEVEL"] = null
- // record["Nav_ListCheckDetailQuestion.Nav_Question.DEMAND"] = null
- // record.QUESTION_LEVEL = null
- // stateData.Nav_ListSafeCheckDetail[i].QUESTION_LEVEL = null
- // stateData.Nav_ListSafeCheckDetail[i].DEMANDS = null
- // }
- // //保存信息
- // record["CHECKRESULT"] = CHECKRESULT
- // stateData.Nav_ListSafeCheckDetail[i].CHECKRESULT = CHECKRESULT
- // // record["Nav_CheckQuestion.DEMAND"] = stateData.Nav_ListSafeCheckDetail[i].DEMAND_SAME
- // // params.stateData.Nav_ListSafeCheckDetail[i].QUESTION_LEVEL = params.stateData.Nav_ListSafeCheckDetail[i].QUESTION_LEVEL_SAME
- // // params.stateData.Nav_ListSafeCheckDetail[i].Nav_CheckMain.Nav_CheckQuestion.DEMAND = params.stateData.Nav_ListSafeCheckDetail[i].DEMAND_SAME
- // }
- // }
- // // record.Nav_ListCheckDetailQuestion.Nav_Question.DEMAND = strDEMAND
- // // if (listQ != null && listQ.length > 0) {
- // // // if (listQ) { }
- // // record.QUESTION_LEVEL = 20
- // // } else {
- // // record.QUESTION_LEVEL = 20
- // // }
- // }
- // }
-
//新版 直接加信息 只有 无和对应信息
onSubChange: ({ row, setDataState, pageCode, record, colInfo, dispatch, stateData, props }) => {
//BS057