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

Merge

parents cae45b51 b6f2400c
......@@ -218,7 +218,8 @@ export const FasSerUrl = {
textPlanDownloadFile: completePrefix(baseURI, 'api/visual/plan/text/downloadFile/{id}'),//下载文件
uploadTextPlan: completePrefix(baseURI, 'file/plan/{appId}/texts'),
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) => {
return commonGet(url);
};
export const queryFmeaControlObjAction = (ids) => {
let url = formatUrl(FasSerUrl.queryFmeaControlObjUrl, { ids });
return commonGet(url);
};
/**
* 获取预案树
*/
......
......@@ -41,7 +41,7 @@
background-color: $biz-title-color;
}
position: absolute;
width: 50%;
width: 60%;
height: calc(100% - 42px);
border-color: $biz-border-color;
background-color: $content-color;
......@@ -62,9 +62,9 @@
}
.risk-model-eva {
position: absolute;
width: 50%;
width: 40%;
height: calc(100% - 42px);
left: 50%;
left: 60%;
.risk-eva-span {
display: block;
border-style: solid hidden solid hidden;
......@@ -186,6 +186,14 @@
width: 42px;
min-width: 42px;
}
.ant-table-tbody {
tr {
td {
white-space: pre-line;
}
}
}
}
}
......
......@@ -16,21 +16,21 @@ const getColumns = () => {
title: '设备名称',
dataIndex: 'equipmentName',
key: 'equipmentName',
width: '30%',
width: '25%',
className: 'uant-table-thead'
},
{
title: '区域',
dataIndex: 'productionArea',
key: 'productionArea',
width: '30%',
title: '所属重点设备',
dataIndex: 'importantEquip',
key: 'importantEquip',
width: '25%',
className: 'uant-table-thead'
},
{
title: '监测对象',
title: '指标项',
dataIndex: 'equipmentPointNames',
key: 'equipmentPointNames',
width: '30%',
width: '35%',
className: 'uant-table-thead'
}
];
......
......@@ -5,18 +5,18 @@ import AmosGridTable from './../../common/tableComponent/table/AmosGridTable';
const getColumns = () => {
return [
{
title: '巡检点编号',
dataIndex: 'pointNo',
key: 'pointNo',
width: '10%',
className: 'uant-table-thead'
},
// {
// title: '巡检点编号',
// dataIndex: 'pointNo',
// key: 'pointNo',
// width: '10%',
// className: 'uant-table-thead'
// },
{
title: '巡检点名称',
dataIndex: 'pointName',
key: 'pointName',
width: '20%',
width: '18%',
className: 'uant-table-thead'
},{
title: '责任部门/区域',
......@@ -34,13 +34,13 @@ const getColumns = () => {
title: '联系电话',
dataIndex: 'tel',
key: 'tel',
width: '15%',
width: '12%',
className: 'uant-table-thead'
},{
title: '检查项',
dataIndex: 'inputItems',
key: 'inputItems',
width: '30%',
width: '40%',
className: 'uant-table-thead'
}
];
......@@ -167,6 +167,9 @@ class AssociatedPointTable extends Component {
}
AssociatedPointTable.propTypes = {
dataList: PropTypes.array,
fetchData: PropTypes.func,
totalCount: PropTypes.number
};
export default AssociatedPointTable;
......@@ -17,41 +17,66 @@ const getColumns = (self) => {
title: '事故类型',
dataIndex: 'accidentTypeName',
key: 'accidentTypeName',
width: '5%',
width: '4%',
className: 'uant-table-thead'
},
{
title: '失效影响/事故',
dataIndex: 'influence',
key: 'influence',
width: '10%',
title: '辨识人',
dataIndex: 'identifyUserName',
key: 'identifyUserName',
width: '4%',
className: 'uant-table-thead'
},
{
title: '严重度Si',
dataIndex: 'evaluationS',
key: 'evaluationS',
width: '4%',
title: '辨识方法',
dataIndex: 'identifyMethod',
key: 'identifyMethod',
width: '5%',
className: 'uant-table-thead'
},
{
title: '故障频数Oi',
dataIndex: 'evaluationO',
key: 'evaluationO',
width: '4%',
title: '严重度Si',
dataIndex: 'evaluationS',
key: 'evaluationS',
width: '3%',
className: 'uant-table-thead'
},
{
title: '探测度Di',
dataIndex: 'evaluationD',
key: 'evaluationD',
width: '4%',
width: '3%',
className: 'uant-table-thead'
},
{
title: '故障频数Oi',
dataIndex: 'evaluationO',
key: 'evaluationO',
width: '3.5%',
className: 'uant-table-thead'
},{
title: 'RPNi',
dataIndex: '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'
},{
title: '管控措施',
......@@ -59,55 +84,55 @@ const getColumns = (self) => {
title: '工程措施',
dataIndex: 'engineering',
key: 'engineering',
width: '8%',
width: '7.5%',
className: 'uant-table-thead'
},{
title: '管理措施',
dataIndex: 'management',
key: 'management',
width: '8%',
width: '7.5%',
className: 'uant-table-thead'
},{
title: '培训教育',
dataIndex: 'train',
key: 'train',
width: '8%',
width: '7.5%',
className: 'uant-table-thead'
},{
title: '个体防护',
dataIndex: 'protection',
key: 'protection',
width: '8%',
width: '7.5%',
className: 'uant-table-thead'
},{
title: '应急处置',
dataIndex: 'disposal',
key: 'disposal',
width: '8%',
width: '7.5%',
className: 'uant-table-thead'
}]
},{
title: '责任人',
children: [{
title: '公司责任人',
title: '公司',
dataIndex: 'companyLeaderName',
key: 'companyLeaderName',
width: '4%',
className: 'uant-table-thead'
},{
title: '部门责任人',
title: '部门',
dataIndex: 'departmentLeaderName',
key: 'departmentLeaderName',
width: '4%',
className: 'uant-table-thead'
},{
title: '班组责任人',
title: '班组',
dataIndex: 'groupLeaderName',
key: 'groupLeaderName',
width: '4%',
className: 'uant-table-thead'
},{
title: '个人责任人',
title: '岗位',
dataIndex: 'personLeaderName',
key: 'personLeaderName',
width: '4%',
......
......@@ -28,13 +28,15 @@ class ToolBar extends Component {
render() {
const { activeKey } = this.props;
let key = activeKey === '2' ? '2' : '3';
return (
<div className='risk-lever-toolbar'>
<div className='risk-lever-button' >
<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')} />}
<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>
);
......
......@@ -16,7 +16,8 @@ import {
deleteAssoPointAction,
queryRiskSourceDetailAction,
updateRiskSourceRpniAction,
getTreeNodeTypeAction
getTreeNodeTypeAction,
queryFmeaControlObjAction
} from '../../../../services/preControlService';
import ToolBar from './common/ToolBar';
import FmeaTable from './FmeaTable';
......@@ -245,7 +246,7 @@ class RiskModel extends Component {
}
onToolBarClick = (toolBarFlag, activeKey, parent) => {
const { subActiveKey } = this.state;
const { subActiveKey, param } = this.state;
if (toolBarFlag === '1') {//新增
this.setOpenModelParam(activeKey, subActiveKey, toolBarFlag);
} else if (toolBarFlag === '2') {//编辑
......@@ -298,6 +299,16 @@ class RiskModel extends Component {
return;
}
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 {
deleteParamByActiveKey =(selectedRowKeys,selectedRows, activeKey, subActiveKey)=>{
if (activeKey === '1'){
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'){
this.deleteAssoPoint(selectedRows);
} else if (activeKey === '2' && subActiveKey === '2-2'){
......@@ -533,10 +548,16 @@ class RiskModel extends Component {
);
};
fmeaDelete = (fmeaIds, riskSourceId) => {
// let id = record.id;
fmeaDelete = (fmeaIds, selectedRows, riskSourceId, associatedObjCount) => {
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 => {
if (flag) {
// 确定
......@@ -587,11 +608,12 @@ class RiskModel extends Component {
}
} else if (modelFlag === 'point'){
if (toolBarFlag){
let { pointData } = this.state;
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) {
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'){
......@@ -774,7 +796,7 @@ class RiskModel extends Component {
remove = (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 = () => {
......@@ -782,7 +804,7 @@ class RiskModel extends Component {
const activeKey = '2';
let pane = panes.filter(pane => pane.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) => {
......@@ -849,6 +871,8 @@ class RiskModel extends Component {
<div className='risk-model-tree' onScroll={this.onscroll}>
<Tree
expandedKeys={expandedKeys}
defaultExpandParent
draggable={true}
onExpand={this.onExpand}
selectedKeys={selectedKeys}
autoExpandParent={autoExpandParent}
......@@ -863,7 +887,7 @@ class RiskModel extends Component {
<div className='risk-model-eva'>
<span className='risk-eva-span'>风险评价</span>
<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="con-eva-key">编号 </div>
<div className="con-eva-value">{code}</div>
......@@ -873,10 +897,6 @@ class RiskModel extends Component {
<div className="con-eva-key">等级</div>
<div className="con-eva-value">{level}</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>
</div>
......
......@@ -15,7 +15,7 @@ const getEquipColumns = () => {
className: 'uant-table-thead'
},
{
title: '设备名称',
title: '重点设备',
dataIndex: 'name',
key: 'name',
width: '70%',
......
......@@ -13,7 +13,7 @@ const getAssoEquipColumns = () => {
width: '30%'
},
{
title: '名称',
title: '指标项',
dataIndex: 'name',
key: 'name',
width: '70%'
......@@ -146,7 +146,7 @@ class FireEquipIndexTable extends Component {
isPageable={pagination}
dataList={dataList}
getTableDataAction={()=>{}}
selectedRowKeys={selects}
selectedRowKeys={selectedRowKeys}
getSelectedRows={this.getSelectedRows}
rowClassName={this.getRowClassName}
onRowClick={this.onRowClick}
......
......@@ -13,7 +13,7 @@ const getAssoEquipColumns = () => {
width: '30%'
},
{
title: '名称',
title: '监测设备',
dataIndex: 'fName',
key: 'fName',
width: '70%'
......
......@@ -189,8 +189,20 @@ class PointModel extends Component {
}
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 =>{
this.setState({ dataList:data.content, totalCount:data.totalElements });
this.setState({ dataList: data.content, totalCount: data.totalElements });
});
}
......@@ -275,6 +287,7 @@ class PointModel extends Component {
PointModel.propTypes = {
fmeaId: PropTypes.number,
bindPointsCallback: PropTypes.func
bindPointsCallback: PropTypes.func,
bindingPoints: PropTypes.array
};
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