Commit 21d9c31e authored by 单奇雲's avatar 单奇雲

Mer

parents 44864e25 0e40d767
......@@ -219,7 +219,7 @@ export const FasSerUrl = {
uploadTextPlan: completePrefix(baseURI, 'file/plan/{appId}/texts'),
getTreeNodeTypeUrl: completePrefix(baseURI, 'api/riskModel/riskSource/getChildTypeByPid?riskSourceId={riskSourceId}'),// 根据节点ID获取子节点可能的类型
getAllUserUrl: completePrefix(baseURI, 'api/common/user/list'),//获取所有用户
queryFmeaControlObjUrl: endConf.completePrifix(baseURI, 'api/riskModel/fmea/{ids}/controlObjCount')//根据fmea id查询关联对象个数
queryFmeaControlObjUrl: completePrefix(baseURI, 'api/riskModel/fmea/{ids}/controlObjCount')//根据fmea id查询关联对象个数
};
......
......@@ -3,6 +3,9 @@ import PropTypes from 'prop-types';
import AmosGridTable from './../../common/tableComponent/table/AmosGridTable';
const html_string = "<span style='color':red;'>不合格</span>";
const getColumns = () => {
return [
// {
......@@ -18,35 +21,71 @@ const getColumns = () => {
key: 'pointName',
width: '18%',
className: 'uant-table-thead'
},{
}, {
title: '责任部门/区域',
dataIndex: 'depName',
key: 'depName',
width: '15%',
className: 'uant-table-thead'
},{
}, {
title: '责任人',
dataIndex: 'username',
key: 'username',
width: '10%',
className: 'uant-table-thead'
},{
}, {
title: '联系电话',
dataIndex: 'tel',
key: 'tel',
width: '12%',
className: 'uant-table-thead'
},{
}, {
title: '检查项',
dataIndex: 'inputItems',
key: 'inputItems',
width: '40%',
className: 'uant-table-thead'
className: 'uant-table-thead',
render: (text, record) => {
//根据换行符分隔
let arr = text.split("\n");
let p = document.createElement('span')
if(arr && arr!= null){
arr.map( e =>{
if(e.endsWith("##0")){
let grandChildItem = document.createElement('p');
let a = e.replace("##0","");
grandChildItem.innerText=a;
let font = document.createElement('font');
font.innerText=" 不合格";
font.style.color="red";
grandChildItem.append(font);
p.append(grandChildItem)
}else{
let grandChildItem = document.createElement('p');
let b = e.replace("##1","");
grandChildItem.innerText=b;
let font = document.createElement('font');
font.innerText=" 合格";
font.style.color="green";
grandChildItem.append(font);
p.append(grandChildItem)
}
})
return <div dangerouslySetInnerHTML = {{__html:p.outerHTML}} ></div>
}
}
}
];
};
/**
* 关联对象-巡检点
*/
......@@ -66,9 +105,9 @@ class AssociatedPointTable extends Component {
};
}
/**
* 分页设置参数
*/
/**
* 分页设置参数
*/
setPageConfig = ({ pageSize, current }) => {
if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize;
......@@ -78,9 +117,9 @@ class AssociatedPointTable extends Component {
}
};
/**
* 获取表格所选则的行数据
*/
/**
* 获取表格所选则的行数据
*/
getSelectedRows = (selectedRows, selectedRowKeys) => {
this.setState({ selectedRows, selectedRowKeys });
};
......@@ -115,9 +154,9 @@ class AssociatedPointTable extends Component {
});
}
/**
* 获取表格刷新方法
*/
/**
* 获取表格刷新方法
*/
reload = r => {
this.setState(
{
......@@ -139,6 +178,7 @@ class AssociatedPointTable extends Component {
this.state.reload();
};
render() {
let { pagination, isChecked, selectedRowKeys } = this.state;
let { dataList, fetchData, totalCount } = this.props;
......
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