This commit is contained in:
wyw 2026-06-11 09:58:13 +08:00
commit 145f4ae077
13 changed files with 286 additions and 88 deletions

View File

@ -151,6 +151,7 @@ class SK010ShowPrint extends React.Component {
<td width='10%' className={stylesStep.fontBold}>隐患等级</td>
<td width='10%' className={stylesStep.fontBold}>隐患地点</td>
<td className={stylesStep.fontBold}>隐患原因</td>
<td className={stylesStep.fontBold}>备注</td>
<td className={stylesStep.fontBold}>隐患照片</td>
</tr>
{
@ -227,6 +228,11 @@ class SK010ShowPrint extends React.Component {
})
}
</td>
<td>
{
item.REMARK
}
</td>
<td>
{
showFiles(item?.Nav_CheckRecordDetailFiles, config.picServerHost, this)

View File

@ -172,6 +172,7 @@ class SK012ShowPrint extends React.Component {
<td width='10%' className={stylesStep.fontBold}>隐患等级</td>
<td width='10%' className={stylesStep.fontBold}>隐患地点</td>
<td className={stylesStep.fontBold}>隐患原因</td>
<td className={stylesStep.fontBold}>备注</td>
<td className={stylesStep.fontBold}>隐患照片</td>
</tr>
{
@ -248,6 +249,11 @@ class SK012ShowPrint extends React.Component {
})
}
</td>
<td>
{
item.REMARK
}
</td>
<td>
{
showFiles(item?.Nav_CheckRecordDetailFiles, config.picServerHost, this)

View File

@ -149,6 +149,7 @@ class SK014ShowPrint extends React.Component {
<td className={stylesStep.fontBold}>隐患原因</td>
<td width='10%' className={stylesStep.fontBold}>整改责任人</td>
<td width='10%' className={stylesStep.fontBold}>整改期限</td>
<td className={stylesStep.fontBold}>备注</td>
<td className={stylesStep.fontBold}>隐患照片</td>
</tr>
{
@ -207,6 +208,11 @@ class SK014ShowPrint extends React.Component {
moment(item.RECITIFY_TIME).format('YYYY-MM-DD')
}
</td>
<td>
{
item.REMARK
}
</td>
<td>
{
showFiles(item?.Nav_ReportDetailFiles, config.picServerHost, this)

View File

@ -176,7 +176,7 @@ class SK018ShowPrint extends React.Component {
<Descriptions.Item label="附件">{
showFiles(data?.Nav_Files, config.picServerHost, this)
}</Descriptions.Item>
{/* <Descriptions.Item label="是否入库">{enums.SKIsStoreEnum.enums[data.IS_STORE]}</Descriptions.Item> */}
<Descriptions.Item label="备注">{data.REMARK}</Descriptions.Item>
</Descriptions>
</div> : null
}

View File

@ -151,6 +151,7 @@ class SK020ShowPrint extends React.Component {
<td width='10%' className={stylesStep.fontBold}>整改期限</td>
<td width='10%' className={stylesStep.fontBold}>整改落实人</td>
<td width='10%' className={stylesStep.fontBold}>验收人</td>
<td className={stylesStep.fontBold}>备注</td>
<td className={stylesStep.fontBold}>隐患照片</td>
</tr>
{
@ -214,6 +215,11 @@ class SK020ShowPrint extends React.Component {
item.Nav_AcceptUser?.NAME
}
</td>
<td>
{
item.REMARK
}
</td>
<td>
{
showFiles(item?.Nav_RectifyDetailFiles, config.picServerHost, this)

View File

@ -176,6 +176,7 @@ class SK022ShowPrint extends React.Component {
showUserSign(data.Nav_AcceptUser, config.picServerHost)
: data.Nav_AcceptUser ? data.Nav_AcceptUser.NAME : ''
}</Descriptions.Item>
<Descriptions.Item label="备注">{data.REMARK}</Descriptions.Item>
</Descriptions>
</div> : null
}

View File

@ -134,7 +134,8 @@ class SK033ShowPrint extends React.Component {
<td style={{ width: "80px" }} className={stylesStep.fontBold}>风险类别</td>
<td className={stylesStep.fontBold}>管控措施</td>
<td className={stylesStep.fontBold}>应急处置</td>
<td style={{ width: "50px" }} className={stylesStep.fontBold}>状态</td>
<td style={{ width: "80px" }} className={stylesStep.fontBold}>新增标识</td>
<td style={{ width: "80px" }} className={stylesStep.fontBold}>是否有效</td>
</tr>
{
data?.Nav_Details && data.Nav_Details?.map((item, i) => {
@ -172,6 +173,9 @@ class SK033ShowPrint extends React.Component {
// })
}
</td>
<td>
{enums.SKMarkEnum.enums[item.MARK]}
</td>
<td>
{enums.SKEnableStatusEnum.enums[item.ENABLE_STATUS]}
</td>

View File

@ -130,7 +130,8 @@ class SK035ShowPrint extends React.Component {
<td className={stylesStep.fontBold}>辨识岗位</td>
<td style={{ width: "200px" }} className={stylesStep.fontBold}>管控措施</td>
<td style={{ width: "200px" }} className={stylesStep.fontBold}>应急处置</td>
<td className={stylesStep.fontBold}>状态</td>
<td style={{ width: "80px" }} className={stylesStep.fontBold}>新增标识</td>
<td style={{ width: "80px" }} className={stylesStep.fontBold}>是否有效</td>
</tr>
{
data?.Nav_Details && data.Nav_Details?.map((item, i) => {
@ -188,6 +189,9 @@ class SK035ShowPrint extends React.Component {
// })
}
</td>
<td>
{enums.SKMarkEnum.enums[item.MARK]}
</td>
<td>
{enums.SKEnableStatusEnum.enums[item.ENABLE_STATUS]}
</td>

View File

@ -131,7 +131,8 @@ class SK037ShowPrint extends React.Component {
<td className={stylesStep.fontBold}>辨识岗位</td>
<td style={{ width: "200px" }} className={stylesStep.fontBold}>管控措施</td>
<td style={{ width: "200px" }} className={stylesStep.fontBold}>应急处置</td>
<td className={stylesStep.fontBold}>状态</td>
<td style={{ width: "80px" }} className={stylesStep.fontBold}>新增标识</td>
<td style={{ width: "80px" }} className={stylesStep.fontBold}>是否有效</td>
</tr>
{
data?.Nav_Details && data.Nav_Details?.map((item, i) => {
@ -189,6 +190,9 @@ class SK037ShowPrint extends React.Component {
// })
}
</td>
<td>
{enums.SKMarkEnum.enums[item.MARK]}
</td>
<td>
{enums.SKEnableStatusEnum.enums[item.ENABLE_STATUS]}
</td>

View File

@ -136,6 +136,8 @@ class SK039ShowPrint extends React.Component {
<td className={stylesStep.fontBold}>管控层级</td>
<td className={stylesStep.fontBold}>管控部门</td>
<td className={stylesStep.fontBold}>管控责任人</td>
<td style={{ width: "80px" }} className={stylesStep.fontBold}>新增标识</td>
<td style={{ width: "80px" }} className={stylesStep.fontBold}>是否有效</td>
</tr>
{
data?.Nav_Details && data.Nav_Details?.map((item, i) => {
@ -209,10 +211,16 @@ class SK039ShowPrint extends React.Component {
{
//item.IDENTIFY_USER
item?.Nav_DetailDeparts && item?.Nav_DetailDeparts.map((item2, i) => {
return <tr> {item2?.Nav_User?.NAME}</tr>
return <tr> {item2?.Nav_Department?.Nav_User?.NAME}</tr>
})
}
</td>
<td>
{enums.SKMarkEnum.enums[item.MARK]}
</td>
<td>
{enums.SKEnableStatusEnum.enums[item.ENABLE_STATUS]}
</td>
</tr>
})
}

View File

@ -136,6 +136,8 @@ class SK041ShowPrint extends React.Component {
<td className={stylesStep.fontBold}>管控层级</td>
<td className={stylesStep.fontBold}>管控部门</td>
<td className={stylesStep.fontBold}>管控责任人</td>
<td style={{ width: "80px" }} className={stylesStep.fontBold}>新增标识</td>
<td style={{ width: "80px" }} className={stylesStep.fontBold}>是否有效</td>
</tr>
{
data?.Nav_Details && data.Nav_Details?.map((item, i) => {
@ -209,10 +211,16 @@ class SK041ShowPrint extends React.Component {
{
//item.IDENTIFY_USER
item?.Nav_DetailDeparts && item?.Nav_DetailDeparts.map((item2, i) => {
return <tr> {item2?.Nav_User?.NAME}</tr>
return <tr> {item2?.Nav_Department?.Nav_User?.NAME}</tr>
})
}
</td>
<td>
{enums.SKMarkEnum.enums[item.MARK]}
</td>
<td>
{enums.SKEnableStatusEnum.enums[item.ENABLE_STATUS]}
</td>
</tr>
})
}

View File

@ -2,6 +2,7 @@ import { message } from "antd/lib/index";
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, guid } from "../../utils/common";
import moment from 'moment';
import { Button, Row, Col, Form, Input, Select, Upload, Icon, Modal, Spin,Table } from 'antd';
import Item from "antd/lib/list/Item";
/**
* @return {string}
*/
@ -51,6 +52,10 @@ export default {
Nav_Area: item.Nav_Area,
Nav_Type: item.Nav_Type,
Nav_RiskName: item.Nav_RiskName,
PRODUCTION_UNIT_ID: item.PRODUCTION_UNIT_ID,
Nav_ProductionUnit:item.Nav_ProductionUnit,
MARK:item.MARK,
ENABLE_STATUS:item.ENABLE_STATUS,
}
if(stateData && stateData.Nav_Details)
{

View File

@ -46,7 +46,7 @@ class RiskControl extends React.Component {
this.echartsInstances.stackBarChart = echarts.init(chartDom);
const { riskSubData } = this.props;
const riskList = riskSubData?.riskList || [];
const riskList = riskSubData?.riskList?.filter((item) => item.companyName !== '小计') || [];
if (riskList.length === 0) {
this.echartsInstances.stackBarChart.setOption({
@ -324,6 +324,8 @@ class RiskControl extends React.Component {
this.setupResizeHandler('typeBarChart', this.renderTypeBarChart);
};
// 表格: 各公司风险统计明细表
// 表格: 各公司风险统计明细表
// 表格: 各公司风险统计明细表
renderRiskTable = () => {
const { riskSubData } = this.props;
@ -333,100 +335,238 @@ class RiskControl extends React.Component {
return <div style={{ textAlign: 'center', padding: '50px', color: '#999' }}>暂无风险数据</div>;
}
// 表格列配置(与 trainingContent 样式保持一致)
const columns = [
{
title: '公司名称',
dataIndex: 'companyName',
key: 'companyName',
align: 'center',
width: 120,
render: (text) => <strong>{text}</strong>,
},
{
title: '重大风险',
dataIndex: 'majorCount',
key: 'majorCount',
align: 'center',
width: 100,
render: (text) => <span style={{ color: '#c92a2a', fontWeight: 'bold' }}>{text}</span>,
},
{
title: '较大风险',
dataIndex: 'largerCount',
key: 'largerCount',
align: 'center',
width: 100,
render: (text) => <span style={{ color: '#ffa94d', fontWeight: 'bold' }}>{text}</span>,
},
{
title: '一般风险',
dataIndex: 'generalCount',
key: 'generalCount',
align: 'center',
width: 100,
render: (text) => <span style={{ color: '#ffe066', fontWeight: 'bold' }}>{text}</span>,
},
{
title: '低风险',
dataIndex: 'lowCount',
key: 'lowCount',
align: 'center',
width: 100,
render: (text) => <span style={{ color: '#4285F4', fontWeight: 'bold' }}>{text}</span>,
},
{
title: '小计',
dataIndex: 'totalCount',
key: 'totalCount',
align: 'center',
width: 100,
render: (text) => <strong style={{ color: '#000', fontSize: '14px' }}>{text}</strong>,
},
];
const filteredRiskList = riskList.filter((item) => item.companyName !== '小计');
const tableData = riskList.map((item, index) => ({
key: index,
companyName: item.companyName,
majorCount: item.majorCount,
largerCount: item.largerCount,
generalCount: item.generalCount,
lowCount: item.lowCount,
totalCount: item.totalCount,
}));
// 合计行
const summary = {
majorTotal: riskList.reduce((sum, item) => sum + (item.majorCount || 0), 0),
largerTotal: riskList.reduce((sum, item) => sum + (item.largerCount || 0), 0),
generalTotal: riskList.reduce((sum, item) => sum + (item.generalCount || 0), 0),
lowTotal: riskList.reduce((sum, item) => sum + (item.lowCount || 0), 0),
totalAll: riskList.reduce((sum, item) => sum + (item.totalCount || 0), 0),
majorTotal: filteredRiskList.reduce((sum, item) => sum + (item.majorCount || 0), 0),
largerTotal: filteredRiskList.reduce((sum, item) => sum + (item.largerCount || 0), 0),
generalTotal: filteredRiskList.reduce((sum, item) => sum + (item.generalCount || 0), 0),
lowTotal: filteredRiskList.reduce((sum, item) => sum + (item.lowCount || 0), 0),
totalAll: filteredRiskList.reduce((sum, item) => sum + (item.totalCount || 0), 0),
};
const scrollConfig = columns.length > 10 ? { x: columns.length * 100, y: 360 } : { y: 360 };
const totalWidth = 620;
return (
<div style={{ height: '100%', display: 'flex', flexDirection: 'column' }}>
<div
style={{
height: '100%',
display: 'flex',
flexDirection: 'column',
overflow: 'hidden',
}}
>
<div
style={{
textAlign: 'center',
padding: '20px 0 0 0',
padding: '16px 0',
fontWeight: 'bold',
fontSize: '17px',
fontSize: '16px',
color: '#000',
flexShrink: 0,
borderBottom: '1px solid #f0f0f0',
}}
>
各家公司的风险统计情况
</div>
<div style={{ flex: 1, padding: '10px' }}>
<Table
columns={columns}
dataSource={tableData}
pagination={false}
scroll={scrollConfig}
size="small"
bordered
className={styles.certificateTable}
/>
{/* 表格滚动区域 */}
<div
style={{
flex: 1,
overflow: 'auto',
minHeight: 0,
position: 'relative',
marginLeft: '20px',
}}
>
<table
style={{
width: '100%',
borderCollapse: 'collapse',
fontSize: '14px',
minWidth: totalWidth,
}}
>
{/* 表头 - 使用 sticky 固定 */}
<thead>
<tr style={{ backgroundColor: '#4285f4', position: 'sticky', top: 0, zIndex: 20 }}>
<th
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #e8e8e8',
color: '#fff',
fontWeight: 'bold',
width: 120,
}}
>
公司名称
</th>
<th
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #e8e8e8',
color: '#fff',
fontWeight: 'bold',
width: 100,
}}
>
重大风险
</th>
<th
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #e8e8e8',
color: '#fff',
fontWeight: 'bold',
width: 100,
}}
>
较大风险
</th>
<th
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #e8e8e8',
color: '#fff',
fontWeight: 'bold',
width: 100,
}}
>
一般风险
</th>
<th
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #e8e8e8',
color: '#fff',
fontWeight: 'bold',
width: 100,
}}
>
低风险
</th>
<th
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #e8e8e8',
color: '#fff',
fontWeight: 'bold',
width: 100,
}}
>
小计
</th>
</tr>
</thead>
<tbody>
{filteredRiskList.map((item, index) => (
<tr key={index} style={{ backgroundColor: '#fff' }}>
<td style={{ padding: '8px', textAlign: 'center', border: '1px solid #f0f0f0' }}>
<strong>{item.companyName}</strong>
</td>
<td style={{ padding: '8px', textAlign: 'center', border: '1px solid #f0f0f0' }}>
<span style={{ color: '#c92a2a', fontWeight: 'bold' }}>{item.majorCount}</span>
</td>
<td style={{ padding: '8px', textAlign: 'center', border: '1px solid #f0f0f0' }}>
<span style={{ color: '#ffa94d', fontWeight: 'bold' }}>{item.largerCount}</span>
</td>
<td style={{ padding: '8px', textAlign: 'center', border: '1px solid #f0f0f0' }}>
<span style={{ color: '#ffe066', fontWeight: 'bold' }}>{item.generalCount}</span>
</td>
<td style={{ padding: '8px', textAlign: 'center', border: '1px solid #f0f0f0' }}>
<span style={{ color: '#4285F4', fontWeight: 'bold' }}>{item.lowCount}</span>
</td>
<td style={{ padding: '8px', textAlign: 'center', border: '1px solid #f0f0f0' }}>
<strong>{item.totalCount}</strong>
</td>
</tr>
))}
</tbody>
{/* 合计行 - 使用 sticky 固定在底部 */}
<tfoot>
<tr style={{ backgroundColor: '#fafafa', position: 'sticky', bottom: 0, zIndex: 10 }}>
<td
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #f0f0f0',
fontWeight: 'bold',
backgroundColor: '#fafafa',
}}
>
合计
</td>
<td
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #f0f0f0',
color: '#c92a2a',
fontWeight: 'bold',
backgroundColor: '#fafafa',
}}
>
{summary.majorTotal}
</td>
<td
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #f0f0f0',
color: '#ffa94d',
fontWeight: 'bold',
backgroundColor: '#fafafa',
}}
>
{summary.largerTotal}
</td>
<td
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #f0f0f0',
color: '#ffe066',
fontWeight: 'bold',
backgroundColor: '#fafafa',
}}
>
{summary.generalTotal}
</td>
<td
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #f0f0f0',
color: '#4285F4',
fontWeight: 'bold',
backgroundColor: '#fafafa',
}}
>
{summary.lowTotal}
</td>
<td
style={{
padding: '10px 8px',
textAlign: 'center',
border: '1px solid #f0f0f0',
fontWeight: 'bold',
backgroundColor: '#fafafa',
}}
>
{summary.totalAll}
</td>
</tr>
</tfoot>
</table>
</div>
</div>
);