Commit bc0a440a authored by taabe's avatar taabe

修改bug

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