From e0cfe8c236e6466755780e61735e851c755563ca Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 28 十月 2026 17:42:09 +0800
Subject: [PATCH] fix(staff): 学历统一显示中文(第一学历字典 + 列表/详情格式化)

---
 src/views/personnelManagement/dimission/components/formDia.vue                 |    3 ++-
 src/utils/education.js                                                         |   15 +++++++++++++++
 src/views/officeProcessAutomation/HrManage/resign-apply/components/formDia.vue |    3 ++-
 src/views/officeProcessAutomation/HrManage/resign-apply/index.vue              |    2 ++
 src/views/officeProcessAutomation/HrManage/staff-contract/index.vue            |    2 ++
 src/views/personnelManagement/contractManagement/index.vue                     |    2 ++
 src/views/personnelManagement/dimission/index.vue                              |    2 ++
 7 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/src/utils/education.js b/src/utils/education.js
new file mode 100644
index 0000000..c0ce36f
--- /dev/null
+++ b/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;
diff --git a/src/views/officeProcessAutomation/HrManage/resign-apply/components/formDia.vue b/src/views/officeProcessAutomation/HrManage/resign-apply/components/formDia.vue
index 20c1794..bf452c3 100644
--- a/src/views/officeProcessAutomation/HrManage/resign-apply/components/formDia.vue
+++ b/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,
diff --git a/src/views/officeProcessAutomation/HrManage/resign-apply/index.vue b/src/views/officeProcessAutomation/HrManage/resign-apply/index.vue
index 8d96dd9..f74666e 100644
--- a/src/views/officeProcessAutomation/HrManage/resign-apply/index.vue
+++ b/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: "涓撲笟",
diff --git a/src/views/officeProcessAutomation/HrManage/staff-contract/index.vue b/src/views/officeProcessAutomation/HrManage/staff-contract/index.vue
index 91b48be..2df24c3 100644
--- a/src/views/officeProcessAutomation/HrManage/staff-contract/index.vue
+++ b/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: "涓撲笟",
diff --git a/src/views/personnelManagement/contractManagement/index.vue b/src/views/personnelManagement/contractManagement/index.vue
index bde498a..1117d3b 100644
--- a/src/views/personnelManagement/contractManagement/index.vue
+++ b/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: "涓撲笟",
diff --git a/src/views/personnelManagement/dimission/components/formDia.vue b/src/views/personnelManagement/dimission/components/formDia.vue
index 20c1794..bf452c3 100644
--- a/src/views/personnelManagement/dimission/components/formDia.vue
+++ b/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,
diff --git a/src/views/personnelManagement/dimission/index.vue b/src/views/personnelManagement/dimission/index.vue
index 4a37ae3..4997bb5 100644
--- a/src/views/personnelManagement/dimission/index.vue
+++ b/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: "涓撲笟",

--
Gitblit v1.9.3