main
wangyunfei 1 month ago
parent 373ccbc654
commit b371c4303a

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

@ -1,300 +1,634 @@
import React, { useState, useEffect } from 'react';
import { Card, Table, Button, Modal, Form, Input, Select, message, Space, Tag } from 'antd';
import { PlusOutlined, EditOutlined, DeleteOutlined, EyeOutlined } from '@ant-design/icons';
import './EvaluationReport.less';
import React, { useEffect, useRef, useState } from 'react';
import { Card, Result, CheckCircleOutlined, Button } from 'antd';
import * as echarts from 'echarts';
import StandardTable from '@/components/StandardTable';
import styles from './EvaluationReport.less';
import img1 from '@/assets/safe_majorHazard/online_monitoring/img1.png';
import img2 from '@/assets/safe_majorHazard/online_monitoring/img2.png';
import img3 from '@/assets/safe_majorHazard/online_monitoring/img3.png';
const { Option } = Select;
const EvaluationReport = () => {
const [form] = Form.useForm();
const [dataSource, setDataSource] = useState([]);
const [loading, setLoading] = useState(false);
const [modalVisible, setModalVisible] = useState(false);
const [editingRecord, setEditingRecord] = useState(null);
const [pagination, setPagination] = useState({
current: 1,
pageSize: 10,
total: 0,
});
// 模拟数据
const mockData = [
{
id: 1,
reportName: '2024年第一季度安全评估报告',
reportType: '季度评估',
assessmentPeriod: '2024-01-01 至 2024-03-31',
assessor: '张三',
status: '已完成',
createTime: '2024-04-01 10:00:00',
description: '对第一季度安全生产情况进行全面评估',
},
{
id: 2,
reportName: '2024年年度安全评估报告',
reportType: '年度评估',
assessmentPeriod: '2024-01-01 至 2024-12-31',
assessor: '李四',
status: '进行中',
createTime: '2024-01-15 14:30:00',
description: '年度安全生产综合评估',
},
];
useEffect(() => {
fetchData();
}, [pagination.current, pagination.pageSize]);
const fetchData = async () => {
setLoading(true);
try {
// 模拟API调用
setTimeout(() => {
setDataSource(mockData);
setPagination(prev => ({ ...prev, total: mockData.length }));
setLoading(false);
}, 500);
} catch (error) {
message.error('获取数据失败');
setLoading(false);
}
};
const handleAdd = () => {
setEditingRecord(null);
form.resetFields();
setModalVisible(true);
};
const handleEdit = (record) => {
setEditingRecord(record);
form.setFieldsValue(record);
setModalVisible(true);
};
const handleDelete = (record) => {
Modal.confirm({
title: '确认删除',
content: `确定要删除评估报告"${record.reportName}"吗?`,
onOk: () => {
setDataSource(dataSource.filter(item => item.id !== record.id));
message.success('删除成功');
},
});
};
const handleView = (record) => {
Modal.info({
title: '查看评估报告',
content: (
<div>
<p><strong>报告名称</strong>{record.reportName}</p>
<p><strong>报告类型</strong>{record.reportType}</p>
<p><strong>评估周期</strong>{record.assessmentPeriod}</p>
<p><strong>评估人</strong>{record.assessor}</p>
<p><strong>状态</strong>{record.status}</p>
<p><strong>创建时间</strong>{record.createTime}</p>
<p><strong>描述</strong>{record.description}</p>
</div>
),
width: 600,
const trendChartRef = useRef(null);
const pieChartRef = useRef(null);
const barChartRef = useRef(null);
// 表格相关状态
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const [selectedRows, setSelectedRows] = useState([]);
const [loading, setLoading] = useState(false);
const [dataSource, setDataSource] = useState([]);
const [pagination, setPagination] = useState({
current: 1,
pageSize: 5,
total: 0,
});
};
const handleSubmit = async (values) => {
try {
if (editingRecord) {
// 编辑
setDataSource(dataSource.map(item =>
item.id === editingRecord.id ? { ...item, ...values } : item
));
message.success('编辑成功');
} else {
// 新增
const newRecord = {
id: Date.now(),
...values,
status: '进行中',
createTime: new Date().toLocaleString(),
};
setDataSource([...dataSource, newRecord]);
message.success('添加成功');
}
setModalVisible(false);
form.resetFields();
} catch (error) {
message.error('操作失败');
}
};
const columns = [
{
title: '报告名称',
dataIndex: 'reportName',
key: 'reportName',
width: 200,
},
{
title: '报告类型',
dataIndex: 'reportType',
key: 'reportType',
width: 120,
},
{
title: '评估周期',
dataIndex: 'assessmentPeriod',
key: 'assessmentPeriod',
width: 200,
},
{
title: '评估人',
dataIndex: 'assessor',
key: 'assessor',
width: 100,
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
width: 100,
render: (status) => (
<Tag color={status === '已完成' ? 'green' : 'orange'}>
{status}
</Tag>
),
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
width: 150,
},
{
title: '操作',
key: 'action',
width: 200,
render: (_, record) => (
<Space size="small">
<Button
type="link"
icon={<EyeOutlined />}
onClick={() => handleView(record)}
>
查看
</Button>
<Button
type="link"
icon={<EditOutlined />}
onClick={() => handleEdit(record)}
>
编辑
</Button>
<Button
type="link"
danger
icon={<DeleteOutlined />}
onClick={() => handleDelete(record)}
>
删除
</Button>
</Space>
),
},
];
return (
<div className="evaluation-report">
<Card
title="评估报告管理"
extra={
<Button type="primary" icon={<PlusOutlined />} onClick={handleAdd}>
新增报告
</Button>
// 隐患趋势分析折线图
useEffect(() => {
if (trendChartRef.current) {
const chart = echarts.init(trendChartRef.current);
const option = {
color: ['#FF4D4F', '#FAAD14', '#52C41A'],
legend: {
data: ['重大隐患', '一般隐患', '轻微隐患'],
top: "5px",
left: "center",
itemGap: 20,
textStyle: {
fontSize: 10
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
top: '20%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
axisLabel: {
fontSize: 10
}
},
yAxis: {
type: 'value',
axisLabel: {
fontSize: 10
}
},
series: [
{
name: '重大隐患',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 6,
lineStyle: {
width: 2,
color: '#FF4D4F'
},
itemStyle: {
color: '#FF4D4F',
borderColor: '#FF4D4F',
borderWidth: 2
},
data: [12, 8, 15, 10, 18, 14, 20, 16, 22, 19, 25, 21]
},
{
name: '一般隐患',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 6,
lineStyle: {
width: 2,
color: '#FAAD14'
},
itemStyle: {
color: '#FAAD14',
borderColor: '#FAAD14',
borderWidth: 2
},
data: [25, 30, 28, 35, 32, 38, 40, 36, 42, 38, 45, 41]
},
{
name: '轻微隐患',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 6,
lineStyle: {
width: 2,
color: '#52C41A'
},
itemStyle: {
color: '#52C41A',
borderColor: '#52C41A',
borderWidth: 2
},
data: [45, 50, 48, 55, 52, 58, 60, 56, 62, 58, 65, 61]
}
]
};
chart.setOption(option);
const handleResize = () => {
if (chart && !chart.isDisposed()) {
chart.resize();
}
};
window.addEventListener('resize', handleResize);
return () => {
window.removeEventListener('resize', handleResize);
if (chart && !chart.isDisposed()) {
chart.dispose();
}
};
}
}, []);
// 隐患类型分布玫瑰饼图
useEffect(() => {
if (pieChartRef.current) {
const chart = echarts.init(pieChartRef.current);
const option = {
color: ['#FF4D4F', '#FAAD14', '#52C41A', '#1890FF', '#722ED1', '#13C2C2'],
legend: {
orient: 'vertical',
left: 'left',
top: 'center',
textStyle: {
fontSize: 10
}
},
series: [
{
name: '隐患类型',
type: 'pie',
radius: ['20%', '70%'],
center: ['60%', '50%'],
roseType: 'area',
itemStyle: {
borderRadius: 5,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: true,
formatter: '{b}: {c}',
fontSize: 10
},
data: [
{ value: 35, name: '设备故障' },
{ value: 28, name: '操作失误' },
{ value: 22, name: '环境因素' },
{ value: 18, name: '管理缺陷' },
{ value: 15, name: '设计缺陷' },
{ value: 12, name: '其他' }
]
}
]
};
chart.setOption(option);
const handleResize = () => {
if (chart && !chart.isDisposed()) {
chart.resize();
}
};
window.addEventListener('resize', handleResize);
return () => {
window.removeEventListener('resize', handleResize);
if (chart && !chart.isDisposed()) {
chart.dispose();
}
};
}
}, []);
// 隐患整改情况柱状图
useEffect(() => {
if (barChartRef.current) {
const chart = echarts.init(barChartRef.current);
const option = {
color: ['#FF4D4F', '#FAAD14', '#1890FF', '#52C41A', '#722ED1'],
grid: {
left: '3%',
right: '4%',
bottom: '3%',
top: '10%',
containLabel: true
},
xAxis: {
type: 'category',
data: ['待处理', '处理中', '待审核', '已完成', '已关闭'],
axisLabel: {
fontSize: 10
}
},
yAxis: {
type: 'value',
axisLabel: {
fontSize: 10
}
},
series: [
{
name: '数量',
type: 'bar',
data: [25, 18, 12, 35, 8],
itemStyle: {
borderRadius: [4, 4, 0, 0]
},
barWidth: '60%'
}
]
};
chart.setOption(option);
const handleResize = () => {
if (chart && !chart.isDisposed()) {
chart.resize();
}
};
window.addEventListener('resize', handleResize);
return () => {
window.removeEventListener('resize', handleResize);
if (chart && !chart.isDisposed()) {
chart.dispose();
}
};
}
>
<Table
columns={columns}
dataSource={dataSource}
loading={loading}
rowKey="id"
pagination={{
...pagination,
showSizeChanger: true,
showQuickJumper: true,
showTotal: (total, range) =>
`${range[0]}-${range[1]} 条/共 ${total}`,
onChange: (page, pageSize) => {
setPagination(prev => ({
...prev,
current: page,
pageSize: pageSize || prev.pageSize,
}));
},
}}
/>
</Card>
<Modal
title={editingRecord ? '编辑评估报告' : '新增评估报告'}
open={modalVisible}
onCancel={() => {
setModalVisible(false);
form.resetFields();
}}
onOk={() => form.submit()}
width={600}
>
<Form
form={form}
layout="vertical"
onFinish={handleSubmit}
>
<Form.Item
name="reportName"
label="报告名称"
rules={[{ required: true, message: '请输入报告名称' }]}
>
<Input placeholder="请输入报告名称" />
</Form.Item>
<Form.Item
name="reportType"
label="报告类型"
rules={[{ required: true, message: '请选择报告类型' }]}
>
<Select placeholder="请选择报告类型">
<Option value="季度评估">季度评估</Option>
<Option value="年度评估">年度评估</Option>
<Option value="专项评估">专项评估</Option>
</Select>
</Form.Item>
<Form.Item
name="assessmentPeriod"
label="评估周期"
rules={[{ required: true, message: '请输入评估周期' }]}
>
<Input placeholder="请输入评估周期" />
</Form.Item>
<Form.Item
name="assessor"
label="评估人"
rules={[{ required: true, message: '请输入评估人' }]}
>
<Input placeholder="请输入评估人" />
</Form.Item>
<Form.Item
name="description"
label="描述"
>
<Input.TextArea rows={4} placeholder="请输入描述" />
</Form.Item>
</Form>
</Modal>
</div>
);
}, []);
// 表格列定义
const columns = [
{
title: '编号',
dataIndex: 'id',
key: 'id',
width: 80,
render: (text, record, index) => {
const page = pagination.current || 1;
const pageSize = pagination.pageSize || 5;
const number = (page - 1) * pageSize + index + 1;
return `0${number}`.slice(-2);
}
},
{
title: '报告名称',
dataIndex: 'reportName',
key: 'reportName',
width: 200,
},
{
title: '类型',
dataIndex: 'type',
key: 'type',
width: 120,
},
{
title: '上传时间',
dataIndex: 'uploadTime',
key: 'uploadTime',
width: 150,
},
{
title: '版本',
dataIndex: 'version',
key: 'version',
width: 80,
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
width: 100,
render: (text) => {
const statusMap = {
'已完成': { color: '#52C41A', bg: '#F6FFED' },
'处理中': { color: '#FAAD14', bg: '#FFFBE6' },
'待审核': { color: '#1890FF', bg: '#E6F7FF' }
};
const status = statusMap[text] || { color: '#333', bg: '#F5F5F5' };
return (
<span style={{
color: status.color,
backgroundColor: status.bg,
padding: '2px 8px',
borderRadius: '4px',
fontSize: '12px'
}}>
{text}
</span>
);
}
},
{
title: '上传人',
dataIndex: 'uploader',
key: 'uploader',
width: 100,
},
{
title: '操作',
key: 'action',
width: 80,
render: (_, record) => (
<div>
<Button type="link" size="small" style={{ padding: 0 }}>
下载
</Button>
</div>
),
},
];
// 模拟数据
const mockData = [
{
key: '1',
id: '001',
reportName: '2024年第一季度安全评估报告',
type: '季度报告',
uploadTime: '2024-01-15 08:30:25',
version: 'V1.0',
status: '已完成',
uploader: '张三',
},
{
key: '2',
id: '002',
reportName: '重大危险源专项评估报告',
type: '专项报告',
uploadTime: '2024-01-15 09:15:10',
version: 'V2.1',
status: '处理中',
uploader: '李四',
},
{
key: '3',
id: '003',
reportName: '年度安全风险评估报告',
type: '年度报告',
uploadTime: '2024-01-15 10:45:30',
version: 'V1.5',
status: '待审核',
uploader: '王五',
},
{
key: '4',
id: '004',
reportName: '设备安全评估报告',
type: '设备报告',
uploadTime: '2024-01-15 11:20:45',
version: 'V1.2',
status: '已完成',
uploader: '赵六',
},
{
key: '5',
id: '005',
reportName: '应急预案评估报告',
type: '应急报告',
uploadTime: '2024-01-15 12:10:20',
version: 'V3.0',
status: '已完成',
uploader: '孙七',
},
{
key: '6',
id: '006',
reportName: '环境安全评估报告',
type: '环境报告',
uploadTime: '2024-01-15 13:25:15',
version: 'V1.8',
status: '处理中',
uploader: '周八',
},
{
key: '7',
id: '007',
reportName: '人员安全培训评估报告',
type: '培训报告',
uploadTime: '2024-01-15 14:10:30',
version: 'V2.3',
status: '待审核',
uploader: '吴九',
},
{
key: '8',
id: '008',
reportName: '消防安全评估报告',
type: '消防报告',
uploadTime: '2024-01-15 15:45:20',
version: 'V1.1',
status: '已完成',
uploader: '郑十',
},
{
key: '9',
id: '009',
reportName: '化学品安全评估报告',
type: '化学品报告',
uploadTime: '2024-01-15 16:30:45',
version: 'V2.0',
status: '处理中',
uploader: '钱十一',
},
{
key: '10',
id: '010',
reportName: '职业健康安全评估报告',
type: '职业健康报告',
uploadTime: '2024-01-15 17:15:10',
version: 'V1.6',
status: '已完成',
uploader: '陈十二',
},
{
key: '11',
id: '011',
reportName: '安全管理制度评估报告',
type: '制度报告',
uploadTime: '2024-01-15 18:20:35',
version: 'V1.3',
status: '待审核',
uploader: '刘十三',
},
{
key: '12',
id: '012',
reportName: '安全投入评估报告',
type: '投入报告',
uploadTime: '2024-01-15 19:05:50',
version: 'V1.9',
status: '已完成',
uploader: '黄十四',
},
];
// 初始化数据
useEffect(() => {
setPagination(prev => ({ ...prev, total: mockData.length }));
}, []);
// 根据分页获取当前页数据
const getCurrentPageData = () => {
const { current, pageSize } = pagination;
const startIndex = (current - 1) * pageSize;
const endIndex = startIndex + pageSize;
return mockData.slice(startIndex, endIndex);
};
// 表格选择变化
const onSelectChange = (newSelectedRowKeys, newSelectedRows) => {
setSelectedRowKeys(newSelectedRowKeys);
setSelectedRows(newSelectedRows);
};
// 分页变化处理
const handleTableChange = (pagination) => {
setPagination(prev => ({
...prev,
current: pagination.current,
pageSize: pagination.pageSize,
}));
};
return (
<div className={styles.Econtainer}>
{/* 第一个大块 - 高度16% */}
<div className={styles.EcontainerTop}>
<div className={styles.sectionContent}>
<div className={styles.blocksContainer}>
{/* 块1 */}
<div className={styles.blockItem}>
<div className={styles.blockLeft}>
<div className={styles.blockTitle}>总危险源数量</div>
<div className={styles.blockNumber}>65</div>
<div className={styles.blockChange}>
<span className={styles.arrow}></span>
较昨日 +2
</div>
</div>
<div className={styles.blockRight}>
<img src={img1} alt="总危险源数量" className={styles.blockImage} />
</div>
</div>
{/* 块2 */}
<div className={styles.blockItem}>
<div className={styles.blockLeft}>
<div className={styles.blockTitle}>高风险设备</div>
<div className={styles.blockNumber}>65</div>
<div className={styles.blockChange}>
<span className={styles.arrow}></span>
较昨日 +2
</div>
</div>
<div className={styles.blockRight}>
<img src={img2} alt="高风险设备" className={styles.blockImage} />
</div>
</div>
{/* 块3 */}
<div className={styles.blockItem}>
<div className={styles.blockLeft}>
<div className={styles.blockTitle}>今日预警次数</div>
<div className={styles.blockNumber}>65</div>
<div className={styles.blockChange}>
<span className={styles.arrow}></span>
较昨日 +2
</div>
</div>
<div className={styles.blockRight}>
<img src={img3} alt="今日预警次数" className={styles.blockImage} />
</div>
</div>
{/* 块4 */}
<div className={styles.blockItem}>
<div className={styles.blockLeft}>
<div className={styles.blockTitle}>未处理预警</div>
<div className={styles.blockNumber}>65</div>
<div className={styles.blockChange}>
<span className={styles.arrow}></span>
较昨日 +2
</div>
</div>
<div className={styles.blockRight}>
<img src={img1} alt="未处理预警" className={styles.blockImage} />
</div>
</div>
</div>
</div>
</div>
{/* 第二个大块 - 三个图表块 */}
<div className={styles.EcontainerMiddle}>
<div className={styles.sectionContent}>
{/* 第一个小块 - 隐患趋势分析 */}
<div className={styles.chartBlock}>
<div className={styles.chartTitle}>
<div className={styles.titleIcon}></div>
<div>隐患趋势分析</div>
</div>
<div className={styles.chartContainer} ref={trendChartRef}></div>
</div>
{/* 第二个小块 - 隐患类型分布 */}
<div className={styles.chartBlock}>
<div className={styles.chartTitle}>
<div className={styles.titleIcon}></div>
<div>隐患类型分布</div>
</div>
<div className={styles.chartContainer} ref={pieChartRef}></div>
</div>
{/* 第三小块 - 隐患整改情况 */}
<div className={styles.chartBlock}>
<div className={styles.chartTitle}>
<div className={styles.titleIcon}></div>
<div>隐患整改情况</div>
</div>
<div className={styles.chartContainer} ref={barChartRef}></div>
</div>
</div>
</div>
{/* 第三大块 - 评估报告表格 */}
<div className={styles.EcontainerBottom}>
{/* 首行 左侧标题左对齐 右侧按钮右对齐 */}
<div className={styles.tableHeader}>
<div className={styles.tableTitle}>
<div className={styles.titleIcon}></div>
<div>评估报告</div>
</div>
</div>
{/* 表格 5行8列 带页码 每页5条数据 */}
<div className={styles.tableContainer}>
<StandardTable
columns={columns}
data={{
list: getCurrentPageData(),
pagination: pagination
}}
loading={loading}
selectionType="checkbox"
onSelectRow={onSelectChange}
onChange={handleTableChange}
pagination={{
...pagination,
showSizeChanger: false,
showQuickJumper: true,
showTotal: (total, range) =>
`${total}`,
}}
scroll={{ x: 1000 }}
/>
</div>
</div>
</div>
);
};
export default EvaluationReport;

@ -1,115 +1,225 @@
.evaluation-report {
padding: 20px;
.ant-card {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
border-radius: 6px;
.ant-card-head {
border-bottom: 1px solid #f0f0f0;
.ant-card-head-title {
font-size: 16px;
font-weight: 600;
color: #262626;
}
.Econtainer {
padding: 8px 6px 0px 6px;
height: 100%;
display: flex;
flex-direction: column;
gap: 10px;
// 第一个大块 - 高度16%
.EcontainerTop {
height: 16%;
border-radius: 4px;
display: flex;
flex-direction: column;
.sectionContent {
height: 100%;
display: flex;
flex-direction: column;
.blocksContainer {
flex: 1;
display: flex;
gap: 10px;
height: 100%;
.blockItem {
flex: 1;
height: 100%;
display: flex;
background: linear-gradient(170.5deg, #EBEFF4 6.87%, #FFFFFF 92.55%);
border-radius: 4px;
border: 2px solid #FFFFFF;
.blockLeft {
width: 60%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
padding: 15px;
padding-left: 20px;
gap: 8px;
.blockTitle {
font-family: PingFang SC;
font-weight: 400;
font-size: 12px;
color: #666666;
line-height: 1.2;
}
.blockNumber {
font-family: PingFang SC;
font-weight: 700;
font-size: 24px;
color: #333333;
line-height: 1.2;
}
.blockChange {
font-family: PingFang SC;
font-weight: 400;
font-size: 12px;
color: #1269FF;
line-height: 1.2;
display: flex;
align-items: center;
gap: 4px;
.arrow {
font-size: 14px;
font-weight: bold;
}
.checkIcon {
font-size: 16px;
color: #1269FF;
}
}
}
.blockRight {
flex: 1;
height: 100%;
background-color: transparent;
border-radius: 0 4px 4px 0;
display: flex;
align-items: center;
justify-content: center;
.blockImage {
height: 130%;
object-fit: contain;
margin-right: -10px;
}
}
}
}
}
}
.ant-card-body {
padding: 20px;
}
}
.ant-table {
.ant-table-thead > tr > th {
background-color: #fafafa;
font-weight: 600;
color: #262626;
border-bottom: 1px solid #f0f0f0;
// 第二个大块 - 三个图表块
.EcontainerMiddle {
height: 30%;
border-radius: 4px;
background-color: #fff;
display: flex;
flex-direction: column;
.sectionContent {
height: 100%;
display: flex;
flex-direction: row;
gap: 10px;
padding: 10px;
.chartBlock {
flex: 1;
height: 100%;
background: linear-gradient(170.5deg, #EBEFF4 6.87%, #FFFFFF 53.01%);
border: 2px solid #fff;
border-radius: 4px;
display: flex;
flex-direction: column;
font-family: PingFang SC;
font-size: 14px;
color: #333333;
.chartTitle {
display: flex;
align-items: center;
gap: 8px;
font-weight: 500;
font-size: 14px;
color: #333333;
padding: 10px 15px 5px 15px;
.titleIcon {
width: 3px;
height: 14px;
background-color: #2E4CD4;
}
}
.chartContainer {
flex: 1;
width: 100%;
height: 120%;
// // min-height: 200px;
}
}
}
}
.ant-table-tbody > tr > td {
border-bottom: 1px solid #f0f0f0;
}
.ant-table-tbody > tr:hover > td {
background-color: #f5f5f5;
}
}
.ant-btn {
border-radius: 4px;
&.ant-btn-primary {
background-color: #1890ff;
border-color: #1890ff;
&:hover {
background-color: #40a9ff;
border-color: #40a9ff;
}
}
&.ant-btn-link {
padding: 4px 8px;
height: auto;
&:hover {
background-color: #f5f5f5;
}
}
}
.ant-tag {
border-radius: 4px;
font-size: 12px;
padding: 2px 8px;
}
.ant-modal {
.ant-modal-header {
border-bottom: 1px solid #f0f0f0;
.ant-modal-title {
font-size: 16px;
font-weight: 600;
color: #262626;
}
}
.ant-modal-body {
padding: 24px;
}
.ant-form-item-label > label {
font-weight: 500;
color: #262626;
}
.ant-input,
.ant-select-selector {
border-radius: 4px;
border: 1px solid #d9d9d9;
&:hover {
border-color: #40a9ff;
}
&:focus,
&.ant-select-focused .ant-select-selector {
border-color: #40a9ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
}
}
.ant-pagination {
margin-top: 16px;
text-align: right;
.ant-pagination-total-text {
color: #8c8c8c;
margin-right: 16px;
// 第三大块 - 评估报告表格
.EcontainerBottom {
flex: 1;
background-color: #fff;
border-radius: 4px;
display: flex;
flex-direction: column;
padding: 10px;
.tableHeader {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
.tableTitle {
display: flex;
align-items: center;
gap: 8px;
font-weight: 500;
font-size: 14px;
color: #333333;
.titleIcon {
width: 3px;
height: 14px;
background-color: #2E4CD4;
}
}
}
.tableContainer {
flex: 1;
overflow: hidden;
:global(.ant-table-wrapper) {
height: 100%;
}
:global(.ant-table) {
height: 100%;
}
:global(.ant-table-container) {
height: 100%;
}
:global(.ant-table-body) {
height: calc(100% - 55px); // 减去表头高度
overflow-y: auto;
}
:global(.ant-table-tbody > tr > td) {
padding: 8px 16px;
font-size: 12px;
}
:global(.ant-table-thead > tr > th) {
padding: 8px 16px;
font-size: 12px;
font-weight: 500;
background-color: #fafafa;
}
:global(.ant-pagination) {
margin-top: 10px;
text-align: right;
}
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,13 +1,26 @@
import React from 'react';
import { Card, Result, Timeline,Statistic, Table,Row, Input,Button,Col, Select} from 'antd';
import { Card, Statistic, Table,Row, Input,Button,Col, Select} from 'antd';
import { PhoneOutlined, IdcardOutlined } from '@ant-design/icons';
import StandardTable from '@/components/StandardTable';
import styles from './ResponsibilityImplementation.less';
import upload from '@/assets/business_basic/upload.png';
import download from '@/assets/business_basic/download.png';
import fire_fighting1 from '@/assets/business_basic/fire_fighting1.png';
import fire_fighting2 from '@/assets/business_basic/fire_fighting2.png';
import fire_fighting3 from '@/assets/business_basic/fire_fighting3.png';
import frameIcon from '@/assets/business_basic/Frame.png';
import background1 from '@/assets/business_basic/background1.png';
const ResponsibilityImplementation = () => {
// 搜索处理函数
const onSearch = (value) => {
console.log('搜索内容:', value);
// 这里可以添加实际的搜索逻辑
};
const columns = [
{
title:"编号",
@ -108,7 +121,7 @@ const ResponsibilityImplementation = () => {
<div className={styles.containerR}>
{/* 警告提示框 */}
<div className={styles.warningBox}>
<img src={require('@/assets/business_basic/Frame.png')} alt="警告" className={styles.warningIcon} />
<img src={frameIcon} alt="警告" className={styles.warningIcon} />
<span className={styles.warningText}>
有5个消防设备需要维护3个资质证书即将到期请及时处理
</span>
@ -125,11 +138,11 @@ const ResponsibilityImplementation = () => {
</div>
<div className={styles.buttonGroup}>
<Button className={styles.actionBtn}>
<span className={styles.btnIcon}>📤</span>
上传
<img src={upload} alt="上传图表" className={styles.btnIcon} />
上传图表
</Button>
<Button className={styles.actionBtn}>
<span className={styles.btnIcon}>📥</span>
<img src={download} alt="下载" className={styles.btnIcon} />
下载
</Button>
</div>
@ -138,52 +151,98 @@ const ResponsibilityImplementation = () => {
{/* 第二行:图片占位 */}
<div className={styles.leftBottomSection}>
<div className={styles.imagePlaceholder}>
<div className={styles.imageIcon}>🏢</div>
<div className={styles.imageText}>组织架构图</div>
<img src={fire_fighting1} alt="消防1" className={styles.imageIcon1} />
<div className={styles.imageRow}>
<img src={fire_fighting2} alt="消防2" className={styles.imageIcon2} />
<img src={fire_fighting3} alt="消防3" className={styles.imageIcon3} />
</div>
</div>
</div>
</div>
<div className={styles.containerOneRight}>
{/* 第一块:标题 + 下拉选择框 + 导出按钮 */}
{/* 第一行:标题 + 搜索栏 + 下拉选择框 */}
<div className={styles.rightTopSection}>
<div className={styles.rightTopLeft}>
<div className={styles.titleLeft}>
<div className={styles.titleIcon}></div>
<div>履职时间轴</div>
<div>成员信息管理</div>
</div>
<Select
style={{ width: 100, marginLeft: 15 }}
defaultValue="每月"
className={styles.rightTopSelect}
options={[
{ value: '每月', label: '每月' },
{ value: '每年', label: '每年' },
]}
optionRender={(option) => (
<div className={styles.customOption}>
<span className={styles.optionIcon}>📅</span>
<span className={styles.optionText}>{option.label}</span>
</div>
)}
/>
</div>
<div className={styles.rightTopRight}>
<Button
type="primary"
className={styles.exportBtn}
icon="📄"
>
导出PDF考核报告
</Button>
<div className={styles.searchGroup}>
<Input.Search placeholder="搜索成员..." onSearch={onSearch} style={{ width: 160}} />
<Select
defaultValue="全部组织"
className={styles.organizationSelect}
options={[
{ value: '全部组织', label: '全部组织' },
{ value: '技术部', label: '技术部' },
{ value: '生产部', label: '生产部' },
{ value: '安全部', label: '安全部' },
]}
/>
</div>
</div>
</div>
{/* 第二块:图片内容 */}
{/* 第二行:三个小块 */}
<div className={styles.rightBottomSection}>
<div className={styles.imagePlaceholder}>
<div className={styles.imageIcon}>📊</div>
<div className={styles.imageText}>数据图表</div>
<div className={styles.threeBlocksContainer}>
<div className={styles.blockItem}>
<div className={styles.blockContent}>
<div className={styles.backgroundContainer}>
{/* 第一个块:姓名和单位 */}
<div className={styles.infoBlock}>
<div className={styles.nameText}>张明</div>
<div className={styles.unitText}>东义区消防队</div>
</div>
{/* 第二个块:电话 */}
<div className={styles.infoBlock}>
<PhoneOutlined className={styles.infoIcon} />
<span className={styles.infoText}>132****3847</span>
</div>
{/* 第三个块:身份证 */}
<div className={styles.infoBlock}>
<IdcardOutlined className={styles.infoIcon} />
<span className={styles.infoText}>1304************10</span>
</div>
{/* 第四个块:职位标签 */}
<div className={styles.infoBlock}>
<div className={styles.tagContainer}>
<div className={styles.tagBlue1}>队长</div>
<div className={styles.tagBlue2}>消防工程师</div>
</div>
</div>
{/* 第五个块:证书状态 */}
<div className={styles.infoBlock}>
<div className={styles.tagContainer}>
<div className={styles.tagBlue3}>消防工程师</div>
<div className={styles.tagYellow}>证书3天后到期</div>
</div>
</div>
{/* 第六个块:操作按钮 */}
<div className={styles.actionBlock}>
<div className={styles.buttonContainer}>
<Button className={styles.editBtn}>编辑</Button>
<Button className={styles.deleteBtn}>删除</Button>
</div>
</div>
</div>
</div>
</div>
<div className={styles.blockItem}>
<div className={styles.blockContent}>待开发</div>
</div>
<div className={styles.blockItem}>
<div className={styles.blockContent}>待开发</div>
</div>
</div>
</div>
</div>

@ -34,12 +34,12 @@
margin-bottom: 10px;
gap: 10px;
.containerOneLeft{
.containerOneLeft {
background-color: white;
width: calc(50% - 5px);
display: flex;
flex-direction: column;
padding: 15px;
padding: 5px 15px;
border: 1px solid #f0f0f0;
border-radius: 4px;
@ -47,7 +47,7 @@
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
// margin-bottom: 15px;
.titleLeft {
display: flex;
@ -73,12 +73,13 @@
display: flex;
align-items: center;
gap: 4px;
height: 28px;
border: 1px solid #DFE4F6;
border-radius: 4px;
color: #2E4CD4;
font-weight: 500;
font-size: 12px;
padding: 4px 8px;
padding: 0px 8px;
background: transparent;
cursor: pointer;
transition: all 0.2s;
@ -89,7 +90,8 @@
}
.btnIcon {
font-size: 12px;
width: 12px;
height: 12px;
}
}
}
@ -100,36 +102,58 @@
display: flex;
align-items: center;
justify-content: center;
background-color: #fafafa;
border: 1px dashed #d9d9d9;
border-radius: 4px;
.imagePlaceholder {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
color: #999999;
.imageIcon {
font-size: 32px;
opacity: 0.6;
.imageIcon1 {
transform: scale(0.9) translateY(-5px); // 稍微向上移动
object-fit: contain;
}
.imageRow {
display: flex;
justify-content: space-between;
// width: 100%;
margin-bottom: 10px;
// padding-bottom: 20px;
// gap: 12px;
.imageIcon2 {
height: 55%;
transform: scale(0.7) translateY(-25%) translateX(20%); // 稍微向上移动
object-fit: contain;
background-color: #EFF5FE;
// padding-bottom: 20px;
}
.imageIcon3 {
height: 40%;
transform: scale(0.65) translateY(-32%) translateX(4%); // 向上移动10px
object-fit: contain;
padding-bottom: 20px;
// background-color: #EFF5FE;
}
}
.imageText {
font-size: 14px;
font-size: 12px;
font-weight: 400;
}
}
}
}
.containerOneRight{
.containerOneRight {
background-color: white;
width: calc(50% - 5px);
display: flex;
flex-direction: column;
padding: 15px;
padding: 5px 15px;
border: 1px solid #f0f0f0;
border-radius: 4px;
@ -137,7 +161,7 @@
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
margin-bottom: 10px;
.rightTopLeft {
display: flex;
@ -161,18 +185,56 @@
}
.rightTopRight {
.exportBtn {
background-color: #2E4CD4 !important;
border-color: #2E4CD4 !important;
color: #fff !important;
font-size: 14px !important;
font-weight: 500 !important;
height: 32px;
padding: 0 16px;
.searchGroup {
display: flex;
gap: 8px;
align-items: center;
&:hover {
background-color: #1e3bb8 !important;
border-color: #1e3bb8 !important;
.searchInput {
width: 200px;
height: 32px;
:global(.ant-input) {
height: 32px;
border-radius: 4px;
border: 1px solid #d9d9d9;
font-size: 14px;
&:focus {
border-color: #2E4CD4;
box-shadow: 0 0 0 2px rgba(46, 76, 212, 0.2);
}
}
:global(.ant-input-suffix) {
color: #999999;
font-size: 14px;
}
}
.organizationSelect {
width: 120px;
height: 32px;
:global(.ant-select-selector) {
height: 32px !important;
border-radius: 4px !important;
border: 1px solid #d9d9d9 !important;
&:hover {
border-color: #2E4CD4 !important;
}
&:focus {
border-color: #2E4CD4 !important;
box-shadow: 0 0 0 2px rgba(46, 76, 212, 0.2) !important;
}
}
:global(.ant-select-selection-item) {
line-height: 30px !important;
font-size: 14px !important;
}
}
}
}
@ -180,29 +242,178 @@
.rightBottomSection {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 5px 15px;
width: 100%;
height: 100%;
.imagePlaceholder {
.threeBlocksContainer {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 20px;
width: 100%;
height: 100%;
background-color: #f5f5f5;
border: 2px dashed #d9d9d9;
border-radius: 4px;
.imageIcon {
font-size: 48px;
margin-bottom: 10px;
}
.blockItem {
width: 100%;
height: 100%;
flex: 1;
display: flex;
justify-content: center;
background: url('@/assets/business_basic/background1.png') no-repeat center center;
background-size: 100% auto;
.imageText {
font-size: 14px;
color: #999999;
.blockContent {
// background-color: pink;
font-size: 12px;
color: #666666;
font-weight: 400;
width: 100%;
height: 100%;
}
// 新的6个横向块样式
.backgroundContainer {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
gap: 8px;
.infoBlock {
width: 100%;
display: flex;
justify-content: flex-start;
white-space: nowrap;
.nameText {
font-size: 12px;
font-weight: 500;
color: #333333;
margin-left: 10px;
margin-right: 10px;
margin-top: 15px;
}
.unitText {
font-size: 10px;
font-weight: 400;
color: #666666;
margin-top: 18px;
}
.infoIcon {
font-size: 10px;
color: #666666;
margin-left: 10px;
margin-right: 10px;
}
.infoText {
font-size: 10px;
font-weight: 400;
color: #666666;
}
}
.tagContainer {
display: flex;
gap: 8px;
align-items: center;
}
.tagBlue1 {
background-color: #D5E5FF;
color: #1269FF;
font-size: 10px;
font-weight: 400;
padding: 4px 8px;
border-radius: 4px;
white-space: nowrap;
margin-left: 10px;
}
.tagBlue2 {
background-color: #D5E5FF;
color: #1269FF;
font-size: 10px;
font-weight: 400;
padding: 4px 8px;
border-radius: 4px;
white-space: nowrap;
}
.tagBlue3 {
background-color: #D5E5FF;
color: #1269FF;
font-size: 10px;
font-weight: 400;
padding: 4px 8px;
border-radius: 4px;
white-space: nowrap;
margin-left: 10px;
}
.tagYellow {
background-color: #FFF8E2;
color: #FFC403;
font-size: 10px;
font-weight: 400;
padding: 4px 8px;
border-radius: 4px;
white-space: nowrap;
}
.actionBlock {
width: 100%;
height: 50%;
background-color: #BDD6FDCC;
display: flex;
align-items: center;
justify-content: center;
}
.buttonContainer {
display: flex;
gap: 15px;
align-items: center;
justify-content: center;
width: 100%;
.editBtn {
height: 80%;
background-color: #1269FF;
color: #fff;
font-size: 10px;
font-weight: 400;
border: none;
border-radius: 2px;
cursor: pointer;
padding: 2px 15px;
&:hover {
background-color: #0f5ae0;
}
}
.deleteBtn {
height: 80%;
background-color: #FF5F60;
color: #fff;
font-size: 10px;
font-weight: 400;
border: none;
border-radius: 2px;
cursor: pointer;
padding: 2px 15px;
&:hover {
background-color: #ff4a4b;
}
}
}
}
}
}
}
@ -210,12 +421,12 @@
}
.containerTwo{
.containerTwo {
flex: 1;
background-color: white;
display: flex;
flex-direction: column;
padding: 15px;
padding: 5px 15px;
border: 1px solid #f0f0f0;
border-radius: 4px;
@ -266,7 +477,7 @@
gap: 8px;
:global(.ant-btn) {
height: 32px;
height: 28px;
padding: 0 16px;
border-radius: 4px;
font-size: 14px;
@ -324,7 +535,8 @@
}
.rightTopSelect{
.rightTopSelect {
// 下拉框本身的样式
:global(.ant-select-selector) {
background-color: #f8f9fa !important;

File diff suppressed because it is too large Load Diff

@ -1,241 +1,418 @@
.risk-assessment {
padding: 20px;
.ant-card {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
border-radius: 6px;
.ant-card-head {
border-bottom: 1px solid #f0f0f0;
.ant-card-head-title {
font-size: 16px;
font-weight: 600;
color: #262626;
}
}
.ant-card-body {
padding: 20px;
}
}
.ant-table {
.ant-table-thead > tr > th {
background-color: #fafafa;
font-weight: 600;
color: #262626;
border-bottom: 1px solid #f0f0f0;
}
.ant-table-tbody > tr > td {
border-bottom: 1px solid #f0f0f0;
}
.ant-table-tbody > tr:hover > td {
background-color: #f5f5f5;
}
}
.ant-btn {
border-radius: 4px;
&.ant-btn-primary {
background-color: #1890ff;
border-color: #1890ff;
&:hover {
background-color: #40a9ff;
border-color: #40a9ff;
}
}
&.ant-btn-link {
padding: 4px 8px;
height: auto;
&:hover {
background-color: #f5f5f5;
}
}
}
.ant-tag {
border-radius: 4px;
font-size: 12px;
padding: 2px 8px;
}
.ant-rate {
font-size: 14px;
.ant-rate-star {
margin-right: 2px;
}
}
.ant-progress {
.ant-progress-bg {
border-radius: 2px;
}
&.ant-progress-small {
.ant-progress-text {
font-size: 10px;
}
}
}
.ant-modal {
.ant-modal-header {
border-bottom: 1px solid #f0f0f0;
.ant-modal-title {
font-size: 16px;
font-weight: 600;
color: #262626;
}
}
.ant-modal-body {
padding: 24px;
}
.ant-form-item-label > label {
font-weight: 500;
color: #262626;
}
.ant-input,
.ant-select-selector {
border-radius: 4px;
border: 1px solid #d9d9d9;
&:hover {
border-color: #40a9ff;
}
&:focus,
&.ant-select-focused .ant-select-selector {
border-color: #40a9ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
}
}
.ant-pagination {
margin-top: 16px;
text-align: right;
.ant-pagination-total-text {
color: #8c8c8c;
margin-right: 16px;
}
}
// 风险等级颜色
.risk-level-high {
color: #ff4d4f;
font-weight: 600;
}
.risk-level-medium {
color: #faad14;
font-weight: 600;
}
.risk-level-low {
color: #52c41a;
font-weight: 600;
}
// 状态指示器
.status-indicator {
display: inline-flex;
align-items: center;
gap: 4px;
&.processed {
color: #52c41a;
}
&.pending {
color: #ff4d4f;
}
&.monitoring {
color: #1890ff;
}
}
// 评分显示
.score-display {
.Rcontainer {
padding: 8px 6px 0px 6px;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
.score-value {
font-weight: 600;
font-size: 14px;
gap: 10px;
// 第一个div - 高度20%
.RcontainerTop {
height: 16%;
// background-color: #fff;
border-radius: 4px;
display: flex;
flex-direction: column;
.sectionContent {
height: 100%;
display: flex;
flex-direction: column;
// padding: 15px;
.blocksContainer {
flex: 1;
display: flex;
gap: 10px;
height: 100%;
.blockItem {
flex: 1;
height: 100%;
display: flex;
background: linear-gradient(170.5deg, #EBEFF4 6.87%, #FFFFFF 92.55%);
border-radius: 4px;
border: 2px solid #FFFFFF;
.blockLeft {
width: 60%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
padding: 15px;
padding-left: 20px;
gap: 8px;
.blockTitle {
font-family: PingFang SC;
font-weight: 400;
font-size: 12px;
color: #666666;
line-height: 1.2;
}
.blockNumber {
font-family: PingFang SC;
font-weight: 700;
font-size: 24px;
color: #333333;
line-height: 1.2;
}
.blockChange {
font-family: PingFang SC;
font-weight: 400;
font-size: 12px;
color: #1269FF;
line-height: 1.2;
display: flex;
align-items: center;
gap: 4px;
.arrow {
font-size: 14px;
font-weight: bold;
}
.checkIcon {
font-size: 16px;
color: #1269FF;
}
}
}
.blockRight {
flex: 1;
height: 100%;
background-color: transparent;
border-radius: 0 4px 4px 0;
display: flex;
align-items: center;
justify-content: center;
.blockImage {
// width: 80%;
height: 130%;
// height: 80%;
object-fit: contain;
margin-right: -10px;
}
}
}
}
}
}
.score-label {
font-size: 12px;
color: #8c8c8c;
// 第二个div - 高度30%
.RcontainerMiddle {
height: 30%;
border-radius: 4px;
display: flex;
flex-direction: column;
.sectionContent {
height: 100%;
display: flex;
display: flex;
gap: 10px;
height: 100%;
.middleBlock1 {
flex: 1;
height: 100%;
background: linear-gradient(170.5deg, #EBEFF4 6.87%, #FFFFFF 53.01%);
border: 2px solid #fff;
border-radius: 4px;
position: relative;
padding: 0px 10px 10px 2px;
font-family: PingFang SC;
font-size: 14px;
color: #333333;
.block1Header {
position: absolute;
top: 5px;
left: 10px;
right: 10px;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 10;
.block1Title {
display: flex;
align-items: center;
gap: 8px;
font-weight: 500;
font-size: 14px;
color: #333333;
.titleIcon {
width: 3px;
height: 14px;
background-color: #2E4CD4;
}
}
.block1Select {
width: 100px;
:global(.ant-select-selector) {
height: 28px !important;
font-size: 12px !important;
}
:global(.ant-select-selection-item) {
line-height: 26px !important;
font-size: 12px !important;
}
}
}
.riskLegend {
position: absolute;
Top: 18px;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
z-index: 10;
.legendItem {
display: flex;
align-items: center;
gap: 5px;
.legendDot {
width: 8px;
height: 8px;
border-radius: 50%;
}
.legendText {
font-size: 12px;
color: #333;
font-weight: 400;
}
}
}
.block1Chart {
width: 100%;
height: 100%;
margin-top: 20px;
.mapImage {
margin-top: 7%;
width: 90%;
height: 77%;
object-fit: cover;
border-radius: 4px;
display: block;
margin-left: auto;
margin-right: auto;
}
}
}
.middleBlock2 {
flex: 1;
height: 100%;
// background: linear-gradient(170.5deg, #EBEFF4 6.87%, #FFFFFF 53.01%);
// border: 2px solid #fff;
background-color: #fff;
// border-radius: 4px;
display: flex;
flex-direction: column;
font-family: PingFang SC;
font-size: 14px;
color: #333333;
padding: 5px 10px 5px 10px;
.middleBlock2Title {
display: flex;
justify-content: space-between;
align-items: center;
// margin-bottom: 10px;
.titleLeft {
display: flex;
align-items: center;
gap: 8px;
font-weight: 500;
font-size: 14px;
color: #333333;
.titleIcon {
width: 3px;
height: 14px;
background-color: #2E4CD4;
}
}
.titleRight {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: #666;
}
}
.middleBlock2Chart {
width: 100%;
height: 100%;
// min-height: 200px;
}
}
}
}
}
// 概率和影响程度显示
.rate-display {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
.rate-stars {
display: flex;
align-items: center;
gap: 2px;
}
.rate-text {
font-size: 12px;
color: #8c8c8c;
}
}
// 风险矩阵样式
.risk-matrix {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 8px;
margin: 16px 0;
.matrix-cell {
padding: 8px;
text-align: center;
border: 1px solid #d9d9d9;
border-radius: 4px;
font-size: 12px;
&.high-risk {
background-color: #fff2f0;
border-color: #ff4d4f;
color: #ff4d4f;
}
&.medium-risk {
background-color: #fffbe6;
border-color: #faad14;
color: #faad14;
}
&.low-risk {
background-color: #f6ffed;
border-color: #52c41a;
color: #52c41a;
}
// 第三个div - 占满剩余位置
.RcontainerBottom {
flex: 1; // 占满剩余空间
display: flex;
flex-direction: column;
.sectionContent {
display: flex;
flex-direction: row;
gap: 10px;
padding: 0;
.leftBlock {
width: 30%;
height: 100%;
background: url('@/assets/safe_majorHazard/online_monitoring/risk3.png') no-repeat center center;
background-size: cover;
padding: 0;
display: flex;
flex-direction: column;
gap: 10px;
padding: 15px;
.leftBlockTitle {
display: flex;
align-items: center;
gap: 8px;
font-family: PingFang SC;
font-weight: 500;
font-size: 14px;
color: #333333;
.titleIcon {
width: 3px;
height: 16px;
background-color: #2E4CD4;
}
}
.leftBlockImage {
height: 40%;
width: 100%;
border-radius: 4px;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
height: 80%;
}
.leftBlockItem {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
padding: 10px;
// background-color: #f5f5f5;
border-radius: 4px;
font-family: PingFang SC;
.itemTitle {
font-size: 12px;
color: #666666;
margin-bottom: 5px;
}
.itemValue {
font-size: 14px;
color: #333333;
font-weight: 500;
}
}
}
.rightBlock {
width: 68%;
height: 100%;
background-color: #fff;
padding: 0;
display: flex;
flex-direction: column;
.tableHeader {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 15px 5px 15px;
.tableTitle {
display: flex;
align-items: center;
gap: 8px;
font-family: PingFang SC;
font-weight: 500;
font-size: 14px;
color: #333333;
.titleIcon {
width: 3px;
height: 16px;
background-color: #2E4CD4;
}
}
}
.tableContainer {
flex: 1;
overflow: hidden;
:global(.ant-table) {
font-size: 12px;
}
:global(.ant-table-thead > tr > th) {
background-color: #f5f5fa;
font-weight: 500;
font-size: 14px;
color: #333333;
border-bottom: 1px solid #f0f0f0;
padding: 8px 12px;
text-align: center;
}
:global(.ant-table-tbody > tr > td) {
padding: 8px 12px;
border-bottom: 1px solid #f0f0f0;
text-align: center;
}
:global(.ant-table-tbody > tr:hover > td) {
background-color: #f5f5f5;
}
:global(.ant-pagination) {
margin-top: 16px;
text-align: right;
}
}
}
}
}
}
}
Loading…
Cancel
Save