From 91e6029be34ae47593dea647f38f98a3a69fd6dd Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期三, 25 二月 2026 14:01:47 +0800
Subject: [PATCH] 站点初始化,批量增加
---
rsf-admin/src/page/basicInfo/basStation/BasStationInitModal.jsx | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/basStation/BasStationInitModal.jsx b/rsf-admin/src/page/basicInfo/basStation/BasStationInitModal.jsx
index 865aa26..30feaaf 100644
--- a/rsf-admin/src/page/basicInfo/basStation/BasStationInitModal.jsx
+++ b/rsf-admin/src/page/basicInfo/basStation/BasStationInitModal.jsx
@@ -82,7 +82,7 @@
.then((res) => {
if (res?.data?.code === 200 && res?.data?.data?.records) {
setContainerTypeOptions(res.data.data.records.map((item) => ({
- id: item.id,
+ value: item.value,
label: item.label ?? item.value ?? item.id,
})));
}
@@ -133,9 +133,9 @@
type: common.type,
useStatus: common.useStatus || undefined,
areaIds: common.areaIds,
- containerTypes: common.containerTypes,
- inAble: common.inAble,
- outAble: common.outAble,
+ containerTypes: (common.containerTypes || []).map((v) => Number(v)),
+ inAble: Number(common.inAble),
+ outAble: Number(common.outAble),
};
try {
const res = await request.post('/basStation/save', body);
@@ -299,12 +299,12 @@
onChange={(e) => setCommon((c) => ({ ...c, containerTypes: e.target.value }))}
renderValue={(selected) =>
(selected || [])
- .map((id) => containerTypeOptions.find((c) => c.id === id)?.label ?? id)
+ .map((val) => containerTypeOptions.find((c) => c.value === val)?.label ?? val)
.join(', ')
}
>
{containerTypeOptions.map((opt) => (
- <MenuItem key={opt.id} value={opt.id}>
+ <MenuItem key={opt.value} value={opt.value}>
{opt.label}
</MenuItem>
))}
--
Gitblit v1.9.1