From 9d8e500f5386eb4eb41ceedc321ee495e2bac151 Mon Sep 17 00:00:00 2001
From: loveflow <5269966+loveflow@user.noreply.gitee.com>
Date: Fri, 26 Jan 2024 22:08:28 +0800
Subject: [PATCH] update
---
src/loveflow/components/data/table.vue | 5 +++++
src/loveflow/mixins/tableListMixins.js | 12 ++++++++----
src/views/enterpriseManage/recordManage/index.vue | 9 ++++++++-
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/src/loveflow/components/data/table.vue b/src/loveflow/components/data/table.vue
index 13f69e1..6cfaa49 100644
--- a/src/loveflow/components/data/table.vue
+++ b/src/loveflow/components/data/table.vue
@@ -89,6 +89,11 @@ export default {
selectionChange(item) {
this.$emit("selectionChange", item, this.rowKey);
},
+ //清除选择项
+ clearSelection() {
+ this.$refs.gMainTable.clearSelection();
+ this.$emit("onClearSelected");
+ },
},
};
diff --git a/src/loveflow/mixins/tableListMixins.js b/src/loveflow/mixins/tableListMixins.js
index 53b492f..9acbf0e 100644
--- a/src/loveflow/mixins/tableListMixins.js
+++ b/src/loveflow/mixins/tableListMixins.js
@@ -4,7 +4,7 @@ export const tableListMixins = {
data() {
return {
/* 查询条件 */
- quaryParam: {},
+ queryParam: {},
/* 数据源 */
dataSource: [],
/* 分页参数 */
@@ -86,12 +86,16 @@ export const tableListMixins = {
this.selectedRowKeys = [];
this.selectionRows = [];
},
-
+ //查询
searchQuery() {
this.ipagination.currentPage = 1;
this.loadData();
- this.selectedRowKeys = [];
- this.selectionRows = [];
+ this.onClearSelected();
+ },
+ //重置
+ searchReset() {
+ this.queryParam = {};
+ this.searchQuery();
},
},
};
diff --git a/src/views/enterpriseManage/recordManage/index.vue b/src/views/enterpriseManage/recordManage/index.vue
index 35d45a7..a481c1f 100644
--- a/src/views/enterpriseManage/recordManage/index.vue
+++ b/src/views/enterpriseManage/recordManage/index.vue
@@ -9,12 +9,16 @@
type="primary"
plain
v-if="selectedRowKeys.length"
- @click="onClearSelected"
+ @click="clearSelection"
>
清空选择
+