From 25ab0c2c41862bc4926814e6905e07cf4b76d40a Mon Sep 17 00:00:00 2001
From: yubo <autumnal_wind@yeah.net>
Date: 星期一, 06 四月 2026 22:54:50 +0800
Subject: [PATCH] refactor(user): 规范字典选项计算属性格式
---
src/views/user/inemployees.vue | 102 ++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 76 insertions(+), 26 deletions(-)
diff --git a/src/views/user/inemployees.vue b/src/views/user/inemployees.vue
index a2b78ee..734e3b7 100644
--- a/src/views/user/inemployees.vue
+++ b/src/views/user/inemployees.vue
@@ -1345,37 +1345,87 @@
},
computed: {
// 字典选项计算属性
- statusOptions() { return this.getDictOptions('PLITICAL') },
- empTypeOptions() { return this.getDictOptions('empType') },
- nationOptions() { return this.getDictOptions('NATION') },
- marriageOptions() { return this.getDictOptions('MARRIAGE') },
- educationOptions() { return this.getDictOptions('EDUCATION') },
- nativePlaceOptions() { return this.getDictOptions('NATIVEPLACE') },
- archivesStatusOptions() { return this.getDictOptions('archivesStatus') },
- insuranceTypeOptions() { return this.getDictOptions('INSURANCETYPE') },
- empCardStatusOptions() { return this.getDictOptions('empCardStatus') },
- handbookStatusOptions() { return this.getDictOptions('handbookStatus') },
- certificateListOptions() { return this.getDictOptions('certificateList') },
- physicalExamTypeOptions() { return this.getDictOptions('PHYSICALEXAMTYPE') },
- ecgOptions() { return this.getDictOptions('ECG') },
- contractStatusOptions() { return this.getDictOptions('CONTRACTSTATUS') },
- leaveTypeOptions() { return this.getDictOptions('LEAVETYPE') },
- insuranceGaersOptions() { return this.getDictOptions('INSURANCETYPE') },
- applayStatusOptions() { return this.getDictOptions('applayStatus') },
- reportStatusOptions() { return this.getDictOptions('reportStatus') },
- hospitalizatioFlagOptions() { return this.getDictOptions('hospitalizatioFlag') },
- settleStatusOptions() { return this.getDictOptions('settleStatus') },
- arbitrationTypeOptions() { return this.getDictOptions('ZCTYPE') },
- changeTypeOptions() { return this.getDictOptions('changeType') },
- dimissionTypeOptions() { return this.getDictOptions('LZTYPE') },
- ageStrOptions() { return this.getDictOptions('ageStr') },
- sexOptions() { return this.getDictOptions('sex') }
+ statusOptions() {
+ return this.getDictOptions('PLITICAL')
+ },
+ empTypeOptions() {
+ return this.getDictOptions('EMPTYPE')
+ },
+ nationOptions() {
+ return this.getDictOptions('NATION')
+ },
+ marriageOptions() {
+ return this.getDictOptions('MARRIAGE')
+ },
+ educationOptions() {
+ return this.getDictOptions('EDUCATION')
+ },
+ nativePlaceOptions() {
+ return this.getDictOptions('NATIVEPLACE')
+ },
+ archivesStatusOptions() {
+ return this.getDictOptions('archivesStatus')
+ },
+ insuranceTypeOptions() {
+ return this.getDictOptions('INSURANCETYPE')
+ },
+ empCardStatusOptions() {
+ return this.getDictOptions('empCardStatus')
+ },
+ handbookStatusOptions() {
+ return this.getDictOptions('handbookStatus')
+ },
+ certificateListOptions() {
+ return this.getDictOptions('certificateList')
+ },
+ physicalExamTypeOptions() {
+ return this.getDictOptions('PHYSICALEXAMTYPE')
+ },
+ ecgOptions() {
+ return this.getDictOptions('ECG')
+ },
+ contractStatusOptions() {
+ return this.getDictOptions('CONTRACTSTATUS')
+ },
+ leaveTypeOptions() {
+ return this.getDictOptions('LEAVETYPE')
+ },
+ insuranceGaersOptions() {
+ return this.getDictOptions('INSURANCETYPE')
+ },
+ applayStatusOptions() {
+ return this.getDictOptions('applayStatus')
+ },
+ reportStatusOptions() {
+ return this.getDictOptions('reportStatus')
+ },
+ hospitalizatioFlagOptions() {
+ return this.getDictOptions('hospitalizatioFlag')
+ },
+ settleStatusOptions() {
+ return this.getDictOptions('settleStatus')
+ },
+ arbitrationTypeOptions() {
+ return this.getDictOptions('ZCTYPE')
+ },
+ changeTypeOptions() {
+ return this.getDictOptions('changeType')
+ },
+ dimissionTypeOptions() {
+ return this.getDictOptions('LZTYPE')
+ },
+ ageStrOptions() {
+ return this.getDictOptions('ageStr')
+ },
+ sexOptions() {
+ return this.getDictOptions('sex')
+ }
},
mounted() {
this.fetch()
this.initDept()
// 字典数据已在登录时预加载,直接从 Vuex 获取
- this.initDictTypes(['ageStr', 'PLITICAL', 'sex', 'empType', 'NATION', 'MARRIAGE', 'EDUCATION', 'NATIVEPLACE', 'archivesStatus', 'INSURANCETYPE', 'empCardStatus', 'handbookStatus', 'certificateList', 'PHYSICALEXAMTYPE', 'ECG', 'CONTRACTSTATUS', 'LEAVETYPE', 'applayStatus', 'reportStatus', 'hospitalizatioFlag', 'settleStatus', 'ZCTYPE', 'changeType', 'LZTYPE'])
+ this.initDictTypes(['ageStr', 'PLITICAL', 'sex', 'EMPTYPE', 'NATION', 'MARRIAGE', 'EDUCATION', 'NATIVEPLACE', 'archivesStatus', 'INSURANCETYPE', 'empCardStatus', 'handbookStatus', 'certificateList', 'PHYSICALEXAMTYPE', 'ECG', 'CONTRACTSTATUS', 'LEAVETYPE', 'applayStatus', 'reportStatus', 'hospitalizatioFlag', 'settleStatus', 'ZCTYPE', 'changeType', 'LZTYPE'])
this.initJob()
},
methods: {
--
Gitblit v1.8.0