| | |
| | | >解骋</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip prop="empNumb" label="员工编号" width="120" /> |
| | | <el-table-column show-overflow-tooltip prop="empNumb" label="员工编号" width="160" /> |
| | | <el-table-column show-overflow-tooltip prop="allDeptName" label="部门(护卫点)" /> |
| | | <el-table-column show-overflow-tooltip prop="jobName" label="岗位" width="100" /> |
| | | <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="100" /> |
| | | <el-table-column show-overflow-tooltip prop="sex" label="性别" width="100" :formatter="sexFormatter" /> |
| | | <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="160" /> |
| | | <el-table-column show-overflow-tooltip prop="birthdate" label="出生日期" width="120" /> |
| | | <el-table-column show-overflow-tooltip prop="age" label="年龄" width="120" /> |
| | | </el-table> |
| | | <pagination |
| | | v-show="total>0" |
| | |
| | | <el-button @click="dialogIsShow()">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 通用导出对话框 --> |
| | | <export-dialog |
| | | :visible.sync="exportDialogVisible" |
| | | :selected-fields="exportConfig.selectedFields" |
| | | @confirm="handleExportConfirm" |
| | | /> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
| | | import { dateDifference } from '@/utils/myUtil' |
| | | import ExportDialog from '@/components/ExportEmpBase.vue' |
| | | |
| | | export default { |
| | | components: { |
| | | Pagination |
| | | Pagination, |
| | | ExportDialog |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | beginDate: [{ required: true, message: '请选择合同开始日期', trigger: 'change' }], |
| | | endDate: [{ required: true, validator: this.endDate }], |
| | | remark: [{ max: 512, message: '长度不超过512个字符', trigger: 'blur' }] |
| | | }, |
| | | exportDialogVisible: false, |
| | | // 导出配置(每个模块自定义) |
| | | exportConfig: { |
| | | // 默认选中的字段(根据模块需要配置) |
| | | selectedFields: [ |
| | | 'empNumb', // 员工编号 |
| | | 'allDeptName', // 部门(护卫点) |
| | | 'jobName', // 岗位 |
| | | 'empName', // 姓名 |
| | | 'sexName', // 性别 |
| | | 'certificateNumb', // 身份证号码 |
| | | 'birthdate', // 出生日期 |
| | | 'age' // 年龄 |
| | | ], |
| | | // 导出接口地址 |
| | | exportUrl: 'hr/empBaseInfo/export/retirement', |
| | | // 导出文件名 |
| | | fileName: '员工退休提醒.xls' |
| | | } |
| | | } |
| | | }, |
| | |
| | | params.pageNum = this.pagination.num |
| | | params.delFlag = 0 |
| | | params.empStatus = 0 |
| | | |
| | | this.$get('hr/empBaseInfo/retire/alert', { |
| | | ...params |
| | | }).then((r) => { |
| | |
| | | this.sort.field = val.prop |
| | | this.sort.order = val.order |
| | | this.fetch() |
| | | }, |
| | | sexFormatter(row, column, cellValue) { |
| | | const option = this.sexOptions.find(item => item.dicItemCode === cellValue) |
| | | return option ? option.dicItemName : cellValue |
| | | }, |
| | | // 续签合同 |
| | | goOn(row) { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 显示导出对话框 |
| | | showDcyg() { |
| | | this.exportDialogVisible = true |
| | | }, |
| | | // 确认导出 |
| | | handleExportConfirm(selectedFields) { |
| | | const params = { ...this.queryParams } |
| | | params.empStatus = '0' |
| | | params.exportField = selectedFields.join(',') |
| | | |
| | | this.$download( |
| | | this.exportConfig.exportUrl, |
| | | { ...params }, |
| | | this.exportConfig.fileName |
| | | ).then(() => { |
| | | this.$message({ |
| | | message: '下载成功!', |
| | | type: 'success' |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |