tangjie 2026-07-13 11:14:27 +08:00
parent 96d5ae9458
commit b93465309e
5 changed files with 202 additions and 136 deletions

View File

@ -10,7 +10,7 @@ module.exports = {
javaGitBranch: "dev",
// 本地联调 safetyEval-servicecontext-path: /safetyEval默认端口 8095
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
API_HOST: "http://192.168.0.149",
API_HOST: "https://gbs-gateway.qhdsafety.com",
},
production: {
// 应用后端分支名称,部署上线需要

View File

@ -25,7 +25,6 @@ function OrgAccountPage(props) {
const [editOpen, setEditOpen] = useState(false);
const [currentId, setCurrentId] = useState(null);
const [detail, setDetail] = useState(null);
const [rawDetail, setRawDetail] = useState(null);
const [detailLoading, setDetailLoading] = useState(false);
const [editLoading, setEditLoading] = useState(false);
const [dataSource, setDataSource] = useState([]);
@ -35,7 +34,19 @@ function OrgAccountPage(props) {
const getData = async () => {
setLoading(true);
try {
const params = searchForm.getFieldsValue();
const raw = searchForm.getFieldsValue();
const params = {
...raw,
state: raw.state !== "" && raw.state !== undefined ? Number(raw.state) : undefined,
...(Array.isArray(raw.openTimeRange) && raw.openTimeRange[0] && raw.openTimeRange[1]
? {
createTimeStart: raw.openTimeRange[0].format("YYYY-MM-DD"),
createTimeEnd: raw.openTimeRange[1].format("YYYY-MM-DD"),
}
: {}),
};
delete params.openTimeRange;
Object.keys(params).forEach((k) => { if (params[k] === undefined) delete params[k]; });
const res = await safeListRequest(props.orgAccountList)(params);
setDataSource(res?.data || []);
setTotal(res?.totalCount || 0);
@ -52,7 +63,6 @@ function OrgAccountPage(props) {
setDetailLoading(true);
const res = await safeRequest(props.orgAccountGet, { id });
setDetail(res?.data || null);
setRawDetail(res?.raw || null);
setDetailLoading(false);
return res;
};
@ -76,7 +86,7 @@ function OrgAccountPage(props) {
const enabled = isOrgAccountEnabled(record);
Modal.confirm({
title: "确认操作",
content: enabled ? `确认禁用「${record.orgName}」账号?` : `确认启用「${record.orgName}」账号?`,
content: enabled ? `确认禁用「${record.unitName}」账号?` : `确认启用「${record.unitName}」账号?`,
okText: "确认",
cancelText: "取消",
onOk: async () => {
@ -99,7 +109,7 @@ function OrgAccountPage(props) {
<div>
<p>
确认将
<strong>{record.orgName}</strong>
<strong>{record.unitName}</strong>
的密码重置为初始密码
</p>
<p style={{ color: "rgba(0,0,0,0.45)", fontSize: 12 }}>初始密码a123456</p>
@ -124,7 +134,7 @@ function OrgAccountPage(props) {
<div>
<p>
确认删除
<strong>{record.orgName}</strong>
<strong>{record.unitName}</strong>
的账号
</p>
<p style={{ color: "rgba(0,0,0,0.45)", fontSize: 12 }}>此操作不可恢复请谨慎操作</p>
@ -150,14 +160,12 @@ function OrgAccountPage(props) {
const res = await props.orgAccountModify({
...values,
id: currentId,
raw: rawDetail,
});
setEditLoading(false);
if (res?.success !== false) {
message.success("保存成功");
setEditOpen(false);
setCurrentId(null);
setRawDetail(null);
editForm.resetFields();
await getData();
}
@ -165,8 +173,8 @@ function OrgAccountPage(props) {
};
const columns = [
{ title: "机构名称", dataIndex: "orgName", ellipsis: true },
{ title: "属地", dataIndex: "district", width: 260 },
{ title: "机构名称", dataIndex: "unitName", ellipsis: true },
{ title: "属地", dataIndex: "districtName", width: 260 },
{
title: "状态",
width: 80,
@ -179,7 +187,7 @@ function OrgAccountPage(props) {
{ title: "开户时间", dataIndex: "createTime", width: 110 },
{
title: "操作",
width: 320,
width: 200,
fixed: "right",
render: (_, record) => (
<TableAction>
@ -211,10 +219,10 @@ function OrgAccountPage(props) {
form={searchForm}
loading={loading}
formLine={[
<Form.Item key="orgName" name="orgName">
<Form.Item key="unitName" name="unitName">
<ControlWrapper.Input label="机构名称" placeholder="关键字搜索" allowClear />
</Form.Item>,
<Form.Item key="district" name="district">
<Form.Item key="districtName" name="districtName">
<ControlWrapper.Select label="属地" placeholder="请选择属地" allowClear>
{CHONGQING_DISTRICTS.map((opt) => (
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
@ -222,14 +230,14 @@ function OrgAccountPage(props) {
</ControlWrapper.Select>
</Form.Item>,
<Form.Item key="state" name="state">
<ControlWrapper.Select label="状态" placeholder="请选择状态">
<ControlWrapper.Select label="状态" placeholder="请选择状态" allowClear>
{ORG_ACCOUNT_STATE_OPTIONS.map((opt) => (
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
))}
</ControlWrapper.Select>
</Form.Item>,
<Form.Item key="openTimeRange" name="openTimeRange">
<ControlWrapper.DatePicker.RangePicker label="开户时间" />
<ControlWrapper.DatePicker.RangePicker label="开户时间" allowClear />
</Form.Item>,
]}
onReset={() => {
@ -265,22 +273,22 @@ function OrgAccountPage(props) {
loading={detailLoading}
cancelText="关闭"
okButtonProps={{ style: { display: "none" } }}
onCancel={() => { setViewOpen(false); setDetail(null); setRawDetail(null); }}
onCancel={() => { setViewOpen(false); setDetail(null); }}
>
{detail && (
<Descriptions bordered column={2} size="small">
<Descriptions.Item label="机构名称">{detail.orgName}</Descriptions.Item>
<Descriptions.Item label="机构名称">{detail.unitName}</Descriptions.Item>
<Descriptions.Item label="统一社会信用代码">{detail.creditCode}</Descriptions.Item>
<Descriptions.Item label="属地">{detail.regionCountyName}</Descriptions.Item>
<Descriptions.Item label="安全生产监管行业类别">{detail.safetyIndustryCategory}</Descriptions.Item>
<Descriptions.Item label="属地">{detail.districtName}</Descriptions.Item>
<Descriptions.Item label="安全生产监管行业类别">{detail.safetyIndustryCategoryName}</Descriptions.Item>
<Descriptions.Item label="经营地址" span={2}>{detail.businessAddress}</Descriptions.Item>
<Descriptions.Item label="企业状态">{detail.enterpriseStatus}</Descriptions.Item>
<Descriptions.Item label="企业状态">{detail.enterpriseStatusName}</Descriptions.Item>
<Descriptions.Item label="经度/纬度">{detail.longitude}, {detail.latitude}</Descriptions.Item>
<Descriptions.Item label="主要负责人">{detail.principal}</Descriptions.Item>
<Descriptions.Item label="主要负责人">{detail.principalName}</Descriptions.Item>
<Descriptions.Item label="主要负责人电话">{detail.principalPhone}</Descriptions.Item>
<Descriptions.Item label="法定代表人">{detail.legalRepresentative}</Descriptions.Item>
<Descriptions.Item label="法人电话">{detail.legalRepPhone}</Descriptions.Item>
<Descriptions.Item label="企业规模" span={2}>{detail.enterpriseScale}</Descriptions.Item>
<Descriptions.Item label="法人电话">{detail.legalRepresentativePhone}</Descriptions.Item>
<Descriptions.Item label="企业规模" span={2}>{detail.enterpriseScaleName}</Descriptions.Item>
</Descriptions>
)}
</Modal>
@ -296,7 +304,6 @@ function OrgAccountPage(props) {
onCancel={() => {
setEditOpen(false);
setCurrentId(null);
setRawDetail(null);
editForm.resetFields();
}}
onOk={onEditSubmit}
@ -304,7 +311,7 @@ function OrgAccountPage(props) {
<Form form={editForm} layout="vertical">
<Row gutter={16}>
<Col span={12}>
<Form.Item name="orgName" label="机构名称" rules={[{ required: true, message: "请输入机构名称" }]}>
<Form.Item name="unitName" label="机构名称" rules={[{ required: true, message: "请输入机构名称" }]}>
<Input />
</Form.Item>
</Col>
@ -314,12 +321,12 @@ function OrgAccountPage(props) {
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="regionCountyName" label="属地">
<Form.Item name="districtName" label="属地">
<Select options={CHONGQING_DISTRICTS} placeholder="请选择属地" />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="safetyIndustryCategory" label="安全生产监管行业类别">
<Form.Item name="safetyIndustryCategoryName" label="安全生产监管行业类别">
<Input />
</Form.Item>
</Col>
@ -329,7 +336,7 @@ function OrgAccountPage(props) {
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="enterpriseStatus" label="企业状态">
<Form.Item name="enterpriseStatusName" label="企业状态">
<Select options={ENTERPRISE_STATUS_OPTIONS} />
</Form.Item>
</Col>
@ -344,7 +351,7 @@ function OrgAccountPage(props) {
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="principal" label="主要负责人">
<Form.Item name="principalName" label="主要负责人">
<Input />
</Form.Item>
</Col>
@ -359,12 +366,12 @@ function OrgAccountPage(props) {
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="legalRepPhone" label="法人电话">
<Form.Item name="legalRepresentativePhone" label="法人电话">
<Input />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="enterpriseScale" label="企业规模">
<Form.Item name="enterpriseScaleName" label="企业规模">
<Select options={ENTERPRISE_SCALE_OPTIONS.map((o) => ({ label: o.label, value: o.label }))} />
</Form.Item>
</Col>
@ -375,4 +382,4 @@ function OrgAccountPage(props) {
);
}
export default Connect([NS_ORG_INFO], true)(AntdTableFuncControl(OrgAccountPage));
export default Connect([NS_ORG_INFO], true)(AntdTableFuncControl(OrgAccountPage));

View File

@ -5,9 +5,6 @@ import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
import FilePreviewModal from "~/components/FilePreviewModal";
import {
fetchRegisteredOrgDetail,
fetchRegisteredOrgPersonnelCertDetail,
fetchRegisteredOrgPersonnelCertList,
fetchRegisteredOrgPersonnelDetail,
fetchRegisteredOrgPersonnelList,
fetchRegisteredOrgQualificationGroups,
} from "~/utils/regulatorOrgInfo";
@ -16,6 +13,53 @@ import StaffViewModal from "~/components/StaffViewModal";
const LIST_PATH = "/container/supervision/basicInfo/registeredOrg/list";
const ORG_INFO_FORM_OPTIONS = buildOrgInfoFormOptions();
const GENDER_MAP = { 1: "男", 2: "女" };
/** 后端字段名 → 前端表单字段名映射 */
const BACKEND_TO_FORM_FIELD = {
unitName: "orgName",
creditCode: "creditCode",
safetyIndustryCategoryName: "safetyIndustryCategory",
districtName: "regionCountyName",
townStreet: "regionStreetName",
villageCommunity: "regionCommunityName",
longitude: "longitude",
latitude: "latitude",
registerAddress: "registerAddress",
businessAddress: "businessAddress",
ownershipTypeName: "ownershipType",
economyIndustryCode: "gbIndustryCode",
legalRepresentative: "legalRepresentative",
legalRepresentativePhone: "legalRepPhone",
principalName: "principal",
principalPhone: "principalPhone",
safetyDeptManager: "safetyDeptHead",
safetyDeptManagerPhone: "safetyDeptPhone",
safetyDeputyPhone: "safetyVpPhone",
productionDate: "productionDate",
businessStatusName: "businessStatus",
infoDisclosureUrl: "disclosureUrl",
workplaceArea: "workplaceArea",
archiveRoomArea: "archiveRoomArea",
fulltimeEvaluatorCount: "fullTimeEvaluatorCount",
registeredEngineerCount: "registeredSafetyEngineerCount",
enterpriseStatusName: "enterpriseStatus",
enterpriseScaleName: "enterpriseScale",
filingTypeName: "filingType",
filingRecordStatusName: "filingRecordStatus",
attachments: "attachments",
};
function toFormFields(backendData) {
if (!backendData) return {};
const result = {};
Object.entries(BACKEND_TO_FORM_FIELD).forEach(([backendKey, formKey]) => {
if (backendData[backendKey] !== undefined) {
result[formKey] = backendData[backendKey];
}
});
return result;
}
function parseQueryId(location) {
const search = location?.search || window.location.search || "";
@ -38,14 +82,55 @@ function MaterialsTab({ materialGroups, loading, onPreview }) {
if (loading) {
return <Spin />;
}
const groups = Object.entries(materialGroups || {}).map(([code, list], index) => {
const items = Array.isArray(list) ? list : [];
const scopeName = items[0]?.licenseTypeName || code || `资质${index + 1}`;
const expireDate = items.reduce((latest, item) => {
const d = item.validEndDate;
if (!d) return latest;
return !latest || d > latest ? d : latest;
}, "");
const expireWarning = expireDate
? (() => {
const end = new Date(String(expireDate).replace(/-/g, "/"));
if (Number.isNaN(end.getTime())) return false;
const diff = end.getTime() - Date.now();
return diff > 0 && diff < 90 * 24 * 3600 * 1000;
})()
: false;
return {
id: code || String(index),
scopeName,
expireDate: expireDate || "-",
expireWarning,
materials: items.map((item, idx) => {
const certImgs = item.certImageUrl
? (Array.isArray(item.certImageUrl)
? item.certImageUrl
: String(item.certImageUrl).startsWith("[")
? (() => { try { return JSON.parse(item.certImageUrl); } catch { return [{ url: item.certImageUrl }]; } })()
: [{ url: item.certImageUrl }])
: item.certImgFiles || [];
const previewUrl = certImgs[0]?.url || "";
return {
id: item.id || `${code}-${idx}`,
name: item.certName || item.licenseTypeName || "-",
required: true,
status: previewUrl ? "uploaded" : "pending",
previewUrl,
raw: item,
};
}),
};
});
return (
<div>
<div style={{ marginBottom: 12, color: "rgba(0,0,0,0.45)" }}>
该机构共申请
<strong>{materialGroups.length}</strong>
<strong>{groups.length}</strong>
个业务范围资质以下为各范围对应的申请材料清单
</div>
{materialGroups.map((group) => (
{groups.map((group) => (
<Card
key={group.id}
size="small"
@ -97,17 +182,17 @@ function PersonnelTab({ personnel, loading, onView }) {
dataSource={personnel}
columns={[
{ title: "序号", width: 60, render: (_, __, index) => index + 1 },
{ title: "姓名", dataIndex: "name", width: 90 },
{ title: "性别", dataIndex: "gender", width: 60 },
{ title: "岗位", dataIndex: "position", width: 110 },
{ title: "姓名", dataIndex: "userName", width: 90 },
{ title: "性别", width: 60, render: (_, record) => GENDER_MAP[record.genderCode] || "-" },
{ title: "岗位", dataIndex: "postName", width: 110 },
{ title: "资质范围", dataIndex: "qualScope", width: 90 },
{ title: "学历", dataIndex: "education", width: 80 },
{ title: "学历", dataIndex: "educationName", width: 80 },
{
title: "注册安全工程师",
width: 120,
render: (_, record) => (
<Tag color={record.registerEngineer === 1 ? "success" : "error"}>
{record.registerEngineer === 1 ? "是" : "否"}
<Tag color={record.registerEngineerFlag === 1 ? "success" : "error"}>
{record.registerEngineerFlag === 1 ? "是" : "否"}
</Tag>
),
},
@ -129,7 +214,7 @@ function RegisteredOrgDetailPage(props) {
const [orgLoading, setOrgLoading] = useState(Boolean(parseQueryId(props.location)));
const [extrasLoading, setExtrasLoading] = useState(Boolean(parseQueryId(props.location)));
const [orgName, setOrgName] = useState("");
const [materialGroups, setMaterialGroups] = useState([]);
const [materialGroups, setMaterialGroups] = useState({});
const [personnel, setPersonnel] = useState([]);
const [filePreview, setFilePreview] = useState(null);
const [viewPersonnelId, setViewPersonnelId] = useState("");
@ -152,7 +237,7 @@ function RegisteredOrgDetailPage(props) {
fetchRegisteredOrgQualificationGroups(id).catch((err) => {
console.warn("[RegisteredOrgDetail] qualification load failed:", err);
return [];
return { data: {} };
}),
fetchRegisteredOrgPersonnelList(id).catch((err) => {
console.warn("[RegisteredOrgDetail] personnel load failed:", err);
@ -164,10 +249,10 @@ function RegisteredOrgDetailPage(props) {
return;
}
if (orgRes?.data) {
form.setFieldsValue(orgRes.data);
setOrgName(orgRes.data.orgName || "");
form.setFieldsValue(toFormFields(orgRes.data));
setOrgName(orgRes.data.unitName || "");
}
setMaterialGroups(groups || []);
setMaterialGroups(groups?.data || {});
setPersonnel(staffList || []);
}
catch (err) {

View File

@ -75,16 +75,16 @@ function RegisteredOrgListPage(props) {
form={searchForm}
loading={loading}
formLine={[
<Form.Item key="orgName" name="orgName">
<Form.Item key="unitName" name="unitName">
<ControlWrapper.Input label="评价机构名称" allowClear placeholder="关键字搜索" />
</Form.Item>,
<Form.Item key="registerAddress" name="registerAddress">
<ControlWrapper.Input label="注册地址" allowClear placeholder="关键字搜索" />
</Form.Item>,
<Form.Item key="filingType" name="filingType" initialValue="">
<Form.Item key="filingTypeCode" name="filingTypeCode">
<ControlWrapper.Select label="备案类型" placeholder="请选择" allowClear options={REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS} />
</Form.Item>,
<Form.Item key="filingRecordStatus" name="filingRecordStatus" initialValue="">
<Form.Item key="filingRecordStatusCode" name="filingRecordStatusCode">
<ControlWrapper.Select label="备案状态" placeholder="请选择" allowClear options={REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS} />
</Form.Item>,
]}
@ -111,11 +111,11 @@ function RegisteredOrgListPage(props) {
fetchData(pag.current, pag.pageSize);
}}
columns={[
{ title: "评价机构名称", dataIndex: "orgName", ellipsis: true },
{ title: "评价机构名称", dataIndex: "unitName", ellipsis: true },
{ title: "注册地址", dataIndex: "registerAddress", ellipsis: true },
{ title: "服务企业数", dataIndex: "serviceEnterpriseCount", width: 100 },
{ title: "评价项目数", dataIndex: "evalProjectCount", width: 100 },
{ title: "备案类型", dataIndex: "filingType", width: 100 },
{ title: "服务企业数", dataIndex: "serviceEnterpriseCount", width: 100, render: (v) => v ?? 0 },
{ title: "评价项目数", dataIndex: "evalProjectCount", width: 100, render: (v) => v ?? 0 },
{ title: "备案类型", dataIndex: "filingTypeName", width: 100 },
{
title: "备案状态",
width: 90,

View File

@ -1,108 +1,82 @@
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
import {
fromPageResponse,
fromQualificationClassGetResponse,
fromRegulatorOrgInfoModify,
fromSingleResponse,
toOrgAccountRow,
toOrgInfoForm,
toRegisteredOrgPageQuery,
toRegisteredOrgPersonnelRow,
toRegisteredOrgRow,
toRegulatorOrgAccountPageQuery,
toStaffCertForm,
toStaffForm,
} from "../enterpriseInfo/adapter";
import { apiGet, apiPost, apiPostDelete, safeAction, safePageResult } from "../enterpriseInfo/http";
import { Get, Post } from "@cqsjjb/jjb-common-lib/http";
const NO_ORG_CONTEXT = { includeOrgContext: false };
// ─── declareRequest DSL ───
export const orgAccountList = declareRequest("orgInfoLoading", safePageResult(async (params) => {
const query = toRegulatorOrgAccountPageQuery(params);
const res = await apiGet("/safetyEval/org-info/page", query, {}, NO_ORG_CONTEXT);
return fromPageResponse(res, toOrgAccountRow);
}));
export const orgAccountList = declareRequest(
"orgInfoLoading",
"Get > /safetyEval/org-info/page",
'data: [] | res.data || [] & totalCount: 0 | res.totalCount || 0'
);
export const orgAccountGet = declareRequest("orgInfoLoading", safeAction(async ({ id }) => {
const res = await apiGet("/safetyEval/org-info/get", { id }, {}, NO_ORG_CONTEXT);
const result = fromSingleResponse(res, toOrgInfoForm);
return {
...result,
raw: res?.data ?? null,
};
}));
export const orgAccountGet = declareRequest(
"orgInfoLoading",
"Get > /safetyEval/org-info/get",
'data: {} | res.data || {}'
);
export const orgAccountModify = declareRequest("orgInfoLoading", safeAction(async (values) => {
const { raw, ...formValues } = values;
const payload = fromRegulatorOrgInfoModify(formValues, raw || {});
const res = await apiPost("/safetyEval/org-info/modify", payload, {}, NO_ORG_CONTEXT);
return fromSingleResponse(res, toOrgInfoForm);
}));
export const orgAccountModify = declareRequest(
"orgInfoLoading",
"Post > @/safetyEval/org-info/modify"
);
export const orgAccountDelete = declareRequest("orgInfoLoading", safeAction(async (data) => {
return apiPost("/safetyEval/org-info/delete", data, {}, NO_ORG_CONTEXT);
}));
export const orgAccountDelete = declareRequest(
"orgInfoLoading",
"Post > @/safetyEval/org-info/delete"
);
export const orgAccountUpdateState = declareRequest("orgInfoLoading", safeAction(async ({ id, state }) => {
return apiPost("/safetyEval/org-info/update-state", { id, state }, {}, NO_ORG_CONTEXT);
}));
export const orgAccountUpdateState = declareRequest(
"orgInfoLoading",
"Post > @/safetyEval/org-info/update-state"
);
export const orgAccountResetPassword = declareRequest("orgInfoLoading", safeAction(async (data ) => {
const url = `/safetyEval/org-info/reset-password`;
return apiPost(url, data, {}, NO_ORG_CONTEXT);
}));
export const orgAccountResetPassword = declareRequest(
"orgInfoLoading",
"Post > @/safetyEval/org-info/reset-password"
);
export const registeredOrgList = declareRequest("orgInfoLoading", safePageResult(async (params) => {
const query = toRegisteredOrgPageQuery(params);
const res = await apiGet("/safetyEval/org-info/page", query, {}, NO_ORG_CONTEXT);
return fromPageResponse(res, toRegisteredOrgRow);
}));
export const registeredOrgList = declareRequest(
"orgInfoLoading",
"Get > /safetyEval/org-info/page",
'data: [] | res.data || [] & totalCount: 0 | res.totalCount || 0'
);
export const registeredOrgGet = declareRequest("orgInfoLoading", safeAction(async ({ id }) => {
const res = await apiGet("/safetyEval/org-info/get", { id }, {}, NO_ORG_CONTEXT);
return fromSingleResponse(res, toOrgInfoForm);
}));
export const registeredOrgGet = declareRequest(
"orgInfoLoading",
"Get > /safetyEval/org-info/get",
'data: {} | res.data || {}'
);
// ─── 直调 HTTP ───
/** 详情页直调 HTTP避免 DVA loading 与 useEffect 依赖 dispatch 函数导致反复取消 */
export async function fetchRegisteredOrgDetail(id) {
const res = await apiGet("/safetyEval/org-info/get", { id }, {}, NO_ORG_CONTEXT);
return fromSingleResponse(res, toOrgInfoForm);
return Get("/safetyEval/org-info/get", { id }, { token: sessionStorage.getItem("token") });
}
export async function fetchRegisteredOrgQualificationGroups(orgInfoId) {
const res = await apiGet("/safetyEval/org-qualification/classGet", { id: orgInfoId }, {}, NO_ORG_CONTEXT);
if (res?.success === false) {
throw new Error(res?.message || "加载申请材料失败");
}
return fromQualificationClassGetResponse(res);
const res = await Get("/safetyEval/org-qualification/classGet", { id: orgInfoId }, { token: sessionStorage.getItem("token") });
if (res?.success === false) throw new Error(res?.message || "加载申请材料失败");
return { success: true, data: res?.data ?? {} };
}
export async function fetchRegisteredOrgPersonnelList(orgInfoId) {
const res = await apiGet("/safetyEval/org-personnel/page", {
orgId: orgInfoId,
current: 1,
size: 999,
}, {}, NO_ORG_CONTEXT);
const page = fromPageResponse(res, toRegisteredOrgPersonnelRow);
return page?.data || [];
const res = await Get("/safetyEval/org-personnel/page", {
orgId: orgInfoId, current: 1, size: 999,
}, { token: sessionStorage.getItem("token") });
return res?.data || [];
}
export async function fetchRegisteredOrgPersonnelDetail({ id }) {
const res = await apiGet("/safetyEval/org-personnel/get", { id }, {}, NO_ORG_CONTEXT);
return fromSingleResponse(res, toStaffForm);
return Get("/safetyEval/org-personnel/get", { id }, { token: sessionStorage.getItem("token") });
}
export async function fetchRegisteredOrgPersonnelCertList(personnelId) {
const res = await apiGet("/safetyEval/org-personnel-cert/page", {
personnelId,
current: 1,
size: 999,
}, {}, NO_ORG_CONTEXT);
const page = fromPageResponse(res, toStaffCertForm);
return page?.data || [];
const res = await Get("/safetyEval/org-personnel-cert/page", {
personnelId, current: 1, size: 999,
}, { token: sessionStorage.getItem("token") });
return res?.data || [];
}
export async function fetchRegisteredOrgPersonnelCertDetail({ id }) {
const res = await apiGet("/safetyEval/org-personnel-cert/get", { id }, {}, NO_ORG_CONTEXT);
return fromSingleResponse(res, toStaffCertForm);
return Get("/safetyEval/org-personnel-cert/get", { id }, { token: sessionStorage.getItem("token") });
}