123456789101112131415161718192021222324252627282930313233343536 |
- import { useRef, useEffect } from 'react';
- import PageContent from '@/components/PageContent';
- import { useLocation, useNavigate } from '@umijs/max';
- const CadDeTail = () => {
- const cadRef = useRef();
- const location = useLocation();
- const {
- state: { path },
- } = location;
- useEffect(() => {
- const content = document.getElementById('container');
- window.ZwCloud2D.ZwEditor.ZwInit(content);
- ZwCloud2D.ZwDataProcessor.ZwSetConnectUrl(
- 'http://47.111.24.13:5121',
- 'ws://47.111.24.13:5121',
- 'http://47.111.24.13:5121',
- );
- ZwCloud2D.ZwDataProcessor.ZwSetLoadDwg(path);
- window.ZwCloud2D.ZwDataProcessor.ZwLoad();
- }, []);
- return (
- <PageContent>
- <div>CAD在线审批</div>
- <div
- id="container"
- style={{ width: '100%', height: '80vh' }}
- ref={cadRef}
- />
- </PageContent>
- );
- };
- export default CadDeTail;
|