lsc před 2 roky
rodič
revize
86c9a3df42
1 změnil soubory, kde provedl 83 přidání a 6 odebrání
  1. 83 6
      js/Desktop/DeskTop.js

+ 83 - 6
js/Desktop/DeskTop.js

@@ -47,6 +47,45 @@ U.MD.D.I.teacherDeskIcon = [
     { "Name": "jupyter", "Url": "jupyter", "style": { "cssText": "background-image:url(/img/icon/jupyter.png)" } },
 ];
 
+//教师桌面图标的全局变量
+U.MD.D.I.teacherDeskIcon2 = [
+    { "Name": "项目管理", "Url": "project", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
+    { "Name": "学习中心", "Url": "study", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
+    { "Name": "学生管理", "Url": "student", "style": { "cssText": "background-image:url(/img/icon/student.png)" } },
+    { "Name": "学生评价", "Url": "evaluate", "style": { "cssText": "background-image:url(/img/icon/evaluation.png)" } },
+    { "Name": "班级管理", "Url": "class", "style": { "cssText": "background-image:url(/img/icon/class.png)" } },
+    { "Name": "我的资料", "Url": "my", "style": { "cssText": "background-image:url(/img/icon/myMessage.png)" } },
+    { "Name": "通知公告", "Url": "notice", "style": { "cssText": "background-image:url(/img/icon/news.png)" } },
+    { "Name": "素材库", "Url": "library", "style": { "cssText": "background-image:url(/img/icon/library.png)" } },
+    { "Name": "电子白板", "Url": "whiteboard", "style": { "cssText": "background-image:url(/img/icon/whiteBoard.png)" } },
+    { "Name": "问卷调查", "Url": "investigation", "style": { "cssText": "background-image:url(/img/icon/ask.png)" } },
+    { "Name": "便签分类", "Url": "note", "style": { "cssText": "background-image:url(/img/icon/note.png)" } },
+    // { "Name": "量规评分", "Url": "score", "style": { "cssText": "background-image:url(/img/icon/score.png)" } },
+    { "Name": "思维导图", "Url": "mind", "style": { "cssText": "background-image:url(/img/icon/mindMapping.png)" } },
+    { "Name": "协同文档", "Url": "doc", "style": { "cssText": "background-image:url(/img/icon/doc.png)" } },
+    { "Name": "思维网格", "Url": "mindNetwork", "style": { "cssText": "background-image:url(/img/icon/mindNetwork.png)" } },
+    { "Name": "实时课堂", "Url": "teacherClassRoom", "style": { "cssText": "background-image:url(/img/icon/classRoom.png)" } },
+    { "Name": "目标管理", "Url": "sys", "style": { "cssText": "background-image:url(/img/icon/evalua.png)" } },
+    { "Name": "课程设计", "Url": "courseDesign", "style": { "cssText": "background-image:url(/img/icon/courseDesign.png)" } },
+    { "Name": "训练平台", "Url": "train", "style": { "cssText": "background-image:url(/img/icon/trainPlatform.png)" } },
+    { "Name": "编程平台", "Url": "program", "style": { "cssText": "background-image:url(/img/icon/program.png)" } },
+    { "Name": "AI体验", "Url": "AIprogram2", "style": { "cssText": "background-image:url(/img/icon/AIprogram2.png)" } },
+    { "Name": "Python", "Url": "Pythonprogram", "style": { "cssText": "background-image:url(/img/icon/Pythonprogram.png)" } },
+    { "Name": "AI编程", "Url": "AIprogram", "style": { "cssText": "background-image:url(/img/icon/AIprogram.png)" } },
+    { "Name": "源码编辑", "Url": "codeEdit", "style": { "cssText": "background-image:url(/img/icon/code.png)" } },
+    { "Name": "MindMap", "Url": "MindMap", "style": { "cssText": "background-image:url(/img/icon/MIndMap.png)" } },
+    { "Name": "翻译", "Url": "translation", "style": { "cssText": "background-image:url(/img/icon/translation.png)" } },
+    { "Name": " 魔盒识字", "Url": "mohe", "style": { "cssText": "background-image:url(/img/icon/mohe.png)" } },
+    { "Name": "24点", "Url": "24game", "style": { "cssText": "background-image:url(/img/icon/24game.png)" } },
+    { "Name": "数学画板", "Url": "netWorkPanel", "style": { "cssText": "background-image:url(/img/icon/networkPanel.png)" } },
+    { "Name": "GeoGebra", "Url": "GeoGebra", "style": { "cssText": "background-image:url(/img/icon/GeoGebra.png)" } },
+    { "Name": "项目进展", "Url": "case", "style": { "cssText": "background-image:url(/img/icon/case.png)" } },
+    // { "Name": "国家教育", "Url": "resources", "style": { "cssText": "background-image:url(/img/icon/resources.png)" } },
+    { "Name": "赛诺梵", "Url": "snf", "style": { "cssText": "background-image:url(/img/icon/snf.png)" } },
+    { "Name": "汉字宫", "Url": "han", "style": { "cssText": "background-image:url(/img/icon/han.png)" } },
+    // { "Name": "jupyter", "Url": "jupyter", "style": { "cssText": "background-image:url(/img/icon/jupyter.png)" } },
+];
+
 U.MD.D.I.studentDeskIcon = [
     // { "Name": "我的项目", "Url": "studnetProject", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
     { "Name": "学习中心", "Url": "studentStudy", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
@@ -78,11 +117,11 @@ U.MD.D.I.studentDeskIcon = [
     { "Name": "jupyter", "Url": "jupyter", "style": { "cssText": "background-image:url(/img/icon/jupyter.png)" } },
 ];
 
-// U.MD.D.I.studentDeskIcon2 = [
-//     { "Name": "学习中心", "Url": "studentStudy", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
-//     { "Name": "实时课堂", "Url": "studentClassRoom", "style": { "cssText": "background-image:url(/img/icon/classRoom.png)" } },
-//     { "Name": "汉字宫", "Url": "han", "style": { "cssText": "background-image:url(/img/icon/han.png)" } },
-// ]
+U.MD.D.I.studentDeskIcon2 = [
+    { "Name": "学习中心", "Url": "studentStudy", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
+    { "Name": "实时课堂", "Url": "studentClassRoom", "style": { "cssText": "background-image:url(/img/icon/classRoom.png)" } },
+    { "Name": "汉字宫", "Url": "han", "style": { "cssText": "background-image:url(/img/icon/han.png)" } },
+]
 
 U.MD.D.I.schoolDeskIcon = [
     { "Name": "项目管理", "Url": "project", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
@@ -226,17 +265,21 @@ U.MD.D.I.initDesktopIcons = function(el) {
         _org = US.userInfo.org,
         _oid = US.userInfo.organizeid,
         _teacherDesktopIconInfo = U.MD.D.I.teacherDeskIcon, //获取教师端桌面图标
+        _teacherDesktopIconInfo2 = U.MD.D.I.teacherDeskIcon2, //获取教师端桌面图标
         _studentDesktopIconInfo = U.MD.D.I.studentDeskIcon, //获取学生端桌面图标
+        _studentDesktopIconInfo2 = U.MD.D.I.studentDeskIcon2, //获取学生端桌面图标
         _orgDesktopIconInfo = U.MD.D.I.orgDeskIcon, //获取组织桌面图标
         _orgStemDeskIcon = U.MD.D.I.orgStemDeskIcon,
         _hanDeskIcon = U.MD.D.I.hanDeskIcon,
         _schoolDesktopIconInfo = U.MD.D.I.schoolDeskIcon, //获取测试学校桌面图标
         _GMteacherDesktopIconInfo = U.MD.D.I.GMteacherDeskIcon, //获取光明学校桌面图标
         _GMstudentDesktopIconInfo = U.MD.D.I.GMstudentDeskIcon; //获取光明学校桌面图标
+    var _oidA = ['69893dca-1d47-11ed-8c78-005056b86db5',"91305d49-01ba-11ed-8c78-005056b86db5","d9db3320-503a-11ed-8c78-005056b86db5"];
+    var _orgA = ["7ada499f-4ec7-11ed-8c78-005056b86db5","eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d"];
     //清楚桌面图标
     el.innerHTML = "";
     //循环创建桌面图标
-    if (_type == 2 && _oid != "91305d49-01ba-11ed-8c78-005056b86db5" && _org != "eb2af5e9-ac3d-46b6-9fe3-3c1c364f0217") {
+    if (_type == 2  && _oidA.indexOf(_oid) == -1 && _orgA.indexOf(_org) == -1 && _org != 'eb2af5e9-ac3d-46b6-9fe3-3c1c364f0217') {
         for (i = 0; i < _studentDesktopIconInfo.length; i++) {
             _content = $$("div", {
                 className: "U_MD_D_KO",
@@ -253,6 +296,40 @@ U.MD.D.I.initDesktopIcons = function(el) {
             $$("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 && ( _oidA.indexOf(_oid) != -1 || _orgA.indexOf(_org) != -1)){
+        for (i = 0; i < _studentDesktopIconInfo2.length; i++) {
+            _content = $$("div", {
+                className: "U_MD_D_KO",
+                "onmousedown": U.UF.C.closure(function(obj) {
+                    //防止拖动图标即打开了桌面应用
+                    U.MD.D.click(this, obj);
+                }, [_studentDesktopIconInfo2[i]]),
+                "onclick": U.UF.C.closure(function(obj) {
+                    //防止拖动图标即打开了桌面应用
+                    U.MD.D.click(this, obj);
+                }, [_studentDesktopIconInfo2[i]])
+            }, _frag); // 
+            _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
+            $$("div", { className: "U_MD_D_KOS U_Img", "style": _studentDesktopIconInfo2[i].style }, _iconcontent);
+            $$("div", { className: "U_MD_D_KOX", "innerHTML": _studentDesktopIconInfo2[i].Name }, _iconcontent);
+        }
+    }else if ((_type == 1 || _type == 4) && _oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+        for (i = 0; i < _teacherDesktopIconInfo2.length; i++) {
+            _content = $$("div", {
+                className: "U_MD_D_KO",
+                "onmousedown": U.UF.C.closure(function(obj) {
+                    //防止拖动图标即打开了桌面应用
+                    U.MD.D.click(this, obj);
+                }, [_teacherDesktopIconInfo2[i]]),
+                "onclick": U.UF.C.closure(function(obj) {
+                    //防止拖动图标即打开了桌面应用
+                    U.MD.D.click(this, obj);
+                }, [_teacherDesktopIconInfo2[i]])
+            }, _frag); // 
+            _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
+            $$("div", { className: "U_MD_D_KOS U_Img", "style": _teacherDesktopIconInfo2[i].style }, _iconcontent);
+            $$("div", { className: "U_MD_D_KOX", "innerHTML": _teacherDesktopIconInfo2[i].Name }, _iconcontent);
+        }
     } else if ((_type == 1 || _type == 4) && _oid == "d9db3320-503a-11ed-8c78-005056b86db5") {
         for (i = 0; i < _hanDeskIcon.length; i++) {
             _content = $$("div", {