DeskTop.js 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065
  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. ];
  27. U.MD.D.I.studentDeskIcon = [
  28. { "Name": "我的项目", "Url": "studnetProject", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
  29. { "Name": "学习中心", "Url": "studentStudy", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
  30. { "Name": "我的评价", "Url": "studentEvaluate", "style": { "cssText": "background-image:url(/img/icon/evaluation.png)" } },
  31. { "Name": "我的资料", "Url": "studentMy", "style": { "cssText": "background-image:url(/img/icon/myMessage.png)" } },
  32. { "Name": "素材库", "Url": "library", "style": { "cssText": "background-image:url(/img/icon/library.png)" } },
  33. { "Name": "电子白板", "Url": "whiteboard", "style": { "cssText": "background-image:url(/img/icon/whiteBoard.png)" } },
  34. { "Name": "问卷调查", "Url": "investigation", "style": { "cssText": "background-image:url(/img/icon/ask.png)" } },
  35. { "Name": "便签分类", "Url": "note", "style": { "cssText": "background-image:url(/img/icon/note.png)" } },
  36. // { "Name": "量规评分", "Url": "score", "style": { "cssText": "background-image:url(/img/icon/score.png)" } },
  37. { "Name": "思维导图", "Url": "mind", "style": { "cssText": "background-image:url(/img/icon/mindMapping.png)" } },
  38. { "Name": "协同文档", "Url": "doc", "style": { "cssText": "background-image:url(/img/icon/doc.png)" } },
  39. { "Name": "思维网格", "Url": "mindNetwork", "style": { "cssText": "background-image:url(/img/icon/mindNetwork.png)" } },
  40. { "Name": "实时课堂", "Url": "studentClassRoom", "style": { "cssText": "background-image:url(/img/icon/classRoom.png)" } }
  41. ];
  42. //#region 桌面初始化a
  43. /**
  44. * 初始化桌面的起始函数
  45. *
  46. */
  47. U.MD.D.I.init = function() {
  48. if ($("#U_MD_D_K")[0]) {
  49. //初始化桌面图标
  50. U.MD.D.I.initDesktopIcons($("#U_MD_D_K")[0]);
  51. // var clickUrl = ':12588/requestIp.php';
  52. // U.MD.D.I.Mysqlrequest(clickUrl,function(data){
  53. // U.MD.D.I.Ip = data;
  54. // var AccessUrl = ':12588/useAccess.php?ip=' + U.MD.D.I.Ip;
  55. // U.MD.D.I.Mysqlrequest(AccessUrl,function(data){
  56. // U.selectEl("#U_MD_D_RW").css("width", US.width - 165 + "px");
  57. // })
  58. // //初始化任务栏,因为是静态的,所以直接改变样式即可.
  59. // })
  60. }
  61. }
  62. /**
  63. * 隐藏任务栏
  64. *
  65. * @param {element} 桌面元素
  66. */
  67. U.MD.D.I.hiddenTaskbar = function(el) {
  68. //任务栏位置变小
  69. U.selectEl(el).parentElement(3).css({ "bottom": "-60px" });
  70. //桌面的位置变大
  71. // U.selectEl("#U_MD_D_K").css({ "left": "5px" });
  72. }
  73. /**
  74. * 隐藏任务栏
  75. *
  76. * @param {element} 桌面元素
  77. */
  78. U.MD.D.I.hiddenTaskbarout = function(el) {
  79. //任务栏位置变小
  80. if (!U.UF.EV.stopBubbleMouseOutOrOver(el)) {
  81. //任务栏位置变化
  82. U.selectEl(el).css({ "bottom": "-60px" });
  83. //桌面的位置变大
  84. // U.selectEl("#U_MD_D_K").css({ "left": "5px" });
  85. }
  86. }
  87. /**
  88. * 初始化打印桌面图标
  89. *
  90. * @param {element} 桌面元素
  91. */
  92. U.MD.D.I.initDesktopIcons = function(el) {
  93. var i, //用于循环
  94. _content, //桌面图标元素
  95. _iconcontent, //桌面图标元素
  96. _frag = $$("frag"), //定义一个碎片元素
  97. _type = US.userInfo.type,
  98. _teacherDesktopIconInfo = U.MD.D.I.teacherDeskIcon, //获取教师端桌面图标
  99. _studentDesktopIconInfo = U.MD.D.I.studentDeskIcon; //获取桌面图标
  100. //清楚桌面图标
  101. el.innerHTML = "";
  102. //循环创建桌面图标
  103. if (_type == 2) {
  104. for (i = 0; i < _studentDesktopIconInfo.length; i++) {
  105. _content = $$("div", {
  106. className: "U_MD_D_KO",
  107. "onmousedown": U.UF.C.closure(function(obj) {
  108. //防止拖动图标即打开了桌面应用
  109. U.MD.D.click(this, obj);
  110. }, [_studentDesktopIconInfo[i]]),
  111. "onclick": U.UF.C.closure(function(obj) {
  112. //防止拖动图标即打开了桌面应用
  113. U.MD.D.click(this, obj);
  114. }, [_studentDesktopIconInfo[i]])
  115. }, _frag); //
  116. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  117. $$("div", { className: "U_MD_D_KOS U_Img", "style": _studentDesktopIconInfo[i].style }, _iconcontent);
  118. $$("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);
  119. }
  120. } else {
  121. for (i = 0; i < _teacherDesktopIconInfo.length; i++) {
  122. _content = $$("div", {
  123. className: "U_MD_D_KO",
  124. "onmousedown": U.UF.C.closure(function(obj) {
  125. //防止拖动图标即打开了桌面应用
  126. U.MD.D.click(this, obj);
  127. }, [_teacherDesktopIconInfo[i]]),
  128. "onclick": U.UF.C.closure(function(obj) {
  129. //防止拖动图标即打开了桌面应用
  130. U.MD.D.click(this, obj);
  131. }, [_teacherDesktopIconInfo[i]])
  132. }, _frag); //
  133. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  134. $$("div", { className: "U_MD_D_KOS U_Img", "style": _teacherDesktopIconInfo[i].style }, _iconcontent);
  135. $$("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);
  136. }
  137. }
  138. //加载好后给图标定位
  139. U.MD.D.iconPostion($(_frag).Child());
  140. //把图标加载到页面
  141. el.appendChild(_frag);
  142. }
  143. /**
  144. * 显示任务栏
  145. *
  146. * @param {element} 桌面元素
  147. */
  148. U.MD.D.I.displayTaskbar = function(el) {
  149. //判断是否需要形式任务栏,由于用了mouseover事件会冒泡响应多次,这里做了过滤
  150. if (!U.UF.EV.stopBubbleMouseOutOrOver(el) && U.selectEl(el).css("bottom") != "0px") {
  151. //任务栏位置变化
  152. U.selectEl(el).css({ "bottom": "0px" });
  153. //桌面位置变话
  154. // U.selectEl("#U_MD_D_K").css({ "left": "70px" });
  155. }
  156. }
  157. //#region 桌面图标拖动逻辑
  158. /**
  159. * 桌面排列图标
  160. *
  161. * @param {element} 桌面元素
  162. * @param {object} 上下相距的距离
  163. * @param {object} 左右相距的距离
  164. * @return {object} 命名空间
  165. */
  166. U.MD.D.iconPostion = function(childs, top, left) {
  167. var i; //用于循环处理
  168. top = top || 15; //如果没有设置元素的间距处理默认上间距为15
  169. left = left || 20; //如果没有设置元素的间距处理默认左间距为15
  170. //循环所有的图标,设置每个图标的间距,打印顺序是竖排打印的方式
  171. for (i = 0; i < childs.length; i++) {
  172. //如果竖排top超过了范围处理
  173. if (top + 95 > US.height - 10) {
  174. //left超过了页面范围处理,则向上重叠打印处理
  175. if ((left + 180) > US.width) {
  176. top -= 115;
  177. left -= 90;
  178. }
  179. //没有超过范围,那么left+90添加到下一个竖排打印
  180. else {
  181. left += 90;
  182. top = 15;
  183. };
  184. }
  185. //给图标的位置赋值
  186. U.selectEl(childs[i]).css({ top: top + "px", left: left + "px" });
  187. if (i < childs.length - 1) {
  188. //页面图标每次向下加115
  189. top += 115;
  190. }
  191. }
  192. //返回最后调用的图标的位置
  193. return [top, left];
  194. }
  195. /**
  196. * 桌面点击事件逻辑
  197. *
  198. * @param {element} 桌面元素
  199. * @param {object} 上下相距的距离
  200. * @param {object} 左右相距的距离
  201. * @return {object} 命名空间
  202. */
  203. U.MD.D.click = function(el, obj) {
  204. var _buttonnumber = event.button; //点击的按钮的事件值
  205. var _userinfo = US.userInfo;
  206. U.UF.EV.stopBubble(); //阻止向上冒泡
  207. //onmousedown 包含了左键和右键 这里大于2是为了兼容 所有浏览器的右键处理
  208. if (_buttonnumber < 2) {
  209. //如果是click事件的处理
  210. if (event.type == "click") {
  211. //如果元素在mousemove事件中没有移动则出发click事件
  212. if (!U.MD.D.I.IsDrag) {
  213. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  214. U.alert("请先登录您的账号!");
  215. setTimeout(() => {
  216. U.MD.U.L.login();
  217. }, 2000);
  218. } else {
  219. //打开应用处理
  220. U.MD.D.I.openApplication(obj.Url, { "userid": US.userInfo.userid, "directoryid": US.FTPFOLDERID });
  221. }
  222. }
  223. }
  224. //如果是mouse事件的处理
  225. else {
  226. //拖动处理,添加拖动和拖动结束事件
  227. U.UF.F.drag(el, U.MD.D.iconMove, U.MD.D.iconUp);
  228. }
  229. U.MD.D.I.IsDrag = false;
  230. }
  231. }
  232. /**
  233. * 拖动的处理
  234. *
  235. */
  236. U.MD.D.iconMove = function() {
  237. //如果当前位置点击初始化的位置出现了变化,则设置是否拖动的属性 U.MD.D.I.IsDrag为true
  238. U.MD.D.I.IsDrag = true;
  239. }
  240. /**
  241. * 拖动结束后,这里是定位处理,以网状的形式定位
  242. *
  243. * @param {element} 拖动的元素
  244. * @return {object} 命名空间
  245. */
  246. U.MD.D.iconUp = function(el) {
  247. var _top = 15,
  248. _left = 20,
  249. _margin,
  250. _childs = U.selectEl("#U_MD_D_K").Child(), //桌面所有的图标
  251. _positioninfo = U.UF.EL.getElementInfo(el); //获取拖动结束的元素的位置
  252. if (_positioninfo["OT"] > 15) {
  253. //网状的形式定位,如果差超过了55,那么向下定位,否则向上定位
  254. _margin = ((_positioninfo["OT"] - 15) % 115 > 55 && _positioninfo["OT"] + 115 < US.height) ? 1 : 0;
  255. _top = (Math.floor((_positioninfo["OT"] - 15) / 115) + _margin) * 115 + 15;
  256. }
  257. if (_positioninfo["OL"] > 20) {
  258. //网状的形式定位,如果差超过了90,那么向右定位,否则向左定位
  259. _margin = ((_positioninfo["OL"] - 20) % 90 > 45 && _positioninfo["OL"] + 90 < US.width) ? 1 : 0;
  260. _left = (Math.floor((_positioninfo["OL"] - 20) / 90) + _margin) * 90 + 20
  261. }
  262. //while循环判断么一个重叠的元素
  263. do {
  264. _positioninfo = U.MD.D.iconPostion([el], _top, _left); //给重叠的元素向下定位
  265. _top = _positioninfo[0] + 115; //得到定位后的top
  266. _left = _positioninfo[1]; //得到定位后的left
  267. } while (el = U.MD.D.isOverlap(el, _childs, _positioninfo))
  268. }
  269. /**
  270. * 判断拖动后图标是否重叠
  271. *
  272. * @param {element} 拖动的元素
  273. * @param {element} 桌面所有的元素
  274. * @param {array} 拖动元素的位置
  275. ----------[0] 上 top
  276. ----------[1] 左 left
  277. * @return {object} 命名空间
  278. */
  279. U.MD.D.isOverlap = function(el, childs, postionarray) {
  280. //循环所有的图标
  281. for (var i = 0; i < childs.length; i++) {
  282. //判断有没有和该图标诶子重叠的元素
  283. if (el != childs[i] && (childs[i].offsetTop == postionarray[0] && childs[i].offsetLeft == postionarray[1])) {
  284. return childs[i]; //如果有返回
  285. }
  286. }
  287. }
  288. //#endregion
  289. //#endregion
  290. //#region 桌面应用
  291. /**
  292. * 打开应用
  293. *
  294. * @param {string} 类型
  295. -----------------Disk 网盘系统
  296. -----------------PDisk 学习系统网盘
  297. -----------------Poto 图片
  298. -----------------Video 视频
  299. -----------------Music 音乐
  300. -----------------Word word
  301. -----------------Excel excel
  302. -----------------Txt 记事本
  303. -----------------PB 学习系统
  304. -----------------Blog 朋友圈系统
  305. -----------------FTP ftp系统
  306. -----------------Group 好友群
  307. -----------------SY 首页系统
  308. -----------------Set 个人设置
  309. -----------------XSet 系统设置
  310. -----------------App 我们所有的app
  311. -----------------BC c.1473.cn 平台
  312. -----------------CWeb d.1473.cn 变成平台
  313. -----------------其他的外联系统 我们统一用iframe打开
  314. * @param {array} 类型
  315. 如果第一个参数为"disk",则第二个参数为object,里面包含了用户id和目录id{userid:"",directoryid:""}
  316. 如果第一个参数为"word"或者"excel","txt",则第二个参数为文件信息fileinfo。
  317. 如果第一个参数为"blog"或者"PDisk"。建议删除。
  318. 如果第一个参数为其他,则无第二个参数
  319. * @returns {array}
  320. */
  321. window.addEventListener('message', function(e) { // 监听 message 事件
  322. // alert(e.data.type);
  323. if (e.data.type && e.data.type == "1") { //项目管理传入
  324. U.MD.D.I.openInApplication("study", e.data.cid)
  325. } else if (e.data.close && e.data.close == "1") { //更新用户信息
  326. U.MD.D.I.selectUser();
  327. } else if (e.data.tools && e.data.tools == "1") {
  328. U.MD.D.I.openApplication("whiteboard")
  329. } else if (e.data.tools && e.data.tools == "2") {
  330. U.MD.D.I.openApplication("note")
  331. } else if (e.data.tools && e.data.tools == "3") {
  332. U.MD.D.I.openApplication("mind")
  333. } else if (e.data.tools && e.data.tools == "4") {
  334. U.MD.D.I.openApplication("investigation")
  335. } else if (e.data.tools && e.data.tools == "6") {
  336. U.MD.D.I.openApplication("doc")
  337. } else if (e.data.tools && e.data.tools == "7") {
  338. U.MD.D.I.openApplication("mindNetwork")
  339. } else if (e.data.tools && e.data.tools == "8") {
  340. U.MD.D.I.openApplication("library")
  341. }
  342. });
  343. U.MD.D.I.selectUser = function() {
  344. U.A.Request(US.Config.pbl + "selectUser?userid=" + US.userInfo.userid, [], function(res) { //US.userInfo.userid
  345. if (res.value[0].length > 0) {
  346. US.userInfo = res.value[0][0];
  347. $(".userName")[0].innerHTML = US.userInfo.username;
  348. }
  349. }, [], { "type": "GET", "withCredentials": true });
  350. }
  351. U.MD.D.I.openInApplication = function(str, data) {
  352. var _userinfo = US.userInfo, //登录用户信息
  353. _userid = US.userInfo.userid, //登录用户id
  354. _oid = _userinfo.organizeid;
  355. switch (str) {
  356. case "study":
  357. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  358. setTimeout(() => {
  359. U.MD.U.L.login();
  360. }, 2000);
  361. } else {
  362. _formdiv = new U.UF.UI.form(
  363. "项目详情",
  364. $$("iframe", { "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 }), {
  365. "id": "study",
  366. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  367. "onresize": function() {}
  368. }, {
  369. closecallback: function() {}
  370. }, { "style": { "height": "36px" } }).form; //创建窗体
  371. _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); } }
  372. break;
  373. }
  374. }
  375. }
  376. U.MD.D.I.openApplication = function(str, obj, info) {
  377. obj = obj || {};
  378. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  379. _formdiv, //创建任务栏时同时弹出的窗体元素。
  380. _userinfo = US.userInfo, //登录用户信息
  381. _userid = obj.userid || US.userInfo.userid, //登录用户id
  382. _oid = obj.organizeid || _userinfo.organizeid,
  383. _type = US.userInfo.type;
  384. if (_type == 2) {
  385. switch (str) {
  386. case "studnetProject": //好友打开
  387. _formdiv = new U.UF.UI.form(
  388. "我的项目",
  389. $$("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 }), {
  390. "id": "studnetProject",
  391. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  392. "onresize": function() {}
  393. }, {
  394. closecallback: function() {}
  395. }, { "style": { "height": "36px" } }).form; //创建窗体
  396. _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); } }
  397. break;
  398. case "studentEvaluate": //好友打开
  399. _formdiv = new U.UF.UI.form(
  400. "我的评价",
  401. $$("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 }), {
  402. "id": "studentEvaluate",
  403. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  404. "onresize": function() {}
  405. }, {
  406. closecallback: function() {}
  407. }, { "style": { "height": "36px" } }).form; //创建窗体
  408. _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); } }
  409. break;
  410. case "my":
  411. _formdiv = new U.UF.UI.form(
  412. "我的资料",
  413. $$("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 }), {
  414. "id": "my",
  415. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  416. "onresize": function() {}
  417. }, {
  418. closecallback: function() {}
  419. }, { "style": { "height": "36px" } }).form; //创建窗体
  420. _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); } }
  421. break;
  422. case "library":
  423. _formdiv = new U.UF.UI.form(
  424. "素材库",
  425. $$("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 }), {
  426. "id": "library",
  427. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  428. "onresize": function() {}
  429. }, {
  430. closecallback: function() {}
  431. }, { "style": { "height": "36px" } }).form; //创建窗体
  432. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/library.png)" }, "name": "素材库", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  433. break;
  434. case "whiteboard":
  435. _formdiv = new U.UF.UI.form(
  436. "电子白板",
  437. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  438. "id": "whiteboard",
  439. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  440. "onresize": function() {}
  441. }, {
  442. closecallback: function() {}
  443. }, { "style": { "height": "36px" } }).form; //创建窗体
  444. _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); } }
  445. break;
  446. case "investigation":
  447. _formdiv = new U.UF.UI.form(
  448. "问卷调查",
  449. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/ask?userid=" + _userid }), {
  450. "id": "investigation",
  451. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  452. "onresize": function() {}
  453. }, {
  454. closecallback: function() {}
  455. }, { "style": { "height": "36px" } }).form; //创建窗体
  456. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  457. break;
  458. case "note":
  459. _formdiv = new U.UF.UI.form(
  460. "便签分类",
  461. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/note?userid=" + _userid }), {
  462. "id": "note",
  463. "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
  464. "onresize": function() {}
  465. }, {
  466. closecallback: function() {}
  467. }, { "style": { "height": "36px" } }).form; //创建窗体
  468. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/note.png)" }, "name": "便签分类", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  469. break;
  470. // case "score":
  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" }), {
  474. // "id": "score",
  475. // "style": { "width": "90%", "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/score.png)" }, "name": "量规评分", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  481. // break;
  482. case "mind":
  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": "/kityminder-editor/dist/index.html" }), { //"/jsmind/example/demo.html"
  486. "id": "mind",
  487. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  488. "onresize": function() {}
  489. }, {
  490. closecallback: function() {}
  491. }, { "style": { "height": "36px" } }).form; //创建窗体
  492. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindMapping.png)" }, "name": "思维导图", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  493. break;
  494. case "doc":
  495. // U.MD.D.I.isRoom();
  496. _formdiv = new U.UF.UI.form(
  497. "协同文档",
  498. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  499. "id": "doc",
  500. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  501. "onresize": function() {}
  502. }, {
  503. closecallback: function() {}
  504. }, { "style": { "height": "36px" } }).form; //创建窗体
  505. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function() {
  506. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  507. })
  508. _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); } }
  509. break;
  510. case "studentStudy":
  511. _formdiv = new U.UF.UI.form(
  512. "学习中心",
  513. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  514. "id": "studentStudy",
  515. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  516. "onresize": function() {}
  517. }, {
  518. closecallback: function() {}
  519. }, { "style": { "height": "36px" } }).form; //创建窗体
  520. _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); } }
  521. break;
  522. case "mindNetwork": //好友打开
  523. _formdiv = new U.UF.UI.form(
  524. "思维网格",
  525. $$("iframe", { "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 }), {
  526. "id": "mindNetwork",
  527. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  528. "onresize": function() {}
  529. }, {
  530. closecallback: function() {}
  531. }, { "style": { "height": "36px" } }).form; //创建窗体
  532. _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); } }
  533. break;
  534. case "studentClassRoom": //好友打开
  535. _formdiv = new U.UF.UI.form(
  536. "实时课堂",
  537. $$("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 }), {
  538. "id": "studentClassRoom",
  539. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  540. "onresize": function() {}
  541. }, {
  542. closecallback: function() {}
  543. }, { "style": { "height": "36px" } }).form; //创建窗体
  544. _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); } }
  545. break;
  546. }
  547. } else {
  548. //选择应用处理
  549. switch (str) {
  550. case "project": //好友打开
  551. _formdiv = new U.UF.UI.form(
  552. "项目管理",
  553. $$("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 }), {
  554. "id": "project",
  555. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  556. "onresize": function() {}
  557. }, {
  558. closecallback: function() {}
  559. }, { "style": { "height": "36px" } }).form; //创建窗体
  560. _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); } }
  561. break;
  562. case "student":
  563. _formdiv = new U.UF.UI.form(
  564. "学生管理",
  565. $$("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 }), {
  566. "id": "student",
  567. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  568. "onresize": function() {}
  569. }, {
  570. closecallback: function() {}
  571. }, { "style": { "height": "36px" } }).form; //创建窗体
  572. _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); } }
  573. break;
  574. case "evaluate":
  575. _formdiv = new U.UF.UI.form(
  576. "评价管理",
  577. $$("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 }), {
  578. "id": "evaluate",
  579. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  580. "onresize": function() {}
  581. }, {
  582. closecallback: function() {}
  583. }, { "style": { "height": "36px" } }).form; //创建窗体
  584. _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); } }
  585. break;
  586. case "class":
  587. _formdiv = new U.UF.UI.form(
  588. "班级管理",
  589. $$("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 }), {
  590. "id": "class",
  591. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  592. "onresize": function() {}
  593. }, {
  594. closecallback: function() {}
  595. }, { "style": { "height": "36px" } }).form; //创建窗体
  596. _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); } }
  597. break;
  598. case "my":
  599. _formdiv = new U.UF.UI.form(
  600. "我的资料",
  601. $$("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 }), {
  602. "id": "my",
  603. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  604. "onresize": function() {}
  605. }, {
  606. closecallback: function() {}
  607. }, { "style": { "height": "36px" } }).form; //创建窗体
  608. _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); } }
  609. break;
  610. case "notice":
  611. _formdiv = new U.UF.UI.form(
  612. "通知公告",
  613. $$("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 }), {
  614. "id": "notice",
  615. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  616. "onresize": function() {}
  617. }, {
  618. closecallback: function() {}
  619. }, { "style": { "height": "36px" } }).form; //创建窗体
  620. _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); } }
  621. break;
  622. case "library":
  623. _formdiv = new U.UF.UI.form(
  624. "素材库",
  625. $$("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 }), {
  626. "id": "library",
  627. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  628. "onresize": function() {}
  629. }, {
  630. closecallback: function() {}
  631. }, { "style": { "height": "36px" } }).form; //创建窗体
  632. _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); } }
  633. break;
  634. case "whiteboard":
  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://iwb.cocorobo.cn/" }), {
  638. "id": "whiteboard",
  639. "style": { "width": "90%", "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/whiteBoard.png)" }, "name": "电子白板", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  645. break;
  646. case "investigation":
  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-teacher-table/dist/#/ask?userid=" + _userid }), {
  650. "id": "investigation",
  651. "style": { "width": "90%", "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/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  657. break;
  658. case "note":
  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/#/note?userid=" + _userid }), {
  662. "id": "note",
  663. "style": { "width": "20%", "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/note.png)" }, "name": "便签分类", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  669. break;
  670. // case "score":
  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" }), {
  674. // "id": "score",
  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/score.png)" }, "name": "量规评分", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  681. // break;
  682. case "mind":
  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": "/kityminder-editor/dist/index.html" }), { //"/jsmind/example/demo.html"
  686. "id": "mind",
  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/mindMapping.png)" }, "name": "思维导图", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  693. break;
  694. case "doc":
  695. // U.MD.D.I.isRoom();
  696. _formdiv = new U.UF.UI.form(
  697. "协同文档",
  698. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  699. "id": "doc",
  700. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  701. "onresize": function() {}
  702. }, {
  703. closecallback: function() {}
  704. }, { "style": { "height": "36px" } }).form; //创建窗体
  705. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function() {
  706. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  707. })
  708. _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); } }
  709. break;
  710. case "study":
  711. _formdiv = new U.UF.UI.form(
  712. "学习中心",
  713. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  714. "id": "study",
  715. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  716. "onresize": function() {}
  717. }, {
  718. closecallback: function() {}
  719. }, { "style": { "height": "36px" } }).form; //创建窗体
  720. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  721. break;
  722. case "mindNetwork": //好友打开
  723. _formdiv = new U.UF.UI.form(
  724. "思维网格",
  725. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid?userid=" + _userid }), {
  726. "id": "mindNetwork",
  727. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  728. "onresize": function() {}
  729. }, {
  730. closecallback: function() {}
  731. }, { "style": { "height": "36px" } }).form; //创建窗体
  732. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindNetwork.png)" }, "name": "思维网格", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  733. break;
  734. case "teacherClassRoom": //好友打开
  735. _formdiv = new U.UF.UI.form(
  736. "实时课堂",
  737. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/classRoom?userid=" + _userid + "&oid=" + _oid }), {
  738. "id": "teacherClassRoom",
  739. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  740. "onresize": function() {}
  741. }, {
  742. closecallback: function() {}
  743. }, { "style": { "height": "36px" } }).form; //创建窗体
  744. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/classRoom.png)" }, "name": "实时课堂", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  745. break;
  746. // case "friend": //好友打开
  747. // U.MD.D.I.IsDrag = true;
  748. // U.MD.F.W.viewFriend(info); //打开好友
  749. // // U.MD.N.urlWrite("friend/" + obj.directoryid, "好友"); //好友的url重写
  750. // break;
  751. // case "domain":
  752. // var _iframe = $$('iframe', { src: '//domain.1473.cn/DomainSystem.aspx/?fileId=' + info.fileId + '&type=' + info.type + '&mode=' + info.mode, frameborder: "0", style: { cssText: "width:100%;height:100%;border:0px" } });
  753. // _formdiv = new U.UF.UI.form("域名管理", _iframe, { id: "U_MD_DS_DomainShare", style: { "width": "370px", "height": "390px" } }).form;
  754. // if (_formdiv) {
  755. // //生成任务栏的变量
  756. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-15px -296px", "name": "网盘", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  757. // }
  758. // break;
  759. // case "disk": //个人网盘查看
  760. // _formdiv = U.MD.DK.initDisk(_userid, obj.directoryid); //根据网盘数据,并加载网盘,里面包含了url重写
  761. // if (_formdiv) {
  762. // //生成任务栏的变量
  763. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-15px -296px", "name": "网盘", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  764. // }
  765. // break;
  766. // case "word": //Word打开
  767. // var _wordinfo = U.MD.O.word(_userinfo, obj, arguments[2]); //初始化word的处理
  768. // _formdiv = _wordinfo[0];
  769. // if (_formdiv) {
  770. // //生成任务栏的变量
  771. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-462px -296px", "name": "文档", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, _wordinfo[1]); } }
  772. // }
  773. // if (obj.UrlType != 'join') {
  774. // U.MD.N.urlWrite("word/" + _formdiv.id.substr(-36), "在线文档"); //word的url重写
  775. // }
  776. // break;
  777. // case "excel": //Excel打开
  778. // _formdiv = U.MD.O.excel(_userinfo, obj);
  779. // if (_formdiv) {
  780. // //生成任务栏的变量
  781. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-523px -296px", "name": "Excel", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  782. // }
  783. // U.MD.N.urlWrite("excel/" + _formdiv.id.substr(-36), "Excel");
  784. // break;
  785. // case "txt": //Txt打开
  786. // _formdiv = U.MD.D.Txt.textCreate();
  787. // if (_formdiv) {
  788. // //生成任务栏的变量
  789. // _taskbar = { "id": str + obj.directoryid, "backgroundPostion": "-267px -413px", "name": "文本", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  790. // }
  791. // U.MD.N.urlWrite("txt/" + _formdiv.id.substr(-36), "文本");
  792. // break;
  793. // case "lookupFriend":
  794. // _formdiv = U.MD.F.S.popSearchFriendsOrGroupForm(0);
  795. // //生成任务栏的变量
  796. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-85px -413px", "name": "查找好友", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  797. // U.MD.N.urlWrite("lookupfriend/" + obj.directoryid.substr(-36), "查找好友"); //查找好友的url重写
  798. // break;
  799. // case "ftp": //Ftp
  800. // _formdiv = U.MD.F.S.popupsSearchFtp();
  801. // //生成任务栏的变量
  802. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-144px -413px", "name": "FTP", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  803. // break;
  804. // case "group": //群组
  805. // _formdiv = U.MD.F.S.popupsSearchGroups(0);
  806. // //生成任务栏的变量
  807. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-85px -413px", "name": "群组", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  808. // break;
  809. // case "set": //个人设置
  810. // _formdiv = U.MD.U.P.userDataSet();
  811. // if (_formdiv) {
  812. // //生成任务栏的变量
  813. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-400px -296px", "name": "个人设置", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  814. // }
  815. // break;
  816. // case "systemSet": //系统设置
  817. // _formdiv = U.MD.D.B.init();
  818. // //生成任务栏的变量
  819. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-400px -296px", "name": "系统设置", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  820. // break;
  821. // case "boomYun": //BoomYun
  822. // _formdiv = U.Boom.I.onload();
  823. // //生成任务栏的变量
  824. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-844px -419px", "name": "互联办公", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  825. // U.MD.N.urlWrite("boomyun", "互联办公"); //boomyun的url重写
  826. // break;
  827. // case "xz": //App下载
  828. // window.open("http://xz.1473.cn");
  829. // break;
  830. // case "client": //App下载
  831. // window.open("http://client.1473.cn");
  832. // break;
  833. // case "backEndProgramming": //在线编程平台打开
  834. // window.open("http://c.1473.cn");
  835. // break;
  836. // case "frontEndProgramming": //在线web编程
  837. // window.open("http://d.1473.cn");
  838. // break;
  839. // default:
  840. // break;
  841. }
  842. }
  843. //U.MD.D.I.openClick(str);
  844. //如果有任务栏信息
  845. if (_taskbar) {
  846. U.MD.D.T.taskbar(_taskbar); //创建任务处理
  847. }
  848. }
  849. // U.MD.D.I.openClick = function(str){
  850. // var click = '';
  851. // switch(str){
  852. // case 'friend':
  853. // click = '我的好友';
  854. // break;
  855. // case 'domain':
  856. // click = '域名管理';
  857. // break;
  858. // case 'disk':
  859. // click = '我的云盘';
  860. // break;
  861. // case 'word':
  862. // click = 'Word';
  863. // break;
  864. // case 'excel':
  865. // click = 'Execl';
  866. // break;
  867. // case 'txt':
  868. // click = '文本文件';
  869. // break;
  870. // case 'lookupFriend':
  871. // click = '查找好友';
  872. // break;
  873. // case 'ftp':
  874. // click = 'FTP';
  875. // break;
  876. // case 'group':
  877. // click = '群组';
  878. // break;
  879. // case 'set':
  880. // click = '我的设置';
  881. // break;
  882. // case 'systemSet':
  883. // click = '系统设置';
  884. // break;
  885. // case 'boomYun':
  886. // click = '互联办公';
  887. // break;
  888. // case 'xz':
  889. // click = '云端下载';
  890. // break;
  891. // case 'client':
  892. // click = '有思浏览器';
  893. // break;
  894. // case 'backEndProgramming':
  895. // click = '在线后台编程';
  896. // break;
  897. // case 'frontEndProgramming':
  898. // click = '在线前端编程';
  899. // break;
  900. // default: break;
  901. // }
  902. // if(U.MD.D.I.Ip && click){
  903. // var clickUrl = ':12588/useClick.php?name=' + click + '&ip=' + U.MD.D.I.Ip;
  904. // U.MD.D.I.Mysqlrequest(clickUrl,function(data){
  905. // })
  906. // }
  907. // }
  908. /**
  909. *函数作用:ajax简易函数,使用post格式
  910. *@param url {data} 后台地址
  911. *@param data {data} 参数json
  912. *@param fn {data} 回调函数
  913. *
  914. */
  915. // U.MD.D.I.Mysqlrequest = function(url,fn){
  916. // var xhr = new XMLHttpRequest();
  917. // xhr.open("GET",url,true);
  918. // xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  919. // xhr.onreadystatechange = function(){
  920. // if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 304)){
  921. // fn.call(this,xhr.responseText);
  922. // }
  923. // };
  924. // xhr.send();
  925. // }
  926. /*判断是否是内网IP*/
  927. // U.MD.D.I.isInnerIPFn = function(str){
  928. // var curPageUrl = str;
  929. // var reg1 = /(http|ftp|https|www):\/\//g;//去掉前缀
  930. // curPageUrl =curPageUrl.replace(reg1,'');
  931. // // console.log('curPageUrl-1 '+curPageUrl);
  932. // var reg2 = /\:+/g;//替换冒号为一点
  933. // curPageUrl =curPageUrl.replace(reg2,'.');
  934. // // console.log('curPageUrl-2 '+curPageUrl);
  935. // curPageUrl = curPageUrl.split('.');//通过一点来划分数组
  936. // var ipAddress = curPageUrl[0]+'.'+curPageUrl[1]+'.'+curPageUrl[2]+'.'+curPageUrl[3];
  937. // if(curPageUrl[2] != '16'){
  938. // return ipAddress;
  939. // }else{
  940. // return false;
  941. // }
  942. // }
  943. // U.MD.D.I.getUserIP = function(onNewIP) { // onNewIp - your listener function for new IPs
  944. // //compatibility for firefox and chrome
  945. // var myPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
  946. // var pc = new myPeerConnection({
  947. // iceServers: []
  948. // }),
  949. // noop = function() {},
  950. // localIPs = {},
  951. // ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g,
  952. // key;
  953. // function iterateIP(ip) {
  954. // if (!localIPs[ip]) onNewIP(ip);
  955. // localIPs[ip] = true;
  956. // }
  957. // //create a bogus data channel
  958. // pc.createDataChannel("");
  959. // // create offer and set local description
  960. // pc.createOffer().then(function(sdp) {
  961. // sdp.sdp.split('\n').forEach(function(line) {
  962. // if (line.indexOf('candidate') < 0) return;
  963. // line.match(ipRegex).forEach(iterateIP);
  964. // });
  965. // pc.setLocalDescription(sdp, noop, noop);
  966. // }).catch(function(reason) {
  967. // // An error occurred, so handle the failure to connect
  968. // });
  969. // //sten for candidate events
  970. // pc.onicecandidate = function(ice) {
  971. // if (!ice || !ice.candidate || !ice.candidate.candidate || !ice.candidate.candidate.match(ipRegex)) return;
  972. // ice.candidate.candidate.match(ipRegex).forEach(iterateIP);
  973. // };
  974. // }
  975. // U.MD.D.I.getUserIpBool = function(callback){
  976. // U.MD.D.I.getUserIP(function(ip){
  977. // alert("Got IP! :" + ip);
  978. // });
  979. //}
  980. //#endregion