Commit f0de9c50 authored by 单奇雲's avatar 单奇雲

Merge

parents cae45b51 b6f2400c
...@@ -218,7 +218,8 @@ export const FasSerUrl = { ...@@ -218,7 +218,8 @@ export const FasSerUrl = {
textPlanDownloadFile: completePrefix(baseURI, 'api/visual/plan/text/downloadFile/{id}'),//下载文件 textPlanDownloadFile: completePrefix(baseURI, 'api/visual/plan/text/downloadFile/{id}'),//下载文件
uploadTextPlan: completePrefix(baseURI, 'file/plan/{appId}/texts'), uploadTextPlan: completePrefix(baseURI, 'file/plan/{appId}/texts'),
getTreeNodeTypeUrl: completePrefix(baseURI, 'api/riskModel/riskSource/getChildTypeByPid?riskSourceId={riskSourceId}'),// 根据节点ID获取子节点可能的类型 getTreeNodeTypeUrl: completePrefix(baseURI, 'api/riskModel/riskSource/getChildTypeByPid?riskSourceId={riskSourceId}'),// 根据节点ID获取子节点可能的类型
getAllUserUrl: completePrefix(baseURI, 'api/common/user/list')//获取所有用户 getAllUserUrl: completePrefix(baseURI, 'api/common/user/list'),//获取所有用户
queryFmeaControlObjUrl: endConf.completePrifix(baseURI, 'api/riskModel/fmea/{ids}/controlObjCount')//根据fmea id查询关联对象个数
}; };
......
...@@ -155,6 +155,11 @@ export const getTreeNodeTypeAction = (riskSourceId) => { ...@@ -155,6 +155,11 @@ export const getTreeNodeTypeAction = (riskSourceId) => {
return commonGet(url); return commonGet(url);
}; };
export const queryFmeaControlObjAction = (ids) => {
let url = formatUrl(FasSerUrl.queryFmeaControlObjUrl, { ids });
return commonGet(url);
};
/** /**
* 获取预案树 * 获取预案树
*/ */
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
background-color: $biz-title-color; background-color: $biz-title-color;
} }
position: absolute; position: absolute;
width: 50%; width: 60%;
height: calc(100% - 42px); height: calc(100% - 42px);
border-color: $biz-border-color; border-color: $biz-border-color;
background-color: $content-color; background-color: $content-color;
...@@ -62,9 +62,9 @@ ...@@ -62,9 +62,9 @@
} }
.risk-model-eva { .risk-model-eva {
position: absolute; position: absolute;
width: 50%; width: 40%;
height: calc(100% - 42px); height: calc(100% - 42px);
left: 50%; left: 60%;
.risk-eva-span { .risk-eva-span {
display: block; display: block;
border-style: solid hidden solid hidden; border-style: solid hidden solid hidden;
...@@ -186,6 +186,14 @@ ...@@ -186,6 +186,14 @@
width: 42px; width: 42px;
min-width: 42px; min-width: 42px;
} }
.ant-table-tbody {
tr {
td {
white-space: pre-line;
}
}
}
} }
} }
......
...@@ -16,21 +16,21 @@ const getColumns = () => { ...@@ -16,21 +16,21 @@ const getColumns = () => {
title: '设备名称', title: '设备名称',
dataIndex: 'equipmentName', dataIndex: 'equipmentName',
key: 'equipmentName', key: 'equipmentName',
width: '30%', width: '25%',
className: 'uant-table-thead' className: 'uant-table-thead'
}, },
{ {
title: '区域', title: '所属重点设备',
dataIndex: 'productionArea', dataIndex: 'importantEquip',
key: 'productionArea', key: 'importantEquip',
width: '30%', width: '25%',
className: 'uant-table-thead' className: 'uant-table-thead'
}, },
{ {
title: '监测对象', title: '指标项',
dataIndex: 'equipmentPointNames', dataIndex: 'equipmentPointNames',
key: 'equipmentPointNames', key: 'equipmentPointNames',
width: '30%', width: '35%',
className: 'uant-table-thead' className: 'uant-table-thead'
} }
]; ];
......
...@@ -5,18 +5,18 @@ import AmosGridTable from './../../common/tableComponent/table/AmosGridTable'; ...@@ -5,18 +5,18 @@ import AmosGridTable from './../../common/tableComponent/table/AmosGridTable';
const getColumns = () => { const getColumns = () => {
return [ return [
{ // {
title: '巡检点编号', // title: '巡检点编号',
dataIndex: 'pointNo', // dataIndex: 'pointNo',
key: 'pointNo', // key: 'pointNo',
width: '10%', // width: '10%',
className: 'uant-table-thead' // className: 'uant-table-thead'
}, // },
{ {
title: '巡检点名称', title: '巡检点名称',
dataIndex: 'pointName', dataIndex: 'pointName',
key: 'pointName', key: 'pointName',
width: '20%', width: '18%',
className: 'uant-table-thead' className: 'uant-table-thead'
},{ },{
title: '责任部门/区域', title: '责任部门/区域',
...@@ -34,13 +34,13 @@ const getColumns = () => { ...@@ -34,13 +34,13 @@ const getColumns = () => {
title: '联系电话', title: '联系电话',
dataIndex: 'tel', dataIndex: 'tel',
key: 'tel', key: 'tel',
width: '15%', width: '12%',
className: 'uant-table-thead' className: 'uant-table-thead'
},{ },{
title: '检查项', title: '检查项',
dataIndex: 'inputItems', dataIndex: 'inputItems',
key: 'inputItems', key: 'inputItems',
width: '30%', width: '40%',
className: 'uant-table-thead' className: 'uant-table-thead'
} }
]; ];
...@@ -167,6 +167,9 @@ class AssociatedPointTable extends Component { ...@@ -167,6 +167,9 @@ class AssociatedPointTable extends Component {
} }
AssociatedPointTable.propTypes = { AssociatedPointTable.propTypes = {
dataList: PropTypes.array,
fetchData: PropTypes.func,
totalCount: PropTypes.number
}; };
export default AssociatedPointTable; export default AssociatedPointTable;
...@@ -17,41 +17,66 @@ const getColumns = (self) => { ...@@ -17,41 +17,66 @@ const getColumns = (self) => {
title: '事故类型', title: '事故类型',
dataIndex: 'accidentTypeName', dataIndex: 'accidentTypeName',
key: 'accidentTypeName', key: 'accidentTypeName',
width: '5%', width: '4%',
className: 'uant-table-thead' className: 'uant-table-thead'
}, },
{ {
title: '失效影响/事故', title: '辨识人',
dataIndex: 'influence', dataIndex: 'identifyUserName',
key: 'influence', key: 'identifyUserName',
width: '10%', width: '4%',
className: 'uant-table-thead' className: 'uant-table-thead'
}, },
{ {
title: '严重度Si', title: '辨识方法',
dataIndex: 'evaluationS', dataIndex: 'identifyMethod',
key: 'evaluationS', key: 'identifyMethod',
width: '4%', width: '5%',
className: 'uant-table-thead' className: 'uant-table-thead'
}, },
{ {
title: '故障频数Oi', title: '严重度Si',
dataIndex: 'evaluationO', dataIndex: 'evaluationS',
key: 'evaluationO', key: 'evaluationS',
width: '4%', width: '3%',
className: 'uant-table-thead' className: 'uant-table-thead'
}, },
{ {
title: '探测度Di', title: '探测度Di',
dataIndex: 'evaluationD', dataIndex: 'evaluationD',
key: 'evaluationD', key: 'evaluationD',
width: '4%', width: '3%',
className: 'uant-table-thead'
},
{
title: '故障频数Oi',
dataIndex: 'evaluationO',
key: 'evaluationO',
width: '3.5%',
className: 'uant-table-thead' className: 'uant-table-thead'
},{ },{
title: 'RPNi', title: 'RPNi',
dataIndex: 'rpni', dataIndex: 'rpni',
key: 'rpni', key: 'rpni',
width: '4%', width: '3%',
className: 'uant-table-thead'
},{
title: '故障频数Or',
dataIndex: 'newEvaluationO',
key: 'newEvaluationO',
width: '3.5%',
className: 'uant-table-thead'
},{
title: 'RPNr',
dataIndex: 'rpn',
key: 'rpn',
width: '3%',
className: 'uant-table-thead'
},{
title: '等级',
dataIndex: 'level',
key: 'level',
width: '2.5%',
className: 'uant-table-thead' className: 'uant-table-thead'
},{ },{
title: '管控措施', title: '管控措施',
...@@ -59,55 +84,55 @@ const getColumns = (self) => { ...@@ -59,55 +84,55 @@ const getColumns = (self) => {
title: '工程措施', title: '工程措施',
dataIndex: 'engineering', dataIndex: 'engineering',
key: 'engineering', key: 'engineering',
width: '8%', width: '7.5%',
className: 'uant-table-thead' className: 'uant-table-thead'
},{ },{
title: '管理措施', title: '管理措施',
dataIndex: 'management', dataIndex: 'management',
key: 'management', key: 'management',
width: '8%', width: '7.5%',
className: 'uant-table-thead' className: 'uant-table-thead'
},{ },{
title: '培训教育', title: '培训教育',
dataIndex: 'train', dataIndex: 'train',
key: 'train', key: 'train',
width: '8%', width: '7.5%',
className: 'uant-table-thead' className: 'uant-table-thead'
},{ },{
title: '个体防护', title: '个体防护',
dataIndex: 'protection', dataIndex: 'protection',
key: 'protection', key: 'protection',
width: '8%', width: '7.5%',
className: 'uant-table-thead' className: 'uant-table-thead'
},{ },{
title: '应急处置', title: '应急处置',
dataIndex: 'disposal', dataIndex: 'disposal',
key: 'disposal', key: 'disposal',
width: '8%', width: '7.5%',
className: 'uant-table-thead' className: 'uant-table-thead'
}] }]
},{ },{
title: '责任人', title: '责任人',
children: [{ children: [{
title: '公司责任人', title: '公司',
dataIndex: 'companyLeaderName', dataIndex: 'companyLeaderName',
key: 'companyLeaderName', key: 'companyLeaderName',
width: '4%', width: '4%',
className: 'uant-table-thead' className: 'uant-table-thead'
},{ },{
title: '部门责任人', title: '部门',
dataIndex: 'departmentLeaderName', dataIndex: 'departmentLeaderName',
key: 'departmentLeaderName', key: 'departmentLeaderName',
width: '4%', width: '4%',
className: 'uant-table-thead' className: 'uant-table-thead'
},{ },{
title: '班组责任人', title: '班组',
dataIndex: 'groupLeaderName', dataIndex: 'groupLeaderName',
key: 'groupLeaderName', key: 'groupLeaderName',
width: '4%', width: '4%',
className: 'uant-table-thead' className: 'uant-table-thead'
},{ },{
title: '个人责任人', title: '岗位',
dataIndex: 'personLeaderName', dataIndex: 'personLeaderName',
key: 'personLeaderName', key: 'personLeaderName',
width: '4%', width: '4%',
......
...@@ -28,13 +28,15 @@ class ToolBar extends Component { ...@@ -28,13 +28,15 @@ class ToolBar extends Component {
render() { render() {
const { activeKey } = this.props; const { activeKey } = this.props;
let key = activeKey === '2' ? '2' : '3';
return ( return (
<div className='risk-lever-toolbar'> <div className='risk-lever-toolbar'>
<div className='risk-lever-button' > <div className='risk-lever-button' >
<Button title='添加' icon={<BizIcon icon="tianjia" />} transparent onClick={e => this.onClick(e,'1')} /> <Button title='添加' icon={<BizIcon icon="tianjia" />} transparent onClick={e => this.onClick(e,'1')} />
<Button title='修改' icon={<BizIcon icon="xiugai" />} transparent onClick={e => this.onClick(e,'2')} />
{ activeKey === '1' && <Button title='评价' icon={<BizIcon icon="buzhou-queren" />} transparent onClick={e => this.onClick(e,'4')} />} { activeKey === '1' && <Button title='评价' icon={<BizIcon icon="buzhou-queren" />} transparent onClick={e => this.onClick(e,'4')} />}
<Button title='删除' icon={<BizIcon icon="shanchu" />} transparent onClick={e => this.onClick(e,'3')} /> { activeKey === '1' && <Button title='编辑' icon={<BizIcon icon="xiugai" />} transparent onClick={e => this.onClick(e,'2')} />}
<Button title='删除' icon={<BizIcon icon="shanchu" />} transparent onClick={e => this.onClick(e, key)} />
<Button title='刷新' icon={<BizIcon icon="zhongzuo" />} transparent onClick={e => this.onClick(e,'5')} />
</div> </div>
</div> </div>
); );
......
...@@ -16,7 +16,8 @@ import { ...@@ -16,7 +16,8 @@ import {
deleteAssoPointAction, deleteAssoPointAction,
queryRiskSourceDetailAction, queryRiskSourceDetailAction,
updateRiskSourceRpniAction, updateRiskSourceRpniAction,
getTreeNodeTypeAction getTreeNodeTypeAction,
queryFmeaControlObjAction
} from '../../../../services/preControlService'; } from '../../../../services/preControlService';
import ToolBar from './common/ToolBar'; import ToolBar from './common/ToolBar';
import FmeaTable from './FmeaTable'; import FmeaTable from './FmeaTable';
...@@ -245,7 +246,7 @@ class RiskModel extends Component { ...@@ -245,7 +246,7 @@ class RiskModel extends Component {
} }
onToolBarClick = (toolBarFlag, activeKey, parent) => { onToolBarClick = (toolBarFlag, activeKey, parent) => {
const { subActiveKey } = this.state; const { subActiveKey, param } = this.state;
if (toolBarFlag === '1') {//新增 if (toolBarFlag === '1') {//新增
this.setOpenModelParam(activeKey, subActiveKey, toolBarFlag); this.setOpenModelParam(activeKey, subActiveKey, toolBarFlag);
} else if (toolBarFlag === '2') {//编辑 } else if (toolBarFlag === '2') {//编辑
...@@ -298,6 +299,16 @@ class RiskModel extends Component { ...@@ -298,6 +299,16 @@ class RiskModel extends Component {
return; return;
} }
this.setOpenModelParam(activeKey, subActiveKey, toolBarFlag); this.setOpenModelParam(activeKey, subActiveKey, toolBarFlag);
} else if (toolBarFlag === '5') {//刷新
// let ref;
// if (activeKey === '1') {
// ref = this.fmeaRef;
// } else if (activeKey === '2' && subActiveKey === '2-1') {
// ref = this.pointRef;
// } else if (activeKey === '2' && subActiveKey === '2-2') {
// ref = this.equipRef;
// }
this.questStatistiscData(this.pageConfig);
} }
} }
...@@ -314,7 +325,11 @@ class RiskModel extends Component { ...@@ -314,7 +325,11 @@ class RiskModel extends Component {
deleteParamByActiveKey =(selectedRowKeys,selectedRows, activeKey, subActiveKey)=>{ deleteParamByActiveKey =(selectedRowKeys,selectedRows, activeKey, subActiveKey)=>{
if (activeKey === '1'){ if (activeKey === '1'){
let record = selectedRows[0]; let record = selectedRows[0];
this.fmeaDelete(selectedRowKeys, record.riskSourceId); let ids = [];
selectedRows.map(r => ids.push(r.id));
queryFmeaControlObjAction(ids).then(data => {
this.fmeaDelete(selectedRowKeys, selectedRows, record.riskSourceId, data.dataList);
});
} else if (activeKey === '2' && subActiveKey === '2-1'){ } else if (activeKey === '2' && subActiveKey === '2-1'){
this.deleteAssoPoint(selectedRows); this.deleteAssoPoint(selectedRows);
} else if (activeKey === '2' && subActiveKey === '2-2'){ } else if (activeKey === '2' && subActiveKey === '2-2'){
...@@ -533,10 +548,16 @@ class RiskModel extends Component { ...@@ -533,10 +548,16 @@ class RiskModel extends Component {
); );
}; };
fmeaDelete = (fmeaIds, riskSourceId) => { fmeaDelete = (fmeaIds, selectedRows, riskSourceId, associatedObjCount) => {
// let id = record.id;
let { node } = this.state; let { node } = this.state;
AmosAlert.confirm('提示', '确定要删除么?', { let doubleConfirm = false;
selectedRows.map(row => {
if (row.evaluationOid > 0) {
doubleConfirm = true;
}
});
let msg = (doubleConfirm || associatedObjCount > 0) ? '删除后会清空评价和关联对象相关数据,是否确认删除?' : '确定要删除么?';
AmosAlert.confirm('提示', msg, {
callback: flag => { callback: flag => {
if (flag) { if (flag) {
// 确定 // 确定
...@@ -587,11 +608,12 @@ class RiskModel extends Component { ...@@ -587,11 +608,12 @@ class RiskModel extends Component {
} }
} else if (modelFlag === 'point'){ } else if (modelFlag === 'point'){
if (toolBarFlag){ if (toolBarFlag){
let { pointData } = this.state;
if (toolBarFlag === '1'){//新增 if (toolBarFlag === '1'){//新增
return <PointModel fmeaId={fmeaId} ref={component =>this.model = component} bindPointsCallback={this.bindPointsCallback} /> ; return <PointModel bindingPoints={pointData} fmeaId={fmeaId} ref={component =>this.model = component} bindPointsCallback={this.bindPointsCallback} /> ;
} else if (this.pointRef) { } else if (this.pointRef) {
const { selectedRows } = this.pointRef.state; const { selectedRows } = this.pointRef.state;
return <PointModel {...selectedRows[0]} fmeaId={fmeaId} ref={component => this.model = component} bindPointsCallback={this.bindPointsCallback} /> ; return <PointModel bindingPoints={pointData} {...selectedRows[0]} fmeaId={fmeaId} ref={component => this.model = component} bindPointsCallback={this.bindPointsCallback} /> ;
} }
} }
} else if (modelFlag === 'equip'){ } else if (modelFlag === 'equip'){
...@@ -774,7 +796,7 @@ class RiskModel extends Component { ...@@ -774,7 +796,7 @@ class RiskModel extends Component {
remove = (targetKey) => { remove = (targetKey) => {
const panes = this.state.panes.filter(pane => pane.key !== targetKey); const panes = this.state.panes.filter(pane => pane.key !== targetKey);
this.setState({ panes, activeKey: '1' }); this.setState({ panes, activeKey: '1', pointData: [], equipData: [], pointDataTotalNum: 0, equipDataTotalNum: 0 });
} }
add = () => { add = () => {
...@@ -782,7 +804,7 @@ class RiskModel extends Component { ...@@ -782,7 +804,7 @@ class RiskModel extends Component {
const activeKey = '2'; const activeKey = '2';
let pane = panes.filter(pane => pane.key === activeKey); let pane = panes.filter(pane => pane.key === activeKey);
pane.length === 0 && panes.push({ title: '关联对象', content: '关联对象', key: activeKey }); pane.length === 0 && panes.push({ title: '关联对象', content: '关联对象', key: activeKey });
this.setState({ panes, activeKey }); this.setState({ panes, activeKey, pointData: [], equipData: [], pointDataTotalNum: 0, equipDataTotalNum: 0 });
} }
getTabPaneContent = (key) => { getTabPaneContent = (key) => {
...@@ -849,6 +871,8 @@ class RiskModel extends Component { ...@@ -849,6 +871,8 @@ class RiskModel extends Component {
<div className='risk-model-tree' onScroll={this.onscroll}> <div className='risk-model-tree' onScroll={this.onscroll}>
<Tree <Tree
expandedKeys={expandedKeys} expandedKeys={expandedKeys}
defaultExpandParent
draggable={true}
onExpand={this.onExpand} onExpand={this.onExpand}
selectedKeys={selectedKeys} selectedKeys={selectedKeys}
autoExpandParent={autoExpandParent} autoExpandParent={autoExpandParent}
...@@ -863,7 +887,7 @@ class RiskModel extends Component { ...@@ -863,7 +887,7 @@ class RiskModel extends Component {
<div className='risk-model-eva'> <div className='risk-model-eva'>
<span className='risk-eva-span'>风险评价</span> <span className='risk-eva-span'>风险评价</span>
<div className='risk-model-eva-con'> <div className='risk-model-eva-con'>
<SplitPane percentage mainPaneIndex={0} secondaryDefaultSize={67}> <SplitPane percentage mainPaneIndex={0} secondaryDefaultSize={50}>
<div className="risk-model-eva-con-one"> <div className="risk-model-eva-con-one">
<div className="con-eva-key">编号 </div> <div className="con-eva-key">编号 </div>
<div className="con-eva-value">{code}</div> <div className="con-eva-value">{code}</div>
...@@ -873,10 +897,6 @@ class RiskModel extends Component { ...@@ -873,10 +897,6 @@ class RiskModel extends Component {
<div className="con-eva-key">等级</div> <div className="con-eva-key">等级</div>
<div className="con-eva-value">{level}</div> <div className="con-eva-value">{level}</div>
</div> </div>
<div className="risk-model-eva-con-three">
<div className="con-eva-key">RPNI</div>
<div className="con-eva-value">{rpni}</div>
</div>
</SplitPane> </SplitPane>
</SplitPane> </SplitPane>
</div> </div>
......
...@@ -15,7 +15,7 @@ const getEquipColumns = () => { ...@@ -15,7 +15,7 @@ const getEquipColumns = () => {
className: 'uant-table-thead' className: 'uant-table-thead'
}, },
{ {
title: '设备名称', title: '重点设备',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: '70%', width: '70%',
......
...@@ -13,7 +13,7 @@ const getAssoEquipColumns = () => { ...@@ -13,7 +13,7 @@ const getAssoEquipColumns = () => {
width: '30%' width: '30%'
}, },
{ {
title: '名称', title: '指标项',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: '70%' width: '70%'
...@@ -146,7 +146,7 @@ class FireEquipIndexTable extends Component { ...@@ -146,7 +146,7 @@ class FireEquipIndexTable extends Component {
isPageable={pagination} isPageable={pagination}
dataList={dataList} dataList={dataList}
getTableDataAction={()=>{}} getTableDataAction={()=>{}}
selectedRowKeys={selects} selectedRowKeys={selectedRowKeys}
getSelectedRows={this.getSelectedRows} getSelectedRows={this.getSelectedRows}
rowClassName={this.getRowClassName} rowClassName={this.getRowClassName}
onRowClick={this.onRowClick} onRowClick={this.onRowClick}
......
...@@ -13,7 +13,7 @@ const getAssoEquipColumns = () => { ...@@ -13,7 +13,7 @@ const getAssoEquipColumns = () => {
width: '30%' width: '30%'
}, },
{ {
title: '名称', title: '监测设备',
dataIndex: 'fName', dataIndex: 'fName',
key: 'fName', key: 'fName',
width: '70%' width: '70%'
......
...@@ -189,8 +189,20 @@ class PointModel extends Component { ...@@ -189,8 +189,20 @@ class PointModel extends Component {
} }
queryPoint = (searchParam, pageNumber, pageSize) =>{ queryPoint = (searchParam, pageNumber, pageSize) =>{
let { bindingPoints } = this.props;
let { pointId } = { ...this.props };
let bindingPointIds = [];
if (!pointId) {
bindingPoints.map(p => {
bindingPointIds.push(p.id);
});
let bindPointsParam = {};
bindPointsParam.name = 'bindPointIds';
bindPointsParam.value = bindingPointIds.join();
searchParam.push(bindPointsParam);
}
queryPointPageListAction(searchParam, pageNumber, pageSize).then(data =>{ queryPointPageListAction(searchParam, pageNumber, pageSize).then(data =>{
this.setState({ dataList:data.content, totalCount:data.totalElements }); this.setState({ dataList: data.content, totalCount: data.totalElements });
}); });
} }
...@@ -275,6 +287,7 @@ class PointModel extends Component { ...@@ -275,6 +287,7 @@ class PointModel extends Component {
PointModel.propTypes = { PointModel.propTypes = {
fmeaId: PropTypes.number, fmeaId: PropTypes.number,
bindPointsCallback: PropTypes.func bindPointsCallback: PropTypes.func,
bindingPoints: PropTypes.array
}; };
export default PointModel; export default PointModel;
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