Browse Source

拔尖人才跳转

11wqe1 6 days ago
parent
commit
82884023c7
2 changed files with 99 additions and 10 deletions
  1. 82 7
      src/views/HomeView.vue
  2. 17 3
      src/views/login/loginPage.vue

+ 82 - 7
src/views/HomeView.vue

@@ -276,9 +276,9 @@ export default {
 			betaL: this.$region,
 			clearifa: "",
 			msgNum: 0,
-			cocoNoteType: this.$route.query.type,
+			cocoNoteType: '',
 			// cocoNoteType: '666',
-			courseId: this.$route.query.courseid,
+			courseId: '',
 			// courseId: 'da5aa5b7-a98c-11f0-84cf-005056924926',
 			// 荔园集团下的学校
 			mergedList: [
@@ -644,6 +644,66 @@ export default {
 				"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}`;
+			}
+
+			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,
+					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 = "";
@@ -700,7 +760,7 @@ export default {
 			this.addOp3(
 				"1",
 				"",
-				{ type: this.prefixL + val.toolId + (this.roleUser.type == 1 ? '_teacher' : '_student') +  "stu_open" },
+				{ type: 'coconote' + val.toolId + (this.roleUser.type == 1 ? '_teacher' : '_student') +  "stu_open" },
 				"success"
 			);
 		},
@@ -814,9 +874,16 @@ export default {
 	},
 	mounted() {
 		console.log("重新获取数据");
-		console.log('this.$route.query.courseId',this.$route.query.courseid);
-		let pagetype = this.getUrlParam(window.parent.location.href, 'type');
-		console.log('pagetype',pagetype);
+		// console.log('this.$route.query.courseId',this.$route.query.courseid);
+		
+		this.cocoNoteType = this.getUrlParam(window.parent.location.href, 'type');
+		this.courseId = this.getUrlParam(window.parent.location.href, 'courseid');
+		// this.courseId = this.$route.query.courseid
+		// this.cocoNoteType = this.$route.query.type
+
+		console.log('this.courseId',this.courseId);
+		console.log('this.cocoNoteType',this.cocoNoteType);
+
 		
 		if (
 			!this.roleUser.cclassid &&
@@ -830,9 +897,17 @@ export default {
 		// this.getMsg()
 		// 跨学科app跳转 
 
-		if(pagetype === 'coconote'){
+		if(this.cocoNoteType === 'coconote'){
 			this.cocoNoteif()
 			return
+		}else if (this.cocoNoteType === 'person') {
+			// 随机码登录跳转
+			this.opentopTalent({
+				stateL: true,
+				toolId: "topTalent",
+				clearL: true,
+			});
+			return
 		}else if (this.courseId) {
 			// 随机码登录跳转
 			this.openApp2({

+ 17 - 3
src/views/login/loginPage.vue

@@ -9,7 +9,9 @@
 				@click="backVersion"
 				class="Version"
 			>
-				{{ cocoNoteType ? lang.interlearning : lang.Returnoldversion }}
+				<span v-if="!cocoNoteType">{{ lang.Returnoldversion }}</span>
+				<span v-if="cocoNoteType === 'coconote'">{{ lang.interlearning }}</span>
+				<span v-if="cocoNoteType === 'person'">拔尖人才</span>
 			</div>
 			<div class="lp_r_box" v-loading="nextStepsLoading">
 				<div class="lp_r_b_logo">
@@ -52,7 +54,10 @@
 						v-if="['default', 'weChat', 'orgL', 'code','code2'].includes(loginType)"
 						style="display: flex;justify-content: space-between;align-items: first baseline;"
 						>
-						{{ cocoNoteType ? lang.interlearning : lang.login }}
+						<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 }} -->
 						<!-- 返回到选择身份 -->
 						<div v-if="logIdentity != 0" @click="backIDyData" class="backIDy">{{ lang.Reidentity }}</div>
 					</span>
@@ -530,6 +535,11 @@ export default {
 				logo: '',
 				name: '跨学科学习'
 			},
+			personCon: {
+				banner: 'https://liyuan.cocorobo.cn/img/login2.3d600ff5.jpg',
+				logo: '',
+				name: '拔尖人才'
+			},
 			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: [
@@ -582,6 +592,10 @@ export default {
 				_result.banner = this.cocoNoteCon.banner;
 				_result.name = this.cocoNoteCon.name;
 				_result.logo = this.cocoNoteCon.logo;
+			} else if (this.cocoNoteType == 'person') {
+				_result.banner = this.personCon.banner;
+				_result.name = this.personCon.name;
+				_result.logo = this.personCon.logo;
 			}
 
 			return _result;
@@ -663,7 +677,7 @@ export default {
 		// 返回旧版本
 		backVersion() {
 			console.log(this.$region);
-			if (this.cocoNoteType == 'coconote') return console.log('不能返回');
+			if (this.cocoNoteType) return console.log('不能返回');
 			
 			this.$confirm(this.lang.backoldversion, this.lang.tip, {
 				confirmButtonText: this.lang.confirm,