From 1e1cedc70758a7c17ccf63ea11d1db70c409aa66 Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期五, 05 九月 2025 09:45:15 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
---
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