|
@@ -523,6 +523,20 @@ U.MD.D.I.lotechTeacherDeskIcon = [
|
|
|
{ "Name": "教学资源", "Url": "source", "style": { "cssText": "background-image:url(/img/icon/source.png)" } },
|
|
|
{ "Name": "AI共创", "Url": "AIChat", "style": { "cssText": "background-image:url(/img/icon/AIChat.png)" } },
|
|
|
];
|
|
|
+
|
|
|
+//龙华中心小学教师桌面图标的全局变量
|
|
|
+U.MD.D.I.longhuateacherDeskIcon = [
|
|
|
+ { "Name": "课程管理", "Url": "project", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
|
|
|
+ { "Name": "课程中心", "Url": "study", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
|
|
|
+ { "Name": "学生管理", "Url": "student", "style": { "cssText": "background-image:url(/img/icon/student.png)" } },
|
|
|
+ { "Name": "学生评价", "Url": "evaluate", "style": { "cssText": "background-image:url(/img/icon/evaluation.png)" } },
|
|
|
+ { "Name": "项目管理", "Url": "studentCourseS", "style": { "cssText": "background-image:url(/img/icon/studentCourse.png)" } },
|
|
|
+ { "Name": "项目中心", "Url": "studentIndex", "style": { "cssText": "background-image:url(/img/icon/studentIndex.png)" } },
|
|
|
+ { "Name": "班级管理", "Url": "class", "style": { "cssText": "background-image:url(/img/icon/class.png)" } },
|
|
|
+ { "Name": "我的资料", "Url": "my", "style": { "cssText": "background-image:url(/img/icon/myMessage.png)" } },
|
|
|
+ { "Name": "课程进展", "Url": "case", "style": { "cssText": "background-image:url(/img/icon/case.png)" } },
|
|
|
+ { "Name": "教学资源", "Url": "source", "style": { "cssText": "background-image:url(/img/icon/source.png)" } },
|
|
|
+];
|
|
|
//#region 桌面初始化a
|
|
|
|
|
|
/**
|
|
@@ -637,11 +651,12 @@ U.MD.D.I.initDesktopIcons = function (el, type) {
|
|
|
_futianTeacherDeskIconInfo = U.MD.D.I.futianTeacherDeskIcon,//福田
|
|
|
_futianAdminDeskIconInfo = U.MD.D.I.futianAdminDeskIcon,//福田
|
|
|
_lotechTeacherDeskIconInfo = U.MD.D.I.lotechTeacherDeskIcon,//lotech
|
|
|
+ _longhuaTeacherDeskIconInfo = U.MD.D.I.longhuateacherDeskIcon,//lotech
|
|
|
_tcOrganizerDeskIconInfo = U.MD.D.I.tcOrganizerDeskIcon,//腾讯学生
|
|
|
_szscStudentDeskIconInfo = U.MD.D.I.szscStudentDeskIcon,//网络夏令营
|
|
|
_szscTeacherDeskIconInfo = U.MD.D.I.szscTeacherDeskIcon,//网络夏令营
|
|
|
_szscOrganizerDeskIconInfo = U.MD.D.I.szscOrganizerDeskIcon;//网络夏令营
|
|
|
- var _oidA = ['69893dca-1d47-11ed-8c78-005056b86db5', "91305d49-01ba-11ed-8c78-005056b86db5", "d9db3320-503a-11ed-8c78-005056b86db5", "05b62310-8cda-11ed-b13d-005056b86db5", '1c3b9def-8fbe-11ed-b13d-005056b86db5', '91305d49-01ba-11ed-8c78-005056b86db4'];
|
|
|
+ var _oidA = ['69893dca-1d47-11ed-8c78-005056b86db5', "91305d49-01ba-11ed-8c78-005056b86db5", "d9db3320-503a-11ed-8c78-005056b86db5", "05b62310-8cda-11ed-b13d-005056b86db5", '1c3b9def-8fbe-11ed-b13d-005056b86db5', '91305d49-01ba-11ed-8c78-005056b86db4','ea2a8c65-f38c-11ed-91d8-005056b86db5'];
|
|
|
var _orgA = ["7ada499f-4ec7-11ed-8c78-005056b86db5", "eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d", "383f207d-4ced-4eeb-a15a-7b0a2f3abe7b", "150e3120-9195-11ed-b13d-005056b86db5", "ee40e8e3-e36c-4872-8105-cf395481012s", '97c4ee8b-d010-4042-986d-e9d3c217264f','ec0af97a-7c10-4259-a7eb-db9cc8174cdc','4df1b570-f6ac-48fc-8d50-d0b157dae776'];
|
|
|
//清楚桌面图标
|
|
|
el.innerHTML = "";
|
|
@@ -854,7 +869,24 @@ U.MD.D.I.initDesktopIcons = function (el, type) {
|
|
|
$$("div", { className: "U_MD_D_KOS U_Img", "style": _lotechTeacherDeskIconInfo[i].style }, _iconcontent);
|
|
|
$$("div", { className: "U_MD_D_KOX", "innerHTML": _lotechTeacherDeskIconInfo[i].Name }, _iconcontent);
|
|
|
}
|
|
|
- } else if ((_type == 1 || _type == 4) && (_org == "ec0af97a-7c10-4259-a7eb-db9cc8174cdc") && _role == 1) {
|
|
|
+ }else if ((_type == 1 || _type == 4) && (_oid == "ea2a8c65-f38c-11ed-91d8-005056b86db5")) {
|
|
|
+ for (i = 0; i < _longhuaTeacherDeskIconInfo.length; i++) {
|
|
|
+ _content = $$("div", {
|
|
|
+ className: "U_MD_D_KO",
|
|
|
+ "onmousedown": U.UF.C.closure(function (obj) {
|
|
|
+ //防止拖动图标即打开了桌面应用
|
|
|
+ U.MD.D.click(this, obj);
|
|
|
+ }, [_longhuaTeacherDeskIconInfo[i]]),
|
|
|
+ "onclick": U.UF.C.closure(function (obj) {
|
|
|
+ //防止拖动图标即打开了桌面应用
|
|
|
+ U.MD.D.click(this, obj);
|
|
|
+ }, [_longhuaTeacherDeskIconInfo[i]])
|
|
|
+ }, _frag); //
|
|
|
+ _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
|
|
|
+ $$("div", { className: "U_MD_D_KOS U_Img", "style": _longhuaTeacherDeskIconInfo[i].style }, _iconcontent);
|
|
|
+ $$("div", { className: "U_MD_D_KOX", "innerHTML": _longhuaTeacherDeskIconInfo[i].Name }, _iconcontent);
|
|
|
+ }
|
|
|
+ }else if ((_type == 1 || _type == 4) && (_org == "ec0af97a-7c10-4259-a7eb-db9cc8174cdc") && _role == 1) {
|
|
|
for (i = 0; i < _futianAdminDeskIconInfo.length; i++) {
|
|
|
_content = $$("div", {
|
|
|
className: "U_MD_D_KO",
|
|
@@ -1622,6 +1654,14 @@ window.addEventListener('message', function (e) { // 监听 message 事件
|
|
|
U.MD.D.I.openApplicationJieTeacher("mind", e.data.cid, e.data.stage, e.data.task, e.data.tool, e.data.student)
|
|
|
} else if (e.data.tools && e.data.tools == "7teacher") {
|
|
|
U.MD.D.I.openApplicationJieTeacher("mindNetwork", e.data.cid, e.data.stage, e.data.task, e.data.tool, e.data.student)
|
|
|
+ } else if (e.data.tools && e.data.tools == "1teacherE") {
|
|
|
+ U.MD.D.I.openApplicationJieTeacherE("whiteboard", e.data.cid, e.data.stage, e.data.task, e.data.tool, e.data.student)
|
|
|
+ } else if (e.data.tools && e.data.tools == "3teacherE") {
|
|
|
+ U.MD.D.I.openApplicationJieTeacherE("mind", e.data.cid, e.data.stage, e.data.task, e.data.tool, e.data.student)
|
|
|
+ } else if (e.data.tools && e.data.tools == "1E") {
|
|
|
+ U.MD.D.I.openApplicationJieE("whiteboard", e.data.cid, e.data.stage, e.data.task, e.data.tool)
|
|
|
+ } else if (e.data.tools && e.data.tools == "3E") {
|
|
|
+ U.MD.D.I.openApplicationJieE("mind", e.data.cid, e.data.stage, e.data.task, e.data.tool)
|
|
|
}
|
|
|
|
|
|
});
|
|
@@ -3968,12 +4008,11 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
|
|
|
// }
|
|
|
|
|
|
}
|
|
|
-
|
|
|
-U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, student) {
|
|
|
+U.MD.D.I.openApplicationJieE = function (str, cid, stage, task, tool) {
|
|
|
var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
|
|
|
_formdiv, //创建任务栏时同时弹出的窗体元素。
|
|
|
- _userid = student.userid, //登录用户id
|
|
|
- _username = student.student //用户名字
|
|
|
+ _userinfo = US.userInfo, //登录用户信息
|
|
|
+ _userid = US.userInfo.userid //登录用户id
|
|
|
let _iframe;
|
|
|
let _cid = cid,
|
|
|
_stage = stage,
|
|
@@ -4015,7 +4054,7 @@ U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, stud
|
|
|
},
|
|
|
})
|
|
|
_box.appendChild(_loading)
|
|
|
- _box.id = str + '_loadLi' + _userid
|
|
|
+ _box.id = str + '_loadLi'
|
|
|
switch (str) {
|
|
|
case "whiteboard":
|
|
|
aTool = 1;
|
|
@@ -4031,9 +4070,9 @@ U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, stud
|
|
|
_box.appendChild(_iframe);
|
|
|
_box.appendChild(_jie);
|
|
|
_formdiv = new U.UF.UI.form(
|
|
|
- "电子白板-" + _username,
|
|
|
+ "电子白板",
|
|
|
_box, {
|
|
|
- "id": "whiteboard" + cid + stage + task + tool + _userid,
|
|
|
+ "id": "whiteboard" + cid + stage + task + tool,
|
|
|
"style": {
|
|
|
"width": "90%",
|
|
|
"height": "90%",
|
|
@@ -4073,9 +4112,9 @@ U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, stud
|
|
|
_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,
|
|
|
+ "id": "mind" + cid + stage + task + tool,
|
|
|
"style": {
|
|
|
"width": "90%",
|
|
|
"height": "90%",
|
|
@@ -4115,9 +4154,9 @@ U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, stud
|
|
|
_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,
|
|
|
+ "id": "mind" + cid + stage + task + tool,
|
|
|
"style": {
|
|
|
"width": "90%",
|
|
|
"height": "90%",
|
|
@@ -4157,9 +4196,9 @@ U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, stud
|
|
|
_box.appendChild(_iframe);
|
|
|
_box.appendChild(_jie);
|
|
|
_formdiv = new U.UF.UI.form(
|
|
|
- "协同文档-" + _username,
|
|
|
+ "协同文档",
|
|
|
_box, {
|
|
|
- "id": "doc" + cid + stage + task + tool + _userid,
|
|
|
+ "id": "doc" + cid + stage + task + tool,
|
|
|
"style": {
|
|
|
"width": "90%",
|
|
|
"height": "90%",
|
|
@@ -4206,9 +4245,9 @@ U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, stud
|
|
|
_box.appendChild(_iframe);
|
|
|
_box.appendChild(_jie);
|
|
|
_formdiv = new U.UF.UI.form(
|
|
|
- "思维网格-" + _username,
|
|
|
+ "思维网格",
|
|
|
_box, {
|
|
|
- "id": "mindNetwork" + cid + stage + task + tool + _userid,
|
|
|
+ "id": "mindNetwork" + cid + stage + task + tool,
|
|
|
"style": {
|
|
|
"width": "90%",
|
|
|
"height": "90%",
|
|
@@ -4250,9 +4289,9 @@ U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, stud
|
|
|
_box.appendChild(_iframe);
|
|
|
_box.appendChild(_jie);
|
|
|
_formdiv = new U.UF.UI.form(
|
|
|
- "项目设计-" + _username,
|
|
|
+ "项目设计",
|
|
|
_box, {
|
|
|
- "id": "courseDesign" + cid + stage + task + tool + _userid,
|
|
|
+ "id": "courseDesign" + cid + stage + task + tool,
|
|
|
"style": {
|
|
|
"width": "90%",
|
|
|
"height": "90%",
|
|
@@ -4294,7 +4333,7 @@ U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, stud
|
|
|
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";
|
|
|
+ script4.src = window.origin + "/js/Common/jietu2E.js";
|
|
|
|
|
|
if (_iframe) {
|
|
|
if (str == 'doc') {
|
|
@@ -4402,7 +4441,7 @@ U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, stud
|
|
|
"'" +
|
|
|
", " +
|
|
|
"'" +
|
|
|
- str + '_loadLi' + _userid +
|
|
|
+ str + '_loadLi' +
|
|
|
"'" +
|
|
|
", " +
|
|
|
"'" +
|
|
@@ -4419,7 +4458,918 @@ U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, stud
|
|
|
_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' + _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' + _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' + _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' + _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) => {
|