fix(xispeak): 选人组件前端按sortno升序排列,序号越小越靠前

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
wsm
2026-06-29 17:01:41 +08:00
co-authored by Claude Opus 4.7
parent b1a94da2ed
commit c69035292c
3 changed files with 3 additions and 3 deletions
@@ -52,7 +52,7 @@ async function fetchUserList() {
}; };
const res = await defHttp.get({ url: '/sys/user/queryUserRoleComponentData', params }); const res = await defHttp.get({ url: '/sys/user/queryUserRoleComponentData', params });
const records = res?.records || res?.result?.records || []; const records = res?.records || res?.result?.records || [];
userList.value = records; userList.value = records.sort((a, b) => (a.sortno ?? Infinity) - (b.sortno ?? Infinity));
} catch { } catch {
userList.value = []; userList.value = [];
} }
@@ -31,7 +31,7 @@ onMounted(async () => {
}; };
const res = await defHttp.get({ url: '/sys/user/queryUserRoleComponentData', params }); const res = await defHttp.get({ url: '/sys/user/queryUserRoleComponentData', params });
const records = res?.records || res?.result?.records || []; const records = res?.records || res?.result?.records || [];
userList.value = records; userList.value = records.sort((a, b) => (a.sortno ?? Infinity) - (b.sortno ?? Infinity));
} catch { } catch {
userList.value = []; userList.value = [];
} }
@@ -448,7 +448,7 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
}, },
}); });
const records = res?.records || res?.result?.records || []; const records = res?.records || res?.result?.records || [];
defaultCcUsers.value = records; defaultCcUsers.value = records.sort((a, b) => (a.sortno ?? Infinity) - (b.sortno ?? Infinity));
} catch { } catch {
defaultCcUsers.value = []; defaultCcUsers.value = [];
} }