gaoluyang
2026-10-28 e0cfe8c236e6466755780e61735e851c755563ca
fix(staff): 学历统一显示中文(第一学历字典 + 列表/详情格式化)

Co-Authored-By: Claude Code <noreply@anthropic.com>
已修改6个文件
已添加1个文件
29 ■■■■■ 文件已修改
src/utils/education.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/officeProcessAutomation/HrManage/resign-apply/components/formDia.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/officeProcessAutomation/HrManage/resign-apply/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/officeProcessAutomation/HrManage/staff-contract/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personnelManagement/contractManagement/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personnelManagement/dimission/components/formDia.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personnelManagement/dimission/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/education.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
// å­¦åŽ†å­—å…¸ï¼šåŽç«¯å­˜è‹±æ–‡æžšä¸¾ï¼Œé¡µé¢ç»Ÿä¸€æ˜¾ç¤ºä¸­æ–‡
export const EDUCATION_LABELS = {
  secondary: "中专及以下",
  junior_college: "大专",
  bachelor: "本科",
  master: "硕士",
  doctor: "博士及以上",
};
export function formatEducation(value) {
  if (value === null || value === undefined || value === "") return value;
  return EDUCATION_LABELS[value] || value;
}
export default formatEducation;
src/views/officeProcessAutomation/HrManage/resign-apply/components/formDia.vue
@@ -52,7 +52,7 @@
          <el-row :gutter="30">
            <el-col :span="12">
              <el-form-item label="第一学历:">
                {{ currentStaffRecord.firstStudy || '-' }}
                {{ formatEducation(currentStaffRecord.firstStudy) || '-' }}
              </el-form-item>
            </el-col>
            <el-col :span="12">
@@ -167,6 +167,7 @@
<script setup>
  import { ref, reactive, toRefs, getCurrentInstance } from "vue";
  import { staffOnJobListPage } from "@/api/personnelManagement/staffOnJob.js";
  import { formatEducation } from "@/utils/education";
  import {
    createStaffLeave,
    updateStaffLeave,
src/views/officeProcessAutomation/HrManage/resign-apply/index.vue
@@ -42,6 +42,7 @@
  import FormDia from "@/views/personnelManagement/dimission/components/formDia.vue";
  import { findStaffLeaveListPage } from "@/api/personnelManagement/staffLeave.js";
  import { ElMessageBox } from "element-plus";
  import { formatEducation } from "@/utils/education";
  const data = reactive({
    searchForm: {
@@ -100,6 +101,7 @@
    {
      label: "第一学历",
      prop: "firstStudy",
      formatData: formatEducation,
    },
    {
      label: "专业",
src/views/officeProcessAutomation/HrManage/staff-contract/index.vue
@@ -83,6 +83,7 @@
  import { staffOnJobListPage } from "@/api/personnelManagement/staffOnJob.js";
  import dayjs from "dayjs";
  import { getToken } from "@/utils/auth.js";
  import { formatEducation } from "@/utils/education";
  import FilesDia from "./filesDia.vue";
  const data = reactive({
    searchForm: {
@@ -136,6 +137,7 @@
    {
      label: "第一学历",
      prop: "firstStudy",
      formatData: formatEducation,
    },
    {
      label: "专业",
src/views/personnelManagement/contractManagement/index.vue
@@ -101,6 +101,7 @@
  import { staffOnJobListPage } from "@/api/personnelManagement/staffOnJob.js";
  import dayjs from "dayjs";
  import { getToken } from "@/utils/auth.js";
  import { formatEducation } from "@/utils/education";
  import FilesDia from "./filesDia.vue";
  const data = reactive({
    searchForm: {
@@ -154,6 +155,7 @@
    {
      label: "第一学历",
      prop: "firstStudy",
      formatData: formatEducation,
    },
    {
      label: "专业",
src/views/personnelManagement/dimission/components/formDia.vue
@@ -52,7 +52,7 @@
          <el-row :gutter="30">
            <el-col :span="12">
              <el-form-item label="第一学历:">
                {{ currentStaffRecord.firstStudy || '-' }}
                {{ formatEducation(currentStaffRecord.firstStudy) || '-' }}
              </el-form-item>
            </el-col>
            <el-col :span="12">
@@ -167,6 +167,7 @@
<script setup>
  import { ref, reactive, toRefs, getCurrentInstance } from "vue";
  import { staffOnJobListPage } from "@/api/personnelManagement/staffOnJob.js";
  import { formatEducation } from "@/utils/education";
  import {
    createStaffLeave,
    updateStaffLeave,
src/views/personnelManagement/dimission/index.vue
@@ -45,6 +45,7 @@
    batchDeleteStaffLeaves,
  } from "@/api/personnelManagement/staffLeave.js";
  import { ElMessageBox } from "element-plus";
  import { formatEducation } from "@/utils/education";
  const data = reactive({
    searchForm: {
@@ -103,6 +104,7 @@
    {
      label: "第一学历",
      prop: "firstStudy",
      formatData: formatEducation,
    },
    {
      label: "专业",