From e7e039724925367ed8ece14983af6079e7ae0b39 Mon Sep 17 00:00:00 2001
From: ysn <2126564605@qq.com>
Date: Wed, 6 May 2026 14:06:09 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E5=B2=97=E7=AE=A1=E7=90=86-=E4=BA=BA?=
=?UTF-8?q?=E5=91=98=E8=AE=BE=E5=A4=87=E5=8F=B0=E8=B4=A6-=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=8E=92=E5=BA=8F/=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/workLicense/personnelEquipment.vue | 49 +++++++++++++++++---
1 file changed, 43 insertions(+), 6 deletions(-)
diff --git a/src/views/workLicense/personnelEquipment.vue b/src/views/workLicense/personnelEquipment.vue
index f089e8e6..f9f8f84d 100644
--- a/src/views/workLicense/personnelEquipment.vue
+++ b/src/views/workLicense/personnelEquipment.vue
@@ -17,14 +17,17 @@
@refresh-change="refreshChange"
@on-load="onLoad"
:row-class-name="rowClassName"
+ @sort-change="sortChange"
>
- 设备维护
- 批量删除
+
+ 设备维护
+
+ 批量删除
- 导 入
+ 导 入
{{ 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 = '';