Commit bc0a440a authored by taabe's avatar taabe

修改bug

parent 98bed1c1
node_modules
released
dist
zip
......@@ -145,6 +145,14 @@
background: white;
}
}
.amos-radio-disabled {
.amos-radio-status {
&::after {
background-color: #19afff !important;
}
}
}
}
.risk-model-table {
......@@ -154,7 +162,7 @@
overflow-x: scroll;
.grid-content {
width: 1500px;
width: 2000px;
}
}
......
......@@ -10,7 +10,7 @@ const getColumns = (self) => {
title: '危险因素',
dataIndex: 'riskFactorName',
key: 'riskFactorName',
width: '8%',
width: '7%',
className: 'uant-table-thead'
},
{
......@@ -31,21 +31,21 @@ const getColumns = (self) => {
title: '严重度Si',
dataIndex: 'evaluationS',
key: 'evaluationS',
width: '5%',
width: '4%',
className: 'uant-table-thead'
},
{
title: '故障频数Oi',
dataIndex: 'evaluationO',
key: 'evaluationO',
width: '5%',
width: '4%',
className: 'uant-table-thead'
},
{
title: '探测度Di',
dataIndex: 'evaluationD',
key: 'evaluationD',
width: '5%',
width: '4%',
className: 'uant-table-thead'
},{
title: 'RPNi',
......@@ -59,44 +59,65 @@ const getColumns = (self) => {
title: '工程措施',
dataIndex: 'engineering',
key: 'engineering',
width: '9%',
width: '8%',
className: 'uant-table-thead'
},{
title: '管理措施',
dataIndex: 'management',
key: 'management',
width: '9%',
width: '8%',
className: 'uant-table-thead'
},{
title: '培训教育',
dataIndex: 'train',
key: 'train',
width: '9%',
width: '8%',
className: 'uant-table-thead'
},{
title: '个体防护',
dataIndex: 'protection',
key: 'protection',
width: '9%',
width: '8%',
className: 'uant-table-thead'
},{
title: '应急处置',
dataIndex: 'disposal',
key: 'disposal',
width: '9%',
width: '8%',
className: 'uant-table-thead'
}]
},{
title: '责任人',
dataIndex: 'charger',
key: 'charger',
width: '5%',
className: 'uant-table-thead'
children: [{
title: '公司责任人',
dataIndex: 'companyLeaderName',
key: 'companyLeaderName',
width: '4%',
className: 'uant-table-thead'
},{
title: '部门责任人',
dataIndex: 'departmentLeaderName',
key: 'departmentLeaderName',
width: '4%',
className: 'uant-table-thead'
},{
title: '班组责任人',
dataIndex: 'groupLeaderName',
key: 'groupLeaderName',
width: '4%',
className: 'uant-table-thead'
},{
title: '个人责任人',
dataIndex: 'personLeaderName',
key: 'personLeaderName',
width: '4%',
className: 'uant-table-thead'
}]
},{
title: '管控对象',
dataIndex: 'controlObj',
key: 'controlObj',
width: '5%',
width: '4%',
render: (text, record, index) => {
return (
<span>
......
......@@ -325,6 +325,7 @@ class RiskModel extends Component {
});
} else if (modelFlag === 'fmea') {
if (riskSourceId) {
let { node } = this.state;
Object.assign(form, { 'riskSourceId': riskSourceId });
this.model.form.validate((valid, dataValues) => {
if (valid) {
......@@ -341,7 +342,7 @@ class RiskModel extends Component {
});
}
this.femaEdit(fmeaObjList);
this.setState({ modal: false });
this.setState({ modal: false }, () => this.refeshRiskSourceDetail(node.id));
} else {
return false;
}
......@@ -510,6 +511,7 @@ class RiskModel extends Component {
fmeaDelete = (fmeaIds, riskSourceId) => {
// let id = record.id;
let { node } = this.state;
AmosAlert.confirm('提示', '确定要删除么?', {
callback: flag => {
if (flag) {
......@@ -519,6 +521,7 @@ class RiskModel extends Component {
AmosAlert.success('提示', '删除成功');
this.reload();
// this.updateRiskSourceRpni(riskSourceId);
this.refeshRiskSourceDetail(node.id);
},
err => {
AmosAlert.error('错误', err);
......@@ -672,6 +675,7 @@ class RiskModel extends Component {
onSelect =(selectedKeys,e)=>{
this.remove('2');
this.fmeaRef && this.fmeaRef.setState({ selectedRowKeys: [], selectedRows: [] });
this.setState({
isRegion: e.node.props.isRegion,
node: e.node.props,
......
......@@ -198,6 +198,7 @@ class EvaluationModel extends Component {
<Select
className="fmea-model-select"
data={sData}
searchable
renderOption={item => <Option value={parseInt(item.id)}>{item.coefficient}-{item.influence}</Option>}
value={parseInt(form.evaluationSid)}
onChange={(e, item) => this.onSelectChange('evaluationSid', e, item)}
......@@ -207,6 +208,7 @@ class EvaluationModel extends Component {
<Select
className="fmea-model-select"
data={oData}
searchable
renderOption={item => (
<Option value={parseInt(item.id)}>
{item.coefficient}-{item.influence}-{item.describe}
......@@ -220,6 +222,7 @@ class EvaluationModel extends Component {
<Select
className="fmea-model-select"
data={dData}
searchable
renderOption={item => (
<Option value={parseInt(item.id)}>
{item.coefficient}-{item.describe}
......
import React, { Component } from 'react';
import { Form, Input, Select, Divider, MultiSelect } from 'amos-framework';
import { accidentTypeNoPageAction, queryRiskFactorNoPageAction, queryEvaModelAction } from '../../../../../services/preControlService';
import { accidentTypeNoPageAction, queryRiskFactorNoPageAction, queryEvaModelAction,
queryAllUserAction } from '../../../../../services/preControlService';
const FormItem = Form.Item;
const Option = Select.Option;
......@@ -20,6 +21,7 @@ class RiskFactorModel extends Component {
identifyMethod: ''
},
riskFactorData: [],
userData: [],
rules: {
riskFactorIds: [{ required: true, message: '危险因素不能为空' }]
}
......@@ -34,6 +36,7 @@ class RiskFactorModel extends Component {
componentDidMount = () => {
this.getRiskFactorData();
this.getUser();
};
......@@ -65,8 +68,14 @@ class RiskFactorModel extends Component {
});
};
getUser = () => {
queryAllUserAction().then(data => {
this.setState({ userData: data });
});
}
render() {
const { form, rules, riskFactorData } = this.state;
const { form, rules, riskFactorData, userData } = this.state;
const formItemLayout = {
labelCol: {
xs: { span: 24 },
......@@ -86,12 +95,18 @@ class RiskFactorModel extends Component {
<span className="fmea-item-span">基本信息:</span>
<Divider />
<FormItem label={<span>辨识人</span>} className="fmea-item-influence" field="identifyUser" {...formItemLayout}>
<Input className="risk_factor_input" value={form.influence} onChange={e => this.onSelectChange('influence', e.target.value)} />
<Select
className="fmea-model-select"
data={userData}
renderOption={item => <Option value={parseInt(item.id)}>{item.name}</Option>}
value={parseInt(form.identifyUser)}
onChange={(e, item) => this.onSelectChange('identifyUser', e, item)}
/>
</FormItem>
<FormItem label={<span>辨识方法</span>} className="fmea-item-influence" field="identifyMethod" {...formItemLayout}>
<Input className="risk_factor_input" value={form.influence} onChange={e => this.onSelectChange('influence', e.target.value)} />
<Input className="risk_factor_input" value={form.identifyMethod} onChange={e => this.onSelectChange('identifyMethod', e.target.value)} />
</FormItem>
<span className="fmea-item-span">危险有害因素:</span>
<span className="fmea-item-span">危险有害因素:</span>
<Divider />
<FormItem label={<span>危险因素</span>} className="fmea-item-risk-factor" field="riskFactorsId" {...formItemLayout}>
<div className="risk-factor-select" style={{ height: '200px' }} >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment