fix(staff): 第一学历展示兼容英文编码
员工档案教育经历存的是 middle_school/high_school 等英文编码,后端会回写到
staff_on_job.first_study,合同管理、离职、离职申请等列表直接展示该字段。
- 新增 utils/education.js 的 formatEducation 统一转中文(初中/高中/中专/大专/本科等)
- 合同管理、离职、离职申请、OA 合同页的第一学历列加 formatData
- 离职/离职申请详情弹窗同步格式化
Co-Authored-By: Claude Code <noreply@anthropic.com>
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // å¦ååå
¸ï¼åå·¥æ¡£æ¡æè²ç»ååå¨è±æç¼ç ï¼å表/详æ
å±ç¤ºæ¶ç»ä¸è½¬æä¸æ |
| | | 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; |
| | |
| | | <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"> |
| | |
| | | <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, |
| | |
| | | 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: { |
| | |
| | | { |
| | | label: "第ä¸å¦å", |
| | | prop: "firstStudy", |
| | | formatData: formatEducation, |
| | | }, |
| | | { |
| | | label: "ä¸ä¸", |
| | |
| | | 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: { |
| | |
| | | { |
| | | label: "第ä¸å¦å", |
| | | prop: "firstStudy", |
| | | formatData: formatEducation, |
| | | }, |
| | | { |
| | | label: "ä¸ä¸", |
| | |
| | | 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: { |
| | |
| | | { |
| | | label: "第ä¸å¦å", |
| | | prop: "firstStudy", |
| | | formatData: formatEducation, |
| | | }, |
| | | { |
| | | label: "ä¸ä¸", |
| | |
| | | <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"> |
| | |
| | | <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, |
| | |
| | | batchDeleteStaffLeaves, |
| | | } from "@/api/personnelManagement/staffLeave.js"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import { formatEducation } from "@/utils/education.js"; |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | |
| | | { |
| | | label: "第ä¸å¦å", |
| | | prop: "firstStudy", |
| | | formatData: formatEducation, |
| | | }, |
| | | { |
| | | label: "ä¸ä¸", |