From eb77d0ecff905ea3cd7439ff5e15aabe160b37db Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 26 Sep 2025 09:06:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/platform/index.vue | 30 +++++++++++++++++--- src/views/task/components/addAndEditForm.vue | 27 +++++++++--------- src/views/task/index.vue | 20 +++++++++++-- 3 files changed, 58 insertions(+), 19 deletions(-) diff --git a/src/views/platform/index.vue b/src/views/platform/index.vue index d2295ae..9730fce 100644 --- a/src/views/platform/index.vue +++ b/src/views/platform/index.vue @@ -3,10 +3,10 @@
- + - 查询 + 查询 新增 @@ -45,7 +45,7 @@ @@ -86,6 +86,7 @@ export default { return { total: 0, tableData: [], + tableDataAll: [], rightTableData: [], // 页面数据 queryParams: { @@ -109,6 +110,20 @@ export default { this.editRow = row this.dialogConfig.outerVisible = true }, + + onHandleSearch() { + this.tableData = this.tableDataAll.filter((item) => { + return item.name.includes(this.queryParams.name) + }) + }, + + onHandlePagination() { + this.tableData = this.tableDataAll.slice( + (this.queryParams.pageNum - 1) * this.queryParams.pageSize, + this.queryParams.pageNum * this.queryParams.pageSize, + ) + }, + handleDelete(row) { console.log(row) this.$modal @@ -125,7 +140,14 @@ export default { }, async getPlatformList() { const res = await getPlatformListAPI() - this.tableData = res?.data + // this.tableData = res?.data + + if (res?.data.length > 10) { + this.tableData = res?.data.slice(0, 10) + } else { + this.tableData = res?.data + } + this.tableDataAll = res?.data this.total = res?.data?.length this.rightTableData = res?.data[0]?.list || [] }, diff --git a/src/views/task/components/addAndEditForm.vue b/src/views/task/components/addAndEditForm.vue index b46d5b8..4c950af 100644 --- a/src/views/task/components/addAndEditForm.vue +++ b/src/views/task/components/addAndEditForm.vue @@ -184,7 +184,20 @@ + + + + + + + + @@ -218,18 +231,6 @@ - - - - - - - diff --git a/src/views/task/index.vue b/src/views/task/index.vue index 692caae..4bb60a6 100644 --- a/src/views/task/index.vue +++ b/src/views/task/index.vue @@ -43,7 +43,19 @@ - + + +