DeskTop.js 84 KB

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