孔祥富
2021-03-11 7369fd5866a78cde7ecbb4721d9decdfa181fd39
src/views/user/selectuser.vue
@@ -5,7 +5,7 @@
        <el-row>
          <el-col :span="10">
            <el-form-item label="关键字">
              <el-input v-model="queryParams.empNumb" placeholder="请输入内容" style="width:200px" />
              <el-input v-model="queryParams.baseKey" placeholder="请输入内容" style="width:200px" />
            </el-form-item>
          </el-col>
          <el-col :span="10">
@@ -32,6 +32,7 @@
        width="80%"
        @selection-change="handleSelectionChange"
        @row-dblclick="rowDblclick"
        @sort-change="changeSort"
      >
        <el-table-column type="selection" :reserve-selection="false" width="50" />
        <el-table-column v-if="show" prop="empId" label="员工Id" />
@@ -39,7 +40,7 @@
        <el-table-column prop="empName" label="姓名" />
        <el-table-column prop="certificateNumb" label="身份证号码" width="180" />
        <el-table-column v-if="show" prop="deptId" label="部门Id" />
        <el-table-column prop="deptName" label="护卫点" width="180" />
        <el-table-column prop="allDeptName" label="护卫点" width="180" sortable="custom" :sort-orders="['ascending', 'descending']" />
        <el-table-column v-if="show" prop="jobId" label="岗位Id" />
        <el-table-column prop="jobName" label="岗位" />
        <el-table-column prop="empTypeName" label="员工类别" />
@@ -84,12 +85,12 @@
      multipleSelection: [],
      total: 0, // 总数量
      queryParams: {
        empNumb: '',
        baseKey: '',
        empStatus: []
      }, // 查询参数
      sort: {}, // 排序
      pagination: { // 分页参数
        size: 12,
        size: 15,
        num: 1
      },
      list: [], // 给table显示的数据
@@ -112,23 +113,13 @@
    },
    vagueSearch() {
      this.fetch({
        empNumb: this.queryParams.empNumb,
        empName: this.queryParams.empNumb,
        deptName: this.queryParams.empNumb,
        certificateNumb: this.queryParams.empNumb,
        nativePlaceName: this.queryParams.empNumb,
        censusAddress: this.queryParams.empNumb,
        baseKey: this.queryParams.baseKey,
        empStatus: this.queryParams.empStatus
      })
    },
    resetSearch() {
      this.queryParams = {
        empNumb: '',
        empName: '',
        deptName: '',
        certificateNumb: '',
        nativePlaceName: '',
        censusAddress: '',
        baseKey: '',
        empStatus: []
      }
      this.search()
@@ -166,6 +157,11 @@
    rowDblclick(row, column, event) {
      this.$refs.multipleTable.toggleRowSelection(row, true)
      this.sureChoose()
    },
    changeSort(val) {
      this.sort.field = val.prop
      this.sort.order = val.order
      this.search()
    }
  }
}