转岗管理-人员岗位管理-新增排序/权限

dev-scheduling
ysn 3 weeks ago
parent 258d6073d9
commit ed8fc5905a
  1. 138
      src/views/basicData/jobTransferManagement.vue

@ -17,36 +17,71 @@
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
@sort-change="sortChange"
> >
<template #menu-left> <template #menu-left>
<el-button type="primary" @click="handleAdd">新增</el-button> <el-button type="primary" @click="handleAdd" v-if="permissionList.addBtn">新增</el-button>
<el-button type="danger" @click="handleDelete" :disabled="selectionList.length == 0" <el-button
>批量删除</el-button type="danger"
@click="handleDelete"
:disabled="selectionList.length == 0"
v-if="permissionList.delBtn"
> >
<el-button type="success" @click="regularization" :disabled="selectionList.length == 0" 批量删除
> </el-button </el-button>
<el-button
type="success"
@click="regularization"
:disabled="selectionList.length == 0"
v-if="permissionList.regularizationBtn"
> >
<el-button type="primary" @click="planFun('layoff')" :disabled="selectionList.length == 0"
>下岗计划</el-button </el-button>
<el-button
type="primary"
@click="planFun('layoff')"
:disabled="selectionList.length == 0"
v-if="permissionList.unemploymentPlanBtn"
> >
下岗计划
</el-button>
<el-button <el-button
type="primary" type="primary"
@click="planFun('transferTo')" @click="planFun('transferTo')"
:disabled="selectionList.length == 0" :disabled="selectionList.length == 0"
>转岗计划</el-button v-if="permissionList.transferPlanBtn"
> >
转岗计划
</el-button>
</template> </template>
<template #menu-right> <template #menu-right>
<el-button type="primary" @click="handleImport"> </el-button> <el-button type="primary" @click="handleImport" v-if="permissionList.importBtn">
</el-button>
</template> </template>
<template #menu="scope"> <template #menu="scope">
<el-button type="text" @click="updateFun(scope.row)">修改</el-button> <el-button type="text" @click="updateFun(scope.row)" v-if="permissionList.editBtn">
<el-button v-show="scope.row.phStatus == 6" type="text" @click="transferToFun(scope.row)" 修改
>转岗</el-button </el-button>
<el-button
v-show="scope.row.phStatus == 6"
v-if="permissionList.transferToBtn"
type="text"
@click="transferToFun(scope.row)"
> >
转岗
</el-button>
<!-- v-show="scope.row.phStatus == 3" --> <!-- v-show="scope.row.phStatus == 3" -->
<el-button type="text" @click="departFun(scope.row)">离职</el-button> <el-button type="text" @click="departFun(scope.row)" v-if="permissionList.resignationBtn">
<el-button type="text" @click="individualTakeFun(scope.row)">个人信息</el-button> 离职
</el-button>
<el-button
type="text"
@click="individualTakeFun(scope.row)"
v-if="permissionList.personalInformationBtn"
>
个人信息
</el-button>
</template> </template>
<template #dataBirth="scope"> <template #dataBirth="scope">
{{ scope.row.dataBirth ? scope.row.dataBirth.substring(0, 10) : '' }} {{ scope.row.dataBirth ? scope.row.dataBirth.substring(0, 10) : '' }}
@ -198,6 +233,7 @@ import { getUserList } from '@/api/workLicense/workLicense';
import basicImport from '@/components/basic-import/main.vue'; import basicImport from '@/components/basic-import/main.vue';
import jobTransferAdd from './components/jobTransferAdd.vue'; import jobTransferAdd from './components/jobTransferAdd.vue';
import jhSelect from '@/components/jh-select/index.vue'; import jhSelect from '@/components/jh-select/index.vue';
import { mapGetters } from 'vuex';
export default { export default {
components: { components: {
basicImport, basicImport,
@ -288,6 +324,7 @@ export default {
search: false, search: false,
width: 120, width: 120,
addDisabled: true, addDisabled: true,
sortable: 'custom',
}, },
{ {
label: '员工工号', label: '员工工号',
@ -297,6 +334,7 @@ export default {
search: false, search: false,
width: 120, width: 120,
searchLabelWidth: 50, searchLabelWidth: 50,
sortable: 'custom',
}, },
{ {
label: '姓名', label: '姓名',
@ -304,6 +342,7 @@ export default {
span: 8, span: 8,
search: false, search: false,
width: 120, width: 120,
sortable: 'custom',
}, },
{ {
label: '姓名', label: '姓名',
@ -312,16 +351,17 @@ export default {
search: true, search: true,
hide: true, hide: true,
width: 120, width: 120,
sortable: 'custom',
}, },
{ {
label: '岗位', label: '岗位',
prop: 'stationName', prop: 'stationName',
span: 8, span: 8,
search: false, search: false,
width: 120, width: 120,
addDisabled: true, addDisabled: true,
sortable: 'custom',
}, },
{ {
label: '所属岗位', label: '所属岗位',
prop: 'station', prop: 'station',
@ -338,6 +378,7 @@ export default {
value: 'id', value: 'id',
res: 'data.records', res: 'data.records',
}, },
sortable: 'custom',
}, },
{ {
label: '入职时间', label: '入职时间',
@ -350,6 +391,7 @@ export default {
type: 'date', type: 'date',
format: 'YYYY-MM-DD', format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
sortable: 'custom',
}, },
{ {
label: '性别', label: '性别',
@ -358,6 +400,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 120, width: 120,
// sortable: 'custom',
}, },
{ {
label: '技能等级', label: '技能等级',
@ -366,6 +409,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 120, width: 120,
// sortable: 'custom',
}, },
{ {
label: '用工类型', label: '用工类型',
@ -374,6 +418,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 120, width: 120,
// sortable: 'custom',
}, },
{ {
label: '民族', label: '民族',
@ -382,6 +427,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 120, width: 120,
sortable: 'custom',
}, },
{ {
label: '年龄', label: '年龄',
@ -390,6 +436,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 120, width: 120,
sortable: 'custom',
}, },
{ {
label: '身份证号码', label: '身份证号码',
@ -398,6 +445,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 170, width: 170,
sortable: 'custom',
}, },
{ {
label: '籍贯(市县区乡组)', label: '籍贯(市县区乡组)',
@ -407,6 +455,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 170, width: 170,
sortable: 'custom',
}, },
{ {
label: '出生年月', label: '出生年月',
@ -418,6 +467,7 @@ export default {
type: 'date', type: 'date',
format: 'YYYY-MM-DD', format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
sortable: 'custom',
}, },
{ {
label: '政治面貌', label: '政治面貌',
@ -426,6 +476,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 120, width: 120,
sortable: 'custom',
}, },
{ {
label: '婚姻状态', label: '婚姻状态',
@ -434,6 +485,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 120, width: 120,
// sortable: 'custom',
}, },
{ {
label: '毕业院校', label: '毕业院校',
@ -442,6 +494,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 170, width: 170,
sortable: 'custom',
}, },
{ {
label: '专业', label: '专业',
@ -450,6 +503,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 170, width: 170,
sortable: 'custom',
}, },
{ {
label: '最高学历', label: '最高学历',
@ -458,6 +512,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 120, width: 120,
sortable: 'custom',
}, },
{ {
label: '毕业时间', label: '毕业时间',
@ -469,6 +524,7 @@ export default {
type: 'date', type: 'date',
format: 'YYYY-MM-DD', format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
sortable: 'custom',
}, },
{ {
@ -478,6 +534,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 120, width: 120,
sortable: 'custom',
}, },
{ {
label: '家庭住址', label: '家庭住址',
@ -486,6 +543,7 @@ export default {
labelWidth: 150, labelWidth: 150,
search: false, search: false,
width: 170, width: 170,
sortable: 'custom',
}, },
{ {
label: '任现值时间', label: '任现值时间',
@ -499,6 +557,7 @@ export default {
type: 'date', type: 'date',
format: 'YYYY-MM-DD', format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
sortable: 'custom',
}, },
{ {
label: '任职时间(年)', label: '任职时间(年)',
@ -509,8 +568,9 @@ export default {
width: 120, width: 120,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
// sortable: 'custom',
}, },
{ {
label: '参加工作时间', label: '参加工作时间',
prop: 'joinJobDate', prop: 'joinJobDate',
span: 8, span: 8,
@ -520,6 +580,7 @@ export default {
type: 'date', type: 'date',
format: 'YYYY-MM-DD', format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
sortable: 'custom',
}, },
{ {
label: '社会工龄(年)', label: '社会工龄(年)',
@ -530,6 +591,7 @@ export default {
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
width: 120, width: 120,
// sortable: 'custom',
}, },
{ {
label: '合同到期日期', label: '合同到期日期',
@ -543,9 +605,8 @@ export default {
type: 'date', type: 'date',
format: 'YYYY-MM-DD', format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
// sortable: 'custom',
}, },
{ {
label: '状态', label: '状态',
prop: 'phStatus', prop: 'phStatus',
@ -564,6 +625,7 @@ export default {
label: 'dictValue', label: 'dictValue',
value: 'dictKey', value: 'dictKey',
}, },
sortable: 'custom',
}, },
], ],
}, },
@ -603,7 +665,7 @@ export default {
labelWidth: 120, labelWidth: 120,
prop: 'station', prop: 'station',
disabled: true, disabled: true,
type: 'select', type: 'select',
dicUrl: '/blade-system/post/list', dicUrl: '/blade-system/post/list',
props: { props: {
label: 'postName', label: 'postName',
@ -654,6 +716,32 @@ export default {
}, },
}; };
}, },
computed: {
...mapGetters(['permission']),
permissionList() {
return {
addBtn: this.validData(this.permission.jobTransferManagement_add, false),
delBtn: this.validData(this.permission.jobTransferManagement_del, false),
regularizationBtn: this.validData(
this.permission.jobTransferManagement_regularization,
false
),
unemploymentPlanBtn: this.validData(
this.permission.jobTransferManagement_unemploymentPlan,
false
),
transferPlanBtn: this.validData(this.permission.jobTransferManagement_transferPlan, false),
importBtn: this.validData(this.permission.jobTransferManagement_import, false),
transferToBtn: this.validData(this.permission.jobTransferManagement_transferTo, false),
editBtn: this.validData(this.permission.jobTransferManagement_edit, false),
resignationBtn: this.validData(this.permission.jobTransferManagement_resignation, false),
personalInformationBtn: this.validData(
this.permission.jobTransferManagement_personalInformation,
false
),
};
},
},
mounted() { mounted() {
// this.getUserList(); // this.getUserList();
this.getPlanList(); this.getPlanList();
@ -959,7 +1047,15 @@ export default {
refreshChange() { refreshChange() {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
}, },
//
sortChange({ prop, order }) {
this.query.descs = undefined;
this.query.ascs = undefined;
let orderByFieldKey = order === 'descending' ? 'descs' : 'ascs';
this.query[orderByFieldKey] = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase();
//
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {

Loading…
Cancel
Save