From 1afa373c9c1cf43bb7ff4c684558eca757b13fad Mon Sep 17 00:00:00 2001
From: yijiusmile <253281376@qq.com>
Date: 星期二, 09 三月 2021 22:04:06 +0800
Subject: [PATCH] 系统主页文字修改,在职离职高级查询修复无法全选

---
 src/lang/zh.js                  |    2 
 src/views/user/inemployees.vue  |   34 +++++++++--------
 src/views/user/outemployess.vue |   30 ++++++++-------
 3 files changed, 35 insertions(+), 31 deletions(-)

diff --git a/src/lang/zh.js b/src/lang/zh.js
index 7414e43..aa21acd 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -1,6 +1,6 @@
 export default {
   route: {
-    dashboard: '系统主页',
+    dashboard: '数据统计',
     profile: '个人中心'
   },
   navbar: {
diff --git a/src/views/user/inemployees.vue b/src/views/user/inemployees.vue
index b1ea979..09ddfef 100644
--- a/src/views/user/inemployees.vue
+++ b/src/views/user/inemployees.vue
@@ -1859,72 +1859,74 @@
         })
       })
     },
+    // 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 = []
-      }
-    },
     selectAllEmpCardStatus(val) {
       if (val) {
-        this.queryParams.empCardStatus = ['0', '1']
+        this.queryParams.empCardStatus = this.dicListToArr(this.empCardStatusOptions)
       } else {
         this.queryParams.empCardStatus = []
       }
     },
     selectAllHandbookStatus(val) {
       if (val) {
-        this.queryParams.handbookStatus = ['0', '1']
+        this.queryParams.handbookStatus = this.dicListToArr(this.handbookStatusOptions)
       } else {
         this.queryParams.handbookStatus = []
       }
     },
     selectAllEmpType(val) {
       if (val) {
-        this.queryParams.empType = ['01', '02']
+        this.queryParams.empType = this.dicListToArr(this.empTypeOptions)
       } else {
         this.queryParams.empType = []
       }
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