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/user/outemployess.vue | 46 +++++++++++++++-------------------------------
1 files changed, 15 insertions(+), 31 deletions(-)
diff --git a/src/views/user/outemployess.vue b/src/views/user/outemployess.vue
index b73c7d7..9d402c6 100644
--- a/src/views/user/outemployess.vue
+++ b/src/views/user/outemployess.vue
@@ -1264,6 +1264,7 @@
import Pagination from '@/components/Pagination'
import ArchivesChange from './archivesChange'
import Treeselect from '@riophae/vue-treeselect'
+import dictMixin from '../../utils/dictMixin'
export default {
components: {
@@ -1271,6 +1272,7 @@
ArchivesChange,
Pagination
},
+ mixins: [dictMixin],
data() {
return {
dialog: {
@@ -1316,43 +1318,25 @@
baseicInformationForm: {
openDate: new Date()
},
- educationOptions: [],
- statusOptions: [],
- ageStrOptions: [],
- insuranceTypeOptions: [],
- archivesStatusOptions: [],
- sexOptions: [],
- empTypeOptions: [],
cityOptions: ['archivesNumb', 'allDeptName', 'jobName', 'empName', 'certificateNumb', 'certificateValidity', 'sexName', 'nationName', 'age', 'marriageName', 'stature', 'birthdate', 'politicsName', 'empTypeName', 'educationName', 'nativePlaceName', 'censusAddress', 'currentAddress', 'guardNumb', 'returnReceipt', 'archivesStatusName', 'bankName', 'bankNumb', 'telePhone', 'entryDate', 'insuranceTypeName', 'socialNumb', 'introducer', 'seniority', 'empCardStatusName', 'certificateListName', 'urgencyPhone', 'handbookStatusName', 'family', 'empStatusName', 'dimissionDate', 'entryTypeName', 'dimissionTypeName', 'empNumb', 'annualLeave'],
checkedCities: []
}
},
+ computed: {
+ // 字典选项计算属性
+ educationOptions() { return this.getDictOptions('EDUCATION') },
+ statusOptions() { return this.getDictOptions('PLITICAL') },
+ ageStrOptions() { return this.getDictOptions('ageStr') },
+ insuranceTypeOptions() { return this.getDictOptions('INSURANCETYPE') },
+ archivesStatusOptions() { return this.getDictOptions('archivesStatus') },
+ sexOptions() { return this.getDictOptions('sex') },
+ empTypeOptions() { return this.getDictOptions('EMPTYPE') },
+ certificateListOptions() { return this.getDictOptions('certificateList') }
+ },
mounted() {
this.fetch()
- this.getDicts('INSURANCETYPE').then(response => {
- this.insuranceTypeOptions = response.data
- })
- this.getDicts('archivesStatus').then(response => {
- this.archivesStatusOptions = response.data
- })
- this.getDicts('EDUCATION').then(response => {
- this.educationOptions = response.data
- })
- this.getDicts('sex').then(response => {
- this.sexOptions = response.data
- })
- this.getDicts('PLITICAL').then(response => {
- this.statusOptions = response.data
- })
- this.getDicts('ageStr').then(response => {
- this.ageStrOptions = response.data
- })
- this.getDicts('EMPTYPE').then(response => {
- this.empTypeOptions = response.data
- })
- this.getDicts('certificateList').then(response => {
- this.certificateListOptions = response.data
- })
+ // 字典数据已在登录时预加载,直接从 Vuex 获取
+ this.initDictTypes(['INSURANCETYPE', 'archivesStatus', 'EDUCATION', 'sex', 'PLITICAL', 'ageStr', 'EMPTYPE', 'certificateList'])
this.initDept()
},
methods: {
--
Gitblit v1.8.0