From b2ad4e4aa11206b53f36c5c65c9d29d756b160f6 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期六, 30 八月 2025 13:26:19 +0800 Subject: [PATCH] 站点功能优化 --- rsf-admin/src/page/work/components/StaSelect.jsx | 30 +++++++++++++++++++----------- 1 files changed, 19 insertions(+), 11 deletions(-) diff --git a/rsf-admin/src/page/work/components/StaSelect.jsx b/rsf-admin/src/page/work/components/StaSelect.jsx index 5971aa6..64fffb8 100644 --- a/rsf-admin/src/page/work/components/StaSelect.jsx +++ b/rsf-admin/src/page/work/components/StaSelect.jsx @@ -29,19 +29,27 @@ const http = async () => { setLoading(true); try { - const res = await request.post('/selectStaList/page', { - type: type, - current: page, - pageSize: perPage + const res = await request.post('/selectStaList/list', { + type: type }); if (res?.data?.code === 200) { - setList(res.data.data.records.map((item) => { - return { - id: item.site, - name: item.site - } - })); + // 浣跨敤Set鏉ヨ繃婊ら噸澶嶇殑site鍊� + const uniqueSites = new Set(); + setList(res.data.data + .filter(item => { + if (uniqueSites.has(item.site)) { + return false; + } + uniqueSites.add(item.site); + return true; + }) + .map((item) => { + return { + id: item.site, + name: item.site$ + } + })); } else { notify(res.data.msg); } @@ -60,7 +68,7 @@ source={name} choices={list} isLoading={loading} - optionValue='id' + optionValue='name' optionText='name' {...parmas} /> -- Gitblit v1.9.1