#
luxiaotao1123
2024-10-18 769f753ca8581b717bcd27c63c637fe868dd37f1
zy-acs-flow/src/map/insight/agv/AgvMain.jsx
@@ -67,7 +67,7 @@
                addObject(agvGroup);
                three.rePerspective(350, 450);
                three?.rePerspective(350, 450);
            }).catch((error) => {
                console.error(error);
@@ -77,7 +77,7 @@
}
const AgvMain = (props) => {
    const { data, curAgvNo, setCurAgvNo } = props;
    const { curAgvNo, setCurAgvNo, setJsonData } = props;
    const theme = useTheme();
    const translate = useTranslate();
    const containerRef = useRef();
@@ -85,17 +85,16 @@
    const [info, setInfo] = useState(null);
    useEffect(() => {
        if (data) {
            getAgvInfo(data.no, (response) => {
        if (curAgvNo) {
            getAgvInfo(curAgvNo, (response) => {
                setInfo(response);
                setCurAgvNo(data.no);
            });
        }
    }, [data]);
    }, [curAgvNo]);
    useEffect(() => {
        if (info) {
            // console.log(info);
            setJsonData(info);
            endThree();
            setLoading(true);
            setTimeout(() => {
@@ -109,6 +108,10 @@
        }
        return endThree;
    }, [info]);
    const handleReset = () => {
        alert(1)
    }
    return (
        <Box display="flex" height="100%">
@@ -178,7 +181,7 @@
                                    color="primary"
                                    variant="contained"
                                    onConfirm={() => {
                                        alert(1)
                                        handleReset();
                                    }}
                                />
                                {info && (
@@ -200,8 +203,6 @@
}
const KeyValuePair = ({ label, value, bool }) => {
    console.log({ label, value, bool });
    return (
        <>
            <Stack direction="row" alignItems="center" spacing={1} sx={{ mb: 1 }}>