feat:员工档案模块的接口调试接口,自测完成;
todo:员工档案带系统测试;员工概况的接口调试; style:员工管理的代码整合优化;
This commit is contained in:
parent
6e078fb38e
commit
6c958c1363
@ -61,9 +61,17 @@ export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.contant {
|
||||
margin: 16px 0;
|
||||
margin: 16px auto;
|
||||
display: flex;
|
||||
width: 80%;
|
||||
&-label {
|
||||
width: 120px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
&-name {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -42,6 +42,59 @@
|
||||
<span class="contant-label">岗位最初从业时间:</span>
|
||||
<span class="contant-name">{{info.jobBeginTime}}</span>
|
||||
</div>
|
||||
|
||||
<div class="contant" v-if="info.workExperience">
|
||||
<span class="contant-label">工作经历:</span>
|
||||
<span class="contant-name" v-html="info.workExperience" style="white-space: pre-wrap;"></span>
|
||||
</div>
|
||||
|
||||
<div class="contant">
|
||||
<span class="contant-label">简历附件:</span>
|
||||
<span class="contant-name">{{info.resumeUrl || "暂无"}}</span>
|
||||
</div>
|
||||
|
||||
<div class="contant" v-if="info.projectExperiences">
|
||||
<span class="contant-label">项目经历:</span>
|
||||
<span class="contant-name">
|
||||
<!-- info.projectExperiences" -->
|
||||
<div class="contant-name-contant" v-for="(i,index) in info.projectExperiences" :key="index">
|
||||
<div class="contant-name-contant-item">
|
||||
<span class="contant-name-contant-item-left">项目名称:</span>
|
||||
<span class="contant-name-contant-item-right">{{i.projectName}}</span>
|
||||
</div>
|
||||
<div class="contant-name-contant-item">
|
||||
<span class="contant-name-contant-item-left">时间:</span>
|
||||
<span
|
||||
class="contant-name-contant-item-right"
|
||||
>{{i.projectBeginTime || "未知"}}~{{i.projectEndTime || "未知"}}</span>
|
||||
</div>
|
||||
<div class="contant-name-contant-item" v-if="i.projectContent">
|
||||
<span class="contant-name-contant-item-left">工作内容:</span>
|
||||
<span class="contant-name-contant-item-right">{{i.projectContent}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="contant" v-if="info.workTransfers">
|
||||
<span class="contant-label">工作调转记录:</span>
|
||||
<!-- <span class="contant-name" v-html="info.workTransfers"></span> -->
|
||||
<span class="contant-name">
|
||||
<div class="contant-name-contant" style="padding-top:20px;">
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
type="primary"
|
||||
:key="index"
|
||||
v-for="(i,index) in info.workTransfers"
|
||||
:timestamp="i.transferTime"
|
||||
placement="top"
|
||||
>
|
||||
<p>{{i.transferRecord}}</p>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -86,9 +139,33 @@ export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.el-timeline {
|
||||
margin: 0 0 0 -40px;
|
||||
}
|
||||
.contant {
|
||||
margin: 16px 0;
|
||||
margin: 16px auto;
|
||||
display: flex;
|
||||
width: 80%;
|
||||
&-label {
|
||||
width: 160px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
&-name {
|
||||
flex: 1;
|
||||
&-contant {
|
||||
background: rgba(242, 242, 242, 0.509804);
|
||||
border-radius: 3px;
|
||||
box-sizing: border-box;
|
||||
padding: 6px 10px;
|
||||
margin: 0 0 10px 0;
|
||||
&-item {
|
||||
display: flex;
|
||||
&-left {
|
||||
width: 80px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="block">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="员工姓名">
|
||||
<el-input clearable v-model="query.name"></el-input>
|
||||
<el-input clearable v-model="query.name" @keyup.enter.native="getTable"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员状态">
|
||||
<el-select v-model="query.staffStatus" placeholder="请选择">
|
||||
@ -35,8 +35,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getTable">查询</el-button>
|
||||
<el-button @click="clear">重置</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="getTable">查询</el-button>
|
||||
<el-button :loading="loading" @click="clear">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -57,7 +57,13 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" align="center" label="职位" prop="position"></el-table-column>
|
||||
<el-table-column header-align="center" align="center" label="职位" prop="position">
|
||||
<template slot-scope="scope">
|
||||
<div class="conatnt-name">
|
||||
<span>{{ scope.row.position || "暂无信息" }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" align="center" label="状态" prop="staffStatus"></el-table-column>
|
||||
<el-table-column header-align="center" align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
@ -78,7 +84,13 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-dialog title="员工档案" :close-on-click-modal="false" :visible.sync="dialogVisible" width="60%">
|
||||
<el-dialog
|
||||
top="60px"
|
||||
title="员工档案"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
>
|
||||
<div class="dialogVisible-tabs">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="基础信息" name="first">
|
||||
@ -90,10 +102,7 @@
|
||||
<div class="noInfo" v-else>暂无信息</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="职业信息" name="third">
|
||||
<professional
|
||||
v-if="employeesInfo.occupationInfo"
|
||||
:info="occupationInfo.occupationInfo"
|
||||
/>
|
||||
<professional v-if="employeesInfo.occupationInfo" :info="employeesInfo.occupationInfo" />
|
||||
<div class="noInfo" v-else>暂无信息</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@ -162,8 +171,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getEmployeesInfo (data) {
|
||||
let result = await apiEmployeesInfo(data)
|
||||
const result = await apiEmployeesInfo(data)
|
||||
if (result.code === 0) {
|
||||
this.activeName = 'first'
|
||||
this.dialogVisible = true
|
||||
this.employeesInfo = result.data
|
||||
} else {
|
||||
@ -178,7 +188,7 @@ export default {
|
||||
},
|
||||
// 获取侧边架构列表
|
||||
async handleGetMenuList () {
|
||||
let result = await apiOrganizationList()
|
||||
const result = await apiOrganizationList()
|
||||
console.log('result: ', result)
|
||||
this.menuList = result
|
||||
},
|
||||
@ -193,7 +203,6 @@ export default {
|
||||
} else {
|
||||
this.$message.error(result.msg)
|
||||
}
|
||||
console.log('getEmployeesList: ', result)
|
||||
this.loading = false
|
||||
},
|
||||
clear () {
|
||||
@ -231,6 +240,9 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-tree {
|
||||
font-size: 16px;
|
||||
}
|
||||
.conatnt-name {
|
||||
position: relative;
|
||||
&-label {
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="staff">
|
||||
<!-- el-icon-minus -->
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-col class="menu" :span="6">
|
||||
@ -23,7 +22,7 @@
|
||||
<div class="block">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="员工姓名">
|
||||
<el-input v-model="query.name"></el-input>
|
||||
<el-input clearable v-model="query.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员状态">
|
||||
<el-select v-model="query.staffStatus" placeholder="请选择">
|
||||
@ -40,6 +39,11 @@
|
||||
<el-button @click="clear">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form :inline="true">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-plus">批量导入员工档案</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table
|
||||
@ -50,8 +54,21 @@
|
||||
height="600"
|
||||
>
|
||||
<el-table-column header-align="center" align="center" label="工号" prop="staffId"></el-table-column>
|
||||
<el-table-column header-align="center" align="center" label="员工姓名" prop="name"></el-table-column>
|
||||
<el-table-column header-align="center" align="center" label="职位" prop="position"></el-table-column>
|
||||
<el-table-column header-align="center" align="center" width="260" label="员工姓名">
|
||||
<template slot-scope="scope">
|
||||
<div class="conatnt-name">
|
||||
<span>{{ scope.row.name }}</span>
|
||||
<span class="conatnt-name-label" v-if="scope.row.departmentLeader===1">部门负责人</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" align="center" label="职位" prop="position">
|
||||
<template slot-scope="scope">
|
||||
<div class="conatnt-name">
|
||||
<span>{{ scope.row.position || "暂无信息" }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" align="center" label="状态" prop="staffStatus"></el-table-column>
|
||||
<el-table-column header-align="center" align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
@ -72,7 +89,13 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-dialog title="员工档案" :close-on-click-modal="false" :visible.sync="dialogVisible" width="60%">
|
||||
<el-dialog
|
||||
top="60px"
|
||||
title="员工档案"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
>
|
||||
<div class="dialogVisible-tabs">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="基础信息" name="first">
|
||||
@ -87,7 +110,8 @@
|
||||
</el-tabs>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">提 交</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -98,7 +122,7 @@ import menuTree from '@/components/menu-tree'
|
||||
import basis from './componments/basis.vue'
|
||||
import professional from './componments/professional'
|
||||
import education from './componments/education'
|
||||
import { apiOrganizationList, apiEmployeesList, apiEmployeesInfo } from '@/api/api_staff'
|
||||
import { apiOrganizationList, apiEmployeesList } from '@/api/api_staff'
|
||||
export default {
|
||||
components: {
|
||||
menuTree,
|
||||
@ -114,16 +138,9 @@ export default {
|
||||
children: 'list',
|
||||
label: 'name'
|
||||
},
|
||||
|
||||
employeesList: [],
|
||||
menuList: [], // 架构数据
|
||||
tableData: [], // 表格数据
|
||||
employeesInfo: {}, // 员工档案
|
||||
// 搜索数据
|
||||
searchParams: {
|
||||
staffName: '',
|
||||
staffState: ''
|
||||
},
|
||||
// 在职状态
|
||||
staffStateList: [
|
||||
{ value: '0', label: '在职' },
|
||||
@ -135,26 +152,13 @@ export default {
|
||||
limit: 10,
|
||||
pageTotal: 0,
|
||||
departmentId: null
|
||||
},
|
||||
deptId: '',
|
||||
// 弹窗相关
|
||||
showAddDialogForm: false,
|
||||
form: {
|
||||
name: '',
|
||||
region: '',
|
||||
date1: '',
|
||||
date2: '',
|
||||
delivery: false,
|
||||
type: [],
|
||||
resource: '',
|
||||
desc: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: function (val) {
|
||||
if (val.name === 'staff') {
|
||||
this.clearData()
|
||||
this.clear()
|
||||
this.handleGetTableList(val.query.id)
|
||||
}
|
||||
}
|
||||
@ -170,17 +174,16 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getEmployeesInfo (data) {
|
||||
let result = await apiEmployeesInfo(data)
|
||||
if (result.code === 0) {
|
||||
this.dialogVisible = true
|
||||
this.employeesInfo = result.data
|
||||
} else {
|
||||
this.$message.error(result.msg)
|
||||
}
|
||||
console.log('result: ', result)
|
||||
},
|
||||
setCurrentKey (key) {
|
||||
console.log('key: ', key)
|
||||
this.dialogVisible = true
|
||||
|
||||
// const result = await apiEmployeesInfo(data)
|
||||
// if (result.code === 0) {
|
||||
// this.dialogVisible = true
|
||||
// this.employeesInfo = result.data
|
||||
// } else {
|
||||
// this.$message.error(result.msg)
|
||||
// }
|
||||
// console.log('result: ', result)
|
||||
},
|
||||
handleNodeClick (data) {
|
||||
// highlight - current
|
||||
@ -196,9 +199,14 @@ export default {
|
||||
// 获取数据列表 { page: 0, limit: 5 }
|
||||
async handleGetTableList (id) {
|
||||
this.loading = true
|
||||
let result = await apiEmployeesList(Object.assign({}, this.query, { limit: this.query.pageSize, page: this.query.page - 1 }))
|
||||
this.tableData = result.page.list
|
||||
this.query.pageTotal = result.page.totalCount
|
||||
let result = await apiEmployeesList(Object.assign({}, this.query, { limit: this.query.pageSize }))
|
||||
console.log('result: ', result)
|
||||
if (result.code === 0) {
|
||||
this.tableData = result.page.list
|
||||
this.query.pageTotal = result.page.totalCount
|
||||
} else {
|
||||
this.$message.error(result.msg)
|
||||
}
|
||||
console.log('getEmployeesList: ', result)
|
||||
this.loading = false
|
||||
},
|
||||
@ -216,12 +224,6 @@ export default {
|
||||
this.query.page = 1
|
||||
this.handleGetTableList()
|
||||
},
|
||||
clearData () {
|
||||
this.tableData = []
|
||||
this.currentPage = 1
|
||||
this.pageTotal = 20
|
||||
this.loading = true
|
||||
},
|
||||
handleCurrentChange (val) {
|
||||
console.log('val: ', val)
|
||||
this.query.page = val
|
||||
@ -236,14 +238,32 @@ export default {
|
||||
console.log(tab, event)
|
||||
},
|
||||
async handleView (data) {
|
||||
this.dialogVisible = true
|
||||
console.log('data: ', data)
|
||||
// await this.getEmployeesInfo(data.staffId)
|
||||
this.activeName = 'first'
|
||||
await this.getEmployeesInfo(data.staffId)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style >
|
||||
<style lang="scss">
|
||||
.custom-tree-node span {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" >
|
||||
.conatnt-name {
|
||||
position: relative;
|
||||
&-label {
|
||||
position: absolute;
|
||||
font-size: 10px;
|
||||
background: rgba(24, 144, 255, 1);
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
padding: 0 4px;
|
||||
top: -4px;
|
||||
transform: scale(0.7);
|
||||
}
|
||||
}
|
||||
.el-tree-node__content {
|
||||
margin: 10px 0 !important;
|
||||
}
|
||||
@ -253,13 +273,6 @@ export default {
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.staff {
|
||||
// height: 1000px;
|
||||
// background: #fff;
|
||||
// padding: 10px;
|
||||
// box-sizing: border-box;
|
||||
// border-radius: 2px;
|
||||
}
|
||||
.staff .block,
|
||||
.staff .table {
|
||||
margin-left: 20px;
|
||||
@ -285,4 +298,7 @@ export default {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.noInfo {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user