From f896288ad8fe70cbaba3055edd56c0ce68d1bf26 Mon Sep 17 00:00:00 2001
From: ysn <2126564605@qq.com>
Date: Mon, 27 Apr 2026 13:38:12 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E7=8E=AF=E7=AE=A1=E7=90=86-=E7=8E=AF?=
=?UTF-8?q?=E4=BF=9D=E7=AE=A1=E7=90=86-=E7=8E=AF=E4=BF=9D=E5=B7=A1?=
=?UTF-8?q?=E6=A3=80=E4=BB=BB=E5=8A=A1-=E6=96=B0=E5=A2=9E=E6=8E=92?=
=?UTF-8?q?=E5=BA=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../equipmentInspectionTask/index.vue | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/views/safetyManagement/equipmentInspectionTask/index.vue b/src/views/safetyManagement/equipmentInspectionTask/index.vue
index b8759842..f91faae7 100644
--- a/src/views/safetyManagement/equipmentInspectionTask/index.vue
+++ b/src/views/safetyManagement/equipmentInspectionTask/index.vue
@@ -16,6 +16,7 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
+ @sort-change="sortChange"
>
@@ -240,6 +241,20 @@ export default {
this.query = { taskStatus: '1' };
this.onLoad(this.page);
},
+ // 排序
+ sortChange({ prop, order }) {
+ if (!prop) {
+ // 如果取消排序,清空排序参数
+ this.query.orderByField = undefined;
+ this.query.isAsc = undefined;
+ } else {
+ const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase();
+ this.query.orderByField = orderByField;
+ this.query.isAsc = order === 'ascending' ? true : false;
+ }
+ // // 重新加载数据
+ this.onLoad(this.page, this.query);
+ },
// 加载页面数据
onLoad(page, params = {}) {
this.loading = true;