From ceab656e93edafbdaa0d908a2f723336af811b5a Mon Sep 17 00:00:00 2001 From: skyouc <958836976@qq.com> Date: 星期三, 03 九月 2025 12:47:23 +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..d033b5f 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