From 2b8f7e0c50858c60f8a7bd656648aa13897976ae Mon Sep 17 00:00:00 2001 From: luotaiqian <1147642922@qq.com> Date: Tue, 7 Jul 2026 15:19:16 +0800 Subject: [PATCH] bug fix --- src/enumerate/constant/index.js | 6 ++++++ src/pages/Container/Supervision/ExperManage/index.js | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/enumerate/constant/index.js b/src/enumerate/constant/index.js index 3e85f17..9ef443d 100644 --- a/src/enumerate/constant/index.js +++ b/src/enumerate/constant/index.js @@ -59,6 +59,12 @@ export const GENDER_OPTIONS = [ { label: "女", value: 2 }, ]; +/** 性别编码(1男2女) → 名称 */ +export const GENDER_MAP = { + 1: "男", + 2: "女", +}; + /** 审核结果 */ export const REVIEW_RESULT_OPTIONS = [ { label: "通过", value: 1 }, diff --git a/src/pages/Container/Supervision/ExperManage/index.js b/src/pages/Container/Supervision/ExperManage/index.js index 69bb453..33b499b 100644 --- a/src/pages/Container/Supervision/ExperManage/index.js +++ b/src/pages/Container/Supervision/ExperManage/index.js @@ -8,7 +8,7 @@ import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd"; import { tools } from "@cqsjjb/jjb-common-lib"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { NS_QUAL_EXPERT } from "~/enumerate/namespace"; -import { GENDER_OPTIONS } from "~/enumerate/constant"; +import { GENDER_OPTIONS, GENDER_MAP } from "~/enumerate/constant"; const { router } = tools; @@ -116,9 +116,9 @@ const ExperManage = (props) => { { title: "账号", dataIndex: "account", width: 140 }, { title: "性别", - dataIndex: "genderName", + dataIndex: "genderCode", width: 70, - render: (text) => text || "--", + render: (code) => GENDER_MAP[code] || "--", }, { title: "身份证号", dataIndex: "idCardNo", width: 180 }, { title: "证书", dataIndex: "certificate", width: 120, ellipsis: true }, @@ -213,7 +213,7 @@ const ExperManage = (props) => { {qualExpertDetail?.userName || "--"} {qualExpertDetail?.account || "--"} - {qualExpertDetail?.genderName || "--"} + {GENDER_MAP[qualExpertDetail?.genderCode] || "--"} {qualExpertDetail?.idCardNo || "--"} {qualExpertDetail?.certificate || "--"}