DeskTop.js 90 KB

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