This commit is contained in:
dhr
2025-09-24 16:37:09 +08:00
parent 80cca114a9
commit 9913a7854c
15 changed files with 1943 additions and 435 deletions

View File

@ -605,13 +605,14 @@ const formatDate = (dateString) => {
const getUsersList = async () => {
try {
const response = await xunjianUserlist();
const userRows = response?.data?.rows || response?.rows || [];
// 适配新接口格式检查code为200且rows为数组
const userRows = response.code === 200 && response.rows && Array.isArray(response.rows) ? response.rows : [];
userList.value = userRows
.filter((item) => item && typeof item === 'object')
.map((item, index) => ({
label: item.userName || `用户${index + 1}`,
value: item.id || `id_${index}`
.map((item) => ({
label: item.userName || '未知用户',
value: String(item.userId || '') // 使用userId作为唯一标识
}));
if (userList.value.length === 0) {