From 88e634f734d62db6fcbff29ca8636adbea48a119 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 10 四月 2024 11:09:53 +0800 Subject: [PATCH] # --- zy-asrs-flow/src/pages/map/header/search.jsx | 36 +++++++++++++++++++++++++++++++++--- 1 files changed, 33 insertions(+), 3 deletions(-) diff --git a/zy-asrs-flow/src/pages/map/header/search.jsx b/zy-asrs-flow/src/pages/map/header/search.jsx index 5324092..abb5943 100644 --- a/zy-asrs-flow/src/pages/map/header/search.jsx +++ b/zy-asrs-flow/src/pages/map/header/search.jsx @@ -26,6 +26,17 @@ ) }) break; + case Utils.SENSOR_TYPE.CONVEYOR: + options.push({ + value: value, + label: + ( + <> + <span style={{ fontWeight: 'bold' }} >{intl.formatMessage({ id: 'map.sensor.type.conveyor', defaultMessage: '杈撻�佺嚎' })}</span> + </> + ) + }) + break; case Utils.SENSOR_TYPE.SHUTTLE: options.push({ value: value, @@ -37,13 +48,24 @@ ) }) break; + case Utils.SENSOR_TYPE.LIFT: + options.push({ + value: value, + label: + ( + <> + <span style={{ fontWeight: 'bold' }} >{intl.formatMessage({ id: 'map.sensor.type.lift', defaultMessage: '鎻愬崌鏈�' })}</span> + </> + ) + }) + break; case Utils.SENSOR_TYPE.AGV: options.push({ value: value, label: ( <> - <span style={{ fontWeight: 'bold' }} >{intl.formatMessage({ id: 'map.sensor.type.agv', defaultMessage: '鏃犱汉灏忚溅' })}</span> + <span style={{ fontWeight: 'bold' }} >{intl.formatMessage({ id: 'map.sensor.type.agv', defaultMessage: 'AGV' })}</span> </> ) }) @@ -75,6 +97,15 @@ value: child.data.no, label: renderTitle(child.data.no, child.data.uuid) }) + } + // lift special handling + if (curSensorType === Utils.SENSOR_TYPE.LIFT) { + if (child?.data?.type === Utils.SENSOR_TYPE.SHELF && child?.data?.shelfType === Utils.SHELF_TYPE.LIFT) { + sensorListAll.push({ + value: child.data.liftNo + '', + label: renderTitle(child.data.liftNo + '', child.data.uuid) + }) + } } }); return sensorListAll; @@ -116,8 +147,7 @@ // second select condition React.useEffect(() => { if (!Utils.getMapContainer()) { return; } - if ((curSensorLabel !== null || curSensorLabel != undefined) - && sensorList && sensorList.length > 0) { + if (!Utils.isNullOfUndefined(curSensorLabel) && sensorList && sensorList.length > 0) { setFilterSensorList(sensorList.filter(item => item.value.includes(curSensorLabel))); } }, [curSensorLabel]) -- Gitblit v1.9.1