From 7a525c53048e5508b44f468a7c738acff9f9790d Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 20 Dec 2021 11:56:20 +0800
Subject: [PATCH] 保安员管理新增排序
---
src/views/securityGuard/securityGuard.vue | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 4f69644..4358c28 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -602,6 +602,8 @@
}
};
return {
+ sort:"",
+ sortName:"",
nowCell: "", //空为手动,2为身份证设备读取
// 表格数据
defaults: {},
@@ -2390,7 +2392,25 @@
},
//排序
sortChange(value) {
- console.log(value, 51151515);
+ // console.log(value, 51151515);
+ if(value.order=="ascending"){
+ this.sort = "asc";
+ }
+ if(value.order=="descending"){
+ this.sort = "desc";
+ }
+ this.sortName = value.prop;
+ //字段匹配
+ if(value.prop=="sexs"){
+ this.sortName = "sex";
+ }
+ if(value.prop=="examinationType"){
+ this.sortName = "examination_type";
+ }
+ if(value.prop=="userType"){
+ this.sortName = "user_type";
+ }
+ this.onLoad(this.page,this.query);
},
onLoad(page, params = {}) {
params = this.search;
@@ -2469,6 +2489,13 @@
"/api/blade-system/dept/security_lazy-tree";
}
+ if(this.sort){
+ params["sort"] = this.sort;
+ }
+ if(this.sortName){
+ params["sortName"] = this.sortName;
+ }
+
let values = {
...params,
};
--
Gitblit v1.9.3