From c7ba5806708d473db2e7b767fdc3ebee197ee99c Mon Sep 17 00:00:00 2001
From: WindowBird <13870814+windows-bird@user.noreply.gitee.com>
Date: Thu, 13 Nov 2025 09:48:26 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8=E5=88=86?=
=?UTF-8?q?=E9=A1=B5=E5=99=A8=E7=9A=84=E5=AE=9E=E7=8E=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/task.js | 13 +-
components/customer/CustomerManagement.vue | 2 +-
pages/task/list/index.vue | 200 ++++++++++++---------
3 files changed, 131 insertions(+), 84 deletions(-)
diff --git a/api/task.js b/api/task.js
index 4d15292..02ee05f 100644
--- a/api/task.js
+++ b/api/task.js
@@ -10,14 +10,16 @@
* @param {number[]} params.statusList 任务状态列表,4对应已完成
* @param {string} params.expireTimeStart 过期时间开始范围(格式:yyyy-MM-dd HH:mm:ss)
* @param {string} params.expireTimeEnd 过期时间结束范围(格式:yyyy-MM-dd HH:mm:ss)
+ * @param {number} params.pageNum 页码
+ * @param {number} params.pageSize 每页数量
* @returns {Promise} 返回任务列表
*/
-export const getTaskList = ({ownerId, overdue, statusList, expireTimeStart, expireTimeEnd }) => {
+export const getTaskList = ({ownerId, overdue, statusList, expireTimeStart, expireTimeEnd, pageNum, pageSize }) => {
const queryParams = [];
if (overdue !== undefined) {
queryParams.push(`overdue=${overdue}`);
}
- if (ownerId !== undefined) {
+ if (ownerId !== undefined && ownerId !== '') {
queryParams.push(`ownerId=${ownerId}`);
}
if (statusList !== undefined && Array.isArray(statusList) && statusList.length > 0) {
@@ -30,6 +32,13 @@ export const getTaskList = ({ownerId, overdue, statusList, expireTimeStart, expi
if (expireTimeEnd !== undefined && expireTimeEnd !== null && expireTimeEnd !== '') {
queryParams.push(`expireTimeEnd=${encodeURIComponent(expireTimeEnd)}`);
}
+ // 添加分页参数
+ if (pageNum !== undefined) {
+ queryParams.push(`pageNum=${pageNum}`);
+ }
+ if (pageSize !== undefined) {
+ queryParams.push(`pageSize=${pageSize}`);
+ }
const queryString = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
return uni.$uv.http.get(`bst/task/list${queryString}`, {
diff --git a/components/customer/CustomerManagement.vue b/components/customer/CustomerManagement.vue
index 287158e..153f789 100644
--- a/components/customer/CustomerManagement.vue
+++ b/components/customer/CustomerManagement.vue
@@ -430,7 +430,7 @@ onUnmounted(() => {
});
// 暴露方法供父组件调用(用于 onReachBottom)
-const winB_LoadMore = () => {
+const winB_LoadMore= () => {
if (!loading.value && !noMore.value) {
loadMore();
}
diff --git a/pages/task/list/index.vue b/pages/task/list/index.vue
index f0d9f7b..ad2a96e 100644
--- a/pages/task/list/index.vue
+++ b/pages/task/list/index.vue
@@ -1,16 +1,19 @@
-
+
-
-
+
-
-
-
-
+
@@ -70,28 +69,54 @@
-
+
暂无{{ getStatusText(statusFilter) || '' }}任务
+
+
+
+ 上拉加载更多
+
+
+ 没有更多数据了
+
@@ -571,5 +599,15 @@ onLoad((options) => {
font-size: 14px;
color: #999;
}
+
+.load-more-tip {
+ padding: 20px;
+ text-align: center;
+}
+
+.load-more-text {
+ font-size: 12px;
+ color: #999;
+}