DeskTop.js 102 KB

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