DeskTop.js 72 KB

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