From 1de0a53abe21eb1317565975937a5cbd3f24120f Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Fri, 25 Oct 2024 18:09:14 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A1=8C=E5=8F=B0=E5=A2=9E=E5=8A=A0=E5=88=86?=
=?UTF-8?q?=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageTable/index/index.vue | 30 +++++++++++++-----------------
1 file changed, 13 insertions(+), 17 deletions(-)
diff --git a/pageTable/index/index.vue b/pageTable/index/index.vue
index b821fc9..340597d 100644
--- a/pageTable/index/index.vue
+++ b/pageTable/index/index.vue
@@ -22,7 +22,7 @@
- 取消
+ 取消
@@ -34,7 +34,7 @@
-
{{item.label}}
@@ -246,12 +246,16 @@
function searchConfirm() {
hideSearch()
- filterTableList()
+ query.page=1;
+ getTable()
// tables.list = tables.originList.filter((v) =>
// v.name.includes(search.keyword.trim())
// );
}
-
+ function clearSearch(){
+ search.keyword=''
+ hideSearch()
+ }
function hideSearch() {
search.show = false
maskHide()
@@ -406,13 +410,14 @@
query.areaId = item.id
}
async function getTable() {
+ let state=status.list[status.active].key
+ state=state?(state=='all'?'':state):''
const {
content,total
- } = await $table.get(query)
+ } = await $table.get({...query,name:search.keyword,state})
tables.hasAjax = true
query.totalElements=total||0
- tables.originList = content
- filterTableList()
+ tables.list = content
}
const areaMap = ref({})
async function getArea() {
@@ -441,17 +446,8 @@
// tables.list = tables.originList.filter((v) => {
// return v.status == status.list[status.active].key
// });
- filterTableList()
+ getTable()
})
-
- function filterTableList() {
- tables.list = tables.originList.filter((v) => {
- console.log(status.list[status.active].key);
- return (status.active == 0 ? true : v.status == status.list[status.active].key) && (
- v.name.includes(search.keyword.trim())
- )
- });
- }
watch(() => times.active, (newval) => {
setTimer()
})