|
|
@@ -95,11 +95,19 @@ export default function SegregationPointManagement({ subMenu }: SegregationPoint
|
|
|
setDeptOptions(convertToTreeSelectData(deptTreeData, 'workstationName'));
|
|
|
|
|
|
// 获取锁定站数据
|
|
|
- const lotoRes = await lotoStationApi.listLoto({ pageNo: 1, pageSize: -1 });
|
|
|
- setLotoOptions(lotoRes.list.map(item => ({
|
|
|
- value: item.id!,
|
|
|
- label: item.lotoName,
|
|
|
- })));
|
|
|
+ try {
|
|
|
+ const lotoRes = await lotoStationApi.listLoto({ pageNo: 1, pageSize: -1 });
|
|
|
+ const data = (lotoRes as any)?.data || lotoRes;
|
|
|
+ const lotoList = data?.list || [];
|
|
|
+ setLotoOptions(lotoList.map((item: any) => ({
|
|
|
+ value: item.id!,
|
|
|
+ label: item.lotoName,
|
|
|
+ })));
|
|
|
+ } catch (lotoError) {
|
|
|
+ console.error('获取锁定站数据失败:', lotoError);
|
|
|
+ // 锁定站是非必填的,如果接口不存在或失败,设置为空数组即可
|
|
|
+ setLotoOptions([]);
|
|
|
+ }
|
|
|
|
|
|
// 获取设备/工艺数据
|
|
|
const techRes = await technologyApi.listTechnology({ pageNo: 1, pageSize: -1 });
|