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;
+}