DeskTop.js 106 KB

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