安全检查绩效报表

安全检查库导出 框架修改
隐患待上报修改
This commit is contained in:
wyw 2024-04-30 17:23:41 +08:00
parent f702038fb2
commit 70915dd5cb
12 changed files with 470 additions and 391 deletions

View File

@ -1819,7 +1819,8 @@ class TableBaseComponent extends ComponentBase {
config={{
type: 'listPage/getTableData',
payload: loadParamJson || {},
url: tableConfig.api
url: tableConfig.api,
customParams:btnConfig.customParams//wyw 添加 参数到导出功能 url
}}
/>
)

View File

@ -39,7 +39,7 @@ class BI056Dilg1_1 extends React.Component {
}
this.state = {
ColorShow: ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
ColorShow: this.props.data.ColorShow,// ["#c02e30", "#f7aa52", "#fbe06a", "#5185f3", "#EF9494", "#51b5f3"],
month: month,
barWidth: this.props.data.barWidth,
seasonIndex: selectSeason,
@ -53,13 +53,9 @@ class BI056Dilg1_1 extends React.Component {
formCode: "",
title: "",
},
ret: {
IsSuccessful: true,
Data: {
checkMineType: {
legendName: ["公司级", "部门级", "车间级", "班组级"],
axisLabelMonth: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
checkCountMonth: [
//有几月的数据就统计到几月 时间不到不统计 也不能放入0
@ -74,53 +70,57 @@ class BI056Dilg1_1 extends React.Component {
[28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],
// 班组级
[55, 56, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60]
// // 2个月的数据如下图
// [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4],
// // 部门级
// [5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 8, 8, 8, 8],
// // 车间级
// [30, 30, 30, 30, 30, 30, 30, 30, 9, 9, 9, 9, 4, 4, 4, 4],
// // 班组级
// [60, 60, 60, 60, 60, 60, 60, 60, 10, 10, 10, 10, 11, 11, 10, 11]
]
},
}
}
}
}
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;
getBaseInfoDataOnline = (mineType, seasonIndex) => {
const json = initFilter(this.props.login.OrgId);
// extendOrder(json, "CREATE_TIME", 1);
json.Parameter1 = mineType;
json.Keyword = (seasonIndex == undefined ? this.state.seasonIndex : seasonIndex)
this.props.dispatch({
type: "app/getDataByPost",
url: "BI/BIController/getRiskPerformanceData",
payload: json2,
url: "BI/BISafe/GetBI056_1_1",
payload: json,
onlyData: false,
onComplete: (ret) => {
this.this.state.CheckCount(ret?.Data.checkMineType);
if (ret && ret.IsSuccessful) {
this.setState({ //设置setState全局变量
Data: {
legendName: ret.Data.lisLevelOrder,// ["公司级", "部门级", "车间级", "班组级"],
axisLabelMonth: this.state.Data.axisLabelMonth,// ret.Data.lisMineTypeOrder,//["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
mineTypeName: ret.Data.lisMineTypeOrder,//["露天矿", "选矿厂", "尾矿库", "职能部门"],
checkCountMonth: ret.Data.Count,// [
}, //将ret对象赋值给data, data供页面调用
})
this.CheckCount(this.state.Data, this.state.seasonIndex - 1);
} else {
message.error("获取信息失败,请刷新后再试!");
}
},
});
};
getBaseInfoData = (mineType) => {
this.CheckCount(this.state.ret.Data.checkMineType, this.state.seasonIndex - 1);
this.CheckCount(this.state.Data, this.state.seasonIndex - 1);
};
onSelectChange(seasonIndex) {
this.CheckCount(this.state.ret.Data.checkMineType, seasonIndex - 1);
// this.CheckCount(this.state.Data, seasonIndex - 1);
this.getBaseInfoDataOnline(null, seasonIndex)
};
// seasonIndex 从0开始
@ -134,11 +134,10 @@ class BI056Dilg1_1 extends React.Component {
for (let i = 0; i < 3; i++) {
axisLabelMonth.push((i + 1 + seasonIndex * 3) + '月');
}
var xAxisName = []
for (let i = 0; i < 3; i++) {
for (let j = 0; j < Data.mineTypeName.length; j++) {
xAxisName.push((i + 1 + seasonIndex * 3) + '月 ' + Data.mineTypeName[i])//3个月一图表
xAxisName.push((i + 1 + seasonIndex * 3) + '月 ' + Data.mineTypeName[j])//3个月一图表
}
}
@ -155,6 +154,7 @@ class BI056Dilg1_1 extends React.Component {
var month = this.state.month
var seriesShow = []
for (let i = 0; i < Data.mineTypeName.length; i++) {
var seriesData = []//数据 在每组数据中获取 Data.checkCountMonth[i]
@ -174,11 +174,12 @@ class BI056Dilg1_1 extends React.Component {
}
}
for (let j = dateIndexMin; j < dateIndexMax; j++) {
if (Data.checkCountMonth[i].length > j) {
seriesData.push(Data.checkCountMonth[i][j])
}
}
// for (let j = dateIndexMin; j < dateIndexMax; j++) {
// if (Data.checkCountMonth[i].length > j) {
// seriesData.push(Data.checkCountMonth[i][j])
// }
// }
seriesData = Data.checkCountMonth[i]
seriesShow.push({
name: Data.legendName[i],
@ -276,12 +277,12 @@ class BI056Dilg1_1 extends React.Component {
render() {
return (
<div style={{ backgroundColor: "#fff", top: "0", bottom: "0", left: "0", right: "0", margin: "auto" }} >
<div style={{ backgroundColor: "#fff", top: "0", bottom: "0", left: "0", right: "0", margin: "auto",width:"100%" }} >
{/* 第一行 */}
<Row gutter={12} style={{ marginTop: "5px", textAlign: "center" }}>
<Col span={1} > </Col>
<Col span={23} style={{ padding: 0 }}>
<Row gutter={12} style={{ marginTop: "5px", textAlign: "center",width:"100%" }}>
{/* <Col span={1} > </Col> */}
<Col span={24} style={{ padding: 0 }}>
<div style={{ float: "right", zIndex: 2 }}>
<Select onChange={value => this.onSelectChange(value)} defaultValue={this.state.seasonIndex} style={{ zIndex: 2, height: "30px", width: "100px", marginRight: "100px" }}>
<option value={1}>第一季度</option>
@ -292,7 +293,7 @@ class BI056Dilg1_1 extends React.Component {
</div>
<div id="divShow" style={{ width: "100%", height: "380px", marginTop: "30px", zIndex: 0 }}></div>
</Col>
<Col span={1} > </Col>
{/* <Col span={1} > </Col> */}
</Row>
<br />
</div>

View File

@ -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,8 +21,6 @@ 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: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
@ -31,36 +29,41 @@ class BI056Dilg1_2 extends React.Component {
}
}
}
}
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");

View File

@ -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月"],
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"

View File

@ -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,7 +25,6 @@ class BI056Dilg2_2 extends React.Component {
},
Data: {
mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
riskTop: {
yAxisName: [
["露天矿 隐患名称", "电机车轨道枕木下沉", "电机车刹车闸瓦磨损", "电机车导线线夹断裂", "电机车轨道断裂", "电机车刹车泵漏气"],
["选矿厂 隐患名称", "电车车轨道枕木下沉", "电机车刹车闸瓦磨损", "电机车导线线夹断裂", "电机车轨道断裂", "电机车刹车泵漏气"],
@ -41,21 +40,22 @@ class BI056Dilg2_2 extends React.Component {
}
}
}
}
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 (
<div style={{ backgroundColor: "#fff", top: "0", bottom: "0", left: "0", right: "0", margin: "auto" }} >

View File

@ -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,7 +25,6 @@ class BI056Dilg3_1 extends React.Component {
},
Data: {
axisLabelMonth: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
checkTypeInfo: {
mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
listLegendName: [
['巡回检查', '例行检查', '专业检查', '综合检查', '重大事故隐患专项排查'],
@ -38,31 +37,52 @@ class BI056Dilg3_1 extends React.Component {
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,

View File

@ -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,7 +25,6 @@ class BI056Dilg3_2 extends React.Component {
},
Data: {
axisLabelMonth: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
checkTypeInfo: {
mineTypeName: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
listLegendName: [
['巡回检查', '例行检查', '专业检查', '综合检查', '重大事故隐患专项排查'],
@ -38,32 +37,47 @@ class BI056Dilg3_2 extends React.Component {
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,

View File

@ -10,19 +10,28 @@ 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: ["露天矿", "选矿厂", "尾矿库", "职能部门"],
@ -57,36 +66,110 @@ class BI056Performance extends React.Component {
}
}
}
}
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 {
</Col>
<Col span={1}></Col>
<Col span={11} className="risk-model-col" style={{ padding: 0 }}>
<Col span={10} className="risk-model-col" style={{ padding: 0 }}>
<div className="home-always-title">
<div className="home-always-left">
<div className="home-always-badge"></div>
@ -879,7 +944,7 @@ class BI056Performance extends React.Component {
<div id="divRiskDeal2_1" style={{ width: "100%", height: "330px" }}></div>
</Col>
<Col span={1}></Col>
<Col span={11} className="risk-model-col" style={{ padding: 0 }}>
<Col span={10} className="risk-model-col" style={{ padding: 0 }}>
<div className="home-always-title">
<div className="home-always-left">
<div className="home-always-badge"></div>
@ -914,7 +979,7 @@ class BI056Performance extends React.Component {
</div>
</Col>
<Col span={1}></Col>
<Col span={11} className="risk-model-col" style={{ padding: 0 }}>
<Col span={10} className="risk-model-col" style={{ padding: 0 }}>
<div className="home-always-title">
<div className="home-always-left">
<div className="home-always-badge"></div>

View File

@ -108,6 +108,7 @@ class CM030ShowPrint extends React.Component {
</div>
<FormPage {...this.state.tmpData} />
<div ref={el => (this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.data.id}>
<h1 className={styles.showPrintHead}>应急装备需求调查</h1>
{
data ? <div style={{ width: '95%' }}>
<Descriptions title='' size='middle' bordered>

View File

@ -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,6 +108,27 @@ function ExportToExcel (props) {
if (res && res.IsSuccessful) {
const { Data, TotalCount } = res
onlineDataSource = [...onlineDataSource, ...Data]
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
}
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) {
@ -122,6 +147,7 @@ function ExportToExcel (props) {
}
}
}
}
})
}

View File

@ -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);

View File

@ -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