jack 2 년 전
부모
커밋
efbf12e6ba
3개의 변경된 파일192개의 추가작업 그리고 162개의 파일을 삭제
  1. 145 141
      js/Desktop/DeskTop.js
  2. 44 18
      js/Office/Word/Word.js
  3. 3 3
      uform.js

+ 145 - 141
js/Desktop/DeskTop.js

@@ -48,7 +48,7 @@ U.MD.D.I.DeskIcon = [
  * 初始化桌面的起始函数
  *
  */
-U.MD.D.I.init = function() {
+U.MD.D.I.init = function () {
     if ($("#U_MD_D_K")[0]) {
         //初始化桌面图标
         U.MD.D.I.initDesktopIcons($("#U_MD_D_K")[0]);
@@ -69,7 +69,7 @@ U.MD.D.I.init = function() {
  *
  * @param  {element} 桌面元素
  */
-U.MD.D.I.hiddenTaskbar = function(el) {
+U.MD.D.I.hiddenTaskbar = function (el) {
     //任务栏位置变小
     U.selectEl(el).parentElement(3).css({ "bottom": "-60px" });
     //桌面的位置变大
@@ -82,7 +82,7 @@ U.MD.D.I.hiddenTaskbar = function(el) {
  *
  * @param  {element} 桌面元素
  */
-U.MD.D.I.hiddenTaskbarout = function(el) {
+U.MD.D.I.hiddenTaskbarout = function (el) {
     //任务栏位置变小
     if (!U.UF.EV.stopBubbleMouseOutOrOver(el)) {
         //任务栏位置变化
@@ -98,7 +98,7 @@ U.MD.D.I.hiddenTaskbarout = function(el) {
  *
  * @param  {element} 桌面元素
  */
-U.MD.D.I.initDesktopIcons = function(el) {
+U.MD.D.I.initDesktopIcons = function (el) {
     var i, //用于循环
         _content, //桌面图标元素
         _iconcontent, //桌面图标元素
@@ -110,11 +110,11 @@ U.MD.D.I.initDesktopIcons = function(el) {
     for (i = 0; i < _DesktopIconInfo.length; i++) {
         _content = $$("div", {
             className: "U_MD_D_KO",
-            "onmousedown": U.UF.C.closure(function(obj) {
+            "onmousedown": U.UF.C.closure(function (obj) {
                 //防止拖动图标即打开了桌面应用
                 U.MD.D.click(this, obj);
             }, [_DesktopIconInfo[i]]),
-            "onclick": U.UF.C.closure(function(obj) {
+            "onclick": U.UF.C.closure(function (obj) {
                 //防止拖动图标即打开了桌面应用
                 U.MD.D.click(this, obj);
             }, [_DesktopIconInfo[i]])
@@ -134,7 +134,7 @@ U.MD.D.I.initDesktopIcons = function(el) {
  *
  * @param  {element} 桌面元素
  */
-U.MD.D.I.displayTaskbar = function(el) {
+U.MD.D.I.displayTaskbar = function (el) {
     //判断是否需要形式任务栏,由于用了mouseover事件会冒泡响应多次,这里做了过滤
     if (!U.UF.EV.stopBubbleMouseOutOrOver(el) && U.selectEl(el).css("bottom") != "0px") {
         //任务栏位置变化
@@ -154,7 +154,7 @@ U.MD.D.I.displayTaskbar = function(el) {
  * @param  {object} 左右相距的距离
  * @return  {object} 命名空间
  */
-U.MD.D.iconPostion = function(childs, top, left) {
+U.MD.D.iconPostion = function (childs, top, left) {
     var i; //用于循环处理
     top = top || 15; //如果没有设置元素的间距处理默认上间距为15
     left = left || 20; //如果没有设置元素的间距处理默认左间距为15
@@ -192,7 +192,7 @@ U.MD.D.iconPostion = function(childs, top, left) {
  * @param  {object} 左右相距的距离
  * @return  {object} 命名空间
  */
-U.MD.D.click = function(el, obj) {
+U.MD.D.click = function (el, obj) {
     var _buttonnumber = event.button; //点击的按钮的事件值
     U.UF.EV.stopBubble(); //阻止向上冒泡
     //onmousedown 包含了左键和右键 这里大于2是为了兼容 所有浏览器的右键处理
@@ -218,7 +218,7 @@ U.MD.D.click = function(el, obj) {
  * 拖动的处理
  *
  */
-U.MD.D.iconMove = function() {
+U.MD.D.iconMove = function () {
     //如果当前位置点击初始化的位置出现了变化,则设置是否拖动的属性   U.MD.D.I.IsDrag为true
     U.MD.D.I.IsDrag = true;
 }
@@ -229,7 +229,7 @@ U.MD.D.iconMove = function() {
  * @param  {element} 拖动的元素
  * @return  {object} 命名空间
  */
-U.MD.D.iconUp = function(el) {
+U.MD.D.iconUp = function (el) {
     var _top = 15,
         _left = 20,
         _margin,
@@ -263,7 +263,7 @@ U.MD.D.iconUp = function(el) {
 ----------[1]  左 left
 * @return  {object} 命名空间
 */
-U.MD.D.isOverlap = function(el, childs, postionarray) {
+U.MD.D.isOverlap = function (el, childs, postionarray) {
     //循环所有的图标
     for (var i = 0; i < childs.length; i++) {
         //判断有没有和该图标诶子重叠的元素
@@ -308,36 +308,36 @@ U.MD.D.isOverlap = function(el, childs, postionarray) {
 如果第一个参数为其他,则无第二个参数
 * @returns {array} 
 */
-window.addEventListener('message', function(e) { // 监听 message 事件
+window.addEventListener('message', function (e) { // 监听 message 事件
     // alert(e.data.type);
     if (e.data.type && e.data.type == "1") { //项目管理传入
         U.MD.D.I.openInApplication("study", e.data.cid)
     }
 });
-U.MD.D.I.openInApplication = function(str, data) {
+U.MD.D.I.openInApplication = function (str, data) {
     switch (str) {
         case "study":
             _formdiv = new U.UF.UI.form(
                 "项目详情",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5&oid=45facc0a-1211-11ec-80ad-005056b86db5&courseId=" + data }), {
-                    "id": "study",
-                    "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "study",
+                "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
     }
 
 }
-U.MD.D.I.openApplication = function(str, obj, info) {
+U.MD.D.I.openApplication = function (str, obj, info) {
     obj = obj || {};
     var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
         _formdiv, //创建任务栏时同时弹出的窗体元素。
         _userinfo = US.userInfo, //登录用户信息
         _userid = obj.userid || _userinfo.UserId //登录用户id
-    ;
+        ;
     //选择应用处理
     switch (str) {
 
@@ -345,194 +345,198 @@ U.MD.D.I.openApplication = function(str, obj, info) {
             _formdiv = new U.UF.UI.form(
                 "项目管理",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5&oid=45facc0a-1211-11ec-80ad-005056b86db5" }), {
-                    "id": "project",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "project",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
         case "student":
             _formdiv = new U.UF.UI.form(
                 "学生管理",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5&oid=45facc0a-1211-11ec-80ad-005056b86db5" }), {
-                    "id": "student",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "student",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
         case "evaluate":
             _formdiv = new U.UF.UI.form(
                 "评价管理",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5&oid=45facc0a-1211-11ec-80ad-005056b86db5" }), {
-                    "id": "evaluate",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "evaluate",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
         case "class":
             _formdiv = new U.UF.UI.form(
                 "班级管理",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5&oid=45facc0a-1211-11ec-80ad-005056b86db5" }), {
-                    "id": "class",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "class",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
         case "my":
             _formdiv = new U.UF.UI.form(
                 "我的资料",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5" }), {
-                    "id": "my",
-                    "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "my",
+                "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
         case "notice":
             _formdiv = new U.UF.UI.form(
                 "通知公告",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5" }), {
-                    "id": "notice",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "notice",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
         case "library":
             _formdiv = new U.UF.UI.form(
                 "素材库",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5" }), {
-                    "id": "library",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "library",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
         case "whiteboard":
             _formdiv = new U.UF.UI.form(
                 "电子白板",
                 $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn" }), {
-                    "id": "whiteboard",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "whiteboard",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
         case "investigation":
             _formdiv = new U.UF.UI.form(
                 "问卷调查",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5" }), {
-                    "id": "investigation",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "investigation",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
         case "note":
             _formdiv = new U.UF.UI.form(
                 "便签分类",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5" }), {
-                    "id": "note",
-                    "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "note",
+                "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
         case "score":
             _formdiv = new U.UF.UI.form(
                 "量规评分",
                 $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn" }), {
-                    "id": "score",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "score",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
         case "mind":
             _formdiv = new U.UF.UI.form(
                 "思维导图",
                 $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/jsmind/example/demo.html" }), {
-                    "id": "mind",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "mind",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
         case "doc":
             _formdiv = new U.UF.UI.form(
                 "协同文档",
                 $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
-                    "id": "doc",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "doc",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+
+            U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
+                $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
+            })
+            _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); } }
             break;
 
         case "study":
             _formdiv = new U.UF.UI.form(
                 "学习中心",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5&oid=45facc0a-1211-11ec-80ad-005056b86db5" }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
-                    "id": "study",
-                    "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "study",
+                "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
-            case "mindNetwork": //好友打开
+        case "mindNetwork": //好友打开
             _formdiv = new U.UF.UI.form(
                 "思维网络",
                 $$("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=71160a48-11e2-11ec-80ad-005056b86db5" }), {
-                    "id": "mindNetwork",
-                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
-                    "onresize": function() {}
-                }, {
-                    closecallback: function() {}
-                }, { "style": { "height": "36px" } }).form; //创建窗体
-            _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); } }
+                "id": "mindNetwork",
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            _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); } }
             break;
 
 
@@ -547,14 +551,14 @@ U.MD.D.I.openApplication = function(str, obj, info) {
             _formdiv = new U.UF.UI.form("域名管理", _iframe, { id: "U_MD_DS_DomainShare", style: { "width": "370px", "height": "390px" } }).form;
             if (_formdiv) {
                 //生成任务栏的变量
-                _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-15px -296px", "name": "网盘", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
+                _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-15px -296px", "name": "网盘", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
             }
             break;
         case "disk": //个人网盘查看 
             _formdiv = U.MD.DK.initDisk(_userid, obj.directoryid); //根据网盘数据,并加载网盘,里面包含了url重写
             if (_formdiv) {
                 //生成任务栏的变量
-                _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-15px -296px", "name": "网盘", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj); } }
+                _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-15px -296px", "name": "网盘", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
             }
             break;
         case "word": //Word打开
@@ -562,7 +566,7 @@ U.MD.D.I.openApplication = function(str, obj, info) {
             _formdiv = _wordinfo[0];
             if (_formdiv) {
                 //生成任务栏的变量
-                _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-462px -296px", "name": "文档", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, _wordinfo[1]); } }
+                _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-462px -296px", "name": "文档", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, _wordinfo[1]); } }
             }
             if (obj.UrlType != 'join') {
                 U.MD.N.urlWrite("word/" + _formdiv.id.substr(-36), "在线文档"); //word的url重写
@@ -572,7 +576,7 @@ U.MD.D.I.openApplication = function(str, obj, info) {
             _formdiv = U.MD.O.excel(_userinfo, obj);
             if (_formdiv) {
                 //生成任务栏的变量
-                _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-523px -296px", "name": "Excel", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj); } }
+                _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-523px -296px", "name": "Excel", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
             }
             U.MD.N.urlWrite("excel/" + _formdiv.id.substr(-36), "Excel");
             break;
@@ -580,42 +584,42 @@ U.MD.D.I.openApplication = function(str, obj, info) {
             _formdiv = U.MD.D.Txt.textCreate();
             if (_formdiv) {
                 //生成任务栏的变量
-                _taskbar = { "id": str + obj.directoryid, "backgroundPostion": "-267px -413px", "name": "文本", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj); } }
+                _taskbar = { "id": str + obj.directoryid, "backgroundPostion": "-267px -413px", "name": "文本", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
             }
             U.MD.N.urlWrite("txt/" + _formdiv.id.substr(-36), "文本");
             break;
         case "lookupFriend":
             _formdiv = U.MD.F.S.popSearchFriendsOrGroupForm(0);
             //生成任务栏的变量
-            _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-85px -413px", "name": "查找好友", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj); } }
+            _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-85px -413px", "name": "查找好友", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
             U.MD.N.urlWrite("lookupfriend/" + obj.directoryid.substr(-36), "查找好友"); //查找好友的url重写
             break;
         case "ftp": //Ftp 
             _formdiv = U.MD.F.S.popupsSearchFtp();
             //生成任务栏的变量
-            _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-144px -413px", "name": "FTP", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj); } }
+            _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-144px -413px", "name": "FTP", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
             break;
         case "group": //群组
             _formdiv = U.MD.F.S.popupsSearchGroups(0);
             //生成任务栏的变量
-            _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-85px -413px", "name": "群组", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj); } }
+            _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-85px -413px", "name": "群组", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
             break;
         case "set": //个人设置
             _formdiv = U.MD.U.P.userDataSet();
             if (_formdiv) {
                 //生成任务栏的变量
-                _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-400px -296px", "name": "个人设置", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj); } }
+                _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-400px -296px", "name": "个人设置", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
             }
             break;
         case "systemSet": //系统设置 
             _formdiv = U.MD.D.B.init();
             //生成任务栏的变量
-            _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-400px -296px", "name": "系统设置", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj); } }
+            _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-400px -296px", "name": "系统设置", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
             break;
         case "boomYun": //BoomYun 
             _formdiv = U.Boom.I.onload();
             //生成任务栏的变量
-            _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-844px -419px", "name": "互联办公", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj); } }
+            _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-844px -419px", "name": "互联办公", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
             U.MD.N.urlWrite("boomyun", "互联办公"); //boomyun的url重写
             break;
         case "xz": //App下载 
@@ -746,7 +750,7 @@ U.MD.D.I.openApplication = function(str, obj, info) {
 //         return false;
 //     }
 
-// }  
+// }
 
 
 

+ 44 - 18
js/Office/Word/Word.js

@@ -29,7 +29,10 @@ US = parent.US;
 * @param   {object}    登录用户信息  
 * @return  {object}    返回当前窗体 
 */
-U.MD.O.W.load = function (fileinfo, userinfo) {
+U.MD.O.W.load = function (fileid) {
+    var fileinfo = U.MD.O.W.getfile(fileid),
+        userinfo = U.MD.O.W.getuser();
+
     U.MD.O.W.variable(fileinfo, userinfo); //初始化全局变量
     U.MD.O.W.LoadContent(fileinfo); //加载内容
     U.MD.O.W.setEvent(); //设置事件
@@ -40,6 +43,29 @@ U.MD.O.W.load = function (fileinfo, userinfo) {
     U.MD.O.W.Panel.LoadOfficeHistory(fileinfo); //加载历史记录
 }
 
+/**
+* 根据cookie获取用户
+*
+*/
+U.MD.O.W.getuser = function () {
+    return {};
+}
+
+
+/**
+* 根据文件id获取文件
+*
+*/
+U.MD.O.W.getfile = function (fileid) {
+    return {
+        UserDirectoryExtendType: "",
+        UserDirectoryID: Guid.newGuid(),
+        newfile: true
+    };
+}
+
+
+
 /**
 * 设置事件
 *
@@ -105,7 +131,7 @@ U.MD.O.W.LoadContent = function (fileinfo) {
             try {
                 _defaultnav = JSON.parse(U.MD.O.W.fileinfo.UsOffice);
             } catch (e) {
-                _defaultnav = { logo: "", nav: [{ pageId: Guid.newGuid(), name: "初始页面"}] };
+                _defaultnav = { logo: "", nav: [{ pageId: Guid.newGuid(), name: "初始页面" }] };
             }
             U.MD.O.W.T.N.form(_defaultnav);
         }
@@ -144,7 +170,7 @@ U.MD.O.W.AsynLoad = function (r) {     //object 值
             try {
                 r = JSON.parse(r);
             } catch (e) {
-                r = { logo: "", nav: [{ pageId: Guid.newGuid(), name: "恢复内容"}] };
+                r = { logo: "", nav: [{ pageId: Guid.newGuid(), name: "恢复内容" }] };
             }
         }
         U.MD.O.W.T.N.form(r);
@@ -182,7 +208,7 @@ U.MD.O.W.save = function () {
         if (_fileid && _fileinfo.UserId && _fileinfo.UserallDirectoryName && U.MD.O.W.permission.edit) { //如果是已经保存到数据库的文档,那么直接保存内容
             U.MD.O.W.Panel.InsertOfficeHistory(_fileinfo, _html, _name, _el); //插入历史记录
             //保存到数据库
-            
+
             top.U.A.Request(US.AUTH, ["SaveFileContent", US.userInfo.UserId, _fileid, _html, _name], function (r) {
                 U.MD.O.W.fileinfo.UsOffice = r.context[1].innerHTML;
                 U.Alert("保存成功");
@@ -328,14 +354,14 @@ document.oncontextmenu = U.UF.EV.stopDefault; //禁止右键菜单
 U.MD.O.W.accessory = function () {
     if (!U.MD.U.L.isLogin()) {
         var _confirm = $$('div'),
-        _pickarea = $$("div", { "style": { "cssText": "display:table; width: 100%; height: auto; "} }, _confirm),
-        _picklocal = $$("div", { "style": { "cssText": "display:table-cell; width:235px; height:170px; background-color:#f5f5f5;text-align:center; vertical-align: middle;cursor: pointer;"} }, _pickarea),
-        _pickline = $$("div", { "style": { "cssText": "display:table-cell; width:1px; height: 100%; background-color:#cecece;"} }, _pickarea),
-        _pickoa = $$("div", { "style": { "cssText": "display:table-cell; width:234px; height:100%; background-color:#f5f5f5;text-align:center; vertical-align: middle;cursor: pointer;"} }, _pickarea);
-        $$("img", { "onerror": U.MD.C.imgError, src: "/img/officefileicon.png", style: { "vertical-align": "middle"} }, _picklocal);
-        $$("img", { "onerror": U.MD.C.imgError, src: "/img/oaofficeicon.png", style: { "vertical-align": "middle"} }, _pickoa);
-        $$('span', { innerText: '从网盘添加', style: { "margin-left": "10px"} }, _pickoa);
-        $$('span', { innerText: '从本地上传', style: { "margin-left": "10px"} }, _picklocal);
+            _pickarea = $$("div", { "style": { "cssText": "display:table; width: 100%; height: auto; " } }, _confirm),
+            _picklocal = $$("div", { "style": { "cssText": "display:table-cell; width:235px; height:170px; background-color:#f5f5f5;text-align:center; vertical-align: middle;cursor: pointer;" } }, _pickarea),
+            _pickline = $$("div", { "style": { "cssText": "display:table-cell; width:1px; height: 100%; background-color:#cecece;" } }, _pickarea),
+            _pickoa = $$("div", { "style": { "cssText": "display:table-cell; width:234px; height:100%; background-color:#f5f5f5;text-align:center; vertical-align: middle;cursor: pointer;" } }, _pickarea);
+        $$("img", { "onerror": U.MD.C.imgError, src: "/img/officefileicon.png", style: { "vertical-align": "middle" } }, _picklocal);
+        $$("img", { "onerror": U.MD.C.imgError, src: "/img/oaofficeicon.png", style: { "vertical-align": "middle" } }, _pickoa);
+        $$('span', { innerText: '从网盘添加', style: { "margin-left": "10px" } }, _pickoa);
+        $$('span', { innerText: '从本地上传', style: { "margin-left": "10px" } }, _picklocal);
         var _locaInp = $$('input', { id: "U_MD_O_cloud", type: "file", style: { cssText: "position: absolute; visibility: hidden;" }, multiple: "" }, _picklocal);
         var _range;
         var _form = new U.UF.UI.form(
@@ -421,7 +447,7 @@ U.MD.O.W.accessory = function () {
                             }
                             var _box = $$('div', {});
                             _box.appendChild(_el);
-                            new U.UF.UI.form("展示位", _box, { id: "showplace", style: { cssText: "width: 600px; height: 500px"} });
+                            new U.UF.UI.form("展示位", _box, { id: "showplace", style: { cssText: "width: 600px; height: 500px" } });
                         })
                         break;
                     case "video":
@@ -456,12 +482,12 @@ U.MD.O.W.accessory.openVideo = function () {
 * 输出文件样式
 */
 U.MD.O.W.accessory.printFile = function (type, data, files) {
-    var _div = $$('span', { style: { cssText: "display: inline-block"} });
+    var _div = $$('span', { style: { cssText: "display: inline-block" } });
 
     switch (type) {
         case "video":
             var video = document.createElement('video'),
-            _second, _mintue;
+                _second, _mintue;
             video.src = "http://fs.1473.cn/" + data[0]
 
             video.addEventListener('canplaythrough', function (e) { //拿到视频的时长
@@ -471,7 +497,7 @@ U.MD.O.W.accessory.printFile = function (type, data, files) {
                 _mintue = m < 10 ? "0" + m : m;
 
                 var _img = $$('img', { src: "/img/YS2017.png" }),
-                _img2 = $$('img', { src: "http://fs.1473.cn/" + data[1] });
+                    _img2 = $$('img', { src: "http://fs.1473.cn/" + data[1] });
 
                 _img2.onload = function () { //当图片加载好后
                     _ctx.drawImage(_img2, 0, 0, 300, 150); //关键帧图片
@@ -481,8 +507,8 @@ U.MD.O.W.accessory.printFile = function (type, data, files) {
                 }
             })
 
-            var _canvas = $$('canvas', { style: { cssText: "border:1px solid #000000;"} }, _div),
-            _ctx = _canvas.getContext('2d');
+            var _canvas = $$('canvas', { style: { cssText: "border:1px solid #000000;" } }, _div),
+                _ctx = _canvas.getContext('2d');
 
             _canvas.width = 300;
             _canvas.height = 150;

+ 3 - 3
uform.js

@@ -42,7 +42,7 @@ try {
             document.domain = "1473.cn"; //把www.1473.cn和main.1473.cn,a.1473.cn的域统一设置为1473.cn
         }
         else {
-            document.domain = "boomyun.com"; //是能是boomyun.com有效,其他均不能设置,会跳转到catch语句
+            document.domain = "cocorobo.cn"; //是能是boomyun.com有效,其他均不能设置,会跳转到catch语句
         }
     }
 }
@@ -126,8 +126,8 @@ if (!US.disk) {
     US.FEEDBACKID = "3c779543-bc1a-4851-af22-af9ba97a5f33" //意见反馈目录id;
     US.MAINDOMAIN = "http://" + ((window.location.host.indexOf("www.1473.cn") > -1 ||
                  window.location.host == "1473.cn" ||
-                 window.location.host.indexOf("www.boomyun.com") > -1 ||
-                 window.location.host == "boomyun.com") ? window.location.host : "www.1473.cn");
+                 window.location.host.indexOf("www.cocorobo.cn") > -1 ||
+                 window.location.host == "cocorobo.cn") ? window.location.host : "www.1473.cn");
 }
 //#endregion