From 5abe582142405569435c7cd0a479908aa5bff992 Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期五, 06 六月 2025 17:04:53 +0800
Subject: [PATCH] 分页修改
---
src/views/basicData/product/index.vue | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/views/basicData/product/index.vue b/src/views/basicData/product/index.vue
index d496069..0da3e12 100644
--- a/src/views/basicData/product/index.vue
+++ b/src/views/basicData/product/index.vue
@@ -103,7 +103,7 @@
addOrEditProduct,
addOrEditProductModel,
delProduct, delProductModel,
- modelList,
+ modelListPage,
productTreeList
} from "@/api/basicData/product.js";
const { proxy } = getCurrentInstance()
@@ -292,16 +292,22 @@
}
// 鏌ヨ瑙勬牸鍨嬪彿
-const pagination = ({ current, limit }) => {
- page.current = current;
- page.size = limit;
+const pagination = (obj) => {
+ page.current = obj.page;
+ page.size = obj.limit;
getModelList()
}
const getModelList = () => {
tableLoading.value = true
- modelList({id: currentId.value}).then(res => {
+ modelListPage({id: currentId.value,
+ current: page.current,
+ size: page.size,
+ }
+ ).then(res => {
+ console.log('res',res)
+ tableData.value = res.records
+ total.value = res.total
tableLoading.value = false
- tableData.value = res
})
}
// 鍒犻櫎瑙勬牸鍨嬪彿
@@ -393,4 +399,4 @@
font-size: 14px;
padding-right: 8px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3