浏览代码

Merge branch 'beta'

lsc 2 年之前
父节点
当前提交
1515dbbcee
共有 5 个文件被更改,包括 95 次插入8 次删除
  1. 二进制
      img/icon/dataBoard.png
  2. 34 3
      js/Desktop/DeskTop.js
  3. 4 5
      node/message.js
  4. 24 0
      node/test.html
  5. 33 0
      node/test.js

二进制
img/icon/dataBoard.png


+ 34 - 3
js/Desktop/DeskTop.js

@@ -1047,7 +1047,7 @@ U.MD.D.I.initDesktopIcons = function(el, type) {
         _szscStudentDeskIconInfo = U.MD.D.I.szscStudentDeskIcon, //网络夏令营
         _szscTeacherDeskIconInfo = U.MD.D.I.szscTeacherDeskIcon, //网络夏令营
         _szscOrganizerDeskIconInfo = U.MD.D.I.szscOrganizerDeskIcon; //网络夏令营
-    var _oidA = ['69893dca-1d47-11ed-8c78-005056b86db5', "91305d49-01ba-11ed-8c78-005056b86db5", "d9db3320-503a-11ed-8c78-005056b86db5", "05b62310-8cda-11ed-b13d-005056b86db5", '1c3b9def-8fbe-11ed-b13d-005056b86db5', '91305d49-01ba-11ed-8c78-005056b86db4', 'ea2a8c65-f38c-11ed-91d8-005056b86db5', '4c686762-1d0a-11ed-8c78-005056b86db5', 'b1095a3c-1d06-4ac8-854f-7c0d97f4ab41', '206c38d2-0cbe-11ee-91d8-005056b86db5'];
+    var _oidA = ['69893dca-1d47-11ed-8c78-005056b86db5', "91305d49-01ba-11ed-8c78-005056b86db5", "d9db3320-503a-11ed-8c78-005056b86db5", "05b62310-8cda-11ed-b13d-005056b86db5", '1c3b9def-8fbe-11ed-b13d-005056b86db5', '91305d49-01ba-11ed-8c78-005056b86db4', 'ea2a8c65-f38c-11ed-91d8-005056b86db5', '4c686762-1d0a-11ed-8c78-005056b86db5', 'b1095a3c-1d06-4ac8-854f-7c0d97f4ab41', '206c38d2-0cbe-11ee-91d8-005056b86db5','ccb9754d-59c1-11ed-8c78-005056b86db5'];
     var _orgA = ["7ada499f-4ec7-11ed-8c78-005056b86db5", "eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d", "383f207d-4ced-4eeb-a15a-7b0a2f3abe7b", "150e3120-9195-11ed-b13d-005056b86db5", "ee40e8e3-e36c-4872-8105-cf395481012s", '97c4ee8b-d010-4042-986d-e9d3c217264f', 'ec0af97a-7c10-4259-a7eb-db9cc8174cdc', '4df1b570-f6ac-48fc-8d50-d0b157dae776', 'e632b86c-f89d-11ed-91d8-005056b86db5', 'b50cf65a-001c-11ee-91d8-005056b86db5', '578de748-05d2-11ee-91d8-005056b86db5', '54f09f1e-09f0-11ee-91d8-005056b86db5', '7b016f69-0f4f-11ee-91d8-005056b86db5', '1973f6c7-1561-11ee-91d8-005056b86db5','2fa75e51-189a-11ee-91d8-005056b86db5'];
     //清楚桌面图标
     el.innerHTML = "";
@@ -1066,7 +1066,8 @@ U.MD.D.I.initDesktopIcons = function(el, type) {
             { "Name": "AI协同", "Url": "ainew", "style": { "cssText": "background-image:url(/img/icon/AIChat.png)" } }, 
             { "Name": "工作管理", "Url": "studioCourse", "style": { "cssText": "background-image:url(/img/icon/studioCourse.png)" } }, 
             { "Name": "工作中心", "Url": "studioIndex", "style": { "cssText": "background-image:url(/img/icon/studioIndex.png)" } },
-            { "Name": "知识建构", "Url": "futureClass", "style": { "cssText": "background-image:url(/img/icon/futureClass.png)" } }
+            { "Name": "知识建构", "Url": "futureClass", "style": { "cssText": "background-image:url(/img/icon/futureClass.png)" } },
+            { "Name": "数据看板", "Url": "dataBoard", "style": { "cssText": "background-image:url(/img/icon/dataBoard.png)" } },
         )
     }
 
@@ -1107,6 +1108,23 @@ U.MD.D.I.initDesktopIcons = function(el, type) {
                 $$("div", { className: "U_MD_D_KOS U_Img", "style": _studentDesktopIconInfo[i].style }, _iconcontent);
                 $$("div", { className: "U_MD_D_KOX", "innerHTML": _studentDesktopIconInfo[i].Name }, _iconcontent);
             }
