DeskTop.js 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245
  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") || document.getElementById("studentStudy");
  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. _type = US.userInfo.type;
  416. switch (str) {
  417. case "studyDetail":
  418. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  419. setTimeout(() => {
  420. U.MD.U.L.login();
  421. }, 2000);
  422. } else {
  423. _formdiv = new U.UF.UI.form(
  424. "项目详情",
  425. $$("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 }), {
  426. "id": "studyDetail",
  427. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  428. "onresize": function() {}
  429. }, {
  430. closecallback: function() {}
  431. }, { "style": { "height": "36px" } }).form; //创建窗体
  432. _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); } }
  433. break;
  434. }
  435. }
  436. }
  437. U.MD.D.I.openApplication = function(str, obj, info) {
  438. obj = obj || {};
  439. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  440. _formdiv, //创建任务栏时同时弹出的窗体元素。
  441. _userinfo = US.userInfo, //登录用户信息
  442. _userid = obj.userid || US.userInfo.userid, //登录用户id
  443. _oid = obj.organizeid || _userinfo.organizeid,
  444. _type = US.userInfo.type;
  445. if (_type == 2 && _oid != "91305d49-01ba-11ed-8c78-005056b86db5") {
  446. switch (str) {
  447. case "studnetProject": //好友打开
  448. _formdiv = new U.UF.UI.form(
  449. "我的项目",
  450. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/project?userid=" + _userid + "&oid=" + _oid }), {
  451. "id": "studnetProject",
  452. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  453. "onresize": function() {}
  454. }, {
  455. closecallback: function() {}
  456. }, { "style": { "height": "36px" } }).form; //创建窗体
  457. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "我的项目", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  458. break;
  459. case "studentEvaluate": //好友打开
  460. _formdiv = new U.UF.UI.form(
  461. "我的评价",
  462. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/works?userid=" + _userid + "&oid=" + _oid }), {
  463. "id": "studentEvaluate",
  464. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  465. "onresize": function() {}
  466. }, {
  467. closecallback: function() {}
  468. }, { "style": { "height": "36px" } }).form; //创建窗体
  469. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "我的评价", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  470. break;
  471. case "my":
  472. _formdiv = new U.UF.UI.form(
  473. "我的资料",
  474. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/data?userid=" + _userid }), {
  475. "id": "my",
  476. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  477. "onresize": function() {}
  478. }, {
  479. closecallback: function() {}
  480. }, { "style": { "height": "36px" } }).form; //创建窗体
  481. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "我的资料", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  482. break;
  483. case "library":
  484. _formdiv = new U.UF.UI.form(
  485. "素材库",
  486. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/library?userid=" + _userid }), {
  487. "id": "library",
  488. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  489. "onresize": function() {}
  490. }, {
  491. closecallback: function() {}
  492. }, { "style": { "height": "36px" } }).form; //创建窗体
  493. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/library.png)" }, "name": "素材库", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  494. break;
  495. case "whiteboard":
  496. _formdiv = new U.UF.UI.form(
  497. "电子白板",
  498. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  499. "id": "whiteboard",
  500. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  501. "onresize": function() {}
  502. }, {
  503. closecallback: function() {}
  504. }, { "style": { "height": "36px" } }).form; //创建窗体
  505. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/whiteBoard.png)" }, "name": "电子白板", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  506. break;
  507. case "investigation":
  508. _formdiv = new U.UF.UI.form(
  509. "问卷调查",
  510. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/ask?userid=" + _userid }), {
  511. "id": "investigation",
  512. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  513. "onresize": function() {}
  514. }, {
  515. closecallback: function() {}
  516. }, { "style": { "height": "36px" } }).form; //创建窗体
  517. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  518. break;
  519. case "note":
  520. _formdiv = new U.UF.UI.form(
  521. "便签分类",
  522. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/note?userid=" + _userid }), {
  523. "id": "note",
  524. "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
  525. "onresize": function() {}
  526. }, {
  527. closecallback: function() {}
  528. }, { "style": { "height": "36px" } }).form; //创建窗体
  529. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/note.png)" }, "name": "便签分类", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  530. break;
  531. // case "score":
  532. // _formdiv = new U.UF.UI.form(
  533. // "量规评分",
  534. // $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn" }), {
  535. // "id": "score",
  536. // "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  537. // "onresize": function() {}
  538. // }, {
  539. // closecallback: function() {}
  540. // }, { "style": { "height": "36px" } }).form; //创建窗体
  541. // _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/score.png)" }, "name": "量规评分", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  542. // break;
  543. case "mind":
  544. _formdiv = new U.UF.UI.form(
  545. "思维导图",
  546. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/kityminder-editor/dist/index.html" }), { //"/jsmind/example/demo.html"
  547. "id": "mind",
  548. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  549. "onresize": function() {}
  550. }, {
  551. closecallback: function() {}
  552. }, { "style": { "height": "36px" } }).form; //创建窗体
  553. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindMapping.png)" }, "name": "思维导图", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  554. break;
  555. case "doc":
  556. // U.MD.D.I.isRoom();
  557. _formdiv = new U.UF.UI.form(
  558. "协同文档",
  559. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  560. "id": "doc",
  561. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  562. "onresize": function() {}
  563. }, {
  564. closecallback: function() {}
  565. }, { "style": { "height": "36px" } }).form; //创建窗体
  566. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function() {
  567. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  568. })
  569. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/doc.png)" }, "name": "协同文档", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  570. break;
  571. case "studentStudy":
  572. _formdiv = new U.UF.UI.form(
  573. "学习中心",
  574. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&tType=" + _type }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  575. "id": "studentStudy",
  576. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  577. "onresize": function() {}
  578. }, {
  579. closecallback: function() {}
  580. }, { "style": { "height": "36px" } }).form; //创建窗体
  581. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  582. break;
  583. case "mindNetwork": //好友打开
  584. _formdiv = new U.UF.UI.form(
  585. "思维网格",
  586. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid?userid=" + _userid }), {
  587. "id": "mindNetwork",
  588. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  589. "onresize": function() {}
  590. }, {
  591. closecallback: function() {}
  592. }, { "style": { "height": "36px" } }).form; //创建窗体
  593. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindNetwork.png)" }, "name": "思维网格", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  594. break;
  595. case "studentClassRoom": //好友打开
  596. _formdiv = new U.UF.UI.form(
  597. "实时课堂",
  598. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/liveRoom?userid=" + _userid + "&oid=" + _oid }), {
  599. "id": "studentClassRoom",
  600. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  601. "onresize": function() {}
  602. }, {
  603. closecallback: function() {}
  604. }, { "style": { "height": "36px" } }).form; //创建窗体
  605. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/classRoom.png)" }, "name": "实时课堂", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  606. setTimeout(() => {
  607. U.UF.F.windowZooming(_formdiv)
  608. }, 0);
  609. break;
  610. }
  611. } else if (_type == 1 && _oid != "91305d49-01ba-11ed-8c78-005056b86db5") {
  612. //选择应用处理
  613. switch (str) {
  614. case "project": //好友打开
  615. _formdiv = new U.UF.UI.form(
  616. "项目管理",
  617. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/course?userid=" + _userid + "&oid=" + _oid }), {
  618. "id": "project",
  619. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  620. "onresize": function() {}
  621. }, {
  622. closecallback: function() {}
  623. }, { "style": { "height": "36px" } }).form; //创建窗体
  624. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "项目管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  625. break;
  626. case "student":
  627. _formdiv = new U.UF.UI.form(
  628. "学生管理",
  629. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/student?userid=" + _userid + "&oid=" + _oid }), {
  630. "id": "student",
  631. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  632. "onresize": function() {}
  633. }, {
  634. closecallback: function() {}
  635. }, { "style": { "height": "36px" } }).form; //创建窗体
  636. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/student.png)" }, "name": "学生管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  637. break;
  638. case "evaluate":
  639. _formdiv = new U.UF.UI.form(
  640. "学生评价",
  641. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/works?userid=" + _userid + "&oid=" + _oid }), {
  642. "id": "evaluate",
  643. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  644. "onresize": function() {}
  645. }, {
  646. closecallback: function() {}
  647. }, { "style": { "height": "36px" } }).form; //创建窗体
  648. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "学生评价", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  649. break;
  650. case "sys":
  651. _formdiv = new U.UF.UI.form(
  652. "目标管理",
  653. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/evaluation?userid=" + _userid + "&oid=" + _oid }), {
  654. "id": "sys",
  655. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  656. "onresize": function() {}
  657. }, {
  658. closecallback: function() {}
  659. }, { "style": { "height": "36px" } }).form; //创建窗体
  660. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/sys.png)" }, "name": "目标管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  661. break;
  662. case "courseDesign":
  663. _formdiv = new U.UF.UI.form(
  664. "课程设计",
  665. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/course-design/index.html" }), {
  666. "id": "courseDesign",
  667. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  668. "onresize": function() {}
  669. }, {
  670. closecallback: function() {}
  671. }, { "style": { "height": "36px" } }).form; //创建窗体
  672. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/courseDesign.png)" }, "name": "课程设计", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  673. break;
  674. case "class":
  675. _formdiv = new U.UF.UI.form(
  676. "班级管理",
  677. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/class?userid=" + _userid + "&oid=" + _oid }), {
  678. "id": "class",
  679. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  680. "onresize": function() {}
  681. }, {
  682. closecallback: function() {}
  683. }, { "style": { "height": "36px" } }).form; //创建窗体
  684. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/class.png)" }, "name": "班级管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  685. break;
  686. case "my":
  687. _formdiv = new U.UF.UI.form(
  688. "我的资料",
  689. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/data?userid=" + _userid }), {
  690. "id": "my",
  691. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  692. "onresize": function() {}
  693. }, {
  694. closecallback: function() {}
  695. }, { "style": { "height": "36px" } }).form; //创建窗体
  696. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "我的资料", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  697. break;
  698. case "notice":
  699. _formdiv = new U.UF.UI.form(
  700. "通知公告",
  701. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/notice?userid=" + _userid }), {
  702. "id": "notice",
  703. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  704. "onresize": function() {}
  705. }, {
  706. closecallback: function() {}
  707. }, { "style": { "height": "36px" } }).form; //创建窗体
  708. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/news.png)" }, "name": "通知公告", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  709. break;
  710. case "library":
  711. _formdiv = new U.UF.UI.form(
  712. "素材库",
  713. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/library?userid=" + _userid }), {
  714. "id": "library",
  715. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  716. "onresize": function() {}
  717. }, {
  718. closecallback: function() {}
  719. }, { "style": { "height": "36px" } }).form; //创建窗体
  720. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/library.png)" }, "name": "素材库", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  721. break;
  722. case "whiteboard":
  723. _formdiv = new U.UF.UI.form(
  724. "电子白板",
  725. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  726. "id": "whiteboard",
  727. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  728. "onresize": function() {}
  729. }, {
  730. closecallback: function() {}
  731. }, { "style": { "height": "36px" } }).form; //创建窗体
  732. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/whiteBoard.png)" }, "name": "电子白板", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  733. break;
  734. case "investigation":
  735. _formdiv = new U.UF.UI.form(
  736. "问卷调查",
  737. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/ask?userid=" + _userid }), {
  738. "id": "investigation",
  739. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  740. "onresize": function() {}
  741. }, {
  742. closecallback: function() {}
  743. }, { "style": { "height": "36px" } }).form; //创建窗体
  744. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  745. break;
  746. case "note":
  747. _formdiv = new U.UF.UI.form(
  748. "便签分类",
  749. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/note?userid=" + _userid }), {
  750. "id": "note",
  751. "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
  752. "onresize": function() {}
  753. }, {
  754. closecallback: function() {}
  755. }, { "style": { "height": "36px" } }).form; //创建窗体
  756. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/note.png)" }, "name": "便签分类", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  757. break;
  758. // case "score":
  759. // _formdiv = new U.UF.UI.form(
  760. // "量规评分",
  761. // $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn" }), {
  762. // "id": "score",
  763. // "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  764. // "onresize": function() {}
  765. // }, {
  766. // closecallback: function() {}
  767. // }, { "style": { "height": "36px" } }).form; //创建窗体
  768. // _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); } }
  769. // break;
  770. case "mind":
  771. _formdiv = new U.UF.UI.form(
  772. "思维导图",
  773. $$("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"
  774. "id": "mind",
  775. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  776. "onresize": function() {}
  777. }, {
  778. closecallback: function() {}
  779. }, { "style": { "height": "36px" } }).form; //创建窗体
  780. _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); } }
  781. break;
  782. case "doc":
  783. // U.MD.D.I.isRoom();
  784. _formdiv = new U.UF.UI.form(
  785. "协同文档",
  786. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  787. "id": "doc",
  788. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  789. "onresize": function() {}
  790. }, {
  791. closecallback: function() {}
  792. }, { "style": { "height": "36px" } }).form; //创建窗体
  793. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function() {
  794. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  795. })
  796. _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); } }
  797. break;
  798. case "study":
  799. _formdiv = new U.UF.UI.form(
  800. "学习中心",
  801. $$("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
  802. "id": "study",
  803. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  804. "onresize": function() {}
  805. }, {
  806. closecallback: function() {}
  807. }, { "style": { "height": "36px" } }).form; //创建窗体
  808. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  809. break;
  810. case "mindNetwork": //好友打开
  811. _formdiv = new U.UF.UI.form(
  812. "思维网格",
  813. $$("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 }), {
  814. "id": "mindNetwork",
  815. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  816. "onresize": function() {}
  817. }, {
  818. closecallback: function() {}
  819. }, { "style": { "height": "36px" } }).form; //创建窗体
  820. _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); } }
  821. break;
  822. case "teacherClassRoom": //好友打开
  823. _formdiv = new U.UF.UI.form(
  824. "实时课堂",
  825. $$("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 }), {
  826. "id": "teacherClassRoom",
  827. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  828. "onresize": function() {}
  829. }, {
  830. closecallback: function() {}
  831. }, { "style": { "height": "36px" } }).form; //创建窗体
  832. _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); } }
  833. setTimeout(() => {
  834. U.UF.F.windowZooming(_formdiv)
  835. }, 0);
  836. break;
  837. }
  838. } else if (_type == 1 && _oid == "91305d49-01ba-11ed-8c78-005056b86db5") {
  839. switch (str) {
  840. case "project": //好友打开
  841. _formdiv = new U.UF.UI.form(
  842. "项目管理",
  843. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/course?userid=" + _userid + "&oid=" + _oid }), {
  844. "id": "project",
  845. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  846. "onresize": function() {}
  847. }, {
  848. closecallback: function() {}
  849. }, { "style": { "height": "36px" } }).form; //创建窗体
  850. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "项目管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  851. break;
  852. case "evaluate":
  853. _formdiv = new U.UF.UI.form(
  854. "学生评价",
  855. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/works?userid=" + _userid + "&oid=" + _oid }), {
  856. "id": "evaluate",
  857. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  858. "onresize": function() {}
  859. }, {
  860. closecallback: function() {}
  861. }, { "style": { "height": "36px" } }).form; //创建窗体
  862. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "学生评价", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  863. break;
  864. case "notice":
  865. _formdiv = new U.UF.UI.form(
  866. "通知公告",
  867. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/notice?userid=" + _userid }), {
  868. "id": "notice",
  869. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  870. "onresize": function() {}
  871. }, {
  872. closecallback: function() {}
  873. }, { "style": { "height": "36px" } }).form; //创建窗体
  874. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/news.png)" }, "name": "通知公告", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  875. break;
  876. case "stuLibrary":
  877. _formdiv = new U.UF.UI.form(
  878. "学习资料",
  879. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/studyLibrary?userid=" + _userid }), {
  880. "id": "stuLibrary",
  881. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  882. "onresize": function() {}
  883. }, {
  884. closecallback: function() {}
  885. }, { "style": { "height": "36px" } }).form; //创建窗体
  886. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/stuLibrary.png)" }, "name": "学习资料", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  887. break;
  888. case "whiteboard":
  889. _formdiv = new U.UF.UI.form(
  890. "电子白板",
  891. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  892. "id": "whiteboard",
  893. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  894. "onresize": function() {}
  895. }, {
  896. closecallback: function() {}
  897. }, { "style": { "height": "36px" } }).form; //创建窗体
  898. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/whiteBoard.png)" }, "name": "电子白板", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  899. break;
  900. case "investigation":
  901. _formdiv = new U.UF.UI.form(
  902. "问卷调查",
  903. $$("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 }), {
  904. "id": "investigation",
  905. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  906. "onresize": function() {}
  907. }, {
  908. closecallback: function() {}
  909. }, { "style": { "height": "36px" } }).form; //创建窗体
  910. _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); } }
  911. break;
  912. case "mind":
  913. _formdiv = new U.UF.UI.form(
  914. "思维导图",
  915. $$("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"
  916. "id": "mind",
  917. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  918. "onresize": function() {}
  919. }, {
  920. closecallback: function() {}
  921. }, { "style": { "height": "36px" } }).form; //创建窗体
  922. _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); } }
  923. break;
  924. case "doc":
  925. // U.MD.D.I.isRoom();
  926. _formdiv = new U.UF.UI.form(
  927. "协同文档",
  928. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  929. "id": "doc",
  930. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  931. "onresize": function() {}
  932. }, {
  933. closecallback: function() {}
  934. }, { "style": { "height": "36px" } }).form; //创建窗体
  935. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function() {
  936. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  937. })
  938. _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); } }
  939. break;
  940. case "study":
  941. _formdiv = new U.UF.UI.form(
  942. "学习中心",
  943. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&tType=" + _type }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  944. "id": "study",
  945. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  946. "onresize": function() {}
  947. }, {
  948. closecallback: function() {}
  949. }, { "style": { "height": "36px" } }).form; //创建窗体
  950. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  951. break;
  952. case "mindNetwork": //好友打开
  953. _formdiv = new U.UF.UI.form(
  954. "思维网格",
  955. $$("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 }), {
  956. "id": "mindNetwork",
  957. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  958. "onresize": function() {}
  959. }, {
  960. closecallback: function() {}
  961. }, { "style": { "height": "36px" } }).form; //创建窗体
  962. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindNetwork.png)" }, "name": "思维网格", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  963. break;
  964. case "train": //好友打开
  965. _formdiv = new U.UF.UI.form(
  966. "训练服务器",
  967. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://xunlian.cocorobo.cn" }), {
  968. "id": "mindNetwork",
  969. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  970. "onresize": function() {}
  971. }, {
  972. closecallback: function() {}
  973. }, { "style": { "height": "36px" } }).form; //创建窗体
  974. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindNetwork.png)" }, "name": "训练服务器", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  975. break;
  976. case "sys":
  977. _formdiv = new U.UF.UI.form(
  978. "目标管理",
  979. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/evaluation?userid=" + _userid + "&oid=" + _oid }), {
  980. "id": "sys",
  981. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  982. "onresize": function() {}
  983. }, {
  984. closecallback: function() {}
  985. }, { "style": { "height": "36px" } }).form; //创建窗体
  986. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/sys.png)" }, "name": "目标管理", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  987. break;
  988. case "courseDesign":
  989. _formdiv = new U.UF.UI.form(
  990. "课程设计",
  991. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/course-design/index.html" }), {
  992. "id": "courseDesign",
  993. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  994. "onresize": function() {}
  995. }, {
  996. closecallback: function() {}
  997. }, { "style": { "height": "36px" } }).form; //创建窗体
  998. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/courseDesign.png)" }, "name": "课程设计", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  999. break;
  1000. }
  1001. }
  1002. //U.MD.D.I.openClick(str);
  1003. //如果有任务栏信息
  1004. if (_taskbar) {
  1005. U.MD.D.T.taskbar(_taskbar); //创建任务处理
  1006. }
  1007. }
  1008. // U.MD.D.I.openClick = function(str){
  1009. // var click = '';
  1010. // switch(str){
  1011. // case 'friend':
  1012. // click = '我的好友';
  1013. // break;
  1014. // case 'domain':
  1015. // click = '域名管理';
  1016. // break;
  1017. // case 'disk':
  1018. // click = '我的云盘';
  1019. // break;
  1020. // case 'word':
  1021. // click = 'Word';
  1022. // break;
  1023. // case 'excel':
  1024. // click = 'Execl';
  1025. // break;
  1026. // case 'txt':
  1027. // click = '文本文件';
  1028. // break;
  1029. // case 'lookupFriend':
  1030. // click = '查找好友';
  1031. // break;
  1032. // case 'ftp':
  1033. // click = 'FTP';
  1034. // break;
  1035. // case 'group':
  1036. // click = '群组';
  1037. // break;
  1038. // case 'set':
  1039. // click = '我的设置';
  1040. // break;
  1041. // case 'systemSet':
  1042. // click = '系统设置';
  1043. // break;
  1044. // case 'boomYun':
  1045. // click = '互联办公';
  1046. // break;
  1047. // case 'xz':
  1048. // click = '云端下载';
  1049. // break;
  1050. // case 'client':
  1051. // click = '有思浏览器';
  1052. // break;
  1053. // case 'backEndProgramming':
  1054. // click = '在线后台编程';
  1055. // break;
  1056. // case 'frontEndProgramming':
  1057. // click = '在线前端编程';
  1058. // break;
  1059. // default: break;
  1060. // }
  1061. // if(U.MD.D.I.Ip && click){
  1062. // var clickUrl = ':12588/useClick.php?name=' + click + '&ip=' + U.MD.D.I.Ip;
  1063. // U.MD.D.I.Mysqlrequest(clickUrl,function(data){
  1064. // })
  1065. // }
  1066. // }
  1067. /**
  1068. *函数作用:ajax简易函数,使用post格式
  1069. *@param url {data} 后台地址
  1070. *@param data {data} 参数json
  1071. *@param fn {data} 回调函数
  1072. *
  1073. */
  1074. // U.MD.D.I.Mysqlrequest = function(url,fn){
  1075. // var xhr = new XMLHttpRequest();
  1076. // xhr.open("GET",url,true);
  1077. // xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  1078. // xhr.onreadystatechange = function(){
  1079. // if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 304)){
  1080. // fn.call(this,xhr.responseText);
  1081. // }
  1082. // };
  1083. // xhr.send();
  1084. // }
  1085. /*判断是否是内网IP*/
  1086. // U.MD.D.I.isInnerIPFn = function(str){
  1087. // var curPageUrl = str;
  1088. // var reg1 = /(http|ftp|https|www):\/\//g;//去掉前缀
  1089. // curPageUrl =curPageUrl.replace(reg1,'');
  1090. // // console.log('curPageUrl-1 '+curPageUrl);
  1091. // var reg2 = /\:+/g;//替换冒号为一点
  1092. // curPageUrl =curPageUrl.replace(reg2,'.');
  1093. // // console.log('curPageUrl-2 '+curPageUrl);
  1094. // curPageUrl = curPageUrl.split('.');//通过一点来划分数组
  1095. // var ipAddress = curPageUrl[0]+'.'+curPageUrl[1]+'.'+curPageUrl[2]+'.'+curPageUrl[3];
  1096. // if(curPageUrl[2] != '16'){
  1097. // return ipAddress;
  1098. // }else{
  1099. // return false;
  1100. // }
  1101. // }
  1102. // U.MD.D.I.getUserIP = function(onNewIP) { // onNewIp - your listener function for new IPs
  1103. // //compatibility for firefox and chrome
  1104. // var myPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
  1105. // var pc = new myPeerConnection({
  1106. // iceServers: []
  1107. // }),
  1108. // noop = function() {},
  1109. // localIPs = {},
  1110. // ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g,
  1111. // key;
  1112. // function iterateIP(ip) {
  1113. // if (!localIPs[ip]) onNewIP(ip);
  1114. // localIPs[ip] = true;
  1115. // }
  1116. // //create a bogus data channel
  1117. // pc.createDataChannel("");
  1118. // // create offer and set local description
  1119. // pc.createOffer().then(function(sdp) {
  1120. // sdp.sdp.split('\n').forEach(function(line) {
  1121. // if (line.indexOf('candidate') < 0) return;
  1122. // line.match(ipRegex).forEach(iterateIP);
  1123. // });
  1124. // pc.setLocalDescription(sdp, noop, noop);
  1125. // }).catch(function(reason) {
  1126. // // An error occurred, so handle the failure to connect
  1127. // });
  1128. // //sten for candidate events
  1129. // pc.onicecandidate = function(ice) {
  1130. // if (!ice || !ice.candidate || !ice.candidate.candidate || !ice.candidate.candidate.match(ipRegex)) return;
  1131. // ice.candidate.candidate.match(ipRegex).forEach(iterateIP);
  1132. // };
  1133. // }
  1134. // U.MD.D.I.getUserIpBool = function(callback){
  1135. // U.MD.D.I.getUserIP(function(ip){
  1136. // alert("Got IP! :" + ip);
  1137. // });
  1138. //}
  1139. //#endregion