DeskTop.js 50 KB

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