+        } else if (_type == 2 && (_oid == "ccb9754d-59c1-11ed-8c78-005056b86db5")) {
+            for (i = 0; i < _hkZJLSStudentDeskIconInfo.length; i++) {
+                _content = $$("div", {
+                    className: "U_MD_D_KO",
+                    "onmousedown": U.UF.C.closure(function(obj) {
+                        //防止拖动图标即打开了桌面应用
+                        U.MD.D.click(this, obj);
+                    }, [_hkZJLSStudentDeskIconInfo[i]]),
+                    "onclick": U.UF.C.closure(function(obj) {
+                        //防止拖动图标即打开了桌面应用
+                        U.MD.D.click(this, obj);
+                    }, [_hkZJLSStudentDeskIconInfo[i]])
+                }, _frag); // 
+                _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
+                $$("div", { className: "U_MD_D_KOS U_Img", "style": _hkZJLSStudentDeskIconInfo[i].style }, _iconcontent);
+                $$("div", { className: "U_MD_D_KOX", "innerHTML": _hkZJLSStudentDeskIconInfo[i].Name }, _iconcontent);
+            } //
         } else if (_type == 2 && (_oid == "206c38d2-0cbe-11ee-91d8-005056b86db5")) {
             for (i = 0; i < _hkZJLSStudentDeskIconInfo.length; i++) {
                 _content = $$("div", {
@@ -4170,7 +4188,7 @@ U.MD.D.I.openApplication = function(str, obj, info) {
         case "futureClass": //AI共创
             _formdiv = new U.UF.UI.form(
                 "知识建构",
-                $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://cscl.cocorobo.cn" }), {
+                $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://cscl.cocorobo.cn" }), {
                     "id": "futureClass",
                     "style": { "width": "100%", "height": "100%", "overflow": 'hidden' },
                     "onresize": function() {}
@@ -4179,6 +4197,19 @@ U.MD.D.I.openApplication = function(str, obj, info) {
                 }, { "style": { "height": "36px" } }).form; //创建窗体
             _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/futureClass.png)" }, "name": "知识建构", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
 
+            break;
+        case "dataBoard": //数据看板
+            _formdiv = new U.UF.UI.form(
+                "数据看板",
+                $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/dataBoard?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&role=" + _role }), {
+                    "id": "dataBoard",
+                    "style": { "width": "100%", "height": "100%", "overflow": 'hidden' },
+                    "onresize": function() {}
+                }, {
+                    closecallback: function() {}
+                }, { "style": { "height": "36px" } }).form; //创建窗体
+            _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/dataBoard.png)" }, "name": "数据看板", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
+
             break;
         case "AIAnalyse": //AI共创
             _formdiv = new U.UF.UI.form(

+ 4 - 5
node/message.js

@@ -749,7 +749,10 @@ us.updatecscl = function (messageInfo, classId, ty) {
         _obj.backgroundUrl = messageInfo.backgroundUrl;
         _obj.edges = _obj.edges || [];
         _obj.nodes = _obj.nodes || [];
-
+        console.log("------------s------------");
+        console.log(messageInfo);
+        console.log(_obj);
+        console.log(ty);
         for (j = 0; j < messageInfo.edges.length; j++) {
             _is = true;
             for (i = 0; i < _obj.edges.length; i++) {
@@ -768,10 +771,6 @@ us.updatecscl = function (messageInfo, classId, ty) {
                 _obj.edges.push(messageInfo.edges[j])
             }
         }
-        console.log("------------s------------");
-        console.log(messageInfo.nodes);
-        console.log(_obj.nodes);
-        console.log(ty);
         for (j = 0; j < messageInfo.nodes.length; j++) {
             _is = true;
             for (i = 0; i < _obj.nodes.length; i++) {

+ 24 - 0
node/test.html

@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wb="http://open.weibo.com/wb" style="overflow: hidden;">
+
+<head>
+
+    <script>
+
+        var xhr = new XMLHttpRequest();
+        xhr.open("GET", "http://127.0.0.1:1473", true);
+        xhr.setRequestHeader("Connection", "keep-alive");
+        xhr.onreadystatechange = function () {
+            if (xhr.readyState == e && xhr.status == 200) {
+                //var data = JSON.parse(xhr.responseText);
+                console.log(data);
+            }
+        }
+    </script>
+</head>
+
+<body>
+
+</body>
+
+</html>

+ 33 - 0
node/test.js

@@ -0,0 +1,33 @@
+us = {};
+us.qs = require("querystring"); //引用文件解析包
+us.http = require("http"); //引用http server服务
+
+
+
+/**
+* 创建服务
+*
+* @param  {object} requset 请求对象
+* @param  {object} response 响应对象
+**/
+us.server = us.http.createServer(function (requset, response) {
+    //设置跨域
+    response.writeHead(200, {
+        "Content-Type": "application/json",
+        'Access-Control-Allow-Origin': '*',
+        "Connection": "keep-alive",
+        'Access-Control-Allow-Headers': 'Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With'
+    });
+    var data = { "name": "John", "age": 30 };
+    res.write(JSON.stringify(data));
+});
+
+
+/**
+* 监听1473端口的处理
+*
+**/
+us.server.listen('1473', '', function () {
+    //在控制台输出监听提示
+    console.log("开始监听" + us.server.address().port + "......");
+});