lsc 1 year ago
parent
commit
e8dadcb0f0
1 changed files with 2777 additions and 35 deletions
  1. 2777 35
      js/gm/DeskTop.js

+ 2777 - 35
js/gm/DeskTop.js

@@ -135,9 +135,10 @@ U.MD.D.I.GMteacherDeskIcon = [
     { "Name": "学生管理", "Url": "studentGM", "style": { "cssText": "background-image:url(/img/icon/gm/student.png)" } },
     { "Name": "学生评价", "Url": "evaluateGM", "style": { "cssText": "background-image:url(/img/icon/gm/evaluate.png)" } },
     { "Name": "班级管理", "Url": "classGM", "style": { "cssText": "background-image:url(/img/icon/gm/class.png)" } },
-    { "Name": "我的资料", "Url": "dataGM", "style": { "cssText": "background-image:url(/img/icon/gm/data.png)" } },
+    // { "Name": "我的资料", "Url": "dataGM", "style": { "cssText": "background-image:url(/img/icon/gm/data.png)" } },
     { "Name": "素材库", "Url": "meterialGM", "style": { "cssText": "background-image:url(/img/icon/gm/material.png)" } },
-    { "Name": "消息通知", "Url": "messageGM", "style": { "cssText": "background-image:url(/img/icon/gm/message.png)" } },
+    // { "Name": "消息通知", "Url": "messageGM", "style": { "cssText": "background-image:url(/img/icon/gm/message.png)" } },
+    { "Name": "案例征集", "Url": "gpbl", "style": { "cssText": "background-image:url(/img/icon/gm/gpbl.png)" } },
 ];
 
 U.MD.D.I.GMorganizerDeskIcon = [
@@ -149,19 +150,19 @@ U.MD.D.I.GMorganizerDeskIcon = [
     { "Name": "项目进展", "Url": "caseGM", "style": { "cssText": "background-image:url(/img/icon/gm/case.png)" } },
     { "Name": "学校管理", "Url": "schoolGM", "style": { "cssText": "background-image:url(/img/icon/gm/school.png)" } },
     { "Name": "教师管理", "Url": "teacherGM", "style": { "cssText": "background-image:url(/img/icon/gm/teacher.png)" } },
-    { "Name": "我的资料", "Url": "dataGM", "style": { "cssText": "background-image:url(/img/icon/gm/data.png)" } },
+    // { "Name": "我的资料", "Url": "dataGM", "style": { "cssText": "background-image:url(/img/icon/gm/data.png)" } },
     { "Name": "素材库", "Url": "meterialGM", "style": { "cssText": "background-image:url(/img/icon/gm/material.png)" } },
     { "Name": "项目审核", "Url": "examineGM", "style": { "cssText": "background-image:url(/img/icon/gm/examine.png)" } },
-    { "Name": "消息通知", "Url": "messageGM", "style": { "cssText": "background-image:url(/img/icon/gm/message.png)" } },
+    // { "Name": "消息通知", "Url": "messageGM", "style": { "cssText": "background-image:url(/img/icon/gm/message.png)" } },
     { "Name": "案例征集", "Url": "gpbl", "style": { "cssText": "background-image:url(/img/icon/gm/gpbl.png)" } },
 ];
 
 U.MD.D.I.GMstudentDeskIcon = [
     { "Name": "学习中心", "Url": "studyGM", "style": { "cssText": "background-image:url(/img/icon/gm/learning.png)" } },
     { "Name": "我的评价", "Url": "evaluateSGM", "style": { "cssText": "background-image:url(/img/icon/gm/evaluate.png)" } },
-    { "Name": "我的资料", "Url": "dataGM", "style": { "cssText": "background-image:url(/img/icon/gm/data.png)" } },
+    // { "Name": "我的资料", "Url": "dataGM", "style": { "cssText": "background-image:url(/img/icon/gm/data.png)" } },
     { "Name": "素材库", "Url": "meterialGM", "style": { "cssText": "background-image:url(/img/icon/gm/material.png)" } },
-    { "Name": "消息通知", "Url": "messageGM", "style": { "cssText": "background-image:url(/img/icon/gm/message.png)" } },
+    // { "Name": "消息通知", "Url": "messageGM", "style": { "cssText": "background-image:url(/img/icon/gm/message.png)" } },
 ];
 
 U.MD.D.I.teacherDeskIcon = [
@@ -1940,7 +1941,7 @@ U.MD.D.I.openApplication = function (str, obj, info) {
         case "projectGM": //项目管理
             _formdiv = new U.UF.UI.form(
                 "项目管理",
-                $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/courseGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
+                $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/course?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
                 "id": "projectGM",
                 "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
                 "onresize": function () { }
@@ -1954,7 +1955,7 @@ U.MD.D.I.openApplication = function (str, obj, info) {
         case "studyGM"://学习中心
             _formdiv = new U.UF.UI.form(
                 "学习中心",
-                $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/indexGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&tType=" + _type + "&cid=" + _classId + "&screenType=" + _TscreenType }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
+                $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&tType=" + _type + "&cid=" + _classId + "&screenType=" + _TscreenType }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
                 "id": "study",
                 "style": { "width": "100%", "height": "100%", "overflow": 'hidden' },
                 "onresize": function () { }
@@ -2318,6 +2319,7 @@ U.MD.D.I.openApplication = function (str, obj, info) {
 //#endregion
 
 
+
 U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
     var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
         _formdiv, //创建任务栏时同时弹出的窗体元素。
@@ -2348,15 +2350,14 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
     //  _loading.id = "";
     let _lchild = document.createElement('div')
     let _limg = document.createElement('img')
-    _limg.src = 'https://pbl.cocorobo.cn/pbl-student-table/dist/js/loading.gif'
+    _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
     _limg.style = "width: 26px;margin-right: 10px;"
     _lchild.appendChild(_limg)
     let _lspan = document.createElement('span')
     _lspan.innerHTML = "上传中..."
     _lchild.appendChild(_lspan)
-    _lchild.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;display:flex;align-items:center;"
+    _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
     _loading.appendChild(_lchild)
-
     var _box = $$('div', {
         "style": {
             "position": "relative",
@@ -2365,7 +2366,7 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
         },
     })
     _box.appendChild(_loading)
-    _box.id = str + '_loadLi'
+    _box.id = str + '_loadLi_Jie' + cid + stage + task + tool + _userid
     switch (str) {
         case "whiteboard":
             aTool = 1;
@@ -2383,7 +2384,7 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
             _formdiv = new U.UF.UI.form(
                 "电子白板",
                 _box, {
-                "id": "whiteboard",
+                "id": "whiteboard" + cid + stage + task + tool,
                 "style": {
                     "width": "90%",
                     "height": "90%",
@@ -2425,7 +2426,7 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
             _formdiv = new U.UF.UI.form(
                 "思维导图",
                 _box, { //"/jsmind/example/demo.html" 
-                "id": "mind",
+                "id": "mind" + cid + stage + task + tool,
                 "style": {
                     "width": "90%",
                     "height": "90%",
@@ -2450,8 +2451,6 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
                     U.MD.D.I.openApplication(str, obj, info);
                 }
             }
-            // let test = window.open("https://cloud.cocorobo.cn/kityminder-editor/dist/index.html", "思维导图", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0,  resizable=0, location=0, status=no");
-            // test.location.reload;
             break;
         case "MindMap":
             aTool = 3;
@@ -2469,7 +2468,7 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
             _formdiv = new U.UF.UI.form(
                 "思维导图",
                 _box, { //"/jsmind/example/demo.html" 
-                "id": "mind",
+                "id": "mind" + cid + stage + task + tool,
                 "style": {
                     "width": "90%",
                     "height": "90%",
@@ -2511,7 +2510,7 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
             _formdiv = new U.UF.UI.form(
                 "协同文档",
                 _box, {
-                "id": "doc",
+                "id": "doc" + cid + stage + task + tool,
                 "style": {
                     "width": "90%",
                     "height": "90%",
@@ -2560,7 +2559,7 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
             _formdiv = new U.UF.UI.form(
                 "思维网格",
                 _box, {
-                "id": "mindNetwork",
+                "id": "mindNetwork" + cid + stage + task + tool,
                 "style": {
                     "width": "90%",
                     "height": "90%",
@@ -2602,9 +2601,9 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
             _box.appendChild(_iframe);
             _box.appendChild(_jie);
             _formdiv = new U.UF.UI.form(
-                "课程设计",
+                "项目设计",
                 _box, {
-                "id": "courseDesign",
+                "id": "courseDesign" + cid + stage + task + tool,
                 "style": {
                     "width": "90%",
                     "height": "90%",
@@ -2623,7 +2622,7 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
                 "style": {
                     "backgroundImage": "url(/img/icon/courseDesign.png)"
                 },
-                "name": "课程设计",
+                "name": "项目设计",
                 "forms": _formdiv,
                 "click": function () {
                     U.MD.D.I.openApplication(str, obj, info);
@@ -2633,29 +2632,36 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
     }
     const script1 = document.createElement("script");
     script1.type = "text/javascript";
-    script1.src =
-        US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
+    // script1.src = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
+    script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
     const script2 = document.createElement("script");
     script2.type = "text/javascript";
-    script2.src =
-        US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
+    // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
+    script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
     const script3 = document.createElement("script");
     script3.type = "text/javascript";
     script3.charset = "UTF-8";
     script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
     const script4 = document.createElement("script");
     script4.type = "text/javascript";
-    script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu2.js";
+    // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu2.js";
+    script4.src = "https://cloud.cocorobo.cn/js/Common/jietu2.js";
 
     if (_iframe) {
         if (str == 'doc') {
-            U.UF.DL.iframeLoad(_iframe, function () {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
                 _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool);
                 _iframe.contentWindow.document.body.appendChild(script1);
                 _iframe.contentWindow.document.body.appendChild(script2);
                 // _iframe.contentWindow.document.body.appendChild(script3);
                 _iframe.contentWindow.document.body.appendChild(script4);
             })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
         } else if (str == 'courseDesign') {
             U.UF.DL.iframeLoad(_iframe, function () {
                 // _iframe.contentWindow.U.MD.O.W.load();
@@ -2663,6 +2669,33 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
                 _iframe.contentWindow.document.body.appendChild(script2);
                 _iframe.contentWindow.document.body.appendChild(script4);
             })
+        } else if (str == 'mind') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = 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.MD.D.I.getContent(cid, stage, task, tool, _userid, '2', _iframe)
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'whiteboard') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = _iframe.onload = () => {
+                _iframe.contentWindow.document.body.appendChild(script1);
+                _iframe.contentWindow.document.body.appendChild(script2);
+                _iframe.contentWindow.document.body.appendChild(script4);
+                U.MD.D.I.getContent(cid, stage, task, tool, _userid, '3', _iframe)
+            };
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
         } else {
             _iframe.onload = () => {
                 _iframe.contentWindow.document.body.appendChild(script1);
@@ -2671,11 +2704,16 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
                 _iframe.contentWindow.document.body.appendChild(script4);
             };
         }
-        _jie.onclick = () => {
+        _jie.onclick = async () => {
             let text = ''
-            if(aTool == 6){
+            if (aTool == 1) {
+                text = JSON.stringify(_iframe.contentWindow.h.app.scene.elements)
+            } else if (aTool == 6) {
                 text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
+            } else if (aTool == 3) {
+                text = await U.MD.D.I.getEditorContent(_iframe);
             }
+
             _loading.style.display = 'flex'
             console.log(_loading);
             var _ajs = _iframe.contentWindow.document.createElement("script");
@@ -2689,7 +2727,7 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
                 "_js.onload = function(){\n" +
                 ' var a = document.getElementsByTagName("img")\n' +
                 ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
-                " html2canvas(document.body,{allowTaint: true,useCORS: true}).then(canvas => {\n" +
+                " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).then(canvas => {\n" +
                 '  var base64Url = canvas.toDataURL("image/png");\n' +
                 'var base64 = "<img src=" + base64Url + " />"\n' +
                 'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
@@ -2715,7 +2753,7 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
                 "'" +
                 ", " +
                 "'" +
-                str + '_loadLi' +
+                (str + '_loadLi_Jie' + cid + stage + task + tool + _userid) +
                 "'" +
                 ", " +
                 "'" +
@@ -2735,8 +2773,2712 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
 
     //U.MD.D.I.openClick(str);
     //如果有任务栏信息
-    if (_taskbar) {
-        U.MD.D.T.taskbar(_taskbar); //创建任务处理
-    }
+    // if (_taskbar) {
+    //     U.MD.D.T.taskbar(_taskbar); //创建任务处理
+    // }
+
+}
+U.MD.D.I.openApplicationJieE = function (str, cid, stage, task, tool) {
+    var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
+        _formdiv, //创建任务栏时同时弹出的窗体元素。
+        _userinfo = US.userInfo, //登录用户信息
+        _userid = US.userInfo.userid //登录用户id
+    let _iframe;
+    let _cid = cid,
+        _stage = stage,
+        _task = task,
+        _tool = tool;
+    var _jie = $$("div", {
+        "style": {
+            "position": "absolute",
+            "bottom": "50px",
+            "right": "50px",
+            "zIndex": "9999",
+            "backgroundColor": "#2268bc",
+            "color": "#fff",
+            "padding": "12px 20px",
+            "cursor": "pointer",
+            "borderRadius": "4px",
+        },
+        "innerHTML": "提交作业"
+    })
+    let aTool = ''
+    let _loading = document.createElement('div')
+    _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
+    //  _loading.id = "";
+    let _lchild = document.createElement('div')
+    let _limg = document.createElement('img')
+    _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
+    _limg.style = "width: 26px;margin-right: 10px;"
+    _lchild.appendChild(_limg)
+    let _lspan = document.createElement('span')
+    _lspan.innerHTML = "上传中..."
+    _lchild.appendChild(_lspan)
+    _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
+    _loading.appendChild(_lchild)
+    var _box = $$('div', {
+        "style": {
+            "position": "relative",
+            "width": "100%",
+            "height": "100%",
+        },
+    })
+    _box.appendChild(_loading)
+    _box.id = str + '_loadLi_JieE' + cid + stage + task + tool + _userid
+    switch (str) {
+        case "whiteboard":
+            aTool = 1;
+            _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" + cid + stage + task + tool,
+                "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":
+            aTool = 3;
+            _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" + cid + stage + task + tool,
+                "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 "MindMap":
+            aTool = 3;
+            _iframe = $$("iframe", {
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0;width:100%;height:100%"
+                },
+                "src": "//cloud.cocorobo.cn/mind/"
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "思维导图",
+                _box, { //"/jsmind/example/demo.html" 
+                "id": "mind" + cid + stage + task + tool,
+                "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":
+            aTool = 6;
+            _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" + cid + stage + task + tool,
+                "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(cid, stage, task, tool);
+            })
+            _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": //好友打开
+            aTool = 7;
+            _iframe = $$("iframe", {
+                "webkitallowfullscreen": "",
+                "mozallowfullscreen": "",
+                "allowfullscreen": "",
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0; width:100%; height:100%;"
+                },
+                "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/Grid?userid=" + _userid
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "思维网格",
+                _box, {
+                "id": "mindNetwork" + cid + stage + task + tool,
+                "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;
+        case "courseDesign":
+            _iframe = $$("iframe", {
+                "webkitallowfullscreen": "",
+                "mozallowfullscreen": "",
+                "allowfullscreen": "",
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0; width:100%; height:100%;"
+                },
+                "src": "/course-design-vue"
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "项目设计",
+                _box, {
+                "id": "courseDesign" + cid + stage + task + tool,
+                "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/courseDesign.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 = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
+    script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
+    const script2 = document.createElement("script");
+    script2.type = "text/javascript";
+    // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
+    script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
+    const script3 = document.createElement("script");
+    script3.type = "text/javascript";
+    script3.charset = "UTF-8";
+    script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
+    const script4 = document.createElement("script");
+    script4.type = "text/javascript";
+    // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu2.js";
+    script4.src = window.origin + "/js/Common/jietu2E.js";
+
+    if (_iframe) {
+        if (str == 'doc') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
+                _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool);
+                _iframe.contentWindow.document.body.appendChild(script1);
+                _iframe.contentWindow.document.body.appendChild(script2);
+                // _iframe.contentWindow.document.body.appendChild(script3);
+                _iframe.contentWindow.document.body.appendChild(script4);
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'courseDesign') {
+            U.UF.DL.iframeLoad(_iframe, function () {
+                // _iframe.contentWindow.U.MD.O.W.load();
+                // _iframe.contentWindow.document.body.appendChild(script1);
+                _iframe.contentWindow.document.body.appendChild(script2);
+                _iframe.contentWindow.document.body.appendChild(script4);
+            })
+        } else if (str == 'mind') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = 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.MD.D.I.getContent(cid, stage, task, tool, _userid, '2', _iframe)
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'whiteboard') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = _iframe.onload = () => {
+                _iframe.contentWindow.document.body.appendChild(script1);
+                _iframe.contentWindow.document.body.appendChild(script2);
+                _iframe.contentWindow.document.body.appendChild(script4);
+                U.MD.D.I.getContent(cid, stage, task, tool, _userid, '3', _iframe)
+            };
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else {
+            _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 = async () => {
+            let text = ''
+            if (aTool == 1) {
+                text = JSON.stringify(_iframe.contentWindow.h.app.scene.elements)
+            } else if (aTool == 6) {
+                text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
+            } else if (aTool == 3) {
+                text = await U.MD.D.I.getEditorContent(_iframe);
+            }
+
+            _loading.style.display = 'flex'
+            console.log(_loading);
+            var _ajs = _iframe.contentWindow.document.createElement("script");
+            _ajs.type = "text/javascript";
+            _ajs.innerHTML =
+                // 'console.log(' + _loading + ');\n' +
+                'var _js = document.createElement("script");\n' +
+                '_js.type="text/javascript";\n' +
+                '_js.charset="UTF-8";\n' +
+                '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
+                "_js.onload = function(){\n" +
+                ' var a = document.getElementsByTagName("img")\n' +
+                ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
+                " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).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 +
+                "'" +
+                ", " +
+                "'" +
+                (str + '_loadLi_JieE' + cid + stage + task + tool + _userid) +
+                "'" +
+                ", " +
+                "'" +
+                aTool +
+                "'" +
+                ", " +
+                "`" +
+                text +
+                "`" +
+                ")\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); //创建任务处理
+    // }
+
+}
+U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, student) {
+    var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
+        _formdiv, //创建任务栏时同时弹出的窗体元素。
+        _userid = student.userid, //登录用户id
+        _username = student.student //用户名字
+    let _iframe;
+    let _cid = cid,
+        _stage = stage,
+        _task = task,
+        _tool = tool;
+    var _jie = $$("div", {
+        "style": {
+            "position": "absolute",
+            "bottom": "50px",
+            "right": "50px",
+            "zIndex": "9999",
+            "backgroundColor": "#2268bc",
+            "color": "#fff",
+            "padding": "12px 20px",
+            "cursor": "pointer",
+            "borderRadius": "4px",
+        },
+        "innerHTML": "提交作业"
+    })
+    let aTool = ''
+    let _loading = document.createElement('div')
+    _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
+    //  _loading.id = "";
+    let _lchild = document.createElement('div')
+    let _limg = document.createElement('img')
+    _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
+    _limg.style = "width: 26px;margin-right: 10px;"
+    _lchild.appendChild(_limg)
+    let _lspan = document.createElement('span')
+    _lspan.innerHTML = "上传中..."
+    _lchild.appendChild(_lspan)
+    _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
+    _loading.appendChild(_lchild)
+    var _box = $$('div', {
+        "style": {
+            "position": "relative",
+            "width": "100%",
+            "height": "100%",
+        },
+    })
+    _box.appendChild(_loading)
+    _box.id = str + '_loadLi_JieTeacher' + cid + stage + task + tool + _userid
+    switch (str) {
+        case "whiteboard":
+            aTool = 1;
+            _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(
+                "电子白板-" + _username,
+                _box, {
+                "id": "whiteboard" + cid + stage + task + tool + _userid,
+                "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":
+            aTool = 3;
+            _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(
+                "思维导图-" + _username,
+                _box, { //"/jsmind/example/demo.html" 
+                "id": "mind" + cid + stage + task + tool + _userid,
+                "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 "MindMap":
+            aTool = 3;
+            _iframe = $$("iframe", {
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0;width:100%;height:100%"
+                },
+                "src": "//cloud.cocorobo.cn/mind/"
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "思维导图-" + _username,
+                _box, { //"/jsmind/example/demo.html" 
+                "id": "mind" + cid + stage + task + tool + _userid,
+                "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":
+            aTool = 6;
+            _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(
+                "协同文档-" + _username,
+                _box, {
+                "id": "doc" + cid + stage + task + tool + _userid,
+                "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(cid, stage, task, tool);
+            })
+            _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": //好友打开
+            aTool = 7;
+            _iframe = $$("iframe", {
+                "webkitallowfullscreen": "",
+                "mozallowfullscreen": "",
+                "allowfullscreen": "",
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0; width:100%; height:100%;"
+                },
+                "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/Grid?userid=" + _userid
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "思维网格-" + _username,
+                _box, {
+                "id": "mindNetwork" + cid + stage + task + tool + _userid,
+                "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;
+        case "courseDesign":
+            _iframe = $$("iframe", {
+                "webkitallowfullscreen": "",
+                "mozallowfullscreen": "",
+                "allowfullscreen": "",
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0; width:100%; height:100%;"
+                },
+                "src": "/course-design-vue"
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "项目设计-" + _username,
+                _box, {
+                "id": "courseDesign" + cid + stage + task + tool + _userid,
+                "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/courseDesign.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 = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
+    script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
+    const script2 = document.createElement("script");
+    script2.type = "text/javascript";
+    // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
+    script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
+    const script3 = document.createElement("script");
+    script3.type = "text/javascript";
+    script3.charset = "UTF-8";
+    script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
+    const script4 = document.createElement("script");
+    script4.type = "text/javascript";
+    // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu2.js";
+    script4.src = "https://cloud.cocorobo.cn/js/Common/jietu2.js";
+
+    if (_iframe) {
+        if (str == 'doc') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
+                _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool);
+                _iframe.contentWindow.document.body.appendChild(script1);
+                _iframe.contentWindow.document.body.appendChild(script2);
+                // _iframe.contentWindow.document.body.appendChild(script3);
+                _iframe.contentWindow.document.body.appendChild(script4);
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'courseDesign') {
+            U.UF.DL.iframeLoad(_iframe, function () {
+                // _iframe.contentWindow.U.MD.O.W.load();
+                // _iframe.contentWindow.document.body.appendChild(script1);
+                _iframe.contentWindow.document.body.appendChild(script2);
+                _iframe.contentWindow.document.body.appendChild(script4);
+            })
+        } else if (str == 'mind') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = 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.MD.D.I.getContent(cid, stage, task, tool, _userid, '2', _iframe)
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'whiteboard') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = _iframe.onload = () => {
+                _iframe.contentWindow.document.body.appendChild(script1);
+                _iframe.contentWindow.document.body.appendChild(script2);
+                _iframe.contentWindow.document.body.appendChild(script4);
+                U.MD.D.I.getContent(cid, stage, task, tool, _userid, '3', _iframe)
+            };
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else {
+            _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 = async () => {
+            let text = ''
+            if (aTool == 1) {
+                text = JSON.stringify(_iframe.contentWindow.h.app.scene.elements)
+            } else if (aTool == 6) {
+                text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
+            } else if (aTool == 3) {
+                text = await U.MD.D.I.getEditorContent(_iframe);
+            }
+
+            _loading.style.display = 'flex'
+            console.log(_loading);
+            var _ajs = _iframe.contentWindow.document.createElement("script");
+            _ajs.type = "text/javascript";
+            _ajs.innerHTML =
+                // 'console.log(' + _loading + ');\n' +
+                'var _js = document.createElement("script");\n' +
+                '_js.type="text/javascript";\n' +
+                '_js.charset="UTF-8";\n' +
+                '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
+                "_js.onload = function(){\n" +
+                ' var a = document.getElementsByTagName("img")\n' +
+                ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
+                " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).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 +
+                "'" +
+                ", " +
+                "'" +
+                (str + '_loadLi_JieTeacher' + cid + stage + task + tool + _userid) +
+                "'" +
+                ", " +
+                "'" +
+                aTool +
+                "'" +
+                ", " +
+                "`" +
+                text +
+                "`" +
+                ")\n" +
+                " });\n" +
+                "}\n" +
+                "document.head.appendChild(_js);\n";
+            _iframe.contentWindow.document.head.appendChild(_ajs);
+        }
+    }
+}
+
+U.MD.D.I.openApplicationJieTeacherE = function (str, cid, stage, task, tool, student) {
+    var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
+        _formdiv, //创建任务栏时同时弹出的窗体元素。
+        _userid = student.userid, //登录用户id
+        _username = student.student //用户名字
+    let _iframe;
+    let _cid = cid,
+        _stage = stage,
+        _task = task,
+        _tool = tool;
+    var _jie = $$("div", {
+        "style": {
+            "position": "absolute",
+            "bottom": "50px",
+            "right": "50px",
+            "zIndex": "9999",
+            "backgroundColor": "#2268bc",
+            "color": "#fff",
+            "padding": "12px 20px",
+            "cursor": "pointer",
+            "borderRadius": "4px",
+        },
+        "innerHTML": "提交作业"
+    })
+    let aTool = ''
+    let _loading = document.createElement('div')
+    _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
+    //  _loading.id = "";
+    let _lchild = document.createElement('div')
+    let _limg = document.createElement('img')
+    _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
+    _limg.style = "width: 26px;margin-right: 10px;"
+    _lchild.appendChild(_limg)
+    let _lspan = document.createElement('span')
+    _lspan.innerHTML = "上传中..."
+    _lchild.appendChild(_lspan)
+    _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
+    _loading.appendChild(_lchild)
+    var _box = $$('div', {
+        "style": {
+            "position": "relative",
+            "width": "100%",
+            "height": "100%",
+        },
+    })
+    _box.appendChild(_loading)
+    _box.id = str + '_loadLi_JieTeacherE' + cid + stage + task + tool + _userid
+    switch (str) {
+        case "whiteboard":
+            aTool = 1;
+            _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(
+                "电子白板-" + _username,
+                _box, {
+                "id": "whiteboard" + cid + stage + task + tool + _userid,
+                "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":
+            aTool = 3;
+            _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(
+                "思维导图-" + _username,
+                _box, { //"/jsmind/example/demo.html" 
+                "id": "mind" + cid + stage + task + tool + _userid,
+                "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 "MindMap":
+            aTool = 3;
+            _iframe = $$("iframe", {
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0;width:100%;height:100%"
+                },
+                "src": "//cloud.cocorobo.cn/mind/"
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "思维导图-" + _username,
+                _box, { //"/jsmind/example/demo.html" 
+                "id": "mind" + cid + stage + task + tool + _userid,
+                "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":
+            aTool = 6;
+            _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(
+                "协同文档-" + _username,
+                _box, {
+                "id": "doc" + cid + stage + task + tool + _userid,
+                "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(cid, stage, task, tool);
+            })
+            _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": //好友打开
+            aTool = 7;
+            _iframe = $$("iframe", {
+                "webkitallowfullscreen": "",
+                "mozallowfullscreen": "",
+                "allowfullscreen": "",
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0; width:100%; height:100%;"
+                },
+                "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/Grid?userid=" + _userid
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "思维网格-" + _username,
+                _box, {
+                "id": "mindNetwork" + cid + stage + task + tool + _userid,
+                "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;
+        case "courseDesign":
+            _iframe = $$("iframe", {
+                "webkitallowfullscreen": "",
+                "mozallowfullscreen": "",
+                "allowfullscreen": "",
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0; width:100%; height:100%;"
+                },
+                "src": "/course-design-vue"
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "项目设计-" + _username,
+                _box, {
+                "id": "courseDesign" + cid + stage + task + tool + _userid,
+                "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/courseDesign.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 = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
+    script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
+    const script2 = document.createElement("script");
+    script2.type = "text/javascript";
+    // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
+    script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
+    const script3 = document.createElement("script");
+    script3.type = "text/javascript";
+    script3.charset = "UTF-8";
+    script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
+    const script4 = document.createElement("script");
+    script4.type = "text/javascript";
+    // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu2.js";
+    script4.src = window.origin + "/js/Common/jietu2E.js";
+
+    if (_iframe) {
+        if (str == 'doc') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
+                _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool);
+                _iframe.contentWindow.document.body.appendChild(script1);
+                _iframe.contentWindow.document.body.appendChild(script2);
+                // _iframe.contentWindow.document.body.appendChild(script3);
+                _iframe.contentWindow.document.body.appendChild(script4);
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'courseDesign') {
+            U.UF.DL.iframeLoad(_iframe, function () {
+                // _iframe.contentWindow.U.MD.O.W.load();
+                // _iframe.contentWindow.document.body.appendChild(script1);
+                _iframe.contentWindow.document.body.appendChild(script2);
+                _iframe.contentWindow.document.body.appendChild(script4);
+            })
+        } else if (str == 'mind') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = 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.MD.D.I.getContent(cid, stage, task, tool, _userid, '2', _iframe)
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'whiteboard') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = _iframe.onload = () => {
+                _iframe.contentWindow.document.body.appendChild(script1);
+                _iframe.contentWindow.document.body.appendChild(script2);
+                _iframe.contentWindow.document.body.appendChild(script4);
+                U.MD.D.I.getContent(cid, stage, task, tool, _userid, '3', _iframe)
+            };
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else {
+            _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 = async () => {
+            let text = ''
+            if (aTool == 1) {
+                text = JSON.stringify(_iframe.contentWindow.h.app.scene.elements)
+            } else if (aTool == 6) {
+                text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
+            } else if (aTool == 3) {
+                text = await U.MD.D.I.getEditorContent(_iframe);
+            }
+
+            _loading.style.display = 'flex'
+            console.log(_loading);
+            var _ajs = _iframe.contentWindow.document.createElement("script");
+            _ajs.type = "text/javascript";
+            _ajs.innerHTML =
+                // 'console.log(' + _loading + ');\n' +
+                'var _js = document.createElement("script");\n' +
+                '_js.type="text/javascript";\n' +
+                '_js.charset="UTF-8";\n' +
+                '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
+                "_js.onload = function(){\n" +
+                ' var a = document.getElementsByTagName("img")\n' +
+                ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
+                " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).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 +
+                "'" +
+                ", " +
+                "'" +
+                (str + '_loadLi_JieTeacherE' + cid + stage + task + tool + _userid) +
+                "'" +
+                ", " +
+                "'" +
+                aTool +
+                "'" +
+                ", " +
+                "`" +
+                text +
+                "`" +
+                ")\n" +
+                " });\n" +
+                "}\n" +
+                "document.head.appendChild(_js);\n";
+            _iframe.contentWindow.document.head.appendChild(_ajs);
+        }
+    }
+}
+
+
+U.MD.D.I.getEditorContent = function (iframe) {
+    return new Promise((resolve, reject) => {
+        iframe.contentWindow.editor.minder.exportData('json').then(function (content) {
+            console.log(content);
+            resolve(content)
+        });
+    });
+}
+
+U.MD.D.I.getContent = function (cid, s, task, t, uid, type, iframe) {
+    // U.A.Request(US.Config.pbl + "selectWord2?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&type=" + type, [], function (res) {
+    //     if (res.value[0].length > 0) {
+    //         // resolve(res.value[0][0].text);
+    //         iframe.contentWindow.editor.minder.importData('json', res.value[0][0].text).then(function (data) {
+    //             $(fileInput).val('');
+    //         });
+    //     }
+    // }, [], { "type": "GET", "withCredentials": true });
+
+    var xmlhttp;
+    var Mac, Sn, DeviceId
+    if (window.XMLHttpRequest) {
+        //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
+        xmlhttp = new XMLHttpRequest();
+    } else {
+        // IE6, IE5 浏览器执行代码
+        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+    }
+    xmlhttp.onreadystatechange = function () {
+        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+            if (xmlhttp.response && JSON.parse(xmlhttp.response)[0].length > 0) {
+                // resolve(res.value[0][0].text);
+                if (type == '2') {
+                    iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text)
+                } else if (type == '3') {
+                    iframe.contentWindow.h.app.updateScene({ elements: JSON.parse(JSON.parse(xmlhttp.response)[0][0].text) })
+                }
+            } else {
+                U.MD.D.I.getContents2(cid, s, task, t, uid, type, iframe)
+            }
+        }
+    }
+    xmlhttp.open("GET", US.Config.pbl + "selectWord2?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&type=" + type, true);
+    xmlhttp.send();
+
+}
+
+
+U.MD.D.I.openApplicationJieS = function (str, cid, stage, task, tool) {
+    var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
+        _formdiv, //创建任务栏时同时弹出的窗体元素。
+        _userinfo = US.userInfo, //登录用户信息
+        _userid = US.userInfo.userid //登录用户id
+    let _iframe;
+    let _cid = cid,
+        _stage = stage,
+        _task = task,
+        _tool = tool;
+    var _jie = $$("div", {
+        "style": {
+            "position": "absolute",
+            "bottom": "50px",
+            "right": "50px",
+            "zIndex": "9999",
+            "backgroundColor": "#2268bc",
+            "color": "#fff",
+            "padding": "12px 20px",
+            "cursor": "pointer",
+            "borderRadius": "4px",
+        },
+        "innerHTML": "确认并提交"
+    })
+    let aTool = ''
+    let _loading = document.createElement('div')
+    _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
+    //  _loading.id = "";
+    let _lchild = document.createElement('div')
+    let _limg = document.createElement('img')
+    _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
+    _limg.style = "width: 26px;margin-right: 10px;"
+    _lchild.appendChild(_limg)
+    let _lspan = document.createElement('span')
+    _lspan.innerHTML = "上传中..."
+    _lchild.appendChild(_lspan)
+    _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
+    _loading.appendChild(_lchild)
+    var _box = $$('div', {
+        "style": {
+            "position": "relative",
+            "width": "100%",
+            "height": "100%",
+        },
+    })
+    _box.appendChild(_loading)
+    _box.id = str + '_loadLi_JieS' + cid + stage + task + tool + _userid
+    switch (str) {
+        case "whiteboard":
+            aTool = 1;
+            _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": "whiteboards" + cid + stage + task + tool,
+                "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":
+            aTool = 3;
+            _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": "minds" + cid + stage + task + tool,
+                "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":
+            aTool = 6;
+            _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": "docs" + cid + stage + task + tool,
+                "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(cid, stage, task, tool, '2');
+            })
+            _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;
+    }
+    const script1 = document.createElement("script");
+    script1.type = "text/javascript";
+    // script1.src = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
+    script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
+    const script2 = document.createElement("script");
+    script2.type = "text/javascript";
+    // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
+    script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
+    const script3 = document.createElement("script");
+    script3.type = "text/javascript";
+    script3.charset = "UTF-8";
+    script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
+    const script4 = document.createElement("script");
+    script4.type = "text/javascript";
+    // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu4.js";
+    script4.src = "https://cloud.cocorobo.cn/js/Common/jietu4.js";
+
+    if (_iframe) {
+        if (str == 'doc') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
+                _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(script3);
+                _iframe.contentWindow.document.body.appendChild(script4);
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'mind') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = 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.MD.D.I.getContents(cid, stage, task, tool, _userid, '2', _iframe)
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else {
+            _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 = async () => {
+            let text = ''
+            if (aTool == 6) {
+                text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
+            } else if (aTool == 3) {
+                text = await U.MD.D.I.getEditorContent(_iframe);
+            }
+
+            _loading.style.display = 'flex'
+            console.log(_loading);
+            var _ajs = _iframe.contentWindow.document.createElement("script");
+            _ajs.type = "text/javascript";
+            _ajs.innerHTML =
+                // 'console.log(' + _loading + ');\n' +
+                'var _js = document.createElement("script");\n' +
+                '_js.type="text/javascript";\n' +
+                '_js.charset="UTF-8";\n' +
+                '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
+                "_js.onload = function(){\n" +
+                ' var a = document.getElementsByTagName("img")\n' +
+                ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
+                " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).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 +
+                "'" +
+                ", " +
+                "'" +
+                (str + '_loadLi_JieS' + cid + stage + task + tool + _userid) +
+                "'" +
+                ", " +
+                "'" +
+                aTool +
+                "'" +
+                ", " +
+                "`" +
+                text +
+                "`" +
+                ")\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); //创建任务处理
+    // }
+
+}
+
+U.MD.D.I.openApplicationJieStudio = function (str, cid, stage, task, tool) {
+    var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
+        _formdiv, //创建任务栏时同时弹出的窗体元素。
+        _userinfo = US.userInfo, //登录用户信息
+        _userid = US.userInfo.userid //登录用户id
+    let _iframe;
+    let _cid = cid,
+        _stage = stage,
+        _task = task,
+        _tool = tool;
+    var _jie = $$("div", {
+        "style": {
+            "position": "absolute",
+            "bottom": "50px",
+            "right": "50px",
+            "zIndex": "9999",
+            "backgroundColor": "#2268bc",
+            "color": "#fff",
+            "padding": "12px 20px",
+            "cursor": "pointer",
+            "borderRadius": "4px",
+        },
+        "innerHTML": "确认并提交"
+    })
+    let aTool = ''
+    let _loading = document.createElement('div')
+    _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
+    //  _loading.id = "";
+    let _lchild = document.createElement('div')
+    let _limg = document.createElement('img')
+    _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
+    _limg.style = "width: 26px;margin-right: 10px;"
+    _lchild.appendChild(_limg)
+    let _lspan = document.createElement('span')
+    _lspan.innerHTML = "上传中..."
+    _lchild.appendChild(_lspan)
+    _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
+    _loading.appendChild(_lchild)
+    var _box = $$('div', {
+        "style": {
+            "position": "relative",
+            "width": "100%",
+            "height": "100%",
+        },
+    })
+    _box.appendChild(_loading)
+    _box.id = str + '_loadLi_JieStudio' + cid + stage + task + tool + _userid
+    switch (str) {
+        case "whiteboard":
+            aTool = 1;
+            _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": "whiteboards" + cid + stage + task + tool,
+                "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":
+            aTool = 3;
+            _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": "minds" + cid + stage + task + tool,
+                "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":
+            aTool = 6;
+            _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": "docs" + cid + stage + task + tool,
+                "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(cid, stage, task, tool, '2');
+            })
+            _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;
+    }
+    const script1 = document.createElement("script");
+    script1.type = "text/javascript";
+    // script1.src = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
+    script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
+    const script2 = document.createElement("script");
+    script2.type = "text/javascript";
+    // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
+    script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
+    const script3 = document.createElement("script");
+    script3.type = "text/javascript";
+    script3.charset = "UTF-8";
+    script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
+    const script4 = document.createElement("script");
+    script4.type = "text/javascript";
+    // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu4.js";
+    script4.src = "https://cloud.cocorobo.cn/js/Common/jietu5.js";
+
+    if (_iframe) {
+        if (str == 'doc') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
+                _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(script3);
+                _iframe.contentWindow.document.body.appendChild(script4);
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'mind') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = 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.MD.D.I.getContents(cid, stage, task, tool, _userid, '2', _iframe)
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else {
+            _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 = async () => {
+            let text = ''
+            if (aTool == 6) {
+                text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
+            } else if (aTool == 3) {
+                text = await U.MD.D.I.getEditorContent(_iframe);
+            }
+
+            _loading.style.display = 'flex'
+            console.log(_loading);
+            var _ajs = _iframe.contentWindow.document.createElement("script");
+            _ajs.type = "text/javascript";
+            _ajs.innerHTML =
+                // 'console.log(' + _loading + ');\n' +
+                'var _js = document.createElement("script");\n' +
+                '_js.type="text/javascript";\n' +
+                '_js.charset="UTF-8";\n' +
+                '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
+                "_js.onload = function(){\n" +
+                ' var a = document.getElementsByTagName("img")\n' +
+                ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
+                " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).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 +
+                "'" +
+                ", " +
+                "'" +
+                (str + '_loadLi_JieStudio' + cid + stage + task + tool + _userid) +
+                "'" +
+                ", " +
+                "'" +
+                aTool +
+                "'" +
+                ", " +
+                "`" +
+                text +
+                "`" +
+                ")\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); //创建任务处理
+    // }
+
+}
+
+U.MD.D.I.openApplicationYu = function (str, cid, stage, task, tool) {
+    var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
+        _formdiv, //创建任务栏时同时弹出的窗体元素。
+        _userinfo = US.userInfo, //登录用户信息
+        _userid = US.userInfo.userid //登录用户id
+    let _iframe;
+    let _cid = cid,
+        _stage = stage,
+        _task = task,
+        _tool = tool;
+    var _jie = $$("div", {
+        "style": {
+            "position": "absolute",
+            "bottom": "50px",
+            "right": "50px",
+            "zIndex": "9999",
+            "backgroundColor": "#2268bc",
+            "color": "#fff",
+            "padding": "12px 20px",
+            "cursor": "pointer",
+            "borderRadius": "4px",
+        },
+        "innerHTML": "上传模板"
+    })
+    let aTool = ''
+    let _loading = document.createElement('div')
+    _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
+    //  _loading.id = "";
+    let _lchild = document.createElement('div')
+    let _limg = document.createElement('img')
+    _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
+    _limg.style = "width: 26px;margin-right: 10px;"
+    _lchild.appendChild(_limg)
+    let _lspan = document.createElement('span')
+    _lspan.innerHTML = "上传中..."
+    _lchild.appendChild(_lspan)
+    _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
+    _loading.appendChild(_lchild)
+    var _box = $$('div', {
+        "style": {
+            "position": "relative",
+            "width": "100%",
+            "height": "100%",
+        },
+    })
+    _box.appendChild(_loading)
+    _box.id = str + '_loadLi_Yu' + cid + stage + task + tool + _userid
+    switch (str) {
+        case "whiteboard":
+            aTool = 1;
+            _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": "whiteboards_Yu" + cid + stage + task + tool,
+                "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":
+            aTool = 3;
+            _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": "minds_Yu" + cid + stage + task + tool,
+                "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":
+            aTool = 6;
+            _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": "docs_Yu" + cid + stage + task + tool,
+                "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(cid, stage, task, tool, '2');
+            })
+            _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 "CocoPi":
+            aTool = 57;
+            _iframe = $$("iframe", {
+                "allowpaymentrequest": "allowpaymentrequest",
+                "allow": "camera *; microphone *;display-capture;midi;encrypted-media;usb",
+                "webkitallowfullscreen": "",
+                "mozallowfullscreen": "",
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0;width:100%;height:100%"
+                },
+                "src": "https://pi.cocorobo.cn/"
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "CocoPi",
+                _box, {
+                "id": "CocoPi_Yu" + cid + stage + task + tool,
+                "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/cocopi.png)"
+                },
+                "name": "CocoPi",
+                "forms": _formdiv,
+                "click": function () {
+                    U.MD.D.I.openApplication(str, obj, info);
+                }
+            }
+            break;
+    }
+
+    if (_iframe) {
+        if (str == 'doc') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
+                _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool, '2');
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'mind') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
+                U.MD.D.I.getContents2(cid, stage, task, tool, _userid, '2', _iframe)
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'whiteboard') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
+                U.MD.D.I.getContents2(cid, stage, task, tool, _userid, '3', _iframe)
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else if (str == 'CocoPi') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
+                U.MD.D.I.getContents2(cid, stage, task, tool, _userid, '4', _iframe)
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        } else {
+            _iframe.onload = () => { };
+        }
+        _jie.onclick = async () => {
+            let text = ''
+            let type = '2'
+            if (aTool == 1) {
+                text = JSON.stringify(_iframe.contentWindow.h.app.scene.elements)
+                type = '3'
+            } else if (aTool == 6) {
+                text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
+                type = '1'
+            } else if (aTool == 3) {
+                text = await U.MD.D.I.getEditorContent(_iframe);
+                type = '2'
+            } else if (aTool == 57) {
+                text = encodeURIComponent(_iframe.contentWindow.getLoadXmlStr())
+                type = '4'
+            }
+            _loading.style.display = 'flex'
+
+            U.MD.D.I.setContents(_cid, _stage, _task, _tool, _userid, type, text, _loading, _lspan)
+        }
+    }
+
+    //U.MD.D.I.openClick(str);
+    //如果有任务栏信息
+    // if (_taskbar) {
+    //     U.MD.D.T.taskbar(_taskbar); //创建任务处理
+    // }
+
+}
+
+U.MD.D.I.getContents = function (cid, s, task, t, uid, type, iframe) {
+    var xmlhttp;
+    var Mac, Sn, DeviceId
+    if (window.XMLHttpRequest) {
+        //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
+        xmlhttp = new XMLHttpRequest();
+    } else {
+        // IE6, IE5 浏览器执行代码
+        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+    }
+    xmlhttp.onreadystatechange = function () {
+        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+            if (xmlhttp.response && JSON.parse(xmlhttp.response)[0].length > 0) {
+                // resolve(res.value[0][0].text);
+                iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text)
+            }
+        }
+    }
+    xmlhttp.open("GET", US.Config.pbl + "selectWords?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&type=" + type, true);
+    xmlhttp.send();
+
+}
+
+
+U.MD.D.I.getContents2 = function (cid, s, task, t, uid, type, iframe) {
+    var xmlhttp;
+    var Mac, Sn, DeviceId
+    if (window.XMLHttpRequest) {
+        //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
+        xmlhttp = new XMLHttpRequest();
+    } else {
+        // IE6, IE5 浏览器执行代码
+        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+    }
+    xmlhttp.onreadystatechange = function () {
+        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+            if (xmlhttp.response && JSON.parse(xmlhttp.response)[0].length > 0) {
+                // resolve(res.value[0][0].text);
+                if (type == '2') {
+                    iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text)
+                } else if (type == '3') {
+                    iframe.contentWindow.h.app.updateScene({ elements: JSON.parse(JSON.parse(xmlhttp.response)[0][0].text) })
+                } else if (type == '4') {
+                    iframe.contentWindow.loadingXml(JSON.parse(xmlhttp.response)[0][0].text)
+                }
+            } else {
+                if (type == '2') {
+                    iframe.contentWindow.editor.minder.importData('json', '')
+                } else if (type == '3') {
+                    iframe.contentWindow.h.app.updateScene({ elements: [] })
+                } else if (type == '4') {
+                    iframe.contentWindow.window.blockpy.components.editor.blockly.clear();
+                }
+            }
+        }
+    }
+    xmlhttp.open("GET", US.Config.pbl + "selectWordsY?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&type=" + type, true);
+    xmlhttp.send();
+
+}
+
+U.MD.D.I.setContents = function (cid, s, task, t, uid, type, text, loading, span) {
+    var xmlhttp;
+    var Mac, Sn, DeviceId
+    if (window.XMLHttpRequest) {
+        //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
+        xmlhttp = new XMLHttpRequest();
+    } else {
+        // IE6, IE5 浏览器执行代码
+        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+    }
+    xmlhttp.onreadystatechange = function () {
+        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+            if (xmlhttp.response) {
+                // resolve(res.value[0][0].text);
+                // iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text).then(function (data) {
+                //     $(fileInput).val('');
+                // });
+                span.innerHTML = '上传成功'
+                setTimeout(() => {
+                    loading.style.display = 'none'
+                }, 1000);
+            }
+        }
+    }
+    // xmlhttp.open("GET", US.Config.pbl + "insertWord2y?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t+ "&text=" + text + "&type=" + type, true);
+    xmlhttp.open("POST", US.Config.pbl + "insertWord2y", true);
+    // xmlhttp.open("POST", "http://localhost:7003/api/pbl/" + "insertWord2y", true);
+    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+    // 设置请求头,表示请求体的编码格式
+    xmlhttp.send("uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&text=" + text.replaceAll(/%/g, "%25") + "&type=" + type);
+    // 设置请求体,使用url-encoded格式的数据
+}
+
+
+U.MD.D.I.openApplicationUpload = function (str, cid, stage, task, tool) {
+    var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
+        _formdiv, //创建任务栏时同时弹出的窗体元素。
+        _userinfo = US.userInfo, //登录用户信息
+        _userid = US.userInfo.userid //登录用户id
+    let _iframe;
+    let _cid = cid,
+        _stage = stage,
+        _task = task,
+        _tool = tool;
+    var _jie = $$("div", {
+        "style": {
+            "position": "absolute",
+            "bottom": "50px",
+            "right": "50px",
+            "zIndex": "9999",
+            "backgroundColor": "#2268bc",
+            "color": "#fff",
+            "padding": "12px 20px",
+            "cursor": "pointer",
+            "borderRadius": "4px",
+        },
+        "innerHTML": "提交作业"
+    })
+    let aTool = ''
+    let _loading = document.createElement('div')
+    _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
+    //  _loading.id = "";
+    let _lchild = document.createElement('div')
+    let _limg = document.createElement('img')
+    _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
+    _limg.style = "width: 26px;margin-right: 10px;"
+    _lchild.appendChild(_limg)
+    let _lspan = document.createElement('span')
+    _lspan.innerHTML = "上传中..."
+    _lchild.appendChild(_lspan)
+    _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
+    _loading.appendChild(_lchild)
+    var _box = $$('div', {
+        "style": {
+            "position": "relative",
+            "width": "100%",
+            "height": "100%",
+        },
+    })
+    _box.appendChild(_loading)
+    _box.id = str + '_loadLi_Upload' + cid + stage + task + tool + _userid
+    switch (str) {
+        case "CocoPi":
+            aTool = 57;
+            _iframe = $$("iframe", {
+                "allowpaymentrequest": "allowpaymentrequest",
+                "allow": "camera *; microphone *;display-capture;midi;encrypted-media;usb",
+                "webkitallowfullscreen": "",
+                "mozallowfullscreen": "",
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0;width:100%;height:100%"
+                },
+                "src": "https://pi.cocorobo.cn/"
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "CocoPi",
+                _box, {
+                "id": "CocoPi_Upload" + cid + stage + task + tool,
+                "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/cocopi.png)"
+                },
+                "name": "CocoPi",
+                "forms": _formdiv,
+                "click": function () {
+                    U.MD.D.I.openApplication(str, obj, info);
+                }
+            }
+            break;
+    }
+
+
+    if (_iframe) {
+        if (str == 'CocoPi') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
+                U.MD.D.I.getUploadContent(cid, stage, task, tool, _userid, aTool, '15', _iframe)
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        }
+        _jie.onclick = async () => {
+            let text = ''
+            if (aTool == 57) {
+                text = _iframe.contentWindow.getLoadXmlStr()
+            }
+
+            _loading.style.display = 'flex'
+            console.log(_loading);
+            U.A.Request(US.Config.pbl + "addCourseWorks4-u", [_userid, _cid, _stage, _task, _tool, text.replaceAll(/%/g, "%25"), 15, aTool, text], function (res) {
+                _loading.style.display = 'none'
+                let _div = document.createElement('div')
+                _div.style = "width:100%;height:100%;background:#0000008f;position:fixed;top:0;left:0;z-index:99999999999999;display: flex;justify-content: center;align-items: center;"
+                let _inner = document.createElement('div')
+                _inner.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;"
+                _inner.innerHTML = "上传成功"
+                _div.appendChild(_inner)
+                _iframe.contentWindow.window.document.body.appendChild(_div)
+                _div.onclick = () => {
+                    _iframe.contentWindow.window.document.body.removeChild(_div)
+                }
+                setTimeout(() => {
+                    _iframe.contentWindow.window.document.body.removeChild(_div)
+                }, 1000);
+            }, [], { "type": "POST", "withCredentials": true });
+        }
+    }
+}
+
+U.MD.D.I.openApplicationTeacherUpload = function (str, cid, stage, task, tool, student) {
+    var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
+        _formdiv, //创建任务栏时同时弹出的窗体元素。
+        _userid = student.userid, //登录用户id
+        _username = student.student //用户名字
+    let _iframe;
+    let _cid = cid,
+        _stage = stage,
+        _task = task,
+        _tool = tool;
+    var _jie = $$("div", {
+        "style": {
+            "position": "absolute",
+            "bottom": "50px",
+            "right": "50px",
+            "zIndex": "9999",
+            "backgroundColor": "#2268bc",
+            "color": "#fff",
+            "padding": "12px 20px",
+            "cursor": "pointer",
+            "borderRadius": "4px",
+        },
+        "innerHTML": "提交作业"
+    })
+    let aTool = ''
+    let _loading = document.createElement('div')
+    _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
+    //  _loading.id = "";
+    let _lchild = document.createElement('div')
+    let _limg = document.createElement('img')
+    _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
+    _limg.style = "width: 26px;margin-right: 10px;"
+    _lchild.appendChild(_limg)
+    let _lspan = document.createElement('span')
+    _lspan.innerHTML = "上传中..."
+    _lchild.appendChild(_lspan)
+    _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
+    _loading.appendChild(_lchild)
+    var _box = $$('div', {
+        "style": {
+            "position": "relative",
+            "width": "100%",
+            "height": "100%",
+        },
+    })
+    _box.appendChild(_loading)
+    _box.id = str + '_loadLi_TeacherUpload' + cid + stage + task + tool + _userid
+    switch (str) {
+        case "CocoPi":
+            aTool = 57;
+            _iframe = $$("iframe", {
+                "allowpaymentrequest": "allowpaymentrequest",
+                "allow": "camera *; microphone *;display-capture;midi;encrypted-media;usb",
+                "webkitallowfullscreen": "",
+                "mozallowfullscreen": "",
+                "frameborder": "no",
+                "border": "0",
+                "scrolling ": "no",
+                "style": {
+                    "cssText": "border:0;width:100%;height:100%"
+                },
+                "src": "https://pi.cocorobo.cn/"
+            })
+            _box.appendChild(_iframe);
+            _box.appendChild(_jie);
+            _formdiv = new U.UF.UI.form(
+                "CocoPi-" + _username,
+                _box, {
+                "id": "CocoPi_TeacherUpload" + cid + stage + task + tool + _userid,
+                "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/cocopi.png)"
+                },
+                "name": "CocoPi",
+                "forms": _formdiv,
+                "click": function () {
+                    U.MD.D.I.openApplication(str, obj, info);
+                }
+            }
+            break;
+    }
+
+
+    if (_iframe) {
+        if (str == 'CocoPi') {
+            _iframe = _formdiv.querySelector('iframe')
+            let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
+                U.MD.D.I.getUploadContent(cid, stage, task, tool, _userid, aTool, '15', _iframe)
+            })
+            if (onloadListener) {
+                _iframe.contentDocument.location.reload()
+            } else {
+                _iframe.contentDocument.location.reload()
+            }
+        }
+        _jie.onclick = async () => {
+            let text = ''
+            if (aTool == 57) {
+                text = _iframe.contentWindow.getLoadXmlStr()
+            }
+
+            _loading.style.display = 'flex'
+            console.log(_loading);
+            U.A.Request(US.Config.pbl + "addCourseWorks4-u", [_userid, _cid, _stage, _task, _tool, text.replaceAll(/%/g, "%25"), 15, aTool, text], function (res) {
+                _loading.style.display = 'none'
+                let _div = document.createElement('div')
+                _div.style = "width:100%;height:100%;background:#0000008f;position:fixed;top:0;left:0;z-index:99999999999999;display: flex;justify-content: center;align-items: center;"
+                let _inner = document.createElement('div')
+                _inner.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;"
+                _inner.innerHTML = "上传成功"
+                _div.appendChild(_inner)
+                _iframe.contentWindow.window.document.body.appendChild(_div)
+                _div.onclick = () => {
+                    _iframe.contentWindow.window.document.body.removeChild(_div)
+                }
+                setTimeout(() => {
+                    _iframe.contentWindow.window.document.body.removeChild(_div)
+                }, 1000);
+            }, [], { "type": "POST", "withCredentials": true });
+        }
+    }
+}
+
+U.MD.D.I.getUploadContent = function (cid, s, task, t, uid, atool, type, iframe) {
+    U.A.Request(US.Config.pbl + "selectWorksDetail2u", [uid, cid, s, task, t, type, atool], function (res) {
+        if (res.value[0].length > 0) {
+            if (atool == 57) {
+                iframe.contentWindow.loadingXml(res.value[0][0].content)
+            }
+        } else {
+            if (atool == 57) {
+                U.MD.D.I.getContents2(cid, s, task, t, uid, '4', iframe)
+                // iframe.contentWindow.window.blockpy.components.editor.blockly.clear();
+            }
+        }
+    }, [], { "type": "POST", "withCredentials": true });
 }