diff --git a/src/components/StaffViewModal/index.js b/src/components/StaffViewModal/index.js index fae4d9f..c419270 100644 --- a/src/components/StaffViewModal/index.js +++ b/src/components/StaffViewModal/index.js @@ -9,6 +9,7 @@ import { fetchStaffCertListByPersonnelId, } from "~/api/staffCertificate"; import { fetchOrgPersonnelDetail } from "~/utils/qualFiling/personnelHelper"; +import { TITLE_LEVEL_MAP } from "~/enumerate/enterpriseOptions"; const GENDER_MAP = { 1: "男", 2: "女" }; const REGISTER_ENGINEER_MAP = { 1: "是", 2: "否" }; @@ -152,7 +153,7 @@ export default function StaffViewModal({ {info.educationLevelName || "-"} - {info.titleName || "-"} + {TITLE_LEVEL_MAP[info.titleCode] ?? (info.titleCode || "-")} {REGISTER_ENGINEER_MAP[info.registerEngineerFlag] ?? "-"} diff --git a/src/enumerate/enterpriseOptions.js b/src/enumerate/enterpriseOptions.js index f47067a..c9525af 100644 --- a/src/enumerate/enterpriseOptions.js +++ b/src/enumerate/enterpriseOptions.js @@ -173,3 +173,15 @@ export const REGISTER_ENGINEER_OPTIONS = [ { label: "是", value: 1 }, { label: "否", value: 2 }, ]; + +/** 职称等级 */ +export const TITLE_LEVEL_OPTIONS = [ + { value: "SENIOR", label: "高级" }, + { value: "MIDDLE", label: "中级" }, + { value: "JUNIOR", label: "初级" }, +]; + +export const TITLE_LEVEL_MAP = TITLE_LEVEL_OPTIONS.reduce( + (acc, cur) => ({ ...acc, [cur.value]: cur.label }), + {}, +); diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js index dc27879..fff0113 100644 --- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js +++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js @@ -28,6 +28,7 @@ import { PROFESSIONAL_LEVEL_OPTIONS, QUALIFICATION_INDUSTRY_OPTIONS, REGISTER_ENGINEER_OPTIONS, + TITLE_LEVEL_OPTIONS, } from "~/enumerate/enterpriseOptions"; import { getBirthDateFromIdCard } from "~/utils"; import { idCardRule, mobileRule } from "~/utils/validators"; @@ -689,11 +690,11 @@ function StaffFormModal({ - +