Преглед на файлове

修改type跳转页面代码整理

11wqe1 преди 9 часа
родител
ревизия
671a7c908e
променени са 4 файла, в които са добавени 340 реда и са изтрити 313 реда
  1. 0 4
      src/components/sidebarL.vue
  2. 130 58
      src/components/sidebarL2.vue
  3. 163 231
      src/views/HomeView.vue
  4. 47 20
      src/views/login/loginPage.vue

+ 0 - 4
src/components/sidebarL.vue

@@ -1,11 +1,8 @@
 <template>
         <div class="left">
-            <!-- <div > -->
                 <div class="logo2" @click="gotoKanban">
                     <img :src="fromL.basics.logo ? fromL.basics.logo : require('../assets/img/moren.png')" alt="">
                 </div>
-                <!-- <div class="ulT"> -->
-
                 <!-- 默认首页 -->
                 <div class="ulTOne" @click.stop="goto(0)">
                     <div class="menu_left">
@@ -289,7 +286,6 @@ import { myMixin } from "@/mixins/mixin.js"
                     // 为了隐藏侧边栏与顶部 
                     _url = url + queryString +'&gotype=1'
                 } else if (val.toolId == "classroomOb") {
-                    // 为了隐藏侧边栏与顶部 
                     _url = url + queryString +'&showIntroduceType=1'
                 } else{
                     _url = url + queryString

+ 130 - 58
src/components/sidebarL2.vue

@@ -1,18 +1,21 @@
 <template>
-        <div class="left">            
-                <!-- 权限 -->
+        <div class="left">
                 <div class="logo2">
-                    <img src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/logo17446996549611754360746364.png" alt="">
+                    <img :src="fromL.basics.logo ? fromL.basics.logo : require('../assets/img/moren.png')" alt="">
                 </div>
-                <div style="width: 100%;">
+
+                <!-- 权限 -->
+                <div style="width: 100%;" v-for="(item,index) in appSignL(barList)"
+                    :key="index+1">
                     <!-- 渲染平台工具类型 -->
-                    <div class="barY">
-                        <div class="ulTOne" @click.stop="goto(p,pin)"
-                            v-for="(p,pin) in appSignL(barList)" :key="pin+'p'">
+                    <div style="width: 100%;" @click.stop="goto(item,index)">
+                        <div class="ulTOne" >
                                 <div class="menu_left">
-                                    <img :src="activeL === (pin +1) ? p.url[0].menuActiveIcon : p.url[0].menuIcon" class="logo" alt="">
-                                    <span class="barT" :style="{color : activeL === (pin +1) ? '#0051D7' :''}">
-                                        {{ p.name }}
+                                    <img class="logo"  
+                                    :src="activeL === (index +1) ? item.url[0].menuActiveIcon : item.url[0].menuIcon" 
+                                    alt="">
+                                    <span class="barT" :style="{color : activeL === (index +1) ? '#0051D7' :''}">
+                                        {{ item.name }}
                                     </span>
                                 </div>
                         </div>
@@ -36,47 +39,74 @@ import { myMixin } from "@/mixins/mixin.js"
             appSignL(){
                 return function(val){
                     let data = []
+                    
                     val.forEach(e =>{
-                        if (e.toolId === 'futureClass') {
+                        if (e.toolId === 'futureClass' && this.cocoNoteType == 'coconote') {
                             data.push(e)
                         }
-                    })
-                    val.forEach(e =>{
-                        if (e.toolId === 'person' && this.cocoNoteType == 'person' && this.roleUser.type != 2) {
+                        if (e.toolId === 'person' && this.cocoNoteType == 'person') {
                             data.push(e)
                         }
-                    })
-                    val.forEach( e =>{
-                        if (e.toolId == 'project' && this.cocoNoteType == 'coconote' && this.roleUser.type != 2) {
+                        if (e.toolId === 'learning' && this.cocoNoteType == 'learning') {
+                            data.push(e)
+                        }
+                        if (e.toolId === 'learningstu' && this.cocoNoteType == 'learning') {
+                            data.push(e)
+                        }
+                        if (e.toolId === 'classroomOb' && this.cocoNoteType == 'classroomOb') {
                             data.push(e)
                         }
                     })
-                    console.log('data',data);
-                    data.forEach((e,index)=>{
-                        e.url.forEach(k=>{
-                            k.menuIcon = data[index].url[0].menuIcon
-                            k.menuActiveIcon = data[index].url[0].menuActiveIcon
-                        })
-                    })
+
+                    if (this.roleUser.type == 1) {
+                        data.push(
+                            {
+                                name:'学生管理',
+                                toolId: "project",
+                                argumentList: [
+                                    "userid",
+                                    "oid",
+                                    "classId",
+                                    "org",
+                                    "role"
+                                ],
+                                url: [
+                                    {
+                                        region: "cn",
+                                        url: "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/student",
+                                        name: "学生管理",
+                                        menuIcon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%AD%A6%E7%94%9F%E7%AE%A1%E7%90%861758628251713.svg',
+                                        menuActiveIcon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%AD%A6%E7%94%9F%E7%AE%A1%E7%90%86%20%281%291758628255157.svg'
+                                    },
+                                    {
+                                        region: "beta",
+                                        url: "https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/student",
+                                        name: "学生管理",
+                                        menuIcon:'',
+                                        menuActiveIcon:''
+                                    },
+                                ],
+                            },
+                        )
+                    }
+
                     
-                    // if (!data[0].activeIcon){
-                    //     data[0].activeIcon = data2[0].activeIcon
-                    // }
-                    // if (!data[0].defaultIcon){
-                    //     data[0].defaultIcon = data2[0].defaultIcon
-                    // }
-                    // if (!data[0].hoverIcon){
-                    //     data[0].hoverIcon = data2[0].hoverIcon
-                    // }
-                    // if (!data[0].icon){
-                    //     data[0].icon = data2[0].icon
-                    // }
-                    // if (!data[0].platformIcon){
-                    //     data[0].platformIcon = data2[0].platformIcon
-                    // }
                     return data
                 }
             },
+            // 如果hk,com没有图标,默认使用cn的
+            AppCon(){
+                return function(c) {
+                    let data = JSON.parse(JSON.stringify(c))
+
+                    data.forEach(k=>{
+                        k.menuIcon = data[0].menuIcon
+                        k.menuActiveIcon = data[0].menuActiveIcon
+                    })
+                    
+                    return data
+                };
+            },
             roleUser(){
                 return Object.keys(this.userinfo2).length != 0 ? this.userinfo2 : this.userinfo
             }
@@ -140,32 +170,83 @@ import { myMixin } from "@/mixins/mixin.js"
                         ],
                     },
                     {
-                        name:'学生管理',
-                        toolId: "project",
+                        name:'课堂观察',
+                        toolId: "classroomOb",
+                        argumentList: [
+                            "userid",
+                            "oid",
+                            "org",
+                            "role"
+                        ],
+                        url: [
+                            {
+                                region: "cn",
+                                url: "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/classroomObservation",
+                                name: "课堂观察",
+                                menuIcon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E8%AF%BE%E5%A0%82%E8%A7%82%E5%AF%9F%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%EF%BC%88%E7%BA%BF%E6%80%A7%EF%BC%891763460227583.svg',
+                                menuActiveIcon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E8%AF%BE%E5%A0%82%E8%A7%82%E5%AF%9F%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%EF%BC%88%E7%BA%BF%E6%80%A7%EF%BC%89%20%281%291763460243446.svg'
+                            },
+                            {
+                                region: "beta",
+                                url: "https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/classroomObservation",
+                                name: "课堂观察",
+                                menuIcon:'',
+                                menuActiveIcon:''
+                            },
+                        ],
+                    },
+                    {
+                        name:'个性化学习中心',
+                        toolId: "learning",
                         argumentList: [
                             "userid",
                             "oid",
-                            "classId",
                             "org",
                             "role"
                         ],
                         url: [
                             {
                                 region: "cn",
-                                url: "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/student",
-                                name: "学生管理",
-                                menuIcon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%AD%A6%E7%94%9F%E7%AE%A1%E7%90%861758628251713.svg',
-                                menuActiveIcon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%AD%A6%E7%94%9F%E7%AE%A1%E7%90%86%20%281%291758628255157.svg'
+                                url: "https://beta.app.cocorobo.cn/#/learning",
+                                name: "个性化学习中心",
+                                menuIcon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/athetop1763461509812.svg',
+                                menuActiveIcon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/athetop%20%281%291763461514803.svg'
                             },
                             {
                                 region: "beta",
-                                url: "https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/student",
-                                name: "学生管理",
+                                url: "https://beta.app.cocorobo.cn/#/learning",
+                                name: "个性化学习中心",
                                 menuIcon:'',
                                 menuActiveIcon:''
                             },
                         ],
                     },
+                    {
+                        name:'个性化学习中心',
+                        toolId: "learningStu",
+                        argumentList: [
+                            "userid",
+                            "oid",
+                            "org",
+                            "role"
+                        ],
+                        url: [
+                            {
+                                region: "cn",
+                                url: "https://beta.app.cocorobo.cn/#/learning/studentProjectList",
+                                name: "个性化学习中心",
+                                menuIcon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/athetop1763461509812.svg',
+                                menuActiveIcon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/athetop%20%281%291763461514803.svg'
+                            },
+                            {
+                                region: "beta",
+                                url: "https://beta.app.cocorobo.cn/#/learning/studentProjectList",
+                                name: "个性化学习中心",
+                                menuIcon:'',
+                                menuActiveIcon:''
+                            },
+                        ],
+                    }
                 ]
             }
         },
