safety-eval-service-frontend/src/pages/Container/QualApplication/index.js

30 lines
823 B
JavaScript
Raw Normal View History

2026-07-03 14:47:36 +08:00
import React, { useEffect, useState } from "react";
import { NS_ORG_INFO } from "~/enumerate/namespace";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Skeleton } from "antd";
2026-06-30 17:32:29 +08:00
/** 资质申请管理模块入口:需先有机构信息 */
function QualApplication(props) {
2026-07-03 14:47:36 +08:00
const [orgInfoId, setOrgInfoId] = useState(
sessionStorage.getItem("orgInfoId"),
);
useEffect(() => {
if (!orgInfoId) {
props.orgInfoGet().then((res) => {
2026-07-07 11:18:00 +08:00
if (res?.data?.id) {
setOrgInfoId(res?.data?.id);
sessionStorage.setItem("orgInfoId", res?.data?.id);
}
2026-07-03 14:47:36 +08:00
});
}
}, []);
2026-06-30 17:32:29 +08:00
return (
<div style={{ height: "100%" }}>
2026-07-06 16:22:51 +08:00
{orgInfoId ? props.children : <Skeleton active></Skeleton>}
2026-06-30 17:32:29 +08:00
</div>
);
}
2026-07-03 14:47:36 +08:00
export default Connect([NS_ORG_INFO], true)(QualApplication);