#
luxiaotao1123
2024-03-25 a48bf56c321ef769224182b5a85d59b4beb88d01
#
2个文件已修改
19 ■■■■■ 已修改文件
zy-asrs-flow/src/pages/map/header/search.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/header/search.jsx
@@ -87,16 +87,22 @@
    const [filterSensorList, setFilterSensorList] = React.useState([]);
    const [curSensorLabel, setCurSensorLabel] = React.useState(null);
    // first select
    React.useEffect(() => {
        if (!Utils.getMapContainer()) { return; }
    const resetSearch = () => {
        let sensorListAll = getAllSensorList(curSensorType);
        setSensorList(sensorListAll);
        setFilterSensorList(sensorListAll);
        setCurSensorLabel(null);
    }, [curSensorType])
    }
    // second select
    // first select and switch floor
    React.useEffect(() => {
        if (!Utils.getMapContainer()) { return }
        setTimeout(() => {
            resetSearch();
        }, 200)
    }, [curSensorType, props.curFloor])
    // second select condition
    React.useEffect(() => {
        if (!Utils.getMapContainer()) { return; }
        if ((curSensorLabel !== null || curSensorLabel != undefined)
@@ -120,7 +126,7 @@
                // avoid model modify which will clear spriteBySettings
                setTimeout(() => {
                    setSpriteBySettings(selectSensor);
                }, 300)
                }, 200)
                break;
            case ModelEnum.SETTINGS_MODEL:
                setSpriteBySettings(selectSensor);
zy-asrs-flow/src/pages/map/index.jsx
@@ -295,6 +295,7 @@
                                    model={model}
                                    setModel={setModel}
                                    ModelEnum={MapModel}
                                    curFloor={curFloor}
                                    curSprite={curSprite}
                                    setCurSPrite={setCurSPrite}
                                    setSpriteBySettings={setSpriteBySettings}