<template>
|
<div>
|
<el-container>
|
<el-header :height="headerHeight">
|
<el-row>
|
<el-col :span="16">
|
<h3 class="bu-tian-jia-title">离员工总数</h3>
|
</el-col>
|
<el-col :span="8">
|
<el-input v-model="queryParams.empNumb" placeholder="请输入内容" style="width:200px" />
|
<el-button type="primary" @click="search()">查询</el-button>
|
</el-col>
|
</el-row>
|
|
</el-header>
|
<el-container>
|
<el-main>
|
<el-table :data="tableData">
|
<el-table-column label="序号" type="index" width="50" align="center" />
|
<el-table-column prop="empNumb" label="员工编号" />
|
<el-table-column prop="allDeptName" label="护卫点" />
|
<el-table-column prop="jobName" label="岗位" />
|
<el-table-column prop="empName" label="姓名" />
|
<el-table-column prop="certificateNumb" label="身份证号码" width="180" />
|
<el-table-column prop="sexName" label="性别" />
|
<el-table-column prop="age" label="年龄" />
|
<el-table-column prop="educationName" label="学历" />
|
<el-table-column prop="nativePlaceName" label="籍贯" />
|
<el-table-column prop="urgencyPhone" label="联系电话" />
|
<el-table-column prop="entryDate" label="入职日期" />
|
<el-table-column prop="delFlag" label="员工状态">
|
<template slot-scope="{row}">
|
{{ transDelFlag(row.delFlag) }}
|
</template>
|
</el-table-column>
|
</el-table>
|
<pagination
|
v-show="total>0"
|
:total="total"
|
:page.sync="pagination.num"
|
:limit.sync="pagination.size"
|
@pagination="search"
|
/>
|
</el-main>
|
</el-container>
|
</el-container>
|
|
</div>
|
</template>
|
<script>
|
import Pagination from '@/components/Pagination'
|
export default {
|
components: {
|
Pagination
|
},
|
data() {
|
return {
|
total: 0, // 总数量
|
queryParams: {}, // 查询参数
|
sort: {}, // 排序
|
pagination: { // 分页参数
|
size: 5,
|
num: 1
|
},
|
headerHeight: '70px',
|
advancedQueryShow: false,
|
dialogTableVisible: false,
|
tableData: []
|
}
|
},
|
mounted() {
|
this.search()
|
},
|
methods: {
|
// 翻页方法
|
search() {
|
this.queryParams.empName = this.queryParams.empNumb
|
this.queryParams.deptName = this.queryParams.empNumb
|
this.fetch({
|
...this.queryParams,
|
...this.sort
|
})
|
},
|
fetch(params = {}) {
|
var that = this
|
params.pageSize = this.pagination.size
|
params.pageNum = this.pagination.num
|
params.delFlag = 1
|
this.$get('hr/empBaseInfo/list', {
|
...params
|
}).then((r) => {
|
const data = r.data.data
|
that.total = data.total
|
that.tableData = data.rows
|
})
|
},
|
transDelFlag(delFlag) {
|
switch (delFlag) {
|
case 0:
|
return '正常'
|
case 1:
|
return '删除'
|
case 2:
|
return '暂存'
|
}
|
}
|
}
|
}
|
</script>
|
<style lang="scss" scoped>
|
|
</style>
|