DeskTop.js 101 KB

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