From 06963d397d023ba076508808c8a0ec55da85067e Mon Sep 17 00:00:00 2001
From: 孔祥富 <kongxf@daryun.com>
Date: 星期三, 10 三月 2021 13:39:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/user/outemployess.vue |   30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/src/views/user/outemployess.vue b/src/views/user/outemployess.vue
index 4018e09..89d9c0a 100644
--- a/src/views/user/outemployess.vue
+++ b/src/views/user/outemployess.vue
@@ -1531,58 +1531,60 @@
       alert('已选择部门' + names)
       console.log(users)
     },
+    // dic列表转为数组
+    dicListToArr(dicList) {
+      var arr = []
+      for (var i = 0; i < dicList.length; i++) {
+        var dic = dicList[i]
+        arr.push(dic.dicItemCode)
+      }
+      return arr
+    },
     selectAllSex(val) {
       if (val) {
-        this.queryParams.sex = ['1', '2']
+        this.queryParams.sex = this.dicListToArr(this.sexOptions)
       } else {
         this.queryParams.sex = []
       }
     },
     selectAllEducation(val) {
       if (val) {
-        this.queryParams.education = ['91', '81', '71', '61', '42', '41', '31', '21', '11', '10']
+        this.queryParams.education = this.dicListToArr(this.educationOptions)
       } else {
         this.queryParams.education = []
       }
     },
     selectAllPolitics(val) {
       if (val) {
-        this.queryParams.politics = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13']
+        this.queryParams.politics = this.dicListToArr(this.statusOptions)
       } else {
         this.queryParams.politics = []
       }
     },
     selectAllAgeStr(val) {
       if (val) {
-        this.queryParams.ageStr = ['18-29', '30-39', '40-49', '50-59', '60-69', '69-999']
+        this.queryParams.ageStr = this.dicListToArr(this.ageStrOptions)
       } else {
         this.queryParams.ageStr = []
       }
     },
     selectAllArchivesStatus(val) {
       if (val) {
-        this.queryParams.archivesStatus = ['0', '1']
+        this.queryParams.archivesStatus = this.dicListToArr(this.archivesStatusOptions)
       } else {
         this.queryParams.archivesStatus = []
       }
     },
     selectAllInsuranceType(val) {
       if (val) {
-        this.queryParams.insuranceType = ['1', '2', '3', '4', '5']
+        this.queryParams.insuranceType = this.dicListToArr(this.insuranceTypeOptions)
       } else {
         this.queryParams.insuranceType = []
       }
     },
-    selectAllEmpStatus(val) {
-      if (val) {
-        this.queryParams.empStatus = ['0', '1', '2', '3']
-      } else {
-        this.queryParams.empStatus = []
-      }
-    },
     selectAllEmpType(val) {
       if (val) {
-        this.queryParams.empType = ['01', '02']
+        this.queryParams.empType = this.dicListToArr(this.empTypeOptions)
       } else {
         this.queryParams.empType = []
       }

--
Gitblit v1.8.0