fix(accident): 修复事故管理页面权限控制和数据处理问题

- 修复新增按钮权限控制逻辑错误
- 添加批量删除后选中行状态重置功能
- 修复列定义顺序导致的显示问题
- 添加弹窗遮罩点击关闭限制防止误操作
- 修复监管部门事故列表企业类型筛选条件
- 修复详情查看弹窗加载状态显示位置
master
fangjiakai 2026-02-06 13:35:49 +08:00
parent 0b971f39b9
commit 2c35e03824
2 changed files with 10 additions and 7 deletions

View File

@ -70,6 +70,9 @@ function Accident(props) {
}}
toolBarRender={() => (
<Space>
{!props.isSupervise && props.permission(props.addPermission) &&
<Button type="primary" icon={<AddIcon />} onClick={() => setAddModalVisible(true)}>新增</Button>
}
{props.permission(props.exportPermission) &&
<Button type="primary" loading={loading} icon={<ExportIcon />} ghost onClick={async () => {
const exportParams = getUrlCriteriaQuery("searchFormKeys", "searchFormValues");
@ -77,9 +80,6 @@ function Accident(props) {
await downloadBlob("/accident/accident/export", { params: { ...exportParams, eqType: props.type } })
}}>全部导出</Button>
}
{!props.isSupervise && props.permission(props.addPermission) &&
<Button type="primary" icon={<AddIcon />} onClick={() => setAddModalVisible(true)}>新增</Button>
}
{!props.isSupervise && props.permission(props.deleteBatchPermission) &&
<Button icon={<DeleteIcon />}
ghost
@ -93,6 +93,7 @@ function Accident(props) {
onOk: async () => {
await props["accidentBatchDelete"]({ ids: selectedRowKeys });
message.success("删除成功");
setSelectedRowKeys([]);
getData();
},
});
@ -104,8 +105,8 @@ function Accident(props) {
</Space>
)}
columns={[
{ dataIndex: "incidentName", title: `${typeName}名称` },
{ dataIndex: "corpinfoName", title: `所属公司` },
{ dataIndex: "incidentName", title: `${typeName}名称` },
{ dataIndex: "incidentDate", title: `${typeName}发生时间` },
{ dataIndex: "location", title: `${typeName}发生地点` },
{ dataIndex: "incidentTypeName", title: `${typeName}类型` },
@ -302,6 +303,7 @@ function AddModalComponent(props) {
open
onCancel={onCancel}
onOk={form.submit}
maskClosable={false}
title={props.currentId ? "编辑" : "新增"}
confirmLoading={props.accident.accidentLoading || uploadLoading || deleteLoading}
width={800}
@ -398,12 +400,13 @@ function InfoModalComponent(props) {
open
onCancel={props.onCancel}
footer={<Button onClick={props.onCancel}>关闭</Button>}
maskClosable={false}
title={`查看${typeName}`}
loading={props.accident.accidentLoading}
width={800}
>
<Descriptions
labelStyle={{ width: 200 }}
loading={props.accident.accidentLoading}
column={1}
bordered
items={[

View File

@ -37,7 +37,7 @@ function SuperviseAccident(props) {
const {tableProps, getData} = useTable(props["getCorpInfoList"], {
form,
params: {
enterpriseType: [2],
inType: [0,1,6],
},
onSuccess: ({data}) => {
getAccidentCountByCorpinfoAndType(data.map(item => item.id),form.getFieldValue("eqAccidentType"))