chen.lin
昨天 91e6029be34ae47593dea647f38f98a3a69fd6dd
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>
                ))}