转岗管理-人员设备台账-新增排序/权限

dev-scheduling
ysn 4 weeks ago
parent 49da89b544
commit e7e0397249
  1. 49
      src/views/workLicense/personnelEquipment.vue

@ -17,14 +17,17 @@
@refresh-change="refreshChange"
@on-load="onLoad"
:row-class-name="rowClassName"
@sort-change="sortChange"
>
<!-- :span-method="spanMethod" -->
<template #menu-left>
<el-button type="primary" @click="handleMaintain">设备维护</el-button>
<el-button type="danger" @click="handleDeletes">批量删除</el-button>
<el-button type="primary" @click="handleMaintain" v-if="equipmentMaintenancePermission">
设备维护
</el-button>
<el-button type="danger" @click="handleDeletes" v-if="deletePermission">批量删除</el-button>
</template>
<template #menu-right>
<el-button type="primary" @click="handleImport"> </el-button>
<el-button type="primary" @click="handleImport" v-if="importPermission"> </el-button>
</template>
<template #equipmentDate="scope">
{{ scope.row.equipmentDate ? scope.row.equipmentDate.substring(0, 10) : '' }}
@ -64,7 +67,7 @@
import equipmentDialog from './components/equipmentDialog.vue';
import basicImport from '@/components/basic-import/main.vue';
import { getList, remove, add, update } from '@/api/workLicense/personnelEquipment';
import { mapGetters } from 'vuex';
export default {
components: {
equipmentDialog,
@ -96,7 +99,7 @@ export default {
currentPage: 1,
total: 0,
},
query: {},
selectionList: [],
spanArr: [
{ prop: 'userName', span: [] },
@ -170,6 +173,7 @@ export default {
labelWidth: 140,
overflow: true,
search: true,
sortable: 'custom',
fixed: 'left',
},
{
@ -179,6 +183,7 @@ export default {
width: 150,
overflow: true,
search: false,
sortable: 'custom',
},
{
label: '所属岗位',
@ -187,7 +192,7 @@ export default {
width: 150,
overflow: true,
search: false,
sortable: 'custom',
},
{
label: '所属岗位',
@ -195,6 +200,7 @@ export default {
span: 8,
labelWidth: 150,
search: true,
sortable: 'custom',
width: 170,
hide: true,
filterable: true,
@ -213,6 +219,7 @@ export default {
span: 8,
labelWidth: 150,
search: true,
sortable: 'custom',
width: 200,
dicUrl: '/blade-system/dict/dictionary?code=skill_level',
props: {
@ -227,6 +234,7 @@ export default {
width: 150,
overflow: true,
search: false,
sortable: 'custom',
},
{
label: '最高学历',
@ -235,6 +243,7 @@ export default {
width: 150,
overflow: true,
search: false,
sortable: 'custom',
},
{
label: '出生年月',
@ -243,6 +252,7 @@ export default {
width: 150,
overflow: true,
search: false,
sortable: 'custom',
},
// {
@ -262,6 +272,7 @@ export default {
labelWidth: 140,
overflow: true,
search: false,
sortable: 'custom',
},
{
label: '设备编号',
@ -271,6 +282,7 @@ export default {
labelWidth: 140,
overflow: true,
search: false,
sortable: 'custom',
},
{
label: '设备时间',
@ -280,6 +292,7 @@ export default {
labelWidth: 140,
overflow: true,
search: false,
sortable: 'custom',
},
{
label: '设备有效期(天)',
@ -289,6 +302,7 @@ export default {
labelWidth: 140,
overflow: true,
search: false,
sortable: 'custom',
},
{
label: '设备到期日期',
@ -298,6 +312,7 @@ export default {
labelWidth: 140,
overflow: true,
search: false,
sortable: 'custom',
},
{
label: '状态',
@ -308,11 +323,24 @@ export default {
labelWidth: 140,
overflow: true,
search: false,
sortable: 'custom',
},
],
},
};
},
computed: {
...mapGetters(['permission']),
equipmentMaintenancePermission() {
return this.validData(this.permission.personnelEquipment_equipmentMaintenance, false);
},
deletePermission() {
return this.validData(this.permission.personnelEquipment_del, false);
},
importPermission() {
return this.validData(this.permission.personnelEquipment_import, false);
},
},
mounted() {},
methods: {
//
@ -469,6 +497,15 @@ export default {
refreshChange() {
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);
},
searchReset() {
this.query = {};
this.treeDeptId = '';

Loading…
Cancel
Save