From 59767d0570cdca74e0405b8d361ad0a7e979b6a2 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 02 十一月 2026 22:35:07 +0800
Subject: [PATCH] fix(staff): 第一学历展示兼容英文编码
---
src/views/personnelManagement/dimission/components/formDia.vue | 3 ++-
src/utils/education.js | 22 ++++++++++++++++++++++
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, 34 insertions(+), 2 deletions(-)
diff --git a/src/utils/education.js b/src/utils/education.js
new file mode 100644
index 0000000..7c788eb
--- /dev/null
+++ b/src/utils/education.js
@@ -0,0 +1,22 @@
+// 瀛﹀巻瀛楀吀锛氬憳宸ユ。妗堟暀鑲茬粡鍘嗗瓨鍌ㄨ嫳鏂囩紪鐮侊紝鍒楄〃/璇︽儏灞曠ず鏃剁粺涓�杞垚涓枃
+const EDUCATION_LABELS = {
+ middle_school: "鍒濅腑",
+ high_school: "楂樹腑",
+ technical_secondary: "涓笓",
+ secondary: "涓笓鍙婁互涓�",
+ junior_college: "澶т笓",
+ bachelor: "鏈",
+ master: "纭曞+",
+ doctor: "鍗氬+鍙婁互涓�",
+};
+
+/**
+ * 瀛﹀巻缂栫爜杞腑鏂囷紱宸叉槸涓枃锛堝巻鍙叉暟鎹級鎴栫┖鍊兼椂鍘熸牱杩斿洖
+ * @param {string} value
+ */
+export function formatEducation(value) {
+ if (!value) return value;
+ return EDUCATION_LABELS[value] || value;
+}
+
+export default EDUCATION_LABELS;
diff --git a/src/views/officeProcessAutomation/HrManage/resign-apply/components/formDia.vue b/src/views/officeProcessAutomation/HrManage/resign-apply/components/formDia.vue
index 20c1794..a757ffa 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.js";
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..b68dd9a 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.js";
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..83cbc68 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.js";
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..e3ed07a 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.js";
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..a757ffa 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.js";
import {
createStaffLeave,
updateStaffLeave,
diff --git a/src/views/personnelManagement/dimission/index.vue b/src/views/personnelManagement/dimission/index.vue
index 4a37ae3..0eacffa 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.js";
const data = reactive({
searchForm: {
@@ -103,6 +104,7 @@
{
label: "绗竴瀛﹀巻",
prop: "firstStudy",
+ formatData: formatEducation,
},
{
label: "涓撲笟",
--
Gitblit v1.9.3