From 6448ec15bfe0b65fb822a662105bceddc23b58d8 Mon Sep 17 00:00:00 2001
From: yubo <autumnal_wind@yeah.net>
Date: 星期一, 06 四月 2026 21:34:44 +0800
Subject: [PATCH] feat(user): 新增员工档案管理视图组件

---
 src/views/yunpan/fujian.vue |   58 ++++++++++++++++++----------------------------------------
 1 files changed, 18 insertions(+), 40 deletions(-)

diff --git a/src/views/yunpan/fujian.vue b/src/views/yunpan/fujian.vue
index 065361b..d4d7855 100644
--- a/src/views/yunpan/fujian.vue
+++ b/src/views/yunpan/fujian.vue
@@ -400,11 +400,13 @@
 <script>
 import Pagination from '@/components/Pagination'
 import { Loading } from 'element-ui'
+import dictMixin from '../../utils/dictMixin'
 
 export default {
   components: {
     Pagination
   },
+  mixins: [dictMixin],
   data() {
     return {
       sort: {}, // 排序
@@ -505,51 +507,27 @@
         label: 'label'
       },
       tableindex: 0,
-      rowitem: {},
-      sexOptions: [],
-      insuranceTypeOptions: [],
-      educationOptions: [],
-      statusOptions: [],
-      ageStrOptions: [],
-      archivesStatusOptions: [],
-      empCardStatusOptions: [],
-      handbookStatusOptions: [],
-      empTypeOptions: []
+      rowitem: {}
     }
+  },
+  computed: {
+    // 字典选项计算属性
+    sexOptions() { return this.getDictOptions('sex') },
+    insuranceTypeOptions() { return this.getDictOptions('INSURANCETYPE') },
+    educationOptions() { return this.getDictOptions('EDUCATION') },
+    statusOptions() { return this.getDictOptions('PLITICAL') },
+    ageStrOptions() { return this.getDictOptions('ageStr') },
+    archivesStatusOptions() { return this.getDictOptions('archivesStatus') },
+    empCardStatusOptions() { return this.getDictOptions('empCardStatus') },
+    handbookStatusOptions() { return this.getDictOptions('handbookStatus') },
+    empTypeOptions() { return this.getDictOptions('empType') },
+    certificateListOptions() { return this.getDictOptions('certificateList') }
   },
   mounted() {
     this.initLabel()
     this.fetch()
-    this.getDicts('empType').then(response => {
-      this.empTypeOptions = response.data
-    })
-    this.getDicts('empCardStatus').then(response => {
-      this.empCardStatusOptions = response.data
-    })
-    this.getDicts('handbookStatus').then(response => {
-      this.handbookStatusOptions = response.data
-    })
-    this.getDicts('sex').then(response => {
-      this.sexOptions = response.data
-    })
-    this.getDicts('EDUCATION').then(response => {
-      this.educationOptions = response.data
-    })
-    this.getDicts('PLITICAL').then(response => {
-      this.statusOptions = response.data
-    })
-    this.getDicts('ageStr').then(response => {
-      this.ageStrOptions = response.data
-    })
-    this.getDicts('archivesStatus').then(response => {
-      this.archivesStatusOptions = response.data
-    })
-    this.getDicts('INSURANCETYPE').then(response => {
-      this.insuranceTypeOptions = response.data
-    })
-    this.getDicts('certificateList').then(response => {
-      this.certificateListOptions = response.data
-    })
+    // 字典数据已在登录时预加载,直接从 Vuex 获取
+    this.initDictTypes(['empType', 'empCardStatus', 'handbookStatus', 'sex', 'EDUCATION', 'PLITICAL', 'ageStr', 'archivesStatus', 'INSURANCETYPE', 'certificateList'])
   },
   methods: {
     changeSort(val) {

--
Gitblit v1.8.0