12345678910111213141516171819202122232425262728293031323334353637 |
- 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(() => {
- console.log(window);
- const content = document.getElementById('container');
- window.ZwCloud2D.ZwEditor.ZwInit(content);
- ZwCloud2D.ZwDataProcessor.ZwSetConnectUrl(
- 'http://222.130.26.205:9080',
- 'http://222.130.26.205:5121',
- 'ws://222.130.26.205: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;
|