yubo
2026-03-10 3491f52aa4ba1e9f5fec1e25604373167c6bcdec
src/views/dashboard/zzUser.vue
@@ -10,12 +10,8 @@
  >
    <div class="app-container">
      <div class="filter-container" style="margin-left: -340px;">
        <el-input v-model="queryParams.name" placeholder="姓名/身份证号/护卫点/员工编号" class="filter-item search-item" />
        <el-button class="filter-item" type="primary" @click="search">
          {{ $t('table.search') }}
        </el-button>
        <el-button class="filter-item" type="success" @click="reset">
          {{ $t('table.reset') }}
        <el-button class="filter-item" type="warning" @click="handleExport">
          导出
        </el-button>
      </div>
      <el-table
@@ -99,6 +95,24 @@
      defaultProps: {
        children: 'children',
        label: 'label'
      },
      // 导出配置
      exportConfig: {
        selectedFields: [
          'empNumb', // 员工编号
          'allDeptName', // 部门(护卫点)
          'jobName', // 岗位
          'empName', // 姓名
          'certificateNumb', // 身份证号码
          'birthdate', // 出生日期
          'insuranceTypeName', // 社保档位
          'socialNumb', // 社保电脑号
          'entryDate', // 入职日期
          'probationDate', // 转正日期
          'probationStatusName' // 转正状态
        ],
        exportUrl: 'hr/empBaseInfo/export/probation',
        fileName: '员工转正提醒.xls'
      }
    }
  },
@@ -157,6 +171,26 @@
    },
    cancleChoose() {
      this.$emit('cancleChooseUser')
    },
    // 导出方法
    handleExport() {
      const params = {
        ...this.queryParams,
        delFlag: 0,
        empStatus: 0,
        exportField: this.exportConfig.selectedFields.join(',')
      }
      this.$download(
        this.exportConfig.exportUrl,
        params,
        this.exportConfig.fileName
      ).then(() => {
        this.$message({
          message: '下载成功!',
          type: 'success'
        })
      })
    }
  }
}