DeskTop.js 105 KB

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