|
@@ -1,20 +1,103 @@
|
|
import { useRef, useEffect } from 'react';
|
|
import { useRef, useEffect } from 'react';
|
|
import PageContent from '@/components/PageContent';
|
|
import PageContent from '@/components/PageContent';
|
|
import { useLocation, useNavigate } from '@umijs/max';
|
|
import { useLocation, useNavigate } from '@umijs/max';
|
|
|
|
+import { Button } from 'antd';
|
|
|
|
|
|
const CadDeTail = () => {
|
|
const CadDeTail = () => {
|
|
|
|
+ const navigate = useNavigate();
|
|
const cadRef = useRef();
|
|
const cadRef = useRef();
|
|
const location = useLocation();
|
|
const location = useLocation();
|
|
const {
|
|
const {
|
|
- state: { path },
|
|
|
|
|
|
+ state: { path, user = {}, project_id },
|
|
} = location;
|
|
} = location;
|
|
|
|
+ console.log(user);
|
|
|
|
+
|
|
|
|
+ let commentList = {
|
|
|
|
+ msg: '操作成功',
|
|
|
|
+ code: 0,
|
|
|
|
+ data: {
|
|
|
|
+ total: 2,
|
|
|
|
+ rows: [
|
|
|
|
+ {
|
|
|
|
+ createBy: 1317,
|
|
|
|
+ creator: '皮卡丘',
|
|
|
|
+ createTime: 1672040045000,
|
|
|
|
+ id: '1737299871415943168',
|
|
|
|
+ docId: '1703039467897',
|
|
|
|
+ handleId: '34',
|
|
|
|
+ parentId: '0',
|
|
|
|
+ level: 0,
|
|
|
|
+ withAt: 'NO',
|
|
|
|
+ withMark: 'NO',
|
|
|
|
+ content: '###梵蒂冈梵蒂冈发的',
|
|
|
|
+ mark: '',
|
|
|
|
+ replyList: [],
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ createBy: 1317,
|
|
|
|
+ creator: '柯南',
|
|
|
|
+ createTime: 1672040002000,
|
|
|
|
+ id: '1737299871415943168',
|
|
|
|
+ docId: '1703039467897',
|
|
|
|
+ handleId: '34',
|
|
|
|
+ parentId: '0',
|
|
|
|
+ level: 0,
|
|
|
|
+ withAt: 'NO',
|
|
|
|
+ withMark: 'YES',
|
|
|
|
+ content: '对符合法规和法国###',
|
|
|
|
+ mark: '[{"id":"7a4f4b9f-992d-15ef-9b17-7ca8abe833df","pt":[532.2265851288126,664.973293757502,0],"color":"red","type":0},{"id":"8bac4935-2e0b-444c-212e-bfca607c4f8e","points":[614.8609930415427,634.9244181528729,0,813.1835720320946,678.495287779585,0,834.217784955335,418.5725137995435,0,811.6811282518631,329.9283307658877,0],"color":"red","type":3},{"id":"a664f1ab-359b-87a0-7db9-f758e0e9e958","center":[294.8404678522429,338.9429934472764,0],"endPt":[365.45532552312125,275.84035467755535,0],"color":"cyan","type":1}]',
|
|
|
|
+ replyList: [],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+ //设置群组成员列表,作为@用户列表供用户选择
|
|
|
|
+ let memberList = {
|
|
|
|
+ msg: '操作成功',
|
|
|
|
+ code: 0,
|
|
|
|
+ data: {
|
|
|
|
+ total: 2,
|
|
|
|
+ rows: [
|
|
|
|
+ {
|
|
|
|
+ memberId: '2138',
|
|
|
|
+ phone: '',
|
|
|
|
+ email: '',
|
|
|
|
+ memberName: '何为',
|
|
|
|
+ memberType: 'USER',
|
|
|
|
+ lastTime: 1672039449000,
|
|
|
|
+ roleId: '1607272382833942531',
|
|
|
|
+ roleName: '查看者',
|
|
|
|
+ color: '#87CEFA',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ memberId: '1317',
|
|
|
|
+ phone: '',
|
|
|
|
+ email: '',
|
|
|
|
+ memberName: '柯南',
|
|
|
|
+ memberType: 'PROJECT_ADMIN',
|
|
|
|
+ lastTime: 1672038572000,
|
|
|
|
+ roleId: '1607272382833942528',
|
|
|
|
+ roleName: '管理员',
|
|
|
|
+ color: '#87CEFA',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+ //当前登录的用户信息
|
|
|
|
+ let currentUser = {
|
|
|
|
+ userId: user.ID,
|
|
|
|
+ userName: user.CName,
|
|
|
|
+ phone: user.Mobile,
|
|
|
|
+ email: user.Email,
|
|
|
|
+ description: '',
|
|
|
|
+ type: 'FREE',
|
|
|
|
+ };
|
|
|
|
|
|
console.log('-----path-------', path);
|
|
console.log('-----path-------', path);
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
const content = document.getElementById('container');
|
|
const content = document.getElementById('container');
|
|
ZwCloud2D.ZwEditor.ZwInit(content);
|
|
ZwCloud2D.ZwEditor.ZwInit(content);
|
|
-
|
|
|
|
ZwCloud2D.ZwDataProcessor.ZwSetConnectUrl(
|
|
ZwCloud2D.ZwDataProcessor.ZwSetConnectUrl(
|
|
'https://cad.greentech.com.cn',
|
|
'https://cad.greentech.com.cn',
|
|
'wss://cad.greentech.com.cn:5121',
|
|
'wss://cad.greentech.com.cn:5121',
|
|
@@ -22,10 +105,65 @@ const CadDeTail = () => {
|
|
);
|
|
);
|
|
ZwCloud2D.ZwDataProcessor.ZwSetLoadDwg(path);
|
|
ZwCloud2D.ZwDataProcessor.ZwSetLoadDwg(path);
|
|
ZwCloud2D.ZwDataProcessor.ZwLoad();
|
|
ZwCloud2D.ZwDataProcessor.ZwLoad();
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ ZwCloud2D.ZwDataManager.ZwSetCommentData({
|
|
|
|
+ commentList: commentList,
|
|
|
|
+ memberList: memberList,
|
|
|
|
+ user: currentUser,
|
|
|
|
+ });
|
|
|
|
+ }, 1000);
|
|
|
|
+
|
|
|
|
+ // ZwCloud2D.ZwMessageCallback.ZwEvtUpdateCommentData = function (data) {
|
|
|
|
+ // console.log('------------------', data);
|
|
|
|
+ // switch (data.type) {
|
|
|
|
+ // case 'create':
|
|
|
|
+ // // 补充data.data中缺失的参数,保存新增的评论数据\
|
|
|
|
+ // const paramsadd = {
|
|
|
|
+ // project_id,
|
|
|
|
+ // user_name: user.CName,
|
|
|
|
+ // content: data.data.content,
|
|
|
|
+ // doc_id: path,
|
|
|
|
+ // };
|
|
|
|
+ // // addComment(data.data);
|
|
|
|
+ // break;
|
|
|
|
+ // case 'reply':
|
|
|
|
+ // const params = {
|
|
|
|
+ // project_id,
|
|
|
|
+ // user_name: user.CName,
|
|
|
|
+ // content: data.data.content,
|
|
|
|
+ // doc_id: path,
|
|
|
|
+ // parent_id: data.data.parentId,
|
|
|
|
+ // };
|
|
|
|
+ // // 补充data.data中缺失的参数,保存回复的评论数据
|
|
|
|
+ // // replyComment(data.data);
|
|
|
|
+ // break;
|
|
|
|
+ // case 'delete':
|
|
|
|
+ // // 删除评论数据
|
|
|
|
+ // // deleteComment(data.data.id);
|
|
|
|
+ // break;
|
|
|
|
+ // default:
|
|
|
|
+ // break;
|
|
|
|
+ // }
|
|
|
|
+ // };
|
|
}, []);
|
|
}, []);
|
|
|
|
+
|
|
|
|
+ const handleBackClick = () => {
|
|
|
|
+ navigate(-1);
|
|
|
|
+ };
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<PageContent>
|
|
<PageContent>
|
|
- <div>CAD在线审批</div>
|
|
|
|
|
|
+ <div style={{ fontSize: '20px', marginBottom: '10px' }}>
|
|
|
|
+ CAD在线审批
|
|
|
|
+ <Button
|
|
|
|
+ type="primary"
|
|
|
|
+ style={{ float: 'right' }}
|
|
|
|
+ onClick={handleBackClick}
|
|
|
|
+ >
|
|
|
|
+ 返回
|
|
|
|
+ </Button>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<div
|
|
<div
|
|
id="container"
|
|
id="container"
|
|
style={{ width: '100%', height: '80vh' }}
|
|
style={{ width: '100%', height: '80vh' }}
|