孔祥富
2021-03-10 06963d397d023ba076508808c8a0ec55da85067e
src/views/user/inemployees.vue
@@ -991,7 +991,7 @@
          message: this.$t('rules.noMoreThan20'),
          trigger: 'blur'
        }],
        empName: [{ required: true, message: '请输入员工姓名', trigger: 'blur' },
        empName: [{ required: true, message: '请输入姓名', trigger: 'blur' },
          { min: 2, max: 50, message: this.$t('rules.noMoreThan50'), trigger: 'blur' }],
        empNumb: [{ required: true, message: '请输入员工编号', trigger: 'blur' },
          { min: 2, max: 20, message: this.$t('rules.noMoreThan20'), trigger: 'blur' }],
@@ -1224,6 +1224,7 @@
    this.getDicts('LZTYPE').then(response => {
      this.dimissionTypeOptions = response.data
    })
    this.initJob()
  },
  methods: {
    exportExcel() {
@@ -1264,6 +1265,11 @@
        entryType: []
      }
      this.search()
    },
    initJob() {
      this.$get('system/position/dicJob').then((r) => {
        this.restaurJob = r.data.data
      })
    },
    // 翻页方法
    search() {
@@ -1859,72 +1865,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 = []
      }