@@ -238,7 +319,6 @@ import { myMixin } from "@/mixins/mixin.js"
                     // 为了隐藏侧边栏与顶部 
                     _url = url + queryString +'&gotype=1'
                 } else if (val.toolId == "classroomOb") {
-                    // 为了隐藏侧边栏与顶部 
                     _url = url + queryString +'&showIntroduceType=1'
                 } else{
                     _url = url + queryString
@@ -315,14 +395,6 @@ import { myMixin } from "@/mixins/mixin.js"
   gap: 2px;
 }
 
-
-.barT{
-    font-size:12px;
-    overflow: hidden;
-    /* font-weight: 600; */
-    white-space: nowrap;
-    text-overflow: ellipsis;
-}
 .logo2 {
     cursor: pointer;
   box-sizing: border-box;
@@ -358,7 +430,7 @@ import { myMixin } from "@/mixins/mixin.js"
     overflow: auto;
     display: flex;
     flex-direction: column;
-    gap: 10px;
+    gap: 24px;
 }
 .left::-webkit-scrollbar { width: 0px; } 
 .left { scrollbar-width: none; }

+ 163 - 231
src/views/HomeView.vue

@@ -3,13 +3,13 @@
 		<div class="container">
 			<div class="leftBar" style="height: 100%">
 				<sidebarL
