waring
parent
e810ee4615
commit
8eeb411021
|
|
@ -12,6 +12,7 @@ import {
|
|||
Upload,
|
||||
Flex,
|
||||
Input,
|
||||
Descriptions,
|
||||
message,
|
||||
} from "antd";
|
||||
import { UploadOutlined } from "@ant-design/icons";
|
||||
|
|
@ -37,6 +38,7 @@ const RiskWarning = (props) => {
|
|||
const [total, setTotal] = useState(0);
|
||||
const [statData, setStatData] = useState({});
|
||||
const [handleModalOpen, setHandleModalOpen] = useState(false);
|
||||
const [detailModalOpen, setDetailModalOpen] = useState(false);
|
||||
const [currentRecord, setCurrentRecord] = useState(null);
|
||||
const [modalForm] = Form.useForm();
|
||||
const [uploading, setUploading] = useState(false);
|
||||
|
|
@ -146,6 +148,17 @@ const RiskWarning = (props) => {
|
|||
>
|
||||
处理
|
||||
</Button>
|
||||
) : record.handleStatus === "done" ? (
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
setCurrentRecord(record);
|
||||
setDetailModalOpen(true);
|
||||
}}
|
||||
>
|
||||
详情
|
||||
</Button>
|
||||
) : null,
|
||||
},
|
||||
];
|
||||
|
|
@ -279,6 +292,35 @@ const RiskWarning = (props) => {
|
|||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
|
||||
<Modal
|
||||
title="预警详情"
|
||||
open={detailModalOpen}
|
||||
footer={null}
|
||||
onCancel={() => setDetailModalOpen(false)}
|
||||
>
|
||||
<Descriptions column={1} size="small" className="rw-detail">
|
||||
<Descriptions.Item label="项目编号">
|
||||
{currentRecord?.projectNo || "-"}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="证明材料">
|
||||
{currentRecord?.evidenceFileUrl ? (
|
||||
<a
|
||||
href={currentRecord.evidenceFileUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{getFileName(currentRecord.evidenceFileUrl)}
|
||||
</a>
|
||||
) : (
|
||||
"-"
|
||||
)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="备注处理说明">
|
||||
{currentRecord?.remarks || "-"}
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</Modal>
|
||||
</PageLayout>
|
||||
);
|
||||
};
|
||||
|
|
@ -289,11 +331,11 @@ export default Connect(
|
|||
)(AntdTableFuncControl(RiskWarning));
|
||||
|
||||
/** 证明材料上传字段 - 上传后回填 url */
|
||||
const getFileName = (url) =>
|
||||
typeof url === "string" && url.includes("/") ? url.split("/").pop() : url;
|
||||
|
||||
const UploadButtonField = ({ value, onChange, uploading, setUploading }) => {
|
||||
const fileName =
|
||||
typeof value === "string" && value.includes("/")
|
||||
? value.split("/").pop()
|
||||
: value;
|
||||
const fileName = getFileName(value);
|
||||
|
||||
return (
|
||||
<Flex gap={8} align="center">
|
||||
|
|
|
|||
Loading…
Reference in New Issue