From b06f03a0a2c6b8675347a3a6fe7abaa81ca32c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=91=E6=BA=AA?= <1015733727@qq.com> Date: Fri, 26 Jun 2026 14:27:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=89=8D=E7=AB=AF-=E6=8E=A5=E5=85=A5gb?= =?UTF-8?q?s=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/enterpriseInfo/adapter.js | 116 +++++++++++++++- src/api/enterpriseInfo/orgBootstrap.js | 78 ++++++++--- src/api/equipInfo/index.js | 17 ++- src/api/orgInfo/index.js | 2 + src/api/orgQualificationCert/index.js | 20 +-- src/enumerate/enterpriseOptions.js | 91 +++++++++++++ .../EnterpriseInfo/EquipInfo/index.js | 24 ++-- .../Container/EnterpriseInfo/OrgInfo/index.js | 37 ++++- .../PersonnelInfo/List/index.js | 128 ++++++++++++++++-- .../EnterpriseInfo/QualificationCert/index.js | 35 +++-- .../EnterpriseInfo/ResignationApply/index.js | 2 + src/pages/Container/EnterpriseInfo/index.js | 53 +++++++- src/utils/mockUpload.js | 27 ++++ 13 files changed, 544 insertions(+), 86 deletions(-) create mode 100644 src/enumerate/enterpriseOptions.js diff --git a/src/api/enterpriseInfo/adapter.js b/src/api/enterpriseInfo/adapter.js index dd2c0ad..7caf1d8 100644 --- a/src/api/enterpriseInfo/adapter.js +++ b/src/api/enterpriseInfo/adapter.js @@ -1,11 +1,31 @@ /** 企业信息管理:前后端字段与分页格式适配 */ import { formatDate, formatDateTime, toApiDate, toApiDateTime } from "../../utils/dateFormat"; +import { resolveUploadFileIds } from "../../utils/mockUpload"; import { asId, isIdFieldName, normalizeQueryIds } from "./idUtil"; import { withOrgId } from "./orgContext"; const GENDER_NAME = { 1: "男", 2: "女" }; const RESIGN_AUDIT_STATUS_NAME = { 0: "未审核", 1: "已审核", 2: "已退回" }; +const ENTERPRISE_STATUS_CODE = { 正常: 1, 停业: 2, 注销: 3 }; +const FILING_TYPE_CODE = { 审核备案: "1", 确认备案: "2" }; +const FILING_RECORD_STATUS_CODE = { 已备案: 1, 未备案: 2 }; +const PERSON_TYPE_CODE = { 基础人员: "1", 专职评价师: "2" }; + +function parseAttachmentUrls(urls, defaultName = "附件.pdf") { + if (!urls) { + return []; + } + return String(urls) + .split(",") + .map((url) => url.trim()) + .filter(Boolean) + .map((url, index) => ({ + name: `${defaultName.replace(".pdf", "")}${index + 1}.pdf`, + fileName: `${defaultName.replace(".pdf", "")}${index + 1}.pdf`, + url, + })); +} /** 分页查询参数:子表 org_id → org_info.id;机构信息管理 getInfo 不走此方法 */ export function toPageQuery(params = {}, fieldMap = {}) { @@ -86,16 +106,25 @@ export function toOrgInfoForm(data = {}) { fullTimeEvaluatorCount: data.fulltimeEvaluatorCount, registeredSafetyEngineerCount: data.registeredEngineerCount, authStatusCode: data.authStatusCode, + enterpriseStatus: data.enterpriseStatusName, + enterpriseScale: data.enterpriseScaleName, + filingType: data.filingTypeName ?? "确认备案", + filingRecordStatus: data.filingRecordStatusName ?? "未备案", + attachments: parseAttachmentUrls(data.attachmentUrls), }; } export function fromOrgInfoForm(values = {}, options = {}) { const { isDraft = false } = options; + const enterpriseStatus = values.enterpriseStatus; + const filingType = values.filingType ?? "确认备案"; + const filingRecordStatus = values.filingRecordStatus ?? "未备案"; return { ...pick(values, ["id", "tenantId"]), unitName: values.orgName, creditCode: values.creditCode, safetyIndustryCategoryName: values.safetyIndustryCategory, + districtCode: values.regionCountyName, districtName: values.regionCountyName, townStreet: values.regionStreetName, villageCommunity: values.regionCommunityName, @@ -121,6 +150,15 @@ export function fromOrgInfoForm(values = {}, options = {}) { registeredEngineerCount: values.registeredSafetyEngineerCount, authStatusCode: isDraft ? 0 : 1, authStatusName: isDraft ? "草稿" : "已提交", + enterpriseStatusCode: ENTERPRISE_STATUS_CODE[enterpriseStatus], + enterpriseStatusName: enterpriseStatus, + enterpriseScaleCode: values.enterpriseScale, + enterpriseScaleName: values.enterpriseScale, + filingTypeCode: FILING_TYPE_CODE[filingType] ?? filingType, + filingTypeName: filingType, + filingRecordStatusCode: FILING_RECORD_STATUS_CODE[filingRecordStatus], + filingRecordStatusName: filingRecordStatus, + attachmentUrls: resolveUploadFileIds(values.attachments), }; } @@ -202,10 +240,22 @@ export function toStaffForm(data = {}) { idCardNo: data.idCardNo, homeAddress: data.currentAddress, officeAddress: data.officeAddress, + educationType: data.educationTypeName, + educationLevel: data.educationLevelName, education: data.educationName ?? data.educationCode, graduateSchool: data.graduateSchool, major: data.major, employmentStatus: data.employmentStatusCode, + personType: data.personTypeName ?? "基础人员", + qualScope: data.qualScope, + professionalLevel: data.professionalLevelName, + evaluatorCertNo: data.evaluatorCertNo, + titleName: data.titleName, + registerEngineerFlag: data.registerEngineerFlag ?? 2, + publications: data.publications, + abilityDeclaration: data.abilityDeclaration, + workExperience: data.workExperience, + proofMaterials: parseAttachmentUrls(data.proofMaterialUrl, "专业能力证明.pdf"), deptName: data.deptName, positionName: data.postName ?? data.positionName, certNames: data.certNames, @@ -214,6 +264,12 @@ export function toStaffForm(data = {}) { export function fromStaffForm(values = {}) { const genderCode = values.gender; + const personType = values.personType ?? "基础人员"; + const educationType = values.educationType; + const educationLevel = values.educationLevel; + const educationName = educationType && educationLevel + ? `${educationType}-${educationLevel}` + : values.education; return { ...pick(values, ["id", "tenantId"]), userName: values.staffName, @@ -226,12 +282,28 @@ export function fromStaffForm(values = {}) { idCardNo: values.idCardNo, currentAddress: values.homeAddress, officeAddress: values.officeAddress, - educationName: values.education, - educationCode: values.education, + educationName, + educationCode: educationName, + educationTypeCode: educationType, + educationTypeName: educationType, + educationLevelCode: educationLevel, + educationLevelName: educationLevel, graduateSchool: values.graduateSchool, major: values.major, employmentStatusCode: values.employmentStatus ?? 1, employmentStatusName: values.employmentStatus === 2 ? "离职" : "在职", + personTypeCode: PERSON_TYPE_CODE[personType] ?? personType, + personTypeName: personType, + qualScope: values.qualScope, + professionalLevelCode: values.professionalLevel, + professionalLevelName: values.professionalLevel, + evaluatorCertNo: values.evaluatorCertNo, + titleName: values.titleName, + registerEngineerFlag: values.registerEngineerFlag ?? 2, + publications: values.publications, + abilityDeclaration: values.abilityDeclaration, + workExperience: values.workExperience, + proofMaterialUrl: resolveUploadFileIds(values.proofMaterials), }; } @@ -280,6 +352,21 @@ export function fromStaffCertForm(values = {}) { // ─── 机构资质证书 ─── +/** 资质证书 enableFlag(1启用/2禁用) ↔ 前端 enableStatus(1启用/0禁用) */ +export function mapQualificationEnableStatus(flag) { + return Number(flag) === 1 ? 1 : 0; +} + +export function mapQualificationEnableFlag(status) { + return Number(status) === 1 ? 1 : 2; +} + +/** 列表/表单统一判断:优先 enableFlag,兼容 enableStatus */ +export function isQualificationEnabled(record = {}) { + const flag = record.enableFlag ?? record.enableStatus; + return mapQualificationEnableStatus(flag) === 1; +} + export function toQualificationForm(data = {}) { const certImgs = data.certImageUrl ? [{ url: data.certImageUrl, fileName: data.certName }] @@ -294,7 +381,8 @@ export function toQualificationForm(data = {}) { validStartDate: data.validStartDate, validEndDate: data.validEndDate, remark: data.remark ?? data.remarks, - enableStatus: data.enableFlag, + enableFlag: data.enableFlag, + enableStatus: mapQualificationEnableStatus(data.enableFlag), issueDate: formatDate(data.issueDate), validStartDate: formatDate(data.validStartDate), validEndDate: formatDate(data.validEndDate), @@ -319,17 +407,32 @@ export function fromQualificationForm(values = {}) { validEndDate: toApiDate(values.validEndDate ?? values.validDate?.[1]), certImageUrl, remark: values.remark, - enableFlag: values.enableStatus ?? 1, + enableFlag: mapQualificationEnableFlag(values.enableStatus), }; } // ─── 装备 ─── +/** 装备 enableFlag(1启用/2禁用) ↔ 前端 enableStatus(1启用/0禁用) */ +export function mapEquipEnableStatus(flag) { + return Number(flag) === 1 ? 1 : 0; +} + +export function mapEquipEnableFlag(status) { + return Number(status) === 1 ? 1 : 2; +} + +export function isEquipEnabled(record = {}) { + const flag = record.enableFlag ?? record.enableStatus; + return mapEquipEnableStatus(flag) === 1; +} + export function toEquipForm(data = {}) { const instrumentType = data.instrumentTypeName ?? data.instrumentTypeCode; return { id: asId(data.id), instrumentType, + instrumentCategory: instrumentType, deviceType: data.deviceTypeName ?? data.deviceTypeCode, deviceName: data.deviceName, model: data.deviceModel, @@ -341,7 +444,8 @@ export function toEquipForm(data = {}) { calibrationInitialValue: data.calibrationInitValue, onSiteCalibrationType: data.fieldCalibrationTypeName ?? data.fieldCalibrationTypeCode, isDualChannel: data.dualChannelFlag, - enableStatus: data.enableFlag, + enableFlag: data.enableFlag, + enableStatus: mapEquipEnableStatus(data.enableFlag), }; } @@ -363,7 +467,7 @@ export function fromEquipForm(values = {}) { fieldCalibrationTypeName: values.onSiteCalibrationType, fieldCalibrationTypeCode: values.onSiteCalibrationType, dualChannelFlag: values.isDualChannel, - enableFlag: values.enableStatus ?? 1, + enableFlag: mapEquipEnableFlag(values.enableStatus), }; } diff --git a/src/api/enterpriseInfo/orgBootstrap.js b/src/api/enterpriseInfo/orgBootstrap.js index 3aaeab9..0738ab9 100644 --- a/src/api/enterpriseInfo/orgBootstrap.js +++ b/src/api/enterpriseInfo/orgBootstrap.js @@ -11,31 +11,69 @@ import { toPositionForm, } from "./adapter"; import { apiGet } from "./http"; -import { getOrgInfoId, setOrgInfoId } from "./orgContext"; +import { clearOrgInfoId, getOrgInfoId, setOrgInfoId } from "./orgContext"; + +/** 机构信息管理页路径(无机构数据时唯一可访问页) */ +export const ORG_INFO_PAGE_PATH = "/certificate/container/EnterpriseInfo/OrgInfo"; let ensureOrgPromise = null; +/** 最近一次 getInfo 转换结果,供机构信息页复用,避免重复请求 */ +let lastOrgInfoDetail = null; -/** 确保已缓存机构 id(全局只发起一次 getInfo) */ -export function ensureOrgContext() { - const cached = getOrgInfoId(); - if (cached) { - return Promise.resolve(cached); +export function isOrgInfoPage(path = window.location.pathname) { + return path === ORG_INFO_PAGE_PATH || path.startsWith(`${ORG_INFO_PAGE_PATH}/`); +} + +export function getOrgInfoDetail() { + return lastOrgInfoDetail; +} + +export function setOrgInfoDetailCache(detail) { + lastOrgInfoDetail = detail; +} + +function fetchOrgInfoContext() { + return apiGet("/safety-eval/org-info/getInfo", {}, {}, { includeOrgContext: false }) + .then((res) => { + lastOrgInfoDetail = fromSingleResponse(res, toOrgInfoForm); + const id = lastOrgInfoDetail?.data?.id ?? res?.data?.id; + if (id) { + setOrgInfoId(id); + return { hasOrg: true, orgInfoId: String(id), detail: lastOrgInfoDetail }; + } + clearOrgInfoId(); + return { hasOrg: false, orgInfoId: null, detail: lastOrgInfoDetail }; + }) + .catch((err) => { + console.warn("[ensureOrgContext] getInfo failed:", err); + clearOrgInfoId(); + lastOrgInfoDetail = { success: false, data: null }; + return { hasOrg: false, orgInfoId: null, detail: lastOrgInfoDetail, networkError: true }; + }); +} + +/** + * 确保已缓存机构 id(子表分页/请求头 orgInfoId 依赖此值) + * @param {{ force?: boolean }} options force=true 时忽略缓存并重新 getInfo(进入企业信息模块时使用) + * @returns {Promise<{ hasOrg: boolean, orgInfoId: string|null, detail?: object, networkError?: boolean }>} + */ +export function ensureOrgContext(options = {}) { + const { force = false } = options; + + if (!force) { + const cached = getOrgInfoId(); + if (cached) { + return Promise.resolve({ hasOrg: true, orgInfoId: cached, detail: lastOrgInfoDetail }); + } } - if (!ensureOrgPromise) { - ensureOrgPromise = apiGet("/safety-eval/org-info/getInfo", {}, {}, { includeOrgContext: false }) - .then((res) => { - const result = fromSingleResponse(res, toOrgInfoForm); - const id = result?.data?.id ?? res?.data?.id; - if (id) { - setOrgInfoId(id); - } - return getOrgInfoId(); - }) - .catch(() => null) - .finally(() => { - ensureOrgPromise = null; - }); + + if (ensureOrgPromise) { + return ensureOrgPromise; } + + ensureOrgPromise = fetchOrgInfoContext().finally(() => { + ensureOrgPromise = null; + }); return ensureOrgPromise; } diff --git a/src/api/equipInfo/index.js b/src/api/equipInfo/index.js index 70aa4e3..3c1c76c 100644 --- a/src/api/equipInfo/index.js +++ b/src/api/equipInfo/index.js @@ -3,6 +3,7 @@ import { fromEquipForm, fromPageResponse, fromSingleResponse, + mapEquipEnableFlag, toEquipForm, toPageQuery, } from "../enterpriseInfo/adapter"; @@ -15,6 +16,9 @@ export const equipInfoList = declareRequest("equipInfoLoading", safePageResult(a deviceType: "deviceType", enableStatus: "enableFlag", }); + if (query.enableFlag !== undefined && query.enableFlag !== "") { + query.enableFlag = mapEquipEnableFlag(query.enableFlag); + } const res = await apiGet("/safety-eval/org-equipment/page", query); return fromPageResponse(res, toEquipForm); })); @@ -39,9 +43,12 @@ export const equipInfoRemove = declareRequest("equipInfoLoading", safeAction(asy })); export const equipInfoToggleStatus = declareRequest("equipInfoLoading", safeAction(async ({ id }) => { - const detailRes = await apiGet("/safety-eval/org-equipment/get", { id }); - const current = toEquipForm(detailRes?.data || {}); - const nextStatus = current.enableStatus === 1 ? 0 : 1; - const res = await apiPost("/safety-eval/org-equipment/modify", fromEquipForm({ ...current, id, enableStatus: nextStatus })); - return fromSingleResponse(res, toEquipForm); + const res = await apiGet("/safety-eval/org-equipment/get", { id }); + const data = res?.data || {}; + const nextFlag = Number(data.enableFlag) === 1 ? 2 : 1; + return apiPost("/safety-eval/org-equipment/modify", { + ...data, + id, + enableFlag: nextFlag, + }); })); diff --git a/src/api/orgInfo/index.js b/src/api/orgInfo/index.js index c266951..f08f65b 100644 --- a/src/api/orgInfo/index.js +++ b/src/api/orgInfo/index.js @@ -5,6 +5,7 @@ import { toOrgInfoForm, } from "../enterpriseInfo/adapter"; import { apiGet, apiPost, safeAction } from "../enterpriseInfo/http"; +import { setOrgInfoDetailCache } from "../enterpriseInfo/orgBootstrap"; import { setOrgInfoId } from "../enterpriseInfo/orgContext"; function persistOrgInfoId(result, rawData) { @@ -12,6 +13,7 @@ function persistOrgInfoId(result, rawData) { if (id) { setOrgInfoId(id); } + setOrgInfoDetailCache(result); return result; } diff --git a/src/api/orgQualificationCert/index.js b/src/api/orgQualificationCert/index.js index a184b6f..0e202e6 100644 --- a/src/api/orgQualificationCert/index.js +++ b/src/api/orgQualificationCert/index.js @@ -34,21 +34,21 @@ export const orgQualificationCertRemove = declareRequest("orgQualificationCertLo })); export const orgQualificationCertDisable = declareRequest("orgQualificationCertLoading", safeAction(async ({ id }) => { - const detailRes = await apiGet("/safety-eval/org-qualification/get", { id }); - const payload = fromQualificationForm({ - ...toQualificationForm(detailRes?.data || {}), + const res = await apiGet("/safety-eval/org-qualification/get", { id }); + const data = res?.data || {}; + return apiPost("/safety-eval/org-qualification/modify", { + ...data, id, - enableStatus: 0, + enableFlag: 2, }); - return apiPost("/safety-eval/org-qualification/modify", payload); })); export const orgQualificationCertEnable = declareRequest("orgQualificationCertLoading", safeAction(async ({ id }) => { - const detailRes = await apiGet("/safety-eval/org-qualification/get", { id }); - const payload = fromQualificationForm({ - ...toQualificationForm(detailRes?.data || {}), + const res = await apiGet("/safety-eval/org-qualification/get", { id }); + const data = res?.data || {}; + return apiPost("/safety-eval/org-qualification/modify", { + ...data, id, - enableStatus: 1, + enableFlag: 1, }); - return apiPost("/safety-eval/org-qualification/modify", payload); })); diff --git a/src/enumerate/enterpriseOptions.js b/src/enumerate/enterpriseOptions.js new file mode 100644 index 0000000..2f15fc0 --- /dev/null +++ b/src/enumerate/enterpriseOptions.js @@ -0,0 +1,91 @@ +/** 企业信息管理模块下拉选项 */ + +/** 重庆市辖区(区/县) */ +export const CHONGQING_DISTRICTS = [ + "万州区", "涪陵区", "渝中区", "大渡口区", "江北区", "沙坪坝区", "九龙坡区", "南岸区", + "北碚区", "綦江区", "大足区", "渝北区", "巴南区", "黔江区", "长寿区", "江津区", + "合川区", "永川区", "南川区", "璧山区", "铜梁区", "潼南区", "荣昌区", "开州区", + "梁平区", "武隆区", "城口县", "丰都县", "垫江县", "忠县", "云阳县", "奉节县", + "巫山县", "巫溪县", "石柱土家族自治县", "秀山土家族苗族自治县", "酉阳土家族苗族自治县", + "彭水苗族土家族自治县", +].map((label) => ({ label, value: label })); + +/** 企业状态 */ +export const ENTERPRISE_STATUS_OPTIONS = [ + { label: "正常", value: "正常" }, + { label: "停业", value: "停业" }, + { label: "注销", value: "注销" }, +]; + +/** 企业规模 */ +export const ENTERPRISE_SCALE_OPTIONS = [ + { label: "大", value: "大" }, + { label: "中", value: "中" }, + { label: "小", value: "小" }, + { label: "微型", value: "微型" }, +]; + +/** 备案类型 */ +export const FILING_TYPE_OPTIONS = [ + { label: "审核备案", value: "审核备案" }, + { label: "确认备案", value: "确认备案" }, +]; + +/** 备案状态(机构信息) */ +export const FILING_RECORD_STATUS_OPTIONS = [ + { label: "已备案", value: "已备案" }, + { label: "未备案", value: "未备案" }, +]; + +/** 资质范围 / 证照类型(行业) */ +export const QUALIFICATION_INDUSTRY_OPTIONS = [ + { label: "煤炭开采业", value: "煤炭开采业" }, + { label: "金属、非金属矿及其他矿采选业", value: "金属、非金属矿及其他矿采选业" }, + { label: "陆地石油和天然气开采业", value: "陆地石油和天然气开采业" }, + { label: "陆上油气管道运输业", value: "陆上油气管道运输业" }, + { label: "石油加工业,化学原料、化学品及医药制造业", value: "石油加工业,化学原料、化学品及医药制造业" }, + { label: "烟花爆竹制造业", value: "烟花爆竹制造业" }, + { label: "金属冶炼", value: "金属冶炼" }, +]; + +/** 人员类型 */ +export const PERSON_TYPE_OPTIONS = [ + { label: "基础人员", value: "基础人员" }, + { label: "专职评价师", value: "专职评价师" }, +]; + +/** 职业等级 */ +export const PROFESSIONAL_LEVEL_OPTIONS = [ + { + label: "三级安全评价师(对应职业技能等级三级 / 高级工,入门级)", + value: "三级安全评价师(对应职业技能等级三级 / 高级工,入门级)", + }, + { + label: "二级安全评价师(对应职业技能等级二级 / 技师,中级)", + value: "二级安全评价师(对应职业技能等级二级 / 技师,中级)", + }, + { + label: "一级安全评价师(对应职业技能等级一级 / 高级技师,最高级)", + value: "一级安全评价师(对应职业技能等级一级 / 高级技师,最高级)", + }, +]; + +/** 学历类型 */ +export const EDUCATION_TYPE_OPTIONS = [ + { label: "全日制", value: "全日制" }, + { label: "在职教育", value: "在职教育" }, +]; + +/** 学历层次 */ +export const EDUCATION_LEVEL_OPTIONS = [ + { label: "专科", value: "专科" }, + { label: "本科", value: "本科" }, + { label: "硕士", value: "硕士" }, + { label: "博士", value: "博士" }, +]; + +/** 是否注册安全工程师 */ +export const REGISTER_ENGINEER_OPTIONS = [ + { label: "是", value: 1 }, + { label: "否", value: 2 }, +]; diff --git a/src/pages/Container/EnterpriseInfo/EquipInfo/index.js b/src/pages/Container/EnterpriseInfo/EquipInfo/index.js index 4ece7f2..f0fd442 100644 --- a/src/pages/Container/EnterpriseInfo/EquipInfo/index.js +++ b/src/pages/Container/EnterpriseInfo/EquipInfo/index.js @@ -8,11 +8,11 @@ import Table from "zy-react-library/components/Table"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import useTable from "zy-react-library/hooks/useTable"; import { NS_EQUIP_INFO } from "~/enumerate/namespace"; +import { isEquipEnabled } from "~/api/enterpriseInfo/adapter"; import { safeListRequest, safeRequest } from "~/utils"; import { positiveNumberRule } from "~/utils/validators"; import PageHeader from "../components/PageHeader"; -const ENABLE_STATUS = { 1: "启用", 0: "禁用" }; const DUAL_CHANNEL = { 1: "是", 0: "否" }; function EquipInfoPage(props) { @@ -43,17 +43,21 @@ function EquipInfoPage(props) { }); }; - const onToggleStatus = (id, enableStatus) => { + const onToggleStatus = (id, record) => { + const enabled = isEquipEnabled(record); Modal.confirm({ title: "提示", - content: enableStatus === 1 ? "是否停用" : "是否启用", + content: enabled ? "是否停用" : "是否启用", okText: "是", cancelText: "否", onOk: async () => { const res = await props.equipInfoToggleStatus({ id }); if (res?.success !== false) { message.success("操作成功"); - getData(); + await getData(); + } + else { + message.error(res?.message || "操作失败"); } }, }); @@ -75,12 +79,13 @@ function EquipInfoPage(props) { name: "enableStatus", label: "设备状态", render: FORM_ITEM_RENDER_ENUM.SELECT, - options: Object.entries(ENABLE_STATUS).map(([value, label]) => ({ label, value: Number(value) })), + options: [{ label: "启用", value: 1 }, { label: "禁用", value: 0 }], }, ]} onFinish={getData} />