修复选择负责人

This commit is contained in:
WindowBird 2025-11-14 16:03:10 +08:00
parent fca8927fb4
commit 12cbd23bb2
4 changed files with 33 additions and 33 deletions

View File

@ -44,21 +44,23 @@ export const getDictDataList = (params = {}) => {
// 合并参数
const requestParams = { ...defaultParams, ...params };
// 构建查询字符串
const searchParams = new URLSearchParams();
// 构建查询参数数组兼容uniapp
const queryParams = [];
Object.entries(requestParams).forEach(([key, value]) => {
if (value !== undefined && value !== null && value !== '') {
searchParams.append(key, value.toString());
queryParams.push(`${key}=${encodeURIComponent(value.toString())}`);
}
});
const queryString = searchParams.toString();
const queryString = queryParams.join('&');
const url = `/system/dict/data/list${queryString ? `?${queryString}` : ''}`;
console.log('请求URL:', url); // 调试用
return uni.$uv.http.get(url, {
custom: {
auth: true
}
});
};
};

View File

@ -73,35 +73,30 @@ export const getUserListAll = () => {
};
/**
* 分页获取用户列表
* 分页获取用户列表uni-app兼容版本
* @param {Object} params 查询参数
* @param {number} params.pageNum 页码
* @param {number} params.pageSize 每页数量
* @param {string|number} params.status 启用状态
* @param {string|number} params.delFlag 删除标记
* @param {number} params.pageNum 页码默认1
* @param {number} params.pageSize 每页数量默认100
* @param {string|number} params.status 启用状态默认0
* @param {string|number} params.delFlag 删除标记默认0
* @returns {Promise<Object>} 用户列表
*/
export const getUserList = (params = {}) => {
const defaultParams = {
// 合并参数并过滤空值
const requestParams = Object.entries({
pageNum: 1,
pageSize: 100,
status: 0,
delFlag: 0
};
delFlag: 0,
...params
})
.filter(([_, value]) => value !== undefined && value !== null && value !== '')
.map(([key, value]) => `${key}=${encodeURIComponent(value.toString())}`)
.join('&');
const searchParams = new URLSearchParams();
Object.entries({ ...defaultParams, ...params }).forEach(([key, value]) => {
if (value !== undefined && value !== null && value !== '') {
searchParams.append(key, value);
}
const url = `/system/user/list${requestParams ? `?${requestParams}` : ''}`;
return uni.$uv.http.get(url, {
custom: { auth: true }
});
const queryString = searchParams.toString();
return uni.$uv.http.get(`/system/user/list${queryString ? `?${queryString}` : ''}`, {
custom: {
auth: true
}
});
};
};

View File

@ -53,7 +53,9 @@ const handleClick = (item) => {
return;
}
if (item.key === 'task') {
uni.switchTab({ url: '/pages/index/index' });
uni.navigateTo({
url: '/pages/task/add/index'
});
return;
}
if (item.key === 'customer') {

View File

@ -1,6 +1,6 @@
<template>
<view class="task-add-page">
<scroll-view class="content-scroll" scroll-y>
<view class="content-scroll" >
<view class="form-card">
<view class="section-title">任务信息</view>
@ -114,7 +114,7 @@
</view>
</view>
</view>
</scroll-view>
</view>
<view class="submit-bar">
<uv-button
@ -886,7 +886,7 @@ onLoad(async (options) => {
background: #fff;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
max-height: 76%;
display: flex;
flex-direction: column;
}
@ -922,7 +922,8 @@ onLoad(async (options) => {
}
.member-list {
flex: 1;
height: 600px;
}
.member-item {