#
luxiaotao1123
2024-10-15 d635a3441a4d4297af71eb7ca3bc644931092e83
zy-acs-flow/src/map/header/MapSearch.jsx
@@ -35,6 +35,7 @@
    const {
        mode,
        setMode,
        dataFetched,
        curZone,
        setCurSprite,
        setSpriteSettings,
@@ -59,11 +60,10 @@
    };
    useEffect(() => {
        if (!Tool.getMapContainer()) return;
        setTimeout(() => {
        if (dataFetched) {
            resetSearch();
        }, 200);
    }, [curDeviceType, curZone]);
        }
    }, [curDeviceType, dataFetched, curZone]);
    useEffect(() => {
        if (!Tool.getMapContainer()) return;
@@ -119,7 +119,7 @@
    };
    return (
        <Stack direction="row" spacing={2} alignItems="center">
        <Stack direction="row" spacing={1} alignItems="center">
            <Select
                variant="outlined"
                size="small"
@@ -139,18 +139,21 @@
                size="small"
                options={filterDeviceList}
                getOptionLabel={(option) => option.value}
                renderOption={(props, option) => (
                    <li {...props}>
                        <Stack direction="row" justifyContent="space-between" width="100%">
                            <Typography variant="body1" fontWeight="bold">
                                {option.label}
                            </Typography>
                            <Typography variant="body2" color="text.secondary">
                                {option.uuid}
                            </Typography>
                        </Stack>
                    </li>
                )}
                renderOption={(props, option) => {
                    const { key, ...otherProps } = props;
                    return (
                        <li key={Number(key)} {...otherProps}>
                            <Stack direction="row" justifyContent="space-between" width="100%">
                                <Typography variant="body1" fontWeight="bold">
                                    {option.label}
                                </Typography>
                                <Typography variant="body2" color="text.secondary">
                                    {option.uuid}
                                </Typography>
                            </Stack>
                        </li>
                    )
                }}
                renderInput={(params) => (
                    <TextField
                        {...params}
@@ -177,7 +180,10 @@
                                </>
                            ),
                        }}
                        sx={{ minWidth: 360 }}
                        sx={{
                            minWidth: 360,
                            marginBottom: '7px',
                        }}
                    />
                )}
                value={selectedOption}
@@ -189,6 +195,7 @@
                onInputChange={(event, newInputValue) => {
                    setInputValue(newInputValue);
                }}
                disableClearable
            />
        </Stack>
    );