lsc 2 years ago
parent
commit
b08b041036
6 changed files with 276 additions and 5 deletions
  1. 94 0
      css/Desktop/Desktop.css
  2. BIN
      img/icon/school.png
  3. BIN
      img/icon/teacher.png
  4. 25 0
      index.html
  5. 151 5
      js/Desktop/DeskTop.js
  6. 6 0
      js/Desktop/Onload.js

+ 94 - 0
css/Desktop/Desktop.css

@@ -406,6 +406,100 @@ body div ::-webkit-scrollbar-resizer:vertical {
     display: block;
 }
 
+.U_MD_D_BD_notice_img {
+    height: 20px !important;
+    margin: 0 5px;
+    display: none;
+}
+
+.U_MD_D_BD_notice_img>img {
+    width: 100%;
+    height: 100%;
+}
+
+.U_MD_D_BD_notice {
+    display: none;
+    /* padding: 5px 10px; */
+    background-color: #00000085;
+    position: absolute;
+    right: 0;
+    top: 50px;
+    border-radius: 10px;
+    width: 300px;
+}
+
+.U_MD_D_BD_notice:hover {
+    background-color: #000000a2;
+}
+
+.U_MD_D_BD_notice_title {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    font-size: 15px;
+    padding: 13px 15px;
+    box-sizing: border-box;
+    background: rgb(44, 44, 44);
+    justify-content: space-between;
+    border-top-left-radius: 10px;
+    border-top-right-radius: 10px;
+}
+
+.U_MD_D_BD_notice_title {
+    cursor: pointer;
+}
+
+.U_MD_D_BD_noticeBox {
+    padding: 10px 15px;
+    width: 100%;
+    box-sizing: border-box;
+    font-size: 15px;
+    cursor: pointer;
+}
+
+.U_MD_D_BD_noticeBox+.U_MD_D_BD_noticeBox {
+    border-top: 1px solid #5f5f5f84;
+}
+
+.U_MD_D_BD_noticeBox_title {
+    width: 100%;
+    display: flex;
+}
+
+
+.U_MD_D_BD_noticeBox_title>span:nth-child(1)  {
+    /* margin-left: 8px; */
+    width: calc(100%);
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    word-break: break-word;
+}
+
+.U_MD_D_BD_noticeBox_content {
+    margin-top: 5px;
+    width: 100%;
+    display: flex;
+}
+
+.U_MD_D_BD_noticeBox_content span {
+    width: calc(100%);
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    word-break: break-word;
+    color: #979797;
+
+}
+
+.U_MD_D_BD_noticeBox_time {
+    margin-top: 5px;
+    width: 100%;
+    color: #979797;
+    font-size: 14px;
+}
+
+
 .U_MD_D_BZMD {
     position: relative;
 }

BIN
img/icon/school.png


BIN
img/icon/teacher.png


+ 25 - 0
index.html

@@ -103,6 +103,7 @@
                             <div class="userName"
                                 style="max-width: 86px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
                             </div>
+                            <div class="U_MD_D_BD_notice_img" onclick="U.MD.D.OpenNotice();"><img src="./img/icon/gm/notice.png" alt=""></div>
                             <div class="exit" onclick="U.MD.U.LO.logoutSystem();" title="退出"
                                 style="display: none;margin-left: 5px;color: #888888;">
                                 退出
@@ -115,6 +116,30 @@
                     <div class="U_MD_D_BD_QRcodeShare">
                         <img class="U_MD_D_BD_QRcodeShareImg" src="./img/QRcodeShare.png" alt="Alternate Text" />
                     </div>
+                    <div class="U_MD_D_BD_notice" onclick="U.MD.D.I.openApplication('tcNotice')">
+                        <div class="U_MD_D_BD_notice_title">
+                            <span>消息通知</span>
+                            <img src="./img/icon/gm/cancel.png" alt="" onclick="U.MD.D.cancelNotice()">
+                        </div>
+                        <div class="U_MD_D_BD_noticeBox_box">
+                            <!-- <div class="U_MD_D_BD_noticeBox">
+                                <div class="U_MD_D_BD_noticeBox_title"><span>相向而行,幸福光明</span></div>
+                                <div class="U_MD_D_BD_noticeBox_content"><span>相向而行,幸福光明</span></div>
+                                <div class="U_MD_D_BD_noticeBox_time"><span>2023-06-04 15:06</span></div>
+                            </div>
+                            <div class="U_MD_D_BD_noticeBox">
+                                <div class="U_MD_D_BD_noticeBox_title"><span>新项目:巧“焊”天工</span></div>
+                                <div class="U_MD_D_BD_noticeBox_content"><span>成功发布了,快去学习中心看看吧。</span></div>
+                                <div class="U_MD_D_BD_noticeBox_time"><span>2023-06-04 15:06</span></div>
+                            </div>
+                            <div class="U_MD_D_BD_noticeBox">
+                                <div class="U_MD_D_BD_noticeBox_title"><span>新项目:巧“焊”天工</span></div>
+                                <div class="U_MD_D_BD_noticeBox_content"><span>成功发布了,快去学习中心看看吧。</span></div>
+                                <div class="U_MD_D_BD_noticeBox_time"><span>2023-06-04 15:06</span></div>
+
+                            </div> -->
+                        </div>
+                    </div>
                 </div>
                 <div class="U_MD_D_B" __top__="false" id="U_MD_D_B">
                     <div class="U_MD_D_BZ" onclick="U.MD.D.A.aboutUs();">

+ 151 - 5
js/Desktop/DeskTop.js

@@ -291,6 +291,32 @@ U.MD.D.I.SONGteacherDeskIcon = [
     { "Name": "jupyter", "Url": "jupyter", "style": { "cssText": "background-image:url(/img/icon/jupyter.png)" } },
 ];
 
+
+U.MD.D.I.tcStudentDeskIcon = [
+    { "Name": "师生项目", "Url": "studentCourse", "style": { "cssText": "background-image:url(/img/icon/studentCourse.png)" } },
+    { "Name": "我的资料", "Url": "tcData", "style": { "cssText": "background-image:url(/img/icon/data.png)" } },
+    { "Name": "消息通知", "Url": "tcNotice", "style": { "cssText": "background-image:url(/img/icon/news.png)" } },
+];
+
+U.MD.D.I.tcTeacherDeskIcon = [
+    { "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": "studentCourse", "style": { "cssText": "background-image:url(/img/icon/studentCourse.png)" } },
+    { "Name": "学生管理", "Url": "tcStudent", "style": { "cssText": "background-image:url(/img/icon/student.png)" } },
+    { "Name": "我的资料", "Url": "tcData", "style": { "cssText": "background-image:url(/img/icon/data.png)" } },
+    { "Name": "消息通知", "Url": "tcNotice", "style": { "cssText": "background-image:url(/img/icon/news.png)" } },
+];
+
+U.MD.D.I.tcOrganizerDeskIcon = [
+    { "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": "studentCourseS", "style": { "cssText": "background-image:url(/img/icon/studentCourse.png)" } },
+    { "Name": "学校管理", "Url": "tcSchool", "style": { "cssText": "background-image:url(/img/icon/school.png)" } },
+    { "Name": "教师管理", "Url": "tcTeacher", "style": { "cssText": "background-image:url(/img/icon/teacher.png)" } },
+    { "Name": "我的资料", "Url": "tcData", "style": { "cssText": "background-image:url(/img/icon/data.png)" } },
+    { "Name": "消息通知", "Url": "tcNotice", "style": { "cssText": "background-image:url(/img/icon/news.png)" } },
+];
+
 //#region 桌面初始化a
 
 /**
@@ -355,6 +381,7 @@ U.MD.D.I.initDesktopIcons = function (el) {
         _type = US.userInfo.type,
         _org = US.userInfo.org,
         _oid = US.userInfo.organizeid,
+        _role = US.userInfo.role,
         _teacherDesktopIconInfo = U.MD.D.I.teacherDeskIcon, //获取教师端桌面图标
         _teacherDesktopIconInfo2 = U.MD.D.I.teacherDeskIcon2, //获取教师端桌面图标
         _studentDesktopIconInfo = U.MD.D.I.studentDeskIcon, //获取学生端桌面图标
@@ -367,9 +394,12 @@ U.MD.D.I.initDesktopIcons = function (el) {
         _BSDNSteacherDesktopIconInfo = U.MD.D.I.BSDNSteacherDeskIcon,//获取北师大
         _SONGteacherDesktopIconInfo = U.MD.D.I.SONGteacherDeskIcon,//获取北师大
         _GMteacherDesktopIconInfo = U.MD.D.I.GMteacherDeskIcon, //获取光明学校桌面图标
-        _GMstudentDesktopIconInfo = U.MD.D.I.GMstudentDeskIcon; //获取光明学校桌面图标
+        _GMstudentDesktopIconInfo = U.MD.D.I.GMstudentDeskIcon, //获取光明学校桌面图标
+        _tcStudentDeskIconInfo = U.MD.D.I.tcStudentDeskIcon,//腾讯学生
+        _tcTeacherDeskIconInfo = U.MD.D.I.tcTeacherDeskIcon,//腾讯学生
+        _tcOrganizerDeskIconInfo = U.MD.D.I.tcOrganizerDeskIcon;//腾讯学生
     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","383f207d-4ced-4eeb-a15a-7b0a2f3abe7b"];
+    var _orgA = ["7ada499f-4ec7-11ed-8c78-005056b86db5", "eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d","383f207d-4ced-4eeb-a15a-7b0a2f3abe7b","150e3120-9195-11ed-b13d-005056b86db5"];
     //清楚桌面图标
     el.innerHTML = "";
     //循环创建桌面图标
@@ -577,7 +607,58 @@ U.MD.D.I.initDesktopIcons = function (el) {
             $$("div", { className: "U_MD_D_KOS U_Img", "style": _GMstudentDesktopIconInfo[i].style }, _iconcontent);
             $$("div", { className: "U_MD_D_KOX", "innerHTML": _GMstudentDesktopIconInfo[i].Name }, _iconcontent);
         }
-    } else {
+    } else if ((_type == 1 || _type == 4) && _org == "150e3120-9195-11ed-b13d-005056b86db5" && _role == 0) {
+        for (i = 0; i < _tcTeacherDeskIconInfo.length; i++) {
+            _content = $$("div", {
+                className: "U_MD_D_KO",
+                "onmousedown": U.UF.C.closure(function (obj) {
+                    //防止拖动图标即打开了桌面应用
+                    U.MD.D.click(this, obj);
+                }, [_tcTeacherDeskIconInfo[i]]),
+                "onclick": U.UF.C.closure(function (obj) {
+                    //防止拖动图标即打开了桌面应用
+                    U.MD.D.click(this, obj);
+                }, [_tcTeacherDeskIconInfo[i]])
+            }, _frag); // 
+            _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
+            $$("div", { className: "U_MD_D_KOS U_Img", "style": _tcTeacherDeskIconInfo[i].style }, _iconcontent);
+            $$("div", { className: "U_MD_D_KOX", "innerHTML": _tcTeacherDeskIconInfo[i].Name }, _iconcontent);
+        }
+    } else if ((_type == 1 || _type == 4) && _org == "150e3120-9195-11ed-b13d-005056b86db5" && _role === 1) {
+        for (i = 0; i < _tcOrganizerDeskIconInfo.length; i++) {
+            _content = $$("div", {
+                className: "U_MD_D_KO",
+                "onmousedown": U.UF.C.closure(function (obj) {
+                    //防止拖动图标即打开了桌面应用
+                    U.MD.D.click(this, obj);
+                }, [_tcOrganizerDeskIconInfo[i]]),
+                "onclick": U.UF.C.closure(function (obj) {
+                    //防止拖动图标即打开了桌面应用
+                    U.MD.D.click(this, obj);
+                }, [_tcOrganizerDeskIconInfo[i]])
+            }, _frag); // 
+            _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
+            $$("div", { className: "U_MD_D_KOS U_Img", "style": _tcOrganizerDeskIconInfo[i].style }, _iconcontent);
+            $$("div", { className: "U_MD_D_KOX", "innerHTML": _tcOrganizerDeskIconInfo[i].Name }, _iconcontent);
+        }
+    } else if (_type == 2 && _oid == "150e3120-9195-11ed-b13d-005056b86db5") {
+        for (i = 0; i < _tcStudentDeskIconInfo.length; i++) {
+            _content = $$("div", {
+                className: "U_MD_D_KO",
+                "onmousedown": U.UF.C.closure(function (obj) {
+                    //防止拖动图标即打开了桌面应用
+                    U.MD.D.click(this, obj);
+                }, [_tcStudentDeskIconInfo[i]]),
+                "onclick": U.UF.C.closure(function (obj) {
+                    //防止拖动图标即打开了桌面应用
+                    U.MD.D.click(this, obj);
+                }, [_tcStudentDeskIconInfo[i]])
+            }, _frag); // 
+            _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
+            $$("div", { className: "U_MD_D_KOS U_Img", "style": _tcStudentDeskIconInfo[i].style }, _iconcontent);
+            $$("div", { className: "U_MD_D_KOX", "innerHTML": _tcStudentDeskIconInfo[i].Name }, _iconcontent);
+        }
+    }  else {
         for (i = 0; i < _teacherDesktopIconInfo.length; i++) {
             _content = $$("div", {
                 className: "U_MD_D_KO",
@@ -812,7 +893,10 @@ window.addEventListener('message', function (e) { // 监听 message 事件
     if (e.data.screenType && e.data.screenType == "2") { //项目管理传入
         U.MD.D.I.openInApplication("studyDetail", e.data.cid, e.data.screenType, 4)
         //3是展示全部阶段  2学生 1老师 4专家
-    } else if (e.data.screenType && e.data.screenType == "3") { //项目管理传入
+    }else if (e.data.screenType && e.data.screenType == "2s") { //项目管理传入
+        U.MD.D.I.openInApplication("studyDetailS", e.data.cid, e.data.screenType, 4)
+        //3是展示全部阶段  2学生 1老师 4专家
+    }  else if (e.data.screenType && e.data.screenType == "3") { //项目管理传入
         U.MD.D.I.openInApplication("studyDetail", e.data.cid, 2, 1)
     } else if (e.data.screenType && e.data.screenType == "3s") { //项目管理传入
         U.MD.D.I.openInApplication("studyDetailS", e.data.cid, 2, 1)
@@ -948,6 +1032,7 @@ U.MD.D.I.openInApplication = function (str, data, screenType, tType) {
         _oid = _userinfo.organizeid,
         _type = US.userInfo.type,
         _org = US.userInfo.org,
+        _role = US.userInfo.role,
         _classId = US.userInfo.classid;
     if (_type == 4) {
         tType = 4
@@ -2314,7 +2399,7 @@ U.MD.D.I.openApplication = function (str, obj, info) {
         case "studentCourseS": //学生项目 老师
             _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/#/scourse?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
+                $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/scourse?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&role=" + _role }), {
                 "id": "studentCourseS",
                 "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
                 "onresize": function () { }
@@ -2323,6 +2408,67 @@ U.MD.D.I.openApplication = function (str, obj, info) {
             }, { "style": { "height": "36px" } }).form; //创建窗体
             _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/studentCourse.png)" }, "name": "学生项目", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
             break;
+        case "tcStudent": //腾讯学生管理
+            _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/#/tcStudent?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&role=" + _role }), {
+                "id": "tcStudent",
+                "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 "tcSchool": //腾讯学校管理
+            _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/#/tcSchool?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&role=" + _role }), {
+                "id": "tcSchool",
+                "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/school.png)" }, "name": "学校管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
+            break;
+        case "tcTeacher": //腾讯学校管理
+            _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/#/tcTeacher?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&role=" + _role }), {
+                "id": "tcTeacher",
+                "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/teacher.png)" }, "name": "教师管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
+            break;  
+        case "tcData": //腾讯我的资料
+            _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/#/tcData?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&role=" + _role }), {
+                "id": "tcData",
+                "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/data.png)" }, "name": "我的资料", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
+            break;      
+        case "tcNotice": //腾讯消息通知
+            _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/#/tcNotice?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&role=" + _role }), {
+                "id": "tcNotice",
+                "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/data.png)" }, "name": "消息通知", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
+            break;        
+            
     }
 
 

+ 6 - 0
js/Desktop/Onload.js

@@ -365,6 +365,9 @@ U.MD.D.getuser = function () {
                                         U.MD.D.getNotice();
                                     } else if (res.value[0][0].org == '97c4ee8b-d010-4042-986d-e9d3c217264f') {
                                         $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/zhoujia.jpg")'
+                                    } else if (res.value[0][0].org == '150e3120-9195-11ed-b13d-005056b86db5') {
+                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/tengxunBg.png")'
+                                        U.MD.D.getNotice();
                                     }
 
                                     US.userInfo = res.value[0][0];
@@ -420,6 +423,9 @@ U.MD.D.getuser = function () {
             U.MD.D.getNotice();
         } else if (userInfo.org == '97c4ee8b-d010-4042-986d-e9d3c217264f') {
             $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/zhoujia.jpg")'
+        } else if (userInfo.org == '150e3120-9195-11ed-b13d-005056b86db5') {
+            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/tengxunBg.png")'
+            U.MD.D.getNotice();
         }
 
     }