|
@@ -423,17 +423,21 @@ window.addEventListener('message', function(e) { // 监听 message 事件
|
|
|
var _formel = document.getElementById("study") || document.getElementById("studyDetail") || document.getElementById("studentStudy");
|
|
|
U.UF.F.windowZooming(_formel);
|
|
|
} else if (e.data.tools && e.data.tools == "1") {
|
|
|
- U.MD.D.I.openApplication("whiteboard")
|
|
|
+ // U.MD.D.I.openApplication("whiteboard")
|
|
|
+ U.MD.D.I.openApplicationJie("whiteboard", e.data.cid, e.data.stage, e.data.task, e.data.tool)
|
|
|
} else if (e.data.tools && e.data.tools == "2") {
|
|
|
U.MD.D.I.openApplication("note")
|
|
|
} else if (e.data.tools && e.data.tools == "3") {
|
|
|
- U.MD.D.I.openApplication("mind")
|
|
|
+ // U.MD.D.I.openApplication("mind")
|
|
|
+ U.MD.D.I.openApplicationJie("mind", e.data.cid, e.data.stage, e.data.task, e.data.tool)
|
|
|
} else if (e.data.tools && e.data.tools == "4") {
|
|
|
U.MD.D.I.openApplication("investigation")
|
|
|
} else if (e.data.tools && e.data.tools == "6") {
|
|
|
- U.MD.D.I.openApplication("doc")
|
|
|
+ // U.MD.D.I.openApplication("doc")
|
|
|
+ U.MD.D.I.openApplicationJie("doc", e.data.cid, e.data.stage, e.data.task, e.data.tool)
|
|
|
} else if (e.data.tools && e.data.tools == "7") {
|
|
|
- U.MD.D.I.openApplication("mindNetwork")
|
|
|
+ // U.MD.D.I.openApplication("mindNetwork")
|
|
|
+ U.MD.D.I.openApplicationJie("mindNetwork", e.data.cid, e.data.stage, e.data.task, e.data.tool)
|
|
|
} else if (e.data.tools && e.data.tools == "8") {
|
|
|
U.MD.D.I.openApplication("library")
|
|
|
} else if (e.data.tools && e.data.tools == "17") {
|
|
@@ -1475,4 +1479,276 @@ U.MD.D.I.openApplication = function(str, obj, info) {
|
|
|
//}
|
|
|
|
|
|
|
|
|
-//#endregion
|
|
|
+//#endregion
|
|
|
+
|
|
|
+
|
|
|
+U.MD.D.I.openApplicationJie = function (str,cid,stage,task,tool) {
|
|
|
+ var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
|
|
|
+ _formdiv, //创建任务栏时同时弹出的窗体元素。
|
|
|
+ _userinfo = US.userInfo, //登录用户信息
|
|
|
+ _userid = US.userInfo.userid //登录用户id
|
|
|
+ let _iframe;
|
|
|
+ var _jie = $$("div", {
|
|
|
+ "style": {
|
|
|
+ "position": "absolute",
|
|
|
+ "bottom": "50px",
|
|
|
+ "right": "50px",
|
|
|
+ "zIndex": "9999",
|
|
|
+ "backgroundColor": "#2268bc",
|
|
|
+ "color": "#fff",
|
|
|
+ "padding": "12px 20px",
|
|
|
+ "cursor": "pointer",
|
|
|
+ "borderRadius": "4px",
|
|
|
+ },
|
|
|
+ "innerHTML": "截图"
|
|
|
+ })
|
|
|
+
|
|
|
+ var _box = $$('div', {
|
|
|
+ "style": {
|
|
|
+ "position": "relative",
|
|
|
+ "width": "100%",
|
|
|
+ "height": "100%",
|
|
|
+ },
|
|
|
+ })
|
|
|
+ switch (str) {
|
|
|
+ case "whiteboard":
|
|
|
+ _iframe = $$("iframe", {
|
|
|
+ "frameborder": "no",
|
|
|
+ "border": "0",
|
|
|
+ "scrolling ": "no",
|
|
|
+ "style": {
|
|
|
+ "cssText": "border:0;width:100%;height:100%"
|
|
|
+ },
|
|
|
+ "src": "https://iwb.cocorobo.cn/"
|
|
|
+ })
|
|
|
+ _box.appendChild(_iframe);
|
|
|
+ _box.appendChild(_jie);
|
|
|
+ _formdiv = new U.UF.UI.form(
|
|
|
+ "电子白板",
|
|
|
+ _box, {
|
|
|
+ "id": "whiteboard",
|
|
|
+ "style": {
|
|
|
+ "width": "90%",
|
|
|
+ "height": "90%",
|
|
|
+ "overflow": 'hidden'
|
|
|
+ },
|
|
|
+ "onresize": function () {}
|
|
|
+ }, {
|
|
|
+ closecallback: function () {}
|
|
|
+ }, {
|
|
|
+ "style": {
|
|
|
+ "height": "36px"
|
|
|
+ }
|
|
|
+ }).form; //创建窗体
|
|
|
+ _taskbar = {
|
|
|
+ "id": str + _formdiv.id,
|
|
|
+ "style": {
|
|
|
+ "backgroundImage": "url(/img/icon/whiteBoard.png)"
|
|
|
+ },
|
|
|
+ "name": "电子白板",
|
|
|
+ "forms": _formdiv,
|
|
|
+ "click": function () {
|
|
|
+ U.MD.D.I.openApplication(str, obj, info);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "mind":
|
|
|
+ _iframe = $$("iframe", {
|
|
|
+ "frameborder": "no",
|
|
|
+ "border": "0",
|
|
|
+ "scrolling ": "no",
|
|
|
+ "style": {
|
|
|
+ "cssText": "border:0;width:100%;height:100%"
|
|
|
+ },
|
|
|
+ "src": "/kityminder-editor/dist/index.html"
|
|
|
+ })
|
|
|
+ _box.appendChild(_iframe);
|
|
|
+ _box.appendChild(_jie);
|
|
|
+ _formdiv = new U.UF.UI.form(
|
|
|
+ "思维导图",
|
|
|
+ _box, { //"/jsmind/example/demo.html"
|
|
|
+ "id": "mind",
|
|
|
+ "style": {
|
|
|
+ "width": "90%",
|
|
|
+ "height": "90%",
|
|
|
+ "overflow": 'hidden'
|
|
|
+ },
|
|
|
+ "onresize": function () {}
|
|
|
+ }, {
|
|
|
+ closecallback: function () {}
|
|
|
+ }, {
|
|
|
+ "style": {
|
|
|
+ "height": "36px"
|
|
|
+ }
|
|
|
+ }).form; //创建窗体
|
|
|
+ _taskbar = {
|
|
|
+ "id": str + _formdiv.id,
|
|
|
+ "style": {
|
|
|
+ "backgroundImage": "url(/img/icon/mindMapping.png)"
|
|
|
+ },
|
|
|
+ "name": "思维导图",
|
|
|
+ "forms": _formdiv,
|
|
|
+ "click": function () {
|
|
|
+ U.MD.D.I.openApplication(str, obj, info);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "doc":
|
|
|
+ _iframe = $$("iframe", {
|
|
|
+ "frameborder": "no",
|
|
|
+ "border": "0",
|
|
|
+ "scrolling ": "no",
|
|
|
+ "style": {
|
|
|
+ "cssText": "border:0;width:100%;height:100%"
|
|
|
+ },
|
|
|
+ "src": "/Office/Word/WordEditArea.htm"
|
|
|
+ })
|
|
|
+ _box.appendChild(_iframe);
|
|
|
+ _box.appendChild(_jie);
|
|
|
+ _formdiv = new U.UF.UI.form(
|
|
|
+ "协同文档",
|
|
|
+ _box, {
|
|
|
+ "id": "doc",
|
|
|
+ "style": {
|
|
|
+ "width": "90%",
|
|
|
+ "height": "90%",
|
|
|
+ "overflow": 'hidden'
|
|
|
+ },
|
|
|
+ "onresize": function () {}
|
|
|
+ }, {
|
|
|
+ closecallback: function () {}
|
|
|
+ }, {
|
|
|
+ "style": {
|
|
|
+ "height": "36px"
|
|
|
+ }
|
|
|
+ }).form; //创建窗体
|
|
|
+
|
|
|
+ U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
|
|
|
+ $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
|
|
|
+ })
|
|
|
+ _taskbar = {
|
|
|
+ "id": str + _formdiv.id,
|
|
|
+ "style": {
|
|
|
+ "backgroundImage": "url(/img/icon/doc.png)"
|
|
|
+ },
|
|
|
+ "name": "协同文档",
|
|
|
+ "forms": _formdiv,
|
|
|
+ "click": function () {
|
|
|
+ U.MD.D.I.openApplication(str, obj, info);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "mindNetwork": //好友打开
|
|
|
+ _iframe = $$("iframe", {
|
|
|
+ "webkitallowfullscreen": "",
|
|
|
+ "mozallowfullscreen": "",
|
|
|
+ "allowfullscreen": "",
|
|
|
+ "frameborder": "no",
|
|
|
+ "border": "0",
|
|
|
+ "scrolling ": "no",
|
|
|
+ "style": {
|
|
|
+ "cssText": "border:0; width:100%; height:100%;"
|
|
|
+ },
|
|
|
+ "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid?userid=" + _userid
|
|
|
+ })
|
|
|
+ _box.appendChild(_iframe);
|
|
|
+ _box.appendChild(_jie);
|
|
|
+ _formdiv = new U.UF.UI.form(
|
|
|
+ "思维网格",
|
|
|
+ _box, {
|
|
|
+ "id": "mindNetwork",
|
|
|
+ "style": {
|
|
|
+ "width": "90%",
|
|
|
+ "height": "90%",
|
|
|
+ "overflow": 'hidden'
|
|
|
+ },
|
|
|
+ "onresize": function () {}
|
|
|
+ }, {
|
|
|
+ closecallback: function () {}
|
|
|
+ }, {
|
|
|
+ "style": {
|
|
|
+ "height": "36px"
|
|
|
+ }
|
|
|
+ }).form; //创建窗体
|
|
|
+ _taskbar = {
|
|
|
+ "id": str + _formdiv.id,
|
|
|
+ "style": {
|
|
|
+ "backgroundImage": "url(/img/icon/mindNetwork.png)"
|
|
|
+ },
|
|
|
+ "name": "思维网格",
|
|
|
+ "forms": _formdiv,
|
|
|
+ "click": function () {
|
|
|
+ U.MD.D.I.openApplication(str, obj, info);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ const script1 = document.createElement("script");
|
|
|
+ script1.type = "text/javascript";
|
|
|
+ script1.src =
|
|
|
+ "https://pbl.cocorobo.cn/pbl-student-table/dist/js/jquery-3.6.0.min.js";
|
|
|
+ const script2 = document.createElement("script");
|
|
|
+ script2.type = "text/javascript";
|
|
|
+ script2.src =
|
|
|
+ "https://pbl.cocorobo.cn/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
|
|
|
+ const script3 = document.createElement("script");
|
|
|
+ script3.type = "text/javascript";
|
|
|
+ script3.src = "https://html2canvas.hertzen.com/dist/js/html2canvas.min.js";
|
|
|
+ const script4 = document.createElement("script");
|
|
|
+ script4.type = "text/javascript";
|
|
|
+ script4.src = "https://pbl.cocorobo.cn/pbl-student-table/dist/js/jietu2.js";
|
|
|
+
|
|
|
+ if (_iframe) {
|
|
|
+ _iframe.onload = () => {
|
|
|
+ _iframe.contentWindow.document.body.appendChild(script1);
|
|
|
+ _iframe.contentWindow.document.body.appendChild(script2);
|
|
|
+ // _iframe.contentWindow.document.body.appendChild(script3);
|
|
|
+ _iframe.contentWindow.document.body.appendChild(script4);
|
|
|
+ };
|
|
|
+ _jie.onclick = () => {
|
|
|
+ var _ajs = _iframe.contentWindow.document.createElement("script");
|
|
|
+ _ajs.type = "text/javascript";
|
|
|
+ _ajs.innerHTML =
|
|
|
+ 'var _js = document.createElement("script");\n' +
|
|
|
+ '_js.type="text/javascript";\n' +
|
|
|
+ '_js.src="https://html2canvas.hertzen.com/dist/html2canvas.min.js";\n' +
|
|
|
+ "_js.onload = function(){\n" +
|
|
|
+ " html2canvas(document.body).then(canvas => {\n" +
|
|
|
+ ' var base64Url = canvas.toDataURL("image/png");\n' +
|
|
|
+ 'var base64 = "<img src=" + base64Url + " />"\n' +
|
|
|
+ 'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
|
|
|
+ "beforeUpload_shishi(file," +
|
|
|
+ "'" +
|
|
|
+ _userid +
|
|
|
+ "'" +
|
|
|
+ ", " +
|
|
|
+ "'" +
|
|
|
+ cid +
|
|
|
+ "'" +
|
|
|
+ ", " +
|
|
|
+ "'" +
|
|
|
+ stage +
|
|
|
+ "'" +
|
|
|
+ ", " +
|
|
|
+ "'" +
|
|
|
+ task +
|
|
|
+ "'" +
|
|
|
+ ", " +
|
|
|
+ "'" +
|
|
|
+ tool +
|
|
|
+ "'" +
|
|
|
+ ")\n" +
|
|
|
+ " });\n" +
|
|
|
+ "}\n" +
|
|
|
+ "document.head.appendChild(_js);\n";
|
|
|
+ _iframe.contentWindow.document.head.appendChild(_ajs);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //U.MD.D.I.openClick(str);
|
|
|
+ //如果有任务栏信息
|
|
|
+ if (_taskbar) {
|
|
|
+ U.MD.D.T.taskbar(_taskbar); //创建任务处理
|
|
|
+ }
|
|
|
+
|
|
|
+}
|