DeskTop.js 97 KB

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