风险管控调整

main
wangyunfei 3 weeks ago
parent 4eaad7c46e
commit 8221fbd90e

@ -1,6 +1,6 @@
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { Card, Result, Select, Button } from 'antd'; import { Card, Result, Select, Button, Modal } from 'antd';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import StandardTable from '@/components/StandardTable'; import StandardTable from '@/components/StandardTable';
import styles from './OnlineMonitoring.less'; import styles from './OnlineMonitoring.less';
@ -23,6 +23,7 @@ const OnlineMonitoring = () => {
pageSize: 5, pageSize: 5,
total: 0, total: 0,
}); });
const [deleteModalVisible, setDeleteModalVisible] = useState(false);
useEffect(() => { useEffect(() => {
if (chartRef.current) { if (chartRef.current) {
@ -474,8 +475,23 @@ const OnlineMonitoring = () => {
// 可以在这里添加提示用户选择行的逻辑 // 可以在这里添加提示用户选择行的逻辑
return; return;
} }
console.log('批量删除', selectedRowKeys); // 显示删除确认弹窗
// 这里可以添加批量删除逻辑 setDeleteModalVisible(true);
};
// 确认删除
const handleConfirmDelete = () => {
console.log('确认删除', selectedRowKeys);
// 这里可以添加实际的删除逻辑
// 例如调用API删除数据然后更新列表
setDeleteModalVisible(false);
setSelectedRowKeys([]);
setSelectedRows([]);
};
// 取消删除
const handleCancelDelete = () => {
setDeleteModalVisible(false);
}; };
return ( return (
@ -708,6 +724,32 @@ const OnlineMonitoring = () => {
/> />
</div> </div>
</div> </div>
{/* 删除确认弹窗 */}
<Modal
title="提醒"
open={deleteModalVisible}
onOk={handleConfirmDelete}
onCancel={handleCancelDelete}
okText="确定"
cancelText="取消"
centered={true} // 垂直居中显示
wrapClassName={styles.deleteModal}
okButtonProps={{
style: {
backgroundColor: '#2E4CD4',
borderColor: '#2E4CD4'
}
}}
cancelButtonProps={{
style: {
color: '#666',
borderColor: '#DFE4F6'
}
}}
>
<p>确定删除该条报警信息吗?</p>
</Modal>
</div> </div>
); );
}; };

@ -916,4 +916,14 @@
} }
} }
}
// 删除确认弹窗样式
.deleteModal {
:global(.ant-modal-content) {
background: linear-gradient(180deg, #EAEEFF 0%, #FFFFFF 20.19%, #FFFFFF 100%);
}
:global(.ant-modal-header) {
background: transparent !important;
}
} }

@ -510,6 +510,7 @@ const ResponsibilityImplementation = () => {
okText="确定" okText="确定"
cancelText="取消" cancelText="取消"
width={800} width={800}
wrapClassName={styles.addResponsibleModal}
okButtonProps={{ okButtonProps={{
style: { style: {
backgroundColor: '#2E4CD4', backgroundColor: '#2E4CD4',

@ -320,4 +320,14 @@
color: #333333; color: #333333;
font-weight: 500; font-weight: 500;
} }
}
// 新增责任人弹窗样式
.addResponsibleModal {
:global(.ant-modal-content) {
background: linear-gradient(180deg, #EAEEFF 0%, #FFFFFF 20.19%, #FFFFFF 100%);
}
:global(.ant-modal-header) {
background: transparent !important;
}
} }

@ -46,11 +46,14 @@ const RiskAssessment = () => {
data: ['重大风险', '较高风险', '一般风险', '低风险'], data: ['重大风险', '较高风险', '一般风险', '低风险'],
top: "-3px", top: "-3px",
left: "center", left: "center",
itemGap: 40, // 图例间距 itemGap: 40,
itemWidth: 20,
itemHeight: 9,
textStyle: { textStyle: {
fontSize: 10 fontSize: 10
} }
}, },
grid: { grid: {
left: '2%', left: '2%',
right: '4%', right: '4%',
@ -58,6 +61,7 @@ const RiskAssessment = () => {
top: '12%', top: '12%',
containLabel: true containLabel: true
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
@ -97,7 +101,13 @@ const RiskAssessment = () => {
] ]
} }
}, },
symbol: 'none', symbol: 'none',
symbolSize: 6,
itemStyle: {
color: '#fff',
borderColor: '#FF2526',
borderWidth: 1
},
data: [8, 15, 12, 22, 18, 26, 20] data: [8, 15, 12, 22, 18, 26, 20]
}, },
{ {
@ -122,6 +132,12 @@ const RiskAssessment = () => {
} }
}, },
symbol: 'none', symbol: 'none',
symbolSize: 6,
itemStyle: {
color: '#fff',
borderColor: '#FF8800',
borderWidth: 1
},
data: [5, 8, 6, 12, 10, 15, 13] data: [5, 8, 6, 12, 10, 15, 13]
}, },
{ {
@ -146,6 +162,12 @@ const RiskAssessment = () => {
} }
}, },
symbol: 'none', symbol: 'none',
symbolSize: 6,
itemStyle: {
color: '#fff',
borderColor: '#FFC403',
borderWidth: 1
},
data: [12, 18, 15, 25, 22, 24, 26] data: [12, 18, 15, 25, 22, 24, 26]
}, },
{ {
@ -170,6 +192,12 @@ const RiskAssessment = () => {
} }
}, },
symbol: 'none', symbol: 'none',
symbolSize: 6,
itemStyle: {
color: '#fff',
borderColor: '#65E5F9',
borderWidth: 1
},
data: [3, 5, 7, 9, 6, 8, 4] data: [3, 5, 7, 9, 6, 8, 4]
} }
] ]
@ -533,8 +561,8 @@ const RiskAssessment = () => {
<div className={styles.blockTitle}>今日预警次数</div> <div className={styles.blockTitle}>今日预警次数</div>
<div className={styles.blockNumber}>65</div> <div className={styles.blockNumber}>65</div>
<div className={styles.blockChange}> <div className={styles.blockChange}>
<span className={styles.arrow}></span> <span className={styles.arrow}></span>
较昨日 +2 较昨日 -2
</div> </div>
</div> </div>
<div className={styles.blockRight}> <div className={styles.blockRight}>
@ -548,8 +576,8 @@ const RiskAssessment = () => {
<div className={styles.blockTitle}>未处理预警</div> <div className={styles.blockTitle}>未处理预警</div>
<div className={styles.blockNumber}>65</div> <div className={styles.blockNumber}>65</div>
<div className={styles.blockChange}> <div className={styles.blockChange}>
<span className={styles.arrow}></span> <span className={styles.arrow}></span>
较昨日 +2 与昨日持平
</div> </div>
</div> </div>
<div className={styles.blockRight}> <div className={styles.blockRight}>

Loading…
Cancel
Save