-					v-if="!courseId && !cocoNoteType"
+					v-if="!courseId && !barpage.includes(cocoNoteType)"
 					@getPer="getPer"
 					@AddAppJson="AddAppJson"
 					ref="sidebarLRef"
 				></sidebarL>
 				<sidebarL2
-					v-if="cocoNoteType"
+					v-if="barpage.includes(cocoNoteType)"
 					@AddAppJson="AddAppJson"
 					:cocoNoteType="cocoNoteType"
 					ref="sidebarLRef"
@@ -81,24 +81,14 @@
 							allow="camera *; microphone *; display-capture; midi; encrypted-media; fullscreen; geolocation; clipboard-read; clipboard-write; accelerometer; autoplay; gyroscope; payment; picture-in-picture; usb; xr-spatial-tracking;"
 							frameborder="no"
 							@load="handleLoad"
-							style="border: 0; width: 100%; height: 100vh"
+							style="border: 0; width: 100%;"
+							:style="{height: cocoNoteType ? 'calc(100vh - 60px)' : '100vh'}"
 							:src="item.json"
 							:ref="item.toolId"
 						>
 						</iframe>
 					</div>
 				</div>
-				<!-- <div v-if="cocoNoteType">
-					<iframe
-						allow="camera *; microphone *; display-capture; midi; encrypted-media; fullscreen; geolocation; clipboard-read; clipboard-write; accelerometer; autoplay; gyroscope; payment; picture-in-picture; usb; xr-spatial-tracking;"
-						frameborder="no"
-						@load="handleLoad"
-						style="border: 0; width: 100%;"
-						:style="{height: cocoNoteType ? 'calc(100vh - 60px)' : '100vh'}"
-						:src="clearifa"
-					>
-					</iframe>
-				</div> -->
 				<!-- 荔园首页定制工具,不保存缓存 -->
 				<!-- style="height: calc(100vh - 60px)" -->
 				<div v-if="clearifa">
@@ -293,6 +283,12 @@ export default {
 				x: 80, // 屏幕宽度减去元素宽度
 				y: window.innerHeight - 180, // 屏幕高度减去元素高度
 			}, // 初始位置
+			barpage:[
+				'coconote',
+				'person',
+				'learning',
+				'classroomOb'
+			], //type页面侧边栏
 			positionCopy:{},
 			AppJSon: [],
 			imgA: require("../assets/img/drgB.png"),
@@ -302,9 +298,7 @@ export default {
 			clearifa: "",
 			msgNum: 0,
 			cocoNoteType: this.$route.query.type,
-			// cocoNoteType: '666',
 			courseId: this.$route.query.courseid,
-			// courseId: 'da5aa5b7-a98c-11f0-84cf-005056924926',
 			// 荔园集团下的学校
 			mergedList: [
 				"3823a6a5-1b6e-11f0-a66a-005056924926",
@@ -383,10 +377,10 @@ export default {
 			}
 		},
 		async cocoNoteif(){
-			this.openApp3({
+			// 随机码登录跳转
+			this.openApp2({
 				stateL: true,
 				toolId: "synergyCourse",
-				clearL: true,
 			});
 
 			if (this.cocoNoteType && this.courseId) {
@@ -431,21 +425,18 @@ export default {
 							this.addOp3('1', "", { courseid: this.courseId , type: (this.roleUser.type == 1 ? '_teacher' : '_student') +  "CocoNote_open" }, "success")
 						} else {
 							this.$message.error("没有加入分组请先加入分组");
-							// this.goToCourse3(this.courseId)
-							this.openApp4({
+							this.openApp2({
 								stateL: true,
 								toolId: "synergyCourse/add",
-								clearL: true,
 							});
 							this.addOp3('1', "", { courseid: this.courseId , type:  (this.roleUser.type == 1 ? '_teacher' : '_student') +  "CocoNote_open" }, '没有加入分组请先加入分组')
 						}
 					} else {
 						this.$message.error("没有加入分组请先加入分组");
 						// this.goToCourse3(this.courseId) 
-						this.openApp4({
+						this.openApp2({
 							stateL: true,
 							toolId: "synergyCourse/add",
-							clearL: true,
 						});
 						this.addOp3('1', "", { courseid: this.courseId , type:  (this.roleUser.type == 1 ? '_teacher' : '_student') +  "CocoNote_open" }, '没有加入分组请先加入分组')
 					}
@@ -613,74 +604,57 @@ export default {
 		},
 		// 生成学生跳转到课程详情的链接
 		async openApp2(val) {
-			let url = "";
+			let url = '';
 			let argumentList = ["courseId","userid", "oid", "org","cid","tType","screenType"];
-			if (this.betaL == "beta") {
-				url = `https://beta.pbl.cocorobo.cn/pbl-student-table/dist/#/${val.toolId}`;
-			} else {
-				url = `https://pbl.cocorobo.cn/pbl-student-table/dist/#/${val.toolId}`;
-			}
-
-			await store.commit("user/SET_AppSIGN", val.toolId);
-
-			let _userinfo = this.roleUser, //登录用户信息
-				{
-					userid: _userid,
-					organizeid: _oid,
-					org: _org,
-					classid: _classid,
-				} = _userinfo; // 解构赋值获取用户信息
-			let queryString = "";
-			if (argumentList && argumentList.length) {
-				const paramsMap = {
-					courseId: this.courseId,
-					userid: _userid,
-					oid: _oid,
-					org: _org,
-					cid: _classid,
-					tType: this.roleUser.type,
-					screenType :2
-				};
-
-				const canshu = argumentList
-					.filter((param) => paramsMap[param] !== undefined || param === "type")
-					.map((param) =>
-						param === "type"
-							? `tType=${paramsMap["tType"]}`
-							: `${param}=${paramsMap[param]}`
-					);
-
-				queryString = canshu.length
-					? (url.includes("?") ? "&" : "?") + canshu.join("&")
-					: ""; // 生成查询字符串
-			}
-
-			let _url = url + queryString;
-			console.log("_url", _url);
-
-			let pl = {
-				json: _url,
-				stateL: true,
-				toolId: val.toolId,
-				clearL: val.clearL,
-			};
-			this.AddAppJson(pl)
-			// this.$emit("cutUrl", pl);
-			this.addOp3(
-				"1",
-				"",
-				{ type: this.prefixL + val.toolId + (this.roleUser.type == 1 ? '_teacher' : '_student') +  "stu_open" },
-				"success"
-			);
-		},
-		// 拔尖人才网址登录到页面直接跳转到拔尖人才
-		async opentopTalent(val) {
-			let url = "";
-			let argumentList = ["userid", "oid", "org","role","tType"];
-			if (this.betaL == "beta") {
-				url = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/${val.toolId}`;
-			} else {
-				url = `https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/${val.toolId}`;
+			let teabeta = 'https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/'
+			let teacn = 'https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/'
+			let teahk = 'https://pbl.cocorobo.hk/pbl-teacher-table/dist/#/'
+			let teacom = 'https://pbl.cocorobo.com/pbl-teacher-table/dist/#/'
+
+			let stubeta = 'https://beta.pbl.cocorobo.cn/pbl-student-table/dist/#/'
+			let stucn = 'https://pbl.cocorobo.cn/pbl-student-table/dist/#/'
+			let stuhk = 'https://pbl.cocorobo.hk/pbl-student-table/dist/#/'
+			let stucom = 'https://pbl.cocorobo.com/pbl-student-table/dist/#/'
+
+			let appbeta = 'https://beta.app.cocorobo.cn/#/'
+
+			let teaPage = ['synergyCourse','synergyCourse/add','topTalent','classroomObservation']
+			let stuPage = ['courseDetail']
+			let apppage = ['learning','learning/studentProjectList']
+
+
+			if (this.$region == "beta") {
+				if (stuPage.includes(val.toolId)) {
+					url =stubeta + val.toolId;	
+				} else if(teaPage.includes(val.toolId)){
+					url =teabeta + val.toolId;
+				} else if (apppage.includes(val.toolId)) {
+					url = appbeta + val.toolId;
+				}
+			} else if (this.$region == "hk") {
+				if (stuPage.includes(val.toolId)) {
+					url = stuhk+ val.toolId;
+				} else if(teaPage.includes(val.toolId)){
+					url =teahk + val.toolId;
+				} else if (apppage.includes(val.toolId)) {
+					url = appbeta + val.toolId;
+				}
+			} else if (this.$region == "com") {
+				if (stuPage.includes(val.toolId)) {
+					url = stucom + val.toolId;
+				} else if(teaPage.includes(val.toolId)){
+					url =teacom + val.toolId;
+				} else if (apppage.includes(val.toolId)) {
+					url = appbeta + val.toolId;
+				}
+			}else{
+				if (stuPage.includes(val.toolId)) {
+					url = stucn + val.toolId;
+				}else if(teaPage.includes(val.toolId)){
+					url =teacn + val.toolId;
+				} else if (apppage.includes(val.toolId)) {
+					url = appbeta + val.toolId;
+				}
 			}
 
 			await store.commit("user/SET_AppSIGN", val.toolId);
@@ -691,76 +665,63 @@ export default {
 					organizeid: _oid,
 					org: _org,
 					role: _role,
+					classid: _classid,
 				} = _userinfo; // 解构赋值获取用户信息
 			let queryString = "";
 			if (argumentList && argumentList.length) {
-				const paramsMap = {
-					userid: _userid,
-					oid: _oid,
-					org: _org,
-					role: _role,
-					tType: this.roleUser.type,
-				};
-
-				const canshu = argumentList
-					.filter((param) => paramsMap[param] !== undefined || param === "type")
-					.map((param) =>
-						param === "type"
-							? `tType=${paramsMap["tType"]}`
-							: `${param}=${paramsMap[param]}`
-					);
-
-				queryString = canshu.length
-					? (url.includes("?") ? "&" : "?") + canshu.join("&")
-					: ""; // 生成查询字符串
-			}
-
-			let _url = url + queryString;
-			console.log("_url", _url);
-
-			let pl = {
-				json: _url,
-				stateL: true,
-				toolId: val.toolId,
-				clearL: val.clearL,
-			};
-			this.AddAppJson(pl)
-			// this.$emit("cutUrl", pl);
-			this.addOp3(
-				"1",
-				"",
-				{ type: 'person' + val.toolId + (this.roleUser.type == 1 ? '_teacher' : '_student') +  "stu_open" },
-				"success"
-			);
-		},
-		// coconotetype网址登录到页面直接跳转到协同建构
-		async openApp3(val) {
-			let url = "";
-			let argumentList = ["userid", "oid", "org","role"];
-			if (this.betaL == "beta") {
-				url = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/${val.toolId}`;
-			} else {
-				url = `https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/${val.toolId}`;
-			}
-
-			await store.commit("user/SET_AppSIGN", val.toolId);
 
-			let _userinfo = this.roleUser, //登录用户信息
-				{
-					userid: _userid,
-					organizeid: _oid,
-					org: _org,
-					role:_role,
-				} = _userinfo; // 解构赋值获取用户信息
-			let queryString = "";
-			if (argumentList && argumentList.length) {
-				const paramsMap = {
-					userid: _userid,
-					oid: _oid,
-					org: _org,
-					role: _role,
-					ly :1
-				};
+				let paramsMap = ''
+				if (val.toolId == 'courseDetail') {
+					paramsMap = {
+						courseId: this.courseId,
+						userid: _userid,
+						oid: _oid,
+						org: _org,
+						cid: _classid,
+						tType: this.roleUser.type,
+						screenType :2
+					};
+				}else if (val.toolId == 'synergyCourse') {
+					paramsMap = {
+						userid: _userid,
+						oid: _oid,
+						org: _org,
+						role: _role,
+						ly :1
+					};
+				}else if (val.toolId == 'synergyCourse/add') {
+					paramsMap = {
+						cid: this.courseId,
+						userid: _userid,
+						oid: _oid,
+						org: _org,
+						role: _role,
+						ly :1
+					};
+				}else if (val.toolId == 'topTalent') {
+					paramsMap = {
+						userid: _userid,
+						oid: _oid,
+						org: _org,
+						role: _role,
+						tType: this.roleUser.type,
+					};
+				}else if (val.toolId == 'learning') {
+					paramsMap = {
+						userid: _userid,
+						oid: _oid,
+						org: _org,
+						role: _role,
+					};
+				}else if (val.toolId == 'classroomObservation') {
+					paramsMap = {
+						userid: _userid,
+						oid: _oid,
+						org: _org,
+					};
+				}
+				console.log('paramsMap',paramsMap);
+				console.log('val.toolId',val.toolId);
 
 				const canshu = argumentList
 					.filter((param) => paramsMap[param] !== undefined || param === "type")
@@ -774,85 +735,34 @@ export default {
 					? (url.includes("?") ? "&" : "?") + canshu.join("&")
 					: ""; // 生成查询字符串
 			}
-
-			let _url = url + queryString;
-			console.log("_url", _url);
-
-			let pl = {
-				json: _url,
-				stateL: true,
-				toolId: val.toolId,
-				clearL: val.clearL,
-			};
-			this.AddAppJson(pl)
-			// this.$emit("cutUrl", pl);
-			this.addOp3(
-				"1",
-				"",
-				{ type: 'coconote' + val.toolId + (this.roleUser.type == 1 ? '_teacher' : '_student') +  "stu_open" },
-				"success"
-			);
-		},
-		// coconotetype网址登录到页面直接跳转到协同建构,未加入分组后提示加入分组
-		async openApp4(val) {
-			let url = "";
-			let argumentList = ["userid", "oid", "org","role","cid"];
-			if (this.betaL == "beta") {
-				url = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/${val.toolId}`;
-			} else {
-				url = `https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/${val.toolId}`;
-			}
-
-			await store.commit("user/SET_AppSIGN", val.toolId);
-
-			let _userinfo = this.roleUser, //登录用户信息
-				{
-					userid: _userid,
-					organizeid: _oid,
-					org: _org,
-					role:_role,
-				} = _userinfo; // 解构赋值获取用户信息
-			let queryString = "";
-			if (argumentList && argumentList.length) {
-				const paramsMap = {
-					cid: this.courseId,
-					userid: _userid,
-					oid: _oid,
-					org: _org,
-					role: _role,
-					ly :1
-				};
-
-				const canshu = argumentList
-					.filter((param) => paramsMap[param] !== undefined || param === "type")
-					.map((param) =>
-						param === "type"
-							? `tType=${paramsMap["tType"]}`
-							: `${param}=${paramsMap[param]}`
-					);
-
-				queryString = canshu.length
-					? (url.includes("?") ? "&" : "?") + canshu.join("&")
-					: ""; // 生成查询字符串
+			console.log('queryString',queryString);
+			
+			let _url = ''
+			if (val.toolId == 'synergyCourse' || val.toolId == 'synergyCourse/add') {
+				_url = url + queryString + '&person=person';
+			}else if (val.toolId == 'classroomObservation') {
+				_url = url + queryString + '&showIntroduceType=1';
+			}else if (val.toolId == 'study' && this.roleUser.type == 2) {
+                _url = _url.replace(/([?&])classId=([^&]*)/, '$1cid=$2');
+			} else{
+				_url = url + queryString;
 			}
-
-			let _url = url + queryString;
 			console.log("_url", _url);
 
 			let pl = {
 				json: _url,
 				stateL: true,
 				toolId: val.toolId,
-				clearL: val.clearL,
+				// clearL: val.clearL,
 			};
 			this.AddAppJson(pl)
 			// this.$emit("cutUrl", pl);
-			this.addOp3(
-				"1",
-				"",
-				{ type: this.prefixL + val.toolId + (this.roleUser.type == 1 ? '_teacher' : '_student') +  "stu_open" },
-				"success"
-			);
+			// this.addOp3(
+			// 	"1",
+			// 	"",
+			// 	{ type: this.prefixL + val.toolId + (this.roleUser.type == 1 ? '_teacher' : '_student') +  "stu_open" },
+			// 	"success"
+			// );
 		},
 		// 获取学校权限与组织权限,优先使用学校权限,其次使用组织权限
 		async getPer() {
@@ -918,7 +828,10 @@ export default {
 
 		console.log('this.courseId',this.courseId);
 		console.log('this.cocoNoteType',this.cocoNoteType);
-
+		// 防止乱输入type展示出侧边栏与学生不能使用type进入课堂观察
+		if (!this.barpage.includes(this.cocoNoteType) || (this.cocoNoteType == 'classroomOb' && this.roleUser.type == 2)) {
+			this.cocoNoteType = ''
+		}
 		
 		if (
 			!this.roleUser.cclassid &&
@@ -936,19 +849,38 @@ export default {
 			this.cocoNoteif()
 			return
 		}else if (this.cocoNoteType === 'person') {
-			// 随机码登录跳转
-			this.opentopTalent({
+			this.openApp2({
 				stateL: true,
 				toolId: "topTalent",
-				clearL: true,
 			});
 			return
-		}else if (this.courseId) {
+		}else if (this.cocoNoteType === 'classroomOb') {
+			if (this.roleUser.type == 1) {
+				this.openApp2({
+					stateL: true,
+					toolId: "classroomObservation",
+				});
+			}
+			return
+		}else if (this.cocoNoteType === 'learning') {
+			if (this.roleUser.type == 1) {
+				this.openApp2({
+					stateL: true,
+					toolId: "learning",
+				});
+			}else {
+				this.openApp2({
+					stateL: true,
+					toolId: "learning/studentProjectList",
+				});
+			}
+			
+			return
+		}else if (this.courseId && this.roleUser.type == 1) {
 			// 随机码登录跳转
 			this.openApp2({
 				stateL: true,
 				toolId: "courseDetail",
-				clearL: true,
 			});
 			return
 		}

+ 47 - 20
src/views/login/loginPage.vue

@@ -10,8 +10,7 @@
 				class="Version"
 			>
 				<span v-if="!cocoNoteType">{{ lang.Returnoldversion }}</span>
-				<span v-if="cocoNoteType === 'coconote'">{{ lang.interlearning }}</span>
-				<span v-if="cocoNoteType === 'person'">拔尖人才</span>
+				<span v-else>{{ this.typePageName }}</span>
 			</div>
 			<div class="lp_r_box" v-loading="nextStepsLoading">
 				<div class="lp_r_b_logo">
@@ -55,9 +54,7 @@
 						style="display: flex;justify-content: space-between;align-items: first baseline;"
 						>
 						<span v-if="!cocoNoteType">{{ lang.login }}</span>
-						<span v-if="cocoNoteType === 'coconote'">{{ lang.interlearning }}</span>
-						<span v-if="cocoNoteType === 'person'">拔尖人才</span>
-						<!-- {{ cocoNoteType === 'coconote' ? lang.interlearning : lang.login }} -->
+						<span v-else>{{ this.typePageName }}</span>
 						<!-- 返回到选择身份 -->
 						<div v-if="logIdentity != 0" @click="backIDyData" class="backIDy">{{ lang.Reidentity }}</div>
 					</span>
@@ -73,7 +70,7 @@
 								<img src="../../assets/login/logTea.svg"  alt="">
 								<span>{{ lang.teacher }}</span>
 							</div>
-							<div class="logIdImg"  @click="logIdentity = 2,getData( !cocoNoteType ? 'code' : 'default')">
+							<div class="logIdImg" v-if="this.cocoNoteType != 'classroomOb'"  @click="logIdentity = 2,getData( !cocoNoteType ? 'code' : 'default')">
 								<img src="../../assets/login/logStu.svg" alt="">
 								<span>{{ lang.student }}</span>
 							</div>
@@ -543,6 +540,17 @@ export default {
 				logo: '',
 				name: '拔尖人才'
 			},
+			learningCon: {
+				banner: 'https://liyuan.cocorobo.cn/img/login2.3d600ff5.jpg',
+				logo: '',
+				name: '个性化学习中心'
+			},
+			classroomObCon: {
+				banner: 'https://liyuan.cocorobo.cn/img/login2.3d600ff5.jpg',
+				logo: '',
+				name: '课堂观察'
+			},
+			typePageName:'',
 			cocoNoteName:'',
 			uppercaseAlphabet:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'],
 			allowOrgList: [
@@ -599,6 +607,14 @@ export default {
 				_result.banner = this.personCon.banner;
 				_result.name = this.personCon.name;
 				_result.logo = this.personCon.logo;
+			}else if (this.cocoNoteType == 'learning') {
+				_result.banner = this.learningCon.banner;
+				_result.name = this.learningCon.name;
+				_result.logo = this.learningCon.logo;
+			}else if (this.cocoNoteType == 'classroomOb') {
+				_result.banner = this.classroomObCon.banner;
+				_result.name = this.classroomObCon.name;
+				_result.logo = this.classroomObCon.logo;
 			}
 
 			return _result;
@@ -693,6 +709,8 @@ export default {
 							"https://beta.cloud.cocorobo.cn/index.html";
 					} else if (this.$region == "hk") {
 						window.topU.location.href = "https://cloud.cocorobo.hk/index.html";
+					} else if (this.$region == "com") {
+						window.topU.location.href = "https://cloud.cocorobo.com/index.html";
 					} else {
 						window.topU.location.href = "https://cloud.cocorobo.cn/index.html";
 					}
@@ -894,11 +912,11 @@ export default {
 						console.log("this.userRequestres", res);
 						let _data = res.data[0][0];
 						let userjson = await getUser({ userid: _data.userid });
-						// if (userjson.data[0][0].type == 2) {
-						// 	this.loading = false;
-						// 	this.$message.error(this.lang.Nologinpermission);
-						// 	return;
-						// }
+						if (userjson.data[0][0].type == 2 && this.cocoNoteType == 'classroomOb') {
+							this.loading = false;
+							this.$message.error(this.lang.Nologinpermission);
+							return;
+						}
 						const currentDate = new Date();
 						if (
 							userjson.data[0][0].isLogin1 == 2 ||
@@ -1001,11 +1019,11 @@ export default {
 						console.log("res", res);
 						let _data = res.data[0][0];
 						let userjson = await getUser({ userid: _data.userid });
-						// if (userjson.data[0][0].type == 2) {
-						// 	this.loading = false;
-						// 	this.$message.error(this.lang.Nologinpermission);
-						// 	return;
-						// }
+						if (userjson.data[0][0].type == 2 && this.cocoNoteType == 'classroomOb') {
+							this.loading = false;
+							this.$message.error(this.lang.Nologinpermission);
+							return;
+						}
 
 						const currentDate = new Date();
 						if (
@@ -1366,10 +1384,10 @@ export default {
 						}
 					}
 					let userjson = await getUser({ userid: _data.userid });
-					// if (userjson.data[0][0].type == 2) {
-					// 	this.$message.error(this.lang.Nologinpermission);
-					// 	return;
-					// }
+					if (userjson.data[0][0].type == 2 && this.cocoNoteType == 'classroomOb') {
+						this.$message.error(this.lang.Nologinpermission);
+						return;
+					}
 					const currentDate = new Date();
 						if (
 							userjson.data[0][0].isLogin1 == 2 ||
@@ -1771,6 +1789,15 @@ export default {
 			this.nextStepsLoading = true
 			this.cocostulog()
 		}
+		if (this.cocoNoteType === 'coconote') {
+			this.typePageName = '跨学科学习';
+		}else if (this.cocoNoteType === 'person') {
+			this.typePageName = '拔尖人才';
+		}else if (this.cocoNoteType === 'learning') {
+			this.typePageName = '个性化学习中心';
+		}else if (this.cocoNoteType === 'classroomOb') {
+			this.typePageName = '课堂观察';
+		}
 		this.getLoading();
 		this.getOrdOidData();
 	},