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