DeskTop.js 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697
  1. /*
  2. 此处为桌面系统启动应用区域
  3. */
  4. Namespace.register("U.MD.D.I"); //桌面应用处理
  5. //判断图片是否在拖拽,如果是拖拽图标的过程是不会打开图片的
  6. U.MD.D.I.IsDrag;
  7. U.MD.D.I.Ip;
  8. //教师桌面图标的全局变量
  9. U.MD.D.I.teacherDeskIcon = [
  10. { "Name": "项目管理", "Url": "project", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
  11. { "Name": "学习中心", "Url": "study", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
  12. { "Name": "学生管理", "Url": "student", "style": { "cssText": "background-image:url(/img/icon/student.png)" } },
  13. { "Name": "学生评价", "Url": "evaluate", "style": { "cssText": "background-image:url(/img/icon/evaluation.png)" } },
  14. { "Name": "班级管理", "Url": "class", "style": { "cssText": "background-image:url(/img/icon/class.png)" } },
  15. { "Name": "我的资料", "Url": "my", "style": { "cssText": "background-image:url(/img/icon/myMessage.png)" } },
  16. { "Name": "通知公告", "Url": "notice", "style": { "cssText": "background-image:url(/img/icon/news.png)" } },
  17. { "Name": "素材库", "Url": "library", "style": { "cssText": "background-image:url(/img/icon/library.png)" } },
  18. { "Name": "电子白板", "Url": "whiteboard", "style": { "cssText": "background-image:url(/img/icon/whiteBoard.png)" } },
  19. { "Name": "问卷调查", "Url": "investigation", "style": { "cssText": "background-image:url(/img/icon/ask.png)" } },
  20. { "Name": "便签分类", "Url": "note", "style": { "cssText": "background-image:url(/img/icon/note.png)" } },
  21. // { "Name": "量规评分", "Url": "score", "style": { "cssText": "background-image:url(/img/icon/score.png)" } },
  22. { "Name": "思维导图", "Url": "mind", "style": { "cssText": "background-image:url(/img/icon/mindMapping.png)" } },
  23. { "Name": "协同文档", "Url": "doc", "style": { "cssText": "background-image:url(/img/icon/doc.png)" } },
  24. { "Name": "思维网格", "Url": "mindNetwork", "style": { "cssText": "background-image:url(/img/icon/mindNetwork.png)" } },
  25. { "Name": "实时课堂", "Url": "teacherClassRoom", "style": { "cssText": "background-image:url(/img/icon/classRoom.png)" } },
  26. { "Name": "目标管理", "Url": "sys", "style": { "cssText": "background-image:url(/img/icon/sys.png)" } },
  27. { "Name": "课程设计", "Url": "courseDesign", "style": { "cssText": "background-image:url(/img/icon/courseDesign.png)" } }
  28. ];
  29. U.MD.D.I.studentDeskIcon = [
  30. { "Name": "我的项目", "Url": "studnetProject", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
  31. { "Name": "学习中心", "Url": "studentStudy", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
  32. { "Name": "我的评价", "Url": "studentEvaluate", "style": { "cssText": "background-image:url(/img/icon/evaluation.png)" } },
  33. { "Name": "我的资料", "Url": "studentMy", "style": { "cssText": "background-image:url(/img/icon/myMessage.png)" } },
  34. { "Name": "素材库", "Url": "library", "style": { "cssText": "background-image:url(/img/icon/library.png)" } },
  35. { "Name": "电子白板", "Url": "whiteboard", "style": { "cssText": "background-image:url(/img/icon/whiteBoard.png)" } },
  36. { "Name": "问卷调查", "Url": "investigation", "style": { "cssText": "background-image:url(/img/icon/ask.png)" } },
  37. { "Name": "便签分类", "Url": "note", "style": { "cssText": "background-image:url(/img/icon/note.png)" } },
  38. // { "Name": "量规评分", "Url": "score", "style": { "cssText": "background-image:url(/img/icon/score.png)" } },
  39. { "Name": "思维导图", "Url": "mind", "style": { "cssText": "background-image:url(/img/icon/mindMapping.png)" } },
  40. { "Name": "协同文档", "Url": "doc", "style": { "cssText": "background-image:url(/img/icon/doc.png)" } },
  41. { "Name": "思维网格", "Url": "mindNetwork", "style": { "cssText": "background-image:url(/img/icon/mindNetwork.png)" } },
  42. { "Name": "实时课堂", "Url": "studentClassRoom", "style": { "cssText": "background-image:url(/img/icon/classRoom.png)" } }
  43. ];
  44. U.MD.D.I.schoolDeskIcon = [
  45. { "Name": "项目管理", "Url": "project", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
  46. { "Name": "学习中心", "Url": "study", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
  47. { "Name": "学生评价", "Url": "evaluate", "style": { "cssText": "background-image:url(/img/icon/evaluation.png)" } },
  48. { "Name": "通知公告", "Url": "notice", "style": { "cssText": "background-image:url(/img/icon/news.png)" } },
  49. { "Name": "学习资料", "Url": "stuLibrary", "style": { "cssText": "background-image:url(/img/icon/library.png)" } },
  50. { "Name": "电子白板", "Url": "whiteboard", "style": { "cssText": "background-image:url(/img/icon/whiteBoard.png)" } },
  51. { "Name": "问卷调查", "Url": "investigation", "style": { "cssText": "background-image:url(/img/icon/ask.png)" } },
  52. { "Name": "思维导图", "Url": "mind", "style": { "cssText": "background-image:url(/img/icon/mindMapping.png)" } },
  53. { "Name": "协同文档", "Url": "doc", "style": { "cssText": "background-image:url(/img/icon/doc.png)" } },
  54. { "Name": "思维网格", "Url": "mindNetwork", "style": { "cssText": "background-image:url(/img/icon/mindNetwork.png)" } },
  55. { "Name": "训练服务器", "Url": "train", "style": { "cssText": "background-image:url(/img/icon/trainPlatform.png)" } },
  56. { "Name": "目标管理", "Url": "sys", "style": { "cssText": "background-image:url(/img/icon/sys.png)" } },
  57. { "Name": "课程设计", "Url": "courseDesign", "style": { "cssText": "background-image:url(/img/icon/courseDesign.png)" } }
  58. ];
  59. //#region 桌面初始化a
  60. /**
  61. * 初始化桌面的起始函数
  62. *
  63. */
  64. U.MD.D.I.init = function() {
  65. if ($("#U_MD_D_K")[0]) {
  66. //初始化桌面图标
  67. U.MD.D.I.initDesktopIcons($("#U_MD_D_K")[0]);
  68. // var clickUrl = ':12588/requestIp.php';
  69. // U.MD.D.I.Mysqlrequest(clickUrl,function(data){
  70. // U.MD.D.I.Ip = data;
  71. // var AccessUrl = ':12588/useAccess.php?ip=' + U.MD.D.I.Ip;
  72. // U.MD.D.I.Mysqlrequest(AccessUrl,function(data){
  73. // U.selectEl("#U_MD_D_RW").css("width", US.width - 165 + "px");
  74. // })
  75. // //初始化任务栏,因为是静态的,所以直接改变样式即可.
  76. // })
  77. }
  78. }
  79. /**
  80. * 隐藏任务栏
  81. *
  82. * @param {element} 桌面元素
  83. */
  84. U.MD.D.I.hiddenTaskbar = function(el) {
  85. //任务栏位置变小
  86. U.selectEl(el).parentElement(3).css({ "bottom": "-60px" });
  87. //桌面的位置变大
  88. // U.selectEl("#U_MD_D_K").css({ "left": "5px" });
  89. }
  90. /**
  91. * 隐藏任务栏
  92. *
  93. * @param {element} 桌面元素
  94. */
  95. U.MD.D.I.hiddenTaskbarout = function(el) {
  96. //任务栏位置变小
  97. if (!U.UF.EV.stopBubbleMouseOutOrOver(el)) {
  98. //任务栏位置变化
  99. U.selectEl(el).css({ "bottom": "-60px" });
  100. //桌面的位置变大
  101. // U.selectEl("#U_MD_D_K").css({ "left": "5px" });
  102. }
  103. }
  104. /**
  105. * 初始化打印桌面图标
  106. *
  107. * @param {element} 桌面元素
  108. */
  109. U.MD.D.I.initDesktopIcons = function(el) {
  110. var i, //用于循环
  111. _content, //桌面图标元素
  112. _iconcontent, //桌面图标元素
  113. _frag = $$("frag"), //定义一个碎片元素
  114. _type = US.userInfo.type,
  115. _oid = US.userInfo.organizeid;
  116. _teacherDesktopIconInfo = U.MD.D.I.teacherDeskIcon, //获取教师端桌面图标
  117. _studentDesktopIconInfo = U.MD.D.I.studentDeskIcon, //获取学生端桌面图标
  118. _schoolDesktopIconInfo = U.MD.D.I.schoolDeskIcon; //获取测试学校桌面图标
  119. //清楚桌面图标
  120. el.innerHTML = "";
  121. //循环创建桌面图标
  122. if (_type == 2 && _oid != "91305d49-01ba-11ed-8c78-005056b86db5") {
  123. for (i = 0; i < _studentDesktopIconInfo.length; i++) {
  124. _content = $$("div", {
  125. className: "U_MD_D_KO",
  126. "onmousedown": U.UF.C.closure(function(obj) {
  127. //防止拖动图标即打开了桌面应用
  128. U.MD.D.click(this, obj);
  129. }, [_studentDesktopIconInfo[i]]),
  130. "onclick": U.UF.C.closure(function(obj) {
  131. //防止拖动图标即打开了桌面应用
  132. U.MD.D.click(this, obj);
  133. }, [_studentDesktopIconInfo[i]])
  134. }, _frag); //
  135. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  136. $$("div", { className: "U_MD_D_KOS U_Img", "style": _studentDesktopIconInfo[i].style }, _iconcontent);
  137. $$("div", { className: "U_MD_D_KOX", "style": { "cssText": "text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -webkit-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -moz-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; filter: Glow(color=#777777, strength=1)\9;" }, "innerHTML": _studentDesktopIconInfo[i].Name }, _iconcontent);
  138. }
  139. } else if (_type == 1 && _oid != "91305d49-01ba-11ed-8c78-005056b86db5") {
  140. for (i = 0; i < _teacherDesktopIconInfo.length; i++) {
  141. _content = $$("div", {
  142. className: "U_MD_D_KO",
  143. "onmousedown": U.UF.C.closure(function(obj) {
  144. //防止拖动图标即打开了桌面应用
  145. U.MD.D.click(this, obj);
  146. }, [_teacherDesktopIconInfo[i]]),
  147. "onclick": U.UF.C.closure(function(obj) {
  148. //防止拖动图标即打开了桌面应用
  149. U.MD.D.click(this, obj);
  150. }, [_teacherDesktopIconInfo[i]])
  151. }, _frag); //
  152. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  153. $$("div", { className: "U_MD_D_KOS U_Img", "style": _teacherDesktopIconInfo[i].style }, _iconcontent);
  154. $$("div", { className: "U_MD_D_KOX", "style": { "cssText": "text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -webkit-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -moz-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; filter: Glow(color=#777777, strength=1)\9;" }, "innerHTML": _teacherDesktopIconInfo[i].Name }, _iconcontent);
  155. }
  156. } else if (_type == 1 && _oid == "91305d49-01ba-11ed-8c78-005056b86db5") {
  157. for (i = 0; i < _schoolDesktopIconInfo.length; i++) {
  158. _content = $$("div", {
  159. className: "U_MD_D_KO",
  160. "onmousedown": U.UF.C.closure(function(obj) {
  161. //防止拖动图标即打开了桌面应用
  162. U.MD.D.click(this, obj);
  163. }, [_schoolDesktopIconInfo[i]]),
  164. "onclick": U.UF.C.closure(function(obj) {
  165. //防止拖动图标即打开了桌面应用
  166. U.MD.D.click(this, obj);
  167. }, [_schoolDesktopIconInfo[i]])
  168. }, _frag); //
  169. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  170. $$("div", { className: "U_MD_D_KOS U_Img", "style": _schoolDesktopIconInfo[i].style }, _iconcontent);
  171. $$("div", { className: "U_MD_D_KOX", "style": { "cssText": "text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -webkit-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -moz-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; filter: Glow(color=#777777, strength=1)\9;" }, "innerHTML": _schoolDesktopIconInfo[i].Name }, _iconcontent);
  172. }
  173. } else if (_type == 2 && _oid == "91305d49-01ba-11ed-8c78-005056b86db5") {
  174. for (i = 0; i < _studentDesktopIconInfo.length; i++) {
  175. _content = $$("div", {
  176. className: "U_MD_D_KO",
  177. "onmousedown": U.UF.C.closure(function(obj) {
  178. //防止拖动图标即打开了桌面应用
  179. U.MD.D.click(this, obj);
  180. }, [_studentDesktopIconInfo[i]]),
  181. "onclick": U.UF.C.closure(function(obj) {
  182. //防止拖动图标即打开了桌面应用
  183. U.MD.D.click(this, obj);
  184. }, [_studentDesktopIconInfo[i]])
  185. }, _frag); //
  186. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  187. $$("div", { className: "U_MD_D_KOS U_Img", "style": _studentDesktopIconInfo[i].style }, _iconcontent);
  188. $$("div", { className: "U_MD_D_KOX", "style": { "cssText": "text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -webkit-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -moz-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; filter: Glow(color=#777777, strength=1)\9;" }, "innerHTML": _studentDesktopIconInfo[i].Name }, _iconcontent);
  189. }
  190. } else {
  191. for (i = 0; i < _teacherDesktopIconInfo.length; i++) {
  192. _content = $$("div", {
  193. className: "U_MD_D_KO",
  194. "onmousedown": U.UF.C.closure(function(obj) {
  195. //防止拖动图标即打开了桌面应用
  196. U.MD.D.click(this, obj);
  197. }, [_teacherDesktopIconInfo[i]]),
  198. "onclick": U.UF.C.closure(function(obj) {
  199. //防止拖动图标即打开了桌面应用
  200. U.MD.D.click(this, obj);
  201. }, [_teacherDesktopIconInfo[i]])
  202. }, _frag); //
  203. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  204. $$("div", { className: "U_MD_D_KOS U_Img", "style": _teacherDesktopIconInfo[i].style }, _iconcontent);
  205. $$("div", { className: "U_MD_D_KOX", "style": { "cssText": "text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -webkit-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -moz-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; filter: Glow(color=#777777, strength=1)\9;" }, "innerHTML": _teacherDesktopIconInfo[i].Name }, _iconcontent);
  206. }
  207. }
  208. //加载好后给图标定位
  209. U.MD.D.iconPostion($(_frag).Child());
  210. //把图标加载到页面
  211. el.appendChild(_frag);
  212. }
  213. /**
  214. * 显示任务栏
  215. *
  216. * @param {element} 桌面元素
  217. */
  218. U.MD.D.I.displayTaskbar = function(el) {
  219. //判断是否需要形式任务栏,由于用了mouseover事件会冒泡响应多次,这里做了过滤
  220. if (!U.UF.EV.stopBubbleMouseOutOrOver(el) && U.selectEl(el).css("bottom") != "0px") {
  221. //任务栏位置变化
  222. U.selectEl(el).css({ "bottom": "0px" });
  223. //桌面位置变话
  224. // U.selectEl("#U_MD_D_K").css({ "left": "70px" });
  225. }
  226. }
  227. //#region 桌面图标拖动逻辑
  228. /**
  229. * 桌面排列图标
  230. *
  231. * @param {element} 桌面元素
  232. * @param {object} 上下相距的距离
  233. * @param {object} 左右相距的距离
  234. * @return {object} 命名空间
  235. */
  236. U.MD.D.iconPostion = function(childs, top, left) {
  237. var i; //用于循环处理
  238. top = top || 15; //如果没有设置元素的间距处理默认上间距为15
  239. left = left || 20; //如果没有设置元素的间距处理默认左间距为15
  240. //循环所有的图标,设置每个图标的间距,打印顺序是竖排打印的方式
  241. for (i = 0; i < childs.length; i++) {
  242. //如果竖排top超过了范围处理
  243. if (top + 95 > US.height - 10) {
  244. //left超过了页面范围处理,则向上重叠打印处理
  245. if ((left + 180) > US.width) {
  246. top -= 115;
  247. left -= 90;
  248. }
  249. //没有超过范围,那么left+90添加到下一个竖排打印
  250. else {
  251. left += 90;
  252. top = 15;
  253. };
  254. }
  255. //给图标的位置赋值
  256. U.selectEl(childs[i]).css({ top: top + "px", left: left + "px" });
  257. if (i < childs.length - 1) {
  258. //页面图标每次向下加115
  259. top += 115;
  260. }
  261. }
  262. //返回最后调用的图标的位置
  263. return [top, left];
  264. }
  265. /**
  266. * 桌面点击事件逻辑
  267. *
  268. * @param {element} 桌面元素
  269. * @param {object} 上下相距的距离
  270. * @param {object} 左右相距的距离
  271. * @return {object} 命名空间
  272. */
  273. U.MD.D.click = function(el, obj) {
  274. var _buttonnumber = event.button; //点击的按钮的事件值
  275. var _userinfo = US.userInfo;
  276. U.UF.EV.stopBubble(); //阻止向上冒泡
  277. //onmousedown 包含了左键和右键 这里大于2是为了兼容 所有浏览器的右键处理
  278. if (_buttonnumber < 2) {
  279. //如果是click事件的处理
  280. if (event.type == "click") {
  281. //如果元素在mousemove事件中没有移动则出发click事件
  282. if (!U.MD.D.I.IsDrag) {
  283. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  284. U.alert("请先登录您的账号!");
  285. setTimeout(() => {
  286. U.MD.U.L.login();
  287. }, 2000);
  288. } else {
  289. //打开应用处理
  290. U.MD.D.I.openApplication(obj.Url, { "userid": US.userInfo.userid, "directoryid": US.FTPFOLDERID });
  291. }
  292. }
  293. }
  294. //如果是mouse事件的处理
  295. else {
  296. //拖动处理,添加拖动和拖动结束事件
  297. U.UF.F.drag(el, U.MD.D.iconMove, U.MD.D.iconUp);
  298. }
  299. U.MD.D.I.IsDrag = false;
  300. }
  301. }
  302. /**
  303. * 拖动的处理
  304. *
  305. */
  306. U.MD.D.iconMove = function() {
  307. //如果当前位置点击初始化的位置出现了变化,则设置是否拖动的属性 U.MD.D.I.IsDrag为true
  308. U.MD.D.I.IsDrag = true;
  309. }
  310. /**
  311. * 拖动结束后,这里是定位处理,以网状的形式定位
  312. *
  313. * @param {element} 拖动的元素
  314. * @return {object} 命名空间
  315. */
  316. U.MD.D.iconUp = function(el) {
  317. var _top = 15,
  318. _left = 20,
  319. _margin,
  320. _childs = U.selectEl("#U_MD_D_K").Child(), //桌面所有的图标
  321. _positioninfo = U.UF.EL.getElementInfo(el); //获取拖动结束的元素的位置
  322. if (_positioninfo["OT"] > 15) {
  323. //网状的形式定位,如果差超过了55,那么向下定位,否则向上定位
  324. _margin = ((_positioninfo["OT"] - 15) % 115 > 55 && _positioninfo["OT"] + 115 < US.height) ? 1 : 0;
  325. _top = (Math.floor((_positioninfo["OT"] - 15) / 115) + _margin) * 115 + 15;
  326. }
  327. if (_positioninfo["OL"] > 20) {
  328. //网状的形式定位,如果差超过了90,那么向右定位,否则向左定位
  329. _margin = ((_positioninfo["OL"] - 20) % 90 > 45 && _positioninfo["OL"] + 90 < US.width) ? 1 : 0;
  330. _left = (Math.floor((_positioninfo["OL"] - 20) / 90) + _margin) * 90 + 20
  331. }
  332. //while循环判断么一个重叠的元素
  333. do {
  334. _positioninfo = U.MD.D.iconPostion([el], _top, _left); //给重叠的元素向下定位
  335. _top = _positioninfo[0] + 115; //得到定位后的top
  336. _left = _positioninfo[1]; //得到定位后的left
  337. } while (el = U.MD.D.isOverlap(el, _childs, _positioninfo))
  338. }
  339. /**
  340. * 判断拖动后图标是否重叠
  341. *
  342. * @param {element} 拖动的元素
  343. * @param {element} 桌面所有的元素
  344. * @param {array} 拖动元素的位置
  345. ----------[0] 上 top
  346. ----------[1] 左 left
  347. * @return {object} 命名空间
  348. */
  349. U.MD.D.isOverlap = function(el, childs, postionarray) {
  350. //循环所有的图标
  351. for (var i = 0; i < childs.length; i++) {
  352. //判断有没有和该图标诶子重叠的元素
  353. if (el != childs[i] && (childs[i].offsetTop == postionarray[0] && childs[i].offsetLeft == postionarray[1])) {
  354. return childs[i]; //如果有返回
  355. }
  356. }
  357. }
  358. //#endregion
  359. //#endregion
  360. //#region 桌面应用
  361. /**
  362. * 打开应用
  363. *
  364. * @param {string} 类型
  365. -----------------Disk 网盘系统
  366. -----------------PDisk 学习系统网盘
  367. -----------------Poto 图片
  368. -----------------Video 视频
  369. -----------------Music 音乐
  370. -----------------Word word
  371. -----------------Excel excel
  372. -----------------Txt 记事本
  373. -----------------PB 学习系统
  374. -----------------Blog 朋友圈系统
  375. -----------------FTP ftp系统
  376. -----------------Group 好友群
  377. -----------------SY 首页系统
  378. -----------------Set 个人设置
  379. -----------------XSet 系统设置
  380. -----------------App 我们所有的app
  381. -----------------BC c.1473.cn 平台
  382. -----------------CWeb d.1473.cn 变成平台
  383. -----------------其他的外联系统 我们统一用iframe打开
  384. * @param {array} 类型
  385. 如果第一个参数为"disk",则第二个参数为object,里面包含了用户id和目录id{userid:"",directoryid:""}
  386. 如果第一个参数为"word"或者"excel","txt",则第二个参数为文件信息fileinfo。
  387. 如果第一个参数为"blog"或者"PDisk"。建议删除。
  388. 如果第一个参数为其他,则无第二个参数
  389. * @returns {array}
  390. */
  391. window.addEventListener('message', function(e) { // 监听 message 事件
  392. // alert(e.data.type);
  393. if (e.data.type && e.data.type == "1") { //项目管理传入
  394. U.MD.D.I.openInApplication("studyDetail", e.data.cid)
  395. } else if (e.data.close && e.data.close == "1") { //更新用户信息
  396. U.MD.D.I.selectUser();
  397. } else if (e.data.allScreen && e.data.allScreen == "1") {
  398. var _formel = document.getElementById("study") || document.getElementById("studyDetail") || document.getElementById("studentStudy");
  399. U.UF.F.windowZooming(_formel);
  400. } else if (e.data.tools && e.data.tools == "1") {
  401. U.MD.D.I.openApplication("whiteboard")
  402. } else if (e.data.tools && e.data.tools == "2") {
  403. U.MD.D.I.openApplication("note")
  404. } else if (e.data.tools && e.data.tools == "3") {
  405. U.MD.D.I.openApplication("mind")
  406. } else if (e.data.tools && e.data.tools == "4") {
  407. U.MD.D.I.openApplication("investigation")
  408. } else if (e.data.tools && e.data.tools == "6") {
  409. U.MD.D.I.openApplication("doc")
  410. } else if (e.data.tools && e.data.tools == "7") {
  411. U.MD.D.I.openApplication("mindNetwork")
  412. } else if (e.data.tools && e.data.tools == "8") {
  413. U.MD.D.I.openApplication("library")
  414. } else if (e.data.tools && e.data.tools == "17") {
  415. U.MD.D.I.openApplication("stuLibrary")
  416. } else if (e.data.tools && e.data.tools == "18") {
  417. U.MD.D.I.openApplication("train")
  418. }
  419. });
  420. U.MD.D.I.selectUser = function() {
  421. U.A.Request(US.Config.pbl + "selectUser?userid=" + US.userInfo.userid, [], function(res) { //US.userInfo.userid
  422. if (res.value[0].length > 0) {
  423. US.userInfo = res.value[0][0];
  424. $(".userName")[0].innerHTML = US.userInfo.username;
  425. }
  426. }, [], { "type": "GET", "withCredentials": true });
  427. }
  428. U.MD.D.I.openInApplication = function(str, data) {
  429. var _userinfo = US.userInfo, //登录用户信息
  430. _userid = US.userInfo.userid, //登录用户id
  431. _oid = _userinfo.organizeid,
  432. _type = US.userInfo.type;
  433. switch (str) {
  434. case "studyDetail":
  435. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  436. setTimeout(() => {
  437. U.MD.U.L.login();
  438. }, 2000);
  439. } else {
  440. _formdiv = new U.UF.UI.form(
  441. "项目详情",
  442. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/courseDetail?userid=" + _userid + "&oid=" + _oid + "&courseId=" + data + "&tType=" + _type }), {
  443. "id": "studyDetail",
  444. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  445. "onresize": function() {}
  446. }, {
  447. closecallback: function() {}
  448. }, { "style": { "height": "36px" } }).form; //创建窗体
  449. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  450. break;
  451. }
  452. }
  453. }
  454. U.MD.D.I.openApplication = function(str, obj, info) {
  455. obj = obj || {};
  456. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  457. _formdiv, //创建任务栏时同时弹出的窗体元素。
  458. _userinfo = US.userInfo, //登录用户信息
  459. _userid = obj.userid || US.userInfo.userid, //登录用户id
  460. _oid = obj.organizeid || _userinfo.organizeid,
  461. _type = US.userInfo.type;
  462. if (_type == 2 && _oid != "91305d49-01ba-11ed-8c78-005056b86db5") {
  463. switch (str) {
  464. case "studnetProject": //好友打开
  465. _formdiv = new U.UF.UI.form(
  466. "我的项目",
  467. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/project?userid=" + _userid + "&oid=" + _oid }), {
  468. "id": "studnetProject",
  469. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  470. "onresize": function() {}
  471. }, {
  472. closecallback: function() {}
  473. }, { "style": { "height": "36px" } }).form; //创建窗体
  474. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "我的项目", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  475. break;
  476. case "studentEvaluate": //好友打开
  477. _formdiv = new U.UF.UI.form(
  478. "我的评价",
  479. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/works?userid=" + _userid + "&oid=" + _oid }), {
  480. "id": "studentEvaluate",
  481. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  482. "onresize": function() {}
  483. }, {
  484. closecallback: function() {}
  485. }, { "style": { "height": "36px" } }).form; //创建窗体
  486. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "我的评价", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  487. break;
  488. case "my":
  489. _formdiv = new U.UF.UI.form(
  490. "我的资料",
  491. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/data?userid=" + _userid }), {
  492. "id": "my",
  493. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  494. "onresize": function() {}
  495. }, {
  496. closecallback: function() {}
  497. }, { "style": { "height": "36px" } }).form; //创建窗体
  498. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "我的资料", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  499. break;
  500. case "library":
  501. _formdiv = new U.UF.UI.form(
  502. "素材库",
  503. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/library?userid=" + _userid }), {
  504. "id": "library",
  505. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  506. "onresize": function() {}
  507. }, {
  508. closecallback: function() {}
  509. }, { "style": { "height": "36px" } }).form; //创建窗体
  510. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/library.png)" }, "name": "素材库", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  511. break;
  512. case "whiteboard":
  513. _formdiv = new U.UF.UI.form(
  514. "电子白板",
  515. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  516. "id": "whiteboard",
  517. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  518. "onresize": function() {}
  519. }, {
  520. closecallback: function() {}
  521. }, { "style": { "height": "36px" } }).form; //创建窗体
  522. _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); } }
  523. break;
  524. case "investigation":
  525. _formdiv = new U.UF.UI.form(
  526. "问卷调查",
  527. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/ask?userid=" + _userid }), {
  528. "id": "investigation",
  529. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  530. "onresize": function() {}
  531. }, {
  532. closecallback: function() {}
  533. }, { "style": { "height": "36px" } }).form; //创建窗体
  534. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  535. break;
  536. case "note":
  537. _formdiv = new U.UF.UI.form(
  538. "便签分类",
  539. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/note?userid=" + _userid }), {
  540. "id": "note",
  541. "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
  542. "onresize": function() {}
  543. }, {
  544. closecallback: function() {}
  545. }, { "style": { "height": "36px" } }).form; //创建窗体
  546. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/note.png)" }, "name": "便签分类", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  547. break;
  548. // case "score":
  549. // _formdiv = new U.UF.UI.form(
  550. // "量规评分",
  551. // $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn" }), {
  552. // "id": "score",
  553. // "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  554. // "onresize": function() {}
  555. // }, {
  556. // closecallback: function() {}
  557. // }, { "style": { "height": "36px" } }).form; //创建窗体
  558. // _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/score.png)" }, "name": "量规评分", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  559. // break;
  560. case "mind":
  561. _formdiv = new U.UF.UI.form(
  562. "思维导图",
  563. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/kityminder-editor/dist/index.html" }), { //"/jsmind/example/demo.html"
  564. "id": "mind",
  565. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  566. "onresize": function() {}
  567. }, {
  568. closecallback: function() {}
  569. }, { "style": { "height": "36px" } }).form; //创建窗体
  570. _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); } }
  571. break;
  572. case "doc":
  573. // U.MD.D.I.isRoom();
  574. _formdiv = new U.UF.UI.form(
  575. "协同文档",
  576. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  577. "id": "doc",
  578. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  579. "onresize": function() {}
  580. }, {
  581. closecallback: function() {}
  582. }, { "style": { "height": "36px" } }).form; //创建窗体
  583. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function() {
  584. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  585. })
  586. _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); } }
  587. break;
  588. case "studentStudy":
  589. _formdiv = new U.UF.UI.form(
  590. "学习中心",
  591. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&tType=" + _type }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  592. "id": "studentStudy",
  593. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  594. "onresize": function() {}
  595. }, {
  596. closecallback: function() {}
  597. }, { "style": { "height": "36px" } }).form; //创建窗体
  598. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  599. break;
  600. case "mindNetwork": //好友打开
  601. _formdiv = new U.UF.UI.form(
  602. "思维网格",
  603. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid?userid=" + _userid }), {
  604. "id": "mindNetwork",
  605. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  606. "onresize": function() {}
  607. }, {
  608. closecallback: function() {}
  609. }, { "style": { "height": "36px" } }).form; //创建窗体
  610. _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); } }
  611. break;
  612. case "studentClassRoom": //好友打开
  613. _formdiv = new U.UF.UI.form(
  614. "实时课堂",
  615. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/liveRoom?userid=" + _userid + "&oid=" + _oid }), {
  616. "id": "studentClassRoom",
  617. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  618. "onresize": function() {}
  619. }, {
  620. closecallback: function() {}
  621. }, { "style": { "height": "36px" } }).form; //创建窗体
  622. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/classRoom.png)" }, "name": "实时课堂", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  623. setTimeout(() => {
  624. U.UF.F.windowZooming(_formdiv)
  625. }, 0);
  626. break;
  627. }
  628. } else if (_type == 2 && _oid == "91305d49-01ba-11ed-8c78-005056b86db5") {
  629. switch (str) {
  630. case "studnetProject": //好友打开
  631. _formdiv = new U.UF.UI.form(
  632. "我的项目",
  633. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/project?userid=" + _userid + "&oid=" + _oid }), {
  634. "id": "studnetProject",
  635. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  636. "onresize": function() {}
  637. }, {
  638. closecallback: function() {}
  639. }, { "style": { "height": "36px" } }).form; //创建窗体
  640. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "我的项目", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  641. break;
  642. case "studentEvaluate": //好友打开
  643. _formdiv = new U.UF.UI.form(
  644. "我的评价",
  645. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/works?userid=" + _userid + "&oid=" + _oid }), {
  646. "id": "studentEvaluate",
  647. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  648. "onresize": function() {}
  649. }, {
  650. closecallback: function() {}
  651. }, { "style": { "height": "36px" } }).form; //创建窗体
  652. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "我的评价", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  653. break;
  654. case "my":
  655. _formdiv = new U.UF.UI.form(
  656. "我的资料",
  657. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/data?userid=" + _userid }), {
  658. "id": "my",
  659. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  660. "onresize": function() {}
  661. }, {
  662. closecallback: function() {}
  663. }, { "style": { "height": "36px" } }).form; //创建窗体
  664. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "我的资料", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  665. break;
  666. case "library":
  667. _formdiv = new U.UF.UI.form(
  668. "素材库",
  669. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/library?userid=" + _userid }), {
  670. "id": "library",
  671. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  672. "onresize": function() {}
  673. }, {
  674. closecallback: function() {}
  675. }, { "style": { "height": "36px" } }).form; //创建窗体
  676. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/library.png)" }, "name": "素材库", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  677. break;
  678. case "whiteboard":
  679. _formdiv = new U.UF.UI.form(
  680. "电子白板",
  681. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  682. "id": "whiteboard",
  683. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  684. "onresize": function() {}
  685. }, {
  686. closecallback: function() {}
  687. }, { "style": { "height": "36px" } }).form; //创建窗体
  688. _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); } }
  689. break;
  690. case "investigation":
  691. _formdiv = new U.UF.UI.form(
  692. "问卷调查",
  693. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/ask?userid=" + _userid }), {
  694. "id": "investigation",
  695. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  696. "onresize": function() {}
  697. }, {
  698. closecallback: function() {}
  699. }, { "style": { "height": "36px" } }).form; //创建窗体
  700. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  701. break;
  702. case "note":
  703. _formdiv = new U.UF.UI.form(
  704. "便签分类",
  705. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/note?userid=" + _userid }), {
  706. "id": "note",
  707. "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
  708. "onresize": function() {}
  709. }, {
  710. closecallback: function() {}
  711. }, { "style": { "height": "36px" } }).form; //创建窗体
  712. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/note.png)" }, "name": "便签分类", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  713. break;
  714. // case "score":
  715. // _formdiv = new U.UF.UI.form(
  716. // "量规评分",
  717. // $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn" }), {
  718. // "id": "score",
  719. // "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  720. // "onresize": function() {}
  721. // }, {
  722. // closecallback: function() {}
  723. // }, { "style": { "height": "36px" } }).form; //创建窗体
  724. // _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/score.png)" }, "name": "量规评分", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  725. // break;
  726. case "mind":
  727. _formdiv = new U.UF.UI.form(
  728. "思维导图",
  729. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/kityminder-editor/dist/index.html" }), { //"/jsmind/example/demo.html"
  730. "id": "mind",
  731. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  732. "onresize": function() {}
  733. }, {
  734. closecallback: function() {}
  735. }, { "style": { "height": "36px" } }).form; //创建窗体
  736. _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); } }
  737. break;
  738. case "doc":
  739. // U.MD.D.I.isRoom();
  740. _formdiv = new U.UF.UI.form(
  741. "协同文档",
  742. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  743. "id": "doc",
  744. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  745. "onresize": function() {}
  746. }, {
  747. closecallback: function() {}
  748. }, { "style": { "height": "36px" } }).form; //创建窗体
  749. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function() {
  750. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  751. })
  752. _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); } }
  753. break;
  754. case "studentStudy":
  755. _formdiv = new U.UF.UI.form(
  756. "学习中心",
  757. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&tType=" + _type }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  758. "id": "studentStudy",
  759. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  760. "onresize": function() {}
  761. }, {
  762. closecallback: function() {}
  763. }, { "style": { "height": "36px" } }).form; //创建窗体
  764. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  765. break;
  766. case "mindNetwork": //好友打开
  767. _formdiv = new U.UF.UI.form(
  768. "思维网格",
  769. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid?userid=" + _userid }), {
  770. "id": "mindNetwork",
  771. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  772. "onresize": function() {}
  773. }, {
  774. closecallback: function() {}
  775. }, { "style": { "height": "36px" } }).form; //创建窗体
  776. _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); } }
  777. break;
  778. case "studentClassRoom": //好友打开
  779. _formdiv = new U.UF.UI.form(
  780. "实时课堂",
  781. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/liveRoom?userid=" + _userid + "&oid=" + _oid }), {
  782. "id": "studentClassRoom",
  783. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  784. "onresize": function() {}
  785. }, {
  786. closecallback: function() {}
  787. }, { "style": { "height": "36px" } }).form; //创建窗体
  788. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/classRoom.png)" }, "name": "实时课堂", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  789. setTimeout(() => {
  790. U.UF.F.windowZooming(_formdiv)
  791. }, 0);
  792. break;
  793. }
  794. } else if (_type == 1 && _oid != "91305d49-01ba-11ed-8c78-005056b86db5") {
  795. //选择应用处理
  796. switch (str) {
  797. case "project": //好友打开
  798. _formdiv = new U.UF.UI.form(
  799. "项目管理",
  800. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/course?userid=" + _userid + "&oid=" + _oid }), {
  801. "id": "project",
  802. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  803. "onresize": function() {}
  804. }, {
  805. closecallback: function() {}
  806. }, { "style": { "height": "36px" } }).form; //创建窗体
  807. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "项目管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  808. break;
  809. case "student":
  810. _formdiv = new U.UF.UI.form(
  811. "学生管理",
  812. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/student?userid=" + _userid + "&oid=" + _oid }), {
  813. "id": "student",
  814. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  815. "onresize": function() {}
  816. }, {
  817. closecallback: function() {}
  818. }, { "style": { "height": "36px" } }).form; //创建窗体
  819. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/student.png)" }, "name": "学生管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  820. break;
  821. case "evaluate":
  822. _formdiv = new U.UF.UI.form(
  823. "学生评价",
  824. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/works?userid=" + _userid + "&oid=" + _oid }), {
  825. "id": "evaluate",
  826. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  827. "onresize": function() {}
  828. }, {
  829. closecallback: function() {}
  830. }, { "style": { "height": "36px" } }).form; //创建窗体
  831. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "学生评价", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  832. break;
  833. case "sys":
  834. _formdiv = new U.UF.UI.form(
  835. "目标管理",
  836. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/evaluation?userid=" + _userid + "&oid=" + _oid }), {
  837. "id": "sys",
  838. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  839. "onresize": function() {}
  840. }, {
  841. closecallback: function() {}
  842. }, { "style": { "height": "36px" } }).form; //创建窗体
  843. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/sys.png)" }, "name": "目标管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  844. break;
  845. case "courseDesign":
  846. _formdiv = new U.UF.UI.form(
  847. "课程设计",
  848. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/course-design/index.html" }), {
  849. "id": "courseDesign",
  850. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  851. "onresize": function() {}
  852. }, {
  853. closecallback: function() {}
  854. }, { "style": { "height": "36px" } }).form; //创建窗体
  855. _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); } }
  856. break;
  857. case "class":
  858. _formdiv = new U.UF.UI.form(
  859. "班级管理",
  860. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/class?userid=" + _userid + "&oid=" + _oid }), {
  861. "id": "class",
  862. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  863. "onresize": function() {}
  864. }, {
  865. closecallback: function() {}
  866. }, { "style": { "height": "36px" } }).form; //创建窗体
  867. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/class.png)" }, "name": "班级管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  868. break;
  869. case "my":
  870. _formdiv = new U.UF.UI.form(
  871. "我的资料",
  872. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/data?userid=" + _userid }), {
  873. "id": "my",
  874. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  875. "onresize": function() {}
  876. }, {
  877. closecallback: function() {}
  878. }, { "style": { "height": "36px" } }).form; //创建窗体
  879. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "我的资料", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  880. break;
  881. case "notice":
  882. _formdiv = new U.UF.UI.form(
  883. "通知公告",
  884. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/notice?userid=" + _userid }), {
  885. "id": "notice",
  886. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  887. "onresize": function() {}
  888. }, {
  889. closecallback: function() {}
  890. }, { "style": { "height": "36px" } }).form; //创建窗体
  891. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/news.png)" }, "name": "通知公告", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  892. break;
  893. case "library":
  894. _formdiv = new U.UF.UI.form(
  895. "素材库",
  896. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/library?userid=" + _userid }), {
  897. "id": "library",
  898. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  899. "onresize": function() {}
  900. }, {
  901. closecallback: function() {}
  902. }, { "style": { "height": "36px" } }).form; //创建窗体
  903. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/library.png)" }, "name": "素材库", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  904. break;
  905. case "whiteboard":
  906. _formdiv = new U.UF.UI.form(
  907. "电子白板",
  908. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  909. "id": "whiteboard",
  910. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  911. "onresize": function() {}
  912. }, {
  913. closecallback: function() {}
  914. }, { "style": { "height": "36px" } }).form; //创建窗体
  915. _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); } }
  916. break;
  917. case "investigation":
  918. _formdiv = new U.UF.UI.form(
  919. "问卷调查",
  920. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/ask?userid=" + _userid }), {
  921. "id": "investigation",
  922. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  923. "onresize": function() {}
  924. }, {
  925. closecallback: function() {}
  926. }, { "style": { "height": "36px" } }).form; //创建窗体
  927. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  928. break;
  929. case "note":
  930. _formdiv = new U.UF.UI.form(
  931. "便签分类",
  932. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/note?userid=" + _userid }), {
  933. "id": "note",
  934. "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
  935. "onresize": function() {}
  936. }, {
  937. closecallback: function() {}
  938. }, { "style": { "height": "36px" } }).form; //创建窗体
  939. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/note.png)" }, "name": "便签分类", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  940. break;
  941. // case "score":
  942. // _formdiv = new U.UF.UI.form(
  943. // "量规评分",
  944. // $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn" }), {
  945. // "id": "score",
  946. // "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  947. // "onresize": function() {}
  948. // }, {
  949. // closecallback: function() {}
  950. // }, { "style": { "height": "36px" } }).form; //创建窗体
  951. // _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/score.png)" }, "name": "量规评分", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  952. // break;
  953. case "mind":
  954. _formdiv = new U.UF.UI.form(
  955. "思维导图",
  956. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/kityminder-editor/dist/index.html" }), { //"/jsmind/example/demo.html"
  957. "id": "mind",
  958. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  959. "onresize": function() {}
  960. }, {
  961. closecallback: function() {}
  962. }, { "style": { "height": "36px" } }).form; //创建窗体
  963. _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); } }
  964. break;
  965. case "doc":
  966. // U.MD.D.I.isRoom();
  967. _formdiv = new U.UF.UI.form(
  968. "协同文档",
  969. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  970. "id": "doc",
  971. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  972. "onresize": function() {}
  973. }, {
  974. closecallback: function() {}
  975. }, { "style": { "height": "36px" } }).form; //创建窗体
  976. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function() {
  977. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  978. })
  979. _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); } }
  980. break;
  981. case "study":
  982. _formdiv = new U.UF.UI.form(
  983. "学习中心",
  984. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&tType=" + _type }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  985. "id": "study",
  986. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  987. "onresize": function() {}
  988. }, {
  989. closecallback: function() {}
  990. }, { "style": { "height": "36px" } }).form; //创建窗体
  991. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  992. break;
  993. case "mindNetwork": //好友打开
  994. _formdiv = new U.UF.UI.form(
  995. "思维网格",
  996. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid?userid=" + _userid }), {
  997. "id": "mindNetwork",
  998. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  999. "onresize": function() {}
  1000. }, {
  1001. closecallback: function() {}
  1002. }, { "style": { "height": "36px" } }).form; //创建窗体
  1003. _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); } }
  1004. break;
  1005. case "teacherClassRoom": //好友打开
  1006. _formdiv = new U.UF.UI.form(
  1007. "实时课堂",
  1008. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/classRoom?userid=" + _userid + "&oid=" + _oid }), {
  1009. "id": "teacherClassRoom",
  1010. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1011. "onresize": function() {}
  1012. }, {
  1013. closecallback: function() {}
  1014. }, { "style": { "height": "36px" } }).form; //创建窗体
  1015. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/classRoom.png)" }, "name": "实时课堂", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  1016. setTimeout(() => {
  1017. U.UF.F.windowZooming(_formdiv)
  1018. }, 0);
  1019. break;
  1020. }
  1021. } else if (_type == 1 && _oid == "91305d49-01ba-11ed-8c78-005056b86db5") {
  1022. switch (str) {
  1023. case "project": //好友打开
  1024. _formdiv = new U.UF.UI.form(
  1025. "项目管理",
  1026. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/course?userid=" + _userid + "&oid=" + _oid }), {
  1027. "id": "project",
  1028. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1029. "onresize": function() {}
  1030. }, {
  1031. closecallback: function() {}
  1032. }, { "style": { "height": "36px" } }).form; //创建窗体
  1033. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "项目管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  1034. break;
  1035. case "evaluate":
  1036. _formdiv = new U.UF.UI.form(
  1037. "学生评价",
  1038. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/works?userid=" + _userid + "&oid=" + _oid }), {
  1039. "id": "evaluate",
  1040. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1041. "onresize": function() {}
  1042. }, {
  1043. closecallback: function() {}
  1044. }, { "style": { "height": "36px" } }).form; //创建窗体
  1045. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "学生评价", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  1046. break;
  1047. case "notice":
  1048. _formdiv = new U.UF.UI.form(
  1049. "通知公告",
  1050. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/notice?userid=" + _userid }), {
  1051. "id": "notice",
  1052. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1053. "onresize": function() {}
  1054. }, {
  1055. closecallback: function() {}
  1056. }, { "style": { "height": "36px" } }).form; //创建窗体
  1057. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/news.png)" }, "name": "通知公告", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  1058. break;
  1059. case "stuLibrary":
  1060. _formdiv = new U.UF.UI.form(
  1061. "学习资料",
  1062. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/studyLibrary?userid=" + _userid }), {
  1063. "id": "stuLibrary",
  1064. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1065. "onresize": function() {}
  1066. }, {
  1067. closecallback: function() {}
  1068. }, { "style": { "height": "36px" } }).form; //创建窗体
  1069. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/stuLibrary.png)" }, "name": "学习资料", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  1070. break;
  1071. case "whiteboard":
  1072. _formdiv = new U.UF.UI.form(
  1073. "电子白板",
  1074. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  1075. "id": "whiteboard",
  1076. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1077. "onresize": function() {}
  1078. }, {
  1079. closecallback: function() {}
  1080. }, { "style": { "height": "36px" } }).form; //创建窗体
  1081. _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); } }
  1082. break;
  1083. case "investigation":
  1084. _formdiv = new U.UF.UI.form(
  1085. "问卷调查",
  1086. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/ask?userid=" + _userid }), {
  1087. "id": "investigation",
  1088. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1089. "onresize": function() {}
  1090. }, {
  1091. closecallback: function() {}
  1092. }, { "style": { "height": "36px" } }).form; //创建窗体
  1093. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  1094. break;
  1095. case "mind":
  1096. _formdiv = new U.UF.UI.form(
  1097. "思维导图",
  1098. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/kityminder-editor/dist/index.html" }), { //"/jsmind/example/demo.html"
  1099. "id": "mind",
  1100. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1101. "onresize": function() {}
  1102. }, {
  1103. closecallback: function() {}
  1104. }, { "style": { "height": "36px" } }).form; //创建窗体
  1105. _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); } }
  1106. break;
  1107. case "doc":
  1108. // U.MD.D.I.isRoom();
  1109. _formdiv = new U.UF.UI.form(
  1110. "协同文档",
  1111. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  1112. "id": "doc",
  1113. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1114. "onresize": function() {}
  1115. }, {
  1116. closecallback: function() {}
  1117. }, { "style": { "height": "36px" } }).form; //创建窗体
  1118. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function() {
  1119. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  1120. })
  1121. _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); } }
  1122. break;
  1123. case "study":
  1124. _formdiv = new U.UF.UI.form(
  1125. "学习中心",
  1126. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&tType=" + _type }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  1127. "id": "study",
  1128. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  1129. "onresize": function() {}
  1130. }, {
  1131. closecallback: function() {}
  1132. }, { "style": { "height": "36px" } }).form; //创建窗体
  1133. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  1134. break;
  1135. case "mindNetwork": //好友打开
  1136. _formdiv = new U.UF.UI.form(
  1137. "思维网格",
  1138. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid?userid=" + _userid }), {
  1139. "id": "mindNetwork",
  1140. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1141. "onresize": function() {}
  1142. }, {
  1143. closecallback: function() {}
  1144. }, { "style": { "height": "36px" } }).form; //创建窗体
  1145. _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); } }
  1146. break;
  1147. case "train": //好友打开
  1148. _formdiv = new U.UF.UI.form(
  1149. "训练服务器",
  1150. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://xunlian.cocorobo.cn" }), {
  1151. "id": "mindNetwork",
  1152. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1153. "onresize": function() {}
  1154. }, {
  1155. closecallback: function() {}
  1156. }, { "style": { "height": "36px" } }).form; //创建窗体
  1157. _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); } }
  1158. break;
  1159. case "sys":
  1160. _formdiv = new U.UF.UI.form(
  1161. "目标管理",
  1162. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/evaluation?userid=" + _userid + "&oid=" + _oid }), {
  1163. "id": "sys",
  1164. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1165. "onresize": function() {}
  1166. }, {
  1167. closecallback: function() {}
  1168. }, { "style": { "height": "36px" } }).form; //创建窗体
  1169. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/sys.png)" }, "name": "目标管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  1170. break;
  1171. case "courseDesign":
  1172. _formdiv = new U.UF.UI.form(
  1173. "课程设计",
  1174. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/course-design/index.html" }), {
  1175. "id": "courseDesign",
  1176. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1177. "onresize": function() {}
  1178. }, {
  1179. closecallback: function() {}
  1180. }, { "style": { "height": "36px" } }).form; //创建窗体
  1181. _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); } }
  1182. break;
  1183. }
  1184. }
  1185. //U.MD.D.I.openClick(str);
  1186. //如果有任务栏信息
  1187. if (_taskbar) {
  1188. U.MD.D.T.taskbar(_taskbar); //创建任务处理
  1189. }
  1190. }
  1191. // U.MD.D.I.openClick = function(str){
  1192. // var click = '';
  1193. // switch(str){
  1194. // case 'friend':
  1195. // click = '我的好友';
  1196. // break;
  1197. // case 'domain':
  1198. // click = '域名管理';
  1199. // break;
  1200. // case 'disk':
  1201. // click = '我的云盘';
  1202. // break;
  1203. // case 'word':
  1204. // click = 'Word';
  1205. // break;
  1206. // case 'excel':
  1207. // click = 'Execl';
  1208. // break;
  1209. // case 'txt':
  1210. // click = '文本文件';
  1211. // break;
  1212. // case 'lookupFriend':
  1213. // click = '查找好友';
  1214. // break;
  1215. // case 'ftp':
  1216. // click = 'FTP';
  1217. // break;
  1218. // case 'group':
  1219. // click = '群组';
  1220. // break;
  1221. // case 'set':
  1222. // click = '我的设置';
  1223. // break;
  1224. // case 'systemSet':
  1225. // click = '系统设置';
  1226. // break;
  1227. // case 'boomYun':
  1228. // click = '互联办公';
  1229. // break;
  1230. // case 'xz':
  1231. // click = '云端下载';
  1232. // break;
  1233. // case 'client':
  1234. // click = '有思浏览器';
  1235. // break;
  1236. // case 'backEndProgramming':
  1237. // click = '在线后台编程';
  1238. // break;
  1239. // case 'frontEndProgramming':
  1240. // click = '在线前端编程';
  1241. // break;
  1242. // default: break;
  1243. // }
  1244. // if(U.MD.D.I.Ip && click){
  1245. // var clickUrl = ':12588/useClick.php?name=' + click + '&ip=' + U.MD.D.I.Ip;
  1246. // U.MD.D.I.Mysqlrequest(clickUrl,function(data){
  1247. // })
  1248. // }
  1249. // }
  1250. /**
  1251. *函数作用:ajax简易函数,使用post格式
  1252. *@param url {data} 后台地址
  1253. *@param data {data} 参数json
  1254. *@param fn {data} 回调函数
  1255. *
  1256. */
  1257. // U.MD.D.I.Mysqlrequest = function(url,fn){
  1258. // var xhr = new XMLHttpRequest();
  1259. // xhr.open("GET",url,true);
  1260. // xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  1261. // xhr.onreadystatechange = function(){
  1262. // if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 304)){
  1263. // fn.call(this,xhr.responseText);
  1264. // }
  1265. // };
  1266. // xhr.send();
  1267. // }
  1268. /*判断是否是内网IP*/
  1269. // U.MD.D.I.isInnerIPFn = function(str){
  1270. // var curPageUrl = str;
  1271. // var reg1 = /(http|ftp|https|www):\/\//g;//去掉前缀
  1272. // curPageUrl =curPageUrl.replace(reg1,'');
  1273. // // console.log('curPageUrl-1 '+curPageUrl);
  1274. // var reg2 = /\:+/g;//替换冒号为一点
  1275. // curPageUrl =curPageUrl.replace(reg2,'.');
  1276. // // console.log('curPageUrl-2 '+curPageUrl);
  1277. // curPageUrl = curPageUrl.split('.');//通过一点来划分数组
  1278. // var ipAddress = curPageUrl[0]+'.'+curPageUrl[1]+'.'+curPageUrl[2]+'.'+curPageUrl[3];
  1279. // if(curPageUrl[2] != '16'){
  1280. // return ipAddress;
  1281. // }else{
  1282. // return false;
  1283. // }
  1284. // }
  1285. // U.MD.D.I.getUserIP = function(onNewIP) { // onNewIp - your listener function for new IPs
  1286. // //compatibility for firefox and chrome
  1287. // var myPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
  1288. // var pc = new myPeerConnection({
  1289. // iceServers: []
  1290. // }),
  1291. // noop = function() {},
  1292. // localIPs = {},
  1293. // ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g,
  1294. // key;
  1295. // function iterateIP(ip) {
  1296. // if (!localIPs[ip]) onNewIP(ip);
  1297. // localIPs[ip] = true;
  1298. // }
  1299. // //create a bogus data channel
  1300. // pc.createDataChannel("");
  1301. // // create offer and set local description
  1302. // pc.createOffer().then(function(sdp) {
  1303. // sdp.sdp.split('\n').forEach(function(line) {
  1304. // if (line.indexOf('candidate') < 0) return;
  1305. // line.match(ipRegex).forEach(iterateIP);
  1306. // });
  1307. // pc.setLocalDescription(sdp, noop, noop);
  1308. // }).catch(function(reason) {
  1309. // // An error occurred, so handle the failure to connect
  1310. // });
  1311. // //sten for candidate events
  1312. // pc.onicecandidate = function(ice) {
  1313. // if (!ice || !ice.candidate || !ice.candidate.candidate || !ice.candidate.candidate.match(ipRegex)) return;
  1314. // ice.candidate.candidate.match(ipRegex).forEach(iterateIP);
  1315. // };
  1316. // }
  1317. // U.MD.D.I.getUserIpBool = function(callback){
  1318. // U.MD.D.I.getUserIP(function(ip){
  1319. // alert("Got IP! :" + ip);
  1320. // });
  1321. //}
  1322. //#endregion
  1323. U.MD.D.I.openApplicationJie = function (str) {
  1324. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  1325. _formdiv, //创建任务栏时同时弹出的窗体元素。
  1326. _userinfo = US.userInfo, //登录用户信息
  1327. _userid = US.userInfo.userid //登录用户id
  1328. let _iframe;
  1329. var _jie = $$("div", {
  1330. "style": {
  1331. "position": "absolute",
  1332. "bottom": "50px",
  1333. "right": "50px",
  1334. "zIndex": "9999",
  1335. "backgroundColor": "#2268bc",
  1336. "color": "#fff",
  1337. "padding": "12px 20px",
  1338. "cursor": "pointer",
  1339. "borderRadius": "4px",
  1340. },
  1341. "innerHTML": "截图"
  1342. })
  1343. var _box = $$('div', {
  1344. "style": {
  1345. "position": "relative",
  1346. "width": "100%",
  1347. "height": "100%",
  1348. },
  1349. })
  1350. switch (str) {
  1351. case "whiteboard":
  1352. _iframe = $$("iframe", {
  1353. "frameborder": "no",
  1354. "border": "0",
  1355. "scrolling ": "no",
  1356. "style": {
  1357. "cssText": "border:0;width:100%;height:100%"
  1358. },
  1359. "src": "https://iwb.cocorobo.cn/"
  1360. })
  1361. _box.appendChild(_iframe);
  1362. _box.appendChild(_jie);
  1363. _formdiv = new U.UF.UI.form(
  1364. "电子白板",
  1365. _box, {
  1366. "id": "whiteboard",
  1367. "style": {
  1368. "width": "90%",
  1369. "height": "90%",
  1370. "overflow": 'hidden'
  1371. },
  1372. "onresize": function () {}
  1373. }, {
  1374. closecallback: function () {}
  1375. }, {
  1376. "style": {
  1377. "height": "36px"
  1378. }
  1379. }).form; //创建窗体
  1380. _taskbar = {
  1381. "id": str + _formdiv.id,
  1382. "style": {
  1383. "backgroundImage": "url(/img/icon/whiteBoard.png)"
  1384. },
  1385. "name": "电子白板",
  1386. "forms": _formdiv,
  1387. "click": function () {
  1388. U.MD.D.I.openApplication(str, obj, info);
  1389. }
  1390. }
  1391. break;
  1392. case "mind":
  1393. _iframe = $$("iframe", {
  1394. "frameborder": "no",
  1395. "border": "0",
  1396. "scrolling ": "no",
  1397. "style": {
  1398. "cssText": "border:0;width:100%;height:100%"
  1399. },
  1400. "src": "/kityminder-editor/dist/index.html"
  1401. })
  1402. _box.appendChild(_iframe);
  1403. _box.appendChild(_jie);
  1404. _formdiv = new U.UF.UI.form(
  1405. "思维导图",
  1406. _box, { //"/jsmind/example/demo.html"
  1407. "id": "mind",
  1408. "style": {
  1409. "width": "90%",
  1410. "height": "90%",
  1411. "overflow": 'hidden'
  1412. },
  1413. "onresize": function () {}
  1414. }, {
  1415. closecallback: function () {}
  1416. }, {
  1417. "style": {
  1418. "height": "36px"
  1419. }
  1420. }).form; //创建窗体
  1421. _taskbar = {
  1422. "id": str + _formdiv.id,
  1423. "style": {
  1424. "backgroundImage": "url(/img/icon/mindMapping.png)"
  1425. },
  1426. "name": "思维导图",
  1427. "forms": _formdiv,
  1428. "click": function () {
  1429. U.MD.D.I.openApplication(str, obj, info);
  1430. }
  1431. }
  1432. break;
  1433. case "doc":
  1434. _iframe = $$("iframe", {
  1435. "frameborder": "no",
  1436. "border": "0",
  1437. "scrolling ": "no",
  1438. "style": {
  1439. "cssText": "border:0;width:100%;height:100%"
  1440. },
  1441. "src": "/Office/Word/WordEditArea.htm"
  1442. })
  1443. _box.appendChild(_iframe);
  1444. _box.appendChild(_jie);
  1445. _formdiv = new U.UF.UI.form(
  1446. "协同文档",
  1447. _box, {
  1448. "id": "doc",
  1449. "style": {
  1450. "width": "90%",
  1451. "height": "90%",
  1452. "overflow": 'hidden'
  1453. },
  1454. "onresize": function () {}
  1455. }, {
  1456. closecallback: function () {}
  1457. }, {
  1458. "style": {
  1459. "height": "36px"
  1460. }
  1461. }).form; //创建窗体
  1462. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  1463. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  1464. })
  1465. _taskbar = {
  1466. "id": str + _formdiv.id,
  1467. "style": {
  1468. "backgroundImage": "url(/img/icon/doc.png)"
  1469. },
  1470. "name": "协同文档",
  1471. "forms": _formdiv,
  1472. "click": function () {
  1473. U.MD.D.I.openApplication(str, obj, info);
  1474. }
  1475. }
  1476. break;
  1477. case "mindNetwork": //好友打开
  1478. _iframe = $$("iframe", {
  1479. "webkitallowfullscreen": "",
  1480. "mozallowfullscreen": "",
  1481. "allowfullscreen": "",
  1482. "frameborder": "no",
  1483. "border": "0",
  1484. "scrolling ": "no",
  1485. "style": {
  1486. "cssText": "border:0; width:100%; height:100%;"
  1487. },
  1488. "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid?userid=" + _userid
  1489. })
  1490. _box.appendChild(_iframe);
  1491. _box.appendChild(_jie);
  1492. _formdiv = new U.UF.UI.form(
  1493. "思维网格",
  1494. _box, {
  1495. "id": "mindNetwork",
  1496. "style": {
  1497. "width": "90%",
  1498. "height": "90%",
  1499. "overflow": 'hidden'
  1500. },
  1501. "onresize": function () {}
  1502. }, {
  1503. closecallback: function () {}
  1504. }, {
  1505. "style": {
  1506. "height": "36px"
  1507. }
  1508. }).form; //创建窗体
  1509. _taskbar = {
  1510. "id": str + _formdiv.id,
  1511. "style": {
  1512. "backgroundImage": "url(/img/icon/mindNetwork.png)"
  1513. },
  1514. "name": "思维网格",
  1515. "forms": _formdiv,
  1516. "click": function () {
  1517. U.MD.D.I.openApplication(str, obj, info);
  1518. }
  1519. }
  1520. break;
  1521. }
  1522. const script1 = document.createElement("script");
  1523. script1.type = "text/javascript";
  1524. script1.src =
  1525. "https://pbl.cocorobo.cn/pbl-student-table/dist/jquery-3.6.0.min.js";
  1526. const script2 = document.createElement("script");
  1527. script2.type = "text/javascript";
  1528. script2.src =
  1529. "https://pbl.cocorobo.cn/pbl-student-table/dist/aws-sdk-2.235.1.min.js";
  1530. const script3 = document.createElement("script");
  1531. script3.type = "text/javascript";
  1532. script3.src = "https://html2canvas.hertzen.com/dist/html2canvas.min.js";
  1533. const script4 = document.createElement("script");
  1534. script4.type = "text/javascript";
  1535. script4.src = "https://pbl.cocorobo.cn/pbl-student-table/dist/jietu.js";
  1536. if (_iframe) {
  1537. _iframe.onload = () => {
  1538. _iframe.contentWindow.document.body.appendChild(script1);
  1539. _iframe.contentWindow.document.body.appendChild(script2);
  1540. // _iframe.contentWindow.document.body.appendChild(script3);
  1541. _iframe.contentWindow.document.body.appendChild(script4);
  1542. };
  1543. _jie.onclick = () => {
  1544. var _ajs = _iframe.contentWindow.document.createElement("script");
  1545. _ajs.type = "text/javascript";
  1546. _ajs.innerHTML =
  1547. 'var _js = document.createElement("script");\n' +
  1548. '_js.type="text/javascript";\n' +
  1549. '_js.src="https://html2canvas.hertzen.com/dist/html2canvas.min.js";\n' +
  1550. "_js.onload = function(){\n" +
  1551. " html2canvas(document.body).then(canvas => {\n" +
  1552. '  var base64Url = canvas.toDataURL("image/png");\n' +
  1553. 'var base64 = "<img src=" + base64Url + " />"\n' +
  1554. 'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
  1555. "beforeUpload_shishi(file," +
  1556. "'" +
  1557. this.userid +
  1558. "'" +
  1559. ", " +
  1560. "'" +
  1561. this.cid +
  1562. "'" +
  1563. ")\n" +
  1564. " });\n" +
  1565. "}\n" +
  1566. "document.head.appendChild(_js);\n";
  1567. _iframe.contentWindow.document.head.appendChild(_ajs);
  1568. }
  1569. }
  1570. //U.MD.D.I.openClick(str);
  1571. //如果有任务栏信息
  1572. if (_taskbar) {
  1573. U.MD.D.T.taskbar(_taskbar); //创建任务处理
  1574. }
  1575. }