DeskTop.js 74 KB

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