From 6e185d0f47adca923e1f09ad9913aabbcbd109f4 Mon Sep 17 00:00:00 2001
From: ysn <2126564605@qq.com>
Date: Mon, 27 Apr 2026 11:44:46 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E7=8E=AF=E7=AE=A1=E7=90=86-=E5=AE=89?=
=?UTF-8?q?=E5=85=A8=E7=AE=A1=E7=90=86-=E5=AE=89=E5=85=A8=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
---
.../safetyInspectionTask/index.vue | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/views/safetyManagement/safetyInspectionTask/index.vue b/src/views/safetyManagement/safetyInspectionTask/index.vue
index 4319ec83..b841bfb1 100644
--- a/src/views/safetyManagement/safetyInspectionTask/index.vue
+++ b/src/views/safetyManagement/safetyInspectionTask/index.vue
@@ -16,6 +16,7 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
+ @sort-change="sortChange"
>
@@ -206,6 +207,20 @@ export default {
};
},
methods: {
+ // 排序
+ sortChange({ prop, order }) {
+ if (!prop) {s
+ // 如果取消排序,清空排序参数
+ 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;