|
@@ -1192,6 +1192,8 @@ window.addEventListener('message', function (e) { // 监听 message 事件
|
|
U.MD.D.I.openApplicationJieS("doc", e.data.cid, e.data.stage, e.data.task, e.data.tool)
|
|
U.MD.D.I.openApplicationJieS("doc", e.data.cid, e.data.stage, e.data.task, e.data.tool)
|
|
} else if (e.data.tools && e.data.tools == "3y") {
|
|
} else if (e.data.tools && e.data.tools == "3y") {
|
|
U.MD.D.I.openApplicationYu("mind", e.data.cid, e.data.stage, e.data.task, e.data.tool)
|
|
U.MD.D.I.openApplicationYu("mind", e.data.cid, e.data.stage, e.data.task, e.data.tool)
|
|
|
|
+ } else if (e.data.tools && e.data.tools == "1y") {
|
|
|
|
+ U.MD.D.I.openApplicationYu("whiteboard", e.data.cid, e.data.stage, e.data.task, e.data.tool)
|
|
}
|
|
}
|
|
|
|
|
|
});
|
|
});
|
|
@@ -3823,27 +3825,24 @@ U.MD.D.I.openApplicationYu = function (str, cid, stage, task, tool) {
|
|
if (str == 'doc') {
|
|
if (str == 'doc') {
|
|
U.UF.DL.iframeLoad(_iframe, function () {
|
|
U.UF.DL.iframeLoad(_iframe, function () {
|
|
_iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool, '2');
|
|
_iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool, '2');
|
|
- // _iframe.contentWindow.document.body.appendChild(script1);
|
|
|
|
- // _iframe.contentWindow.document.body.appendChild(script2);
|
|
|
|
- // _iframe.contentWindow.document.body.appendChild(script4);
|
|
|
|
})
|
|
})
|
|
} else if (str == 'mind') {
|
|
} else if (str == 'mind') {
|
|
- U.UF.DL.iframeLoad(_iframe, function () {
|
|
|
|
- // _iframe.contentWindow.document.body.appendChild(script1);
|
|
|
|
- // _iframe.contentWindow.document.body.appendChild(script2);
|
|
|
|
- // _iframe.contentWindow.document.body.appendChild(script4);
|
|
|
|
|
|
+ U.UF.DL.iframeLoad(_iframe, function () {;
|
|
U.MD.D.I.getContents2(cid, stage, task, tool, _userid, '2', _iframe)
|
|
U.MD.D.I.getContents2(cid, stage, task, tool, _userid, '2', _iframe)
|
|
})
|
|
})
|
|
|
|
+ }else if(str == 'whiteboard'){
|
|
|
|
+ U.UF.DL.iframeLoad(_iframe, function () {
|
|
|
|
+ U.MD.D.I.getContents2(cid, stage, task, tool, _userid, '3', _iframe)
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
_iframe.onload = () => {
|
|
_iframe.onload = () => {
|
|
- // _iframe.contentWindow.document.body.appendChild(script1);
|
|
|
|
- // _iframe.contentWindow.document.body.appendChild(script2);
|
|
|
|
- // _iframe.contentWindow.document.body.appendChild(script4);
|
|
|
|
};
|
|
};
|
|
}
|
|
}
|
|
_jie.onclick = async () => {
|
|
_jie.onclick = async () => {
|
|
let text = ''
|
|
let text = ''
|
|
- if (aTool == 6) {
|
|
|
|
|
|
+ if (aTool == 1) {
|
|
|
|
+ text = JSON.stringify(_iframe.contentWindow.h.app.scene.elements)
|
|
|
|
+ }if (aTool == 6) {
|
|
text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
|
|
text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
|
|
} else if (aTool == 3) {
|
|
} else if (aTool == 3) {
|
|
text = await U.MD.D.I.getEditorContent(_iframe);
|
|
text = await U.MD.D.I.getEditorContent(_iframe);
|
|
@@ -3904,9 +3903,13 @@ U.MD.D.I.getContents2 = function (cid, s, task, t, uid, type, iframe) {
|
|
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
|
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
|
if (xmlhttp.response && JSON.parse(xmlhttp.response)[0].length > 0) {
|
|
if (xmlhttp.response && JSON.parse(xmlhttp.response)[0].length > 0) {
|
|
// resolve(res.value[0][0].text);
|
|
// resolve(res.value[0][0].text);
|
|
- iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text).then(function (data) {
|
|
|
|
- $(fileInput).val('');
|
|
|
|
- });
|
|
|
|
|
|
+ if(type == '2'){
|
|
|
|
+ iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text).then(function (data) {
|
|
|
|
+ $(fileInput).val('');
|
|
|
|
+ });
|
|
|
|
+ }else if(type == '3'){
|
|
|
|
+ window.h.app.updateScene({elements:JSON.parse(JSON.parse(xmlhttp.response)[0][0].text)})
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|