SanHQin 3 months ago
parent
commit
68a389f9bd

File diff suppressed because it is too large
+ 0 - 0
dist/css/app.499edba6.css


File diff suppressed because it is too large
+ 0 - 0
dist/css/app.55d5ac85.css


+ 0 - 1
dist/img/cha.1eec2a19.svg

@@ -1 +0,0 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1744968490756" class="icon" viewBox="0 0 1030 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5495" xmlns:xlink="http://www.w3.org/1999/xlink" width="201.171875" height="200"><path d="M610.583851 508.819876L1004.919255 114.484472c25.440994-25.440994 25.440994-76.322981 0-101.763975-25.440994-25.440994-76.322981-25.440994-101.763975 0L508.819876 407.055901 114.484472 25.440994C89.043478 0 38.161491 0 12.720497 25.440994-12.720497 50.881988-12.720497 101.763975 12.720497 127.204969l394.335404 381.614907-381.614907 394.335404c-25.440994 25.440994-25.440994 76.322981 0 101.763975 25.440994 25.440994 76.322981 25.440994 101.763975 0l381.614907-394.335404 394.335404 394.335404c25.440994 25.440994 76.322981 25.440994 101.763975 0 25.440994-25.440994 25.440994-76.322981 0-101.763975L610.583851 508.819876z" p-id="5496" fill="#0663FE"></path></svg>

+ 0 - 4
dist/img/hg1.759e9fd4.svg

@@ -1,4 +0,0 @@
-<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 0H28V28H10C4.47715 28 0 23.5228 0 18V0Z" fill="#F0B343"/>
-<path d="M8.4 21V19.4444H19.6V21H8.4ZM8.4 18.2778L7.38 12.0361C7.35333 12.0361 7.3232 12.0395 7.2896 12.0462C7.256 12.053 7.22613 12.0561 7.2 12.0556C6.86667 12.0556 6.58347 11.942 6.3504 11.7149C6.11734 11.4878 6.00054 11.2124 6 10.8889C5.99947 10.5653 6.11627 10.29 6.3504 10.0629C6.58453 9.83578 6.86773 9.72222 7.2 9.72222C7.53227 9.72222 7.81573 9.83578 8.0504 10.0629C8.28507 10.29 8.4016 10.5653 8.4 10.8889C8.4 10.9796 8.38987 11.0639 8.3696 11.1417C8.34933 11.2194 8.32613 11.2907 8.3 11.3556L10.8 12.4444L13.3 9.11945C13.1533 9.01574 13.0333 8.87963 12.94 8.71111C12.8467 8.54259 12.8 8.36111 12.8 8.16667C12.8 7.84259 12.9168 7.567 13.1504 7.33989C13.384 7.11278 13.6672 6.99948 14 7C14.3328 7.00052 14.6163 7.11408 14.8504 7.34067C15.0845 7.56726 15.2011 7.84259 15.2 8.16667C15.2 8.36111 15.1533 8.54259 15.06 8.71111C14.9667 8.87963 14.8467 9.01574 14.7 9.11945L17.2 12.4444L19.7 11.3556C19.6733 11.2907 19.6499 11.2194 19.6296 11.1417C19.6093 11.0639 19.5995 10.9796 19.6 10.8889C19.6 10.5648 19.7168 10.2892 19.9504 10.0621C20.184 9.835 20.4672 9.72171 20.8 9.72222C21.1328 9.72274 21.4163 9.8363 21.6504 10.0629C21.8845 10.2895 22.0011 10.5648 22 10.8889C21.9989 11.213 21.8824 11.4886 21.6504 11.7157C21.4184 11.9428 21.1349 12.0561 20.8 12.0556C20.7733 12.0556 20.7435 12.0524 20.7104 12.0462C20.6773 12.04 20.6472 12.0366 20.62 12.0361L19.6 18.2778H8.4Z" fill="black"/>
-</svg>

+ 0 - 4
dist/img/hg2.789205ec.svg

@@ -1,4 +0,0 @@
-<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 0H28V28H10C4.47715 28 0 23.5228 0 18V0Z" fill="black"/>
-<path d="M8.4 21V19.4444H19.6V21H8.4ZM8.4 18.2778L7.38 12.0361C7.35333 12.0361 7.3232 12.0395 7.2896 12.0462C7.256 12.053 7.22613 12.0561 7.2 12.0556C6.86667 12.0556 6.58347 11.942 6.3504 11.7149C6.11734 11.4878 6.00054 11.2124 6 10.8889C5.99947 10.5653 6.11627 10.29 6.3504 10.0629C6.58453 9.83578 6.86773 9.72222 7.2 9.72222C7.53227 9.72222 7.81573 9.83578 8.0504 10.0629C8.28507 10.29 8.4016 10.5653 8.4 10.8889C8.4 10.9796 8.38987 11.0639 8.3696 11.1417C8.34933 11.2194 8.32613 11.2907 8.3 11.3556L10.8 12.4444L13.3 9.11945C13.1533 9.01574 13.0333 8.87963 12.94 8.71111C12.8467 8.54259 12.8 8.36111 12.8 8.16667C12.8 7.84259 12.9168 7.567 13.1504 7.33989C13.384 7.11278 13.6672 6.99948 14 7C14.3328 7.00052 14.6163 7.11408 14.8504 7.34067C15.0845 7.56726 15.2011 7.84259 15.2 8.16667C15.2 8.36111 15.1533 8.54259 15.06 8.71111C14.9667 8.87963 14.8467 9.01574 14.7 9.11945L17.2 12.4444L19.7 11.3556C19.6733 11.2907 19.6499 11.2194 19.6296 11.1417C19.6093 11.0639 19.5995 10.9796 19.6 10.8889C19.6 10.5648 19.7168 10.2892 19.9504 10.0621C20.184 9.835 20.4672 9.72171 20.8 9.72222C21.1328 9.72274 21.4163 9.8363 21.6504 10.0629C21.8845 10.2895 22.0011 10.5648 22 10.8889C21.9989 11.213 21.8824 11.4886 21.6504 11.7157C21.4184 11.9428 21.1349 12.0561 20.8 12.0556C20.7733 12.0556 20.7435 12.0524 20.7104 12.0462C20.6773 12.04 20.6472 12.0366 20.62 12.0361L19.6 18.2778H8.4Z" fill="#CFCFCF"/>
-</svg>

+ 0 - 4
dist/img/hg3.1d6e0d63.svg

@@ -1,4 +0,0 @@
-<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 0H28V28H10C4.47715 28 0 23.5228 0 18V0Z" fill="#D9D9D9"/>
-<path d="M8.4 21V19.4444H19.6V21H8.4ZM8.4 18.2778L7.38 12.0361C7.35333 12.0361 7.3232 12.0395 7.2896 12.0462C7.256 12.053 7.22613 12.0561 7.2 12.0556C6.86667 12.0556 6.58347 11.942 6.3504 11.7149C6.11734 11.4878 6.00054 11.2124 6 10.8889C5.99947 10.5653 6.11627 10.29 6.3504 10.0629C6.58453 9.83578 6.86773 9.72222 7.2 9.72222C7.53227 9.72222 7.81573 9.83578 8.0504 10.0629C8.28507 10.29 8.4016 10.5653 8.4 10.8889C8.4 10.9796 8.38987 11.0639 8.3696 11.1417C8.34933 11.2194 8.32613 11.2907 8.3 11.3556L10.8 12.4444L13.3 9.11945C13.1533 9.01574 13.0333 8.87963 12.94 8.71111C12.8467 8.54259 12.8 8.36111 12.8 8.16667C12.8 7.84259 12.9168 7.567 13.1504 7.33989C13.384 7.11278 13.6672 6.99948 14 7C14.3328 7.00052 14.6163 7.11408 14.8504 7.34067C15.0845 7.56726 15.2011 7.84259 15.2 8.16667C15.2 8.36111 15.1533 8.54259 15.06 8.71111C14.9667 8.87963 14.8467 9.01574 14.7 9.11945L17.2 12.4444L19.7 11.3556C19.6733 11.2907 19.6499 11.2194 19.6296 11.1417C19.6093 11.0639 19.5995 10.9796 19.6 10.8889C19.6 10.5648 19.7168 10.2892 19.9504 10.0621C20.184 9.835 20.4672 9.72171 20.8 9.72222C21.1328 9.72274 21.4163 9.8363 21.6504 10.0629C21.8845 10.2895 22.0011 10.5648 22 10.8889C21.9989 11.213 21.8824 11.4886 21.6504 11.7157C21.4184 11.9428 21.1349 12.0561 20.8 12.0556C20.7733 12.0556 20.7435 12.0524 20.7104 12.0462C20.6773 12.04 20.6472 12.0366 20.62 12.0361L19.6 18.2778H8.4Z" fill="#AE938C"/>
-</svg>

+ 0 - 0
dist/img/wechat.d3d8349b.svg → dist/img/wechat.0277f1a9.svg


+ 1 - 1
dist/index.html

@@ -36,7 +36,7 @@
         width: 100%;
         background: #e6eaf0;
         font-family: '黑体';
-      }</style><script defer="defer" src="/js/chunk-vendors.7cdade31.js"></script><script defer="defer" src="/js/app.842f60e1.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.499edba6.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but pblAdminTable doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html><script>function stopSafari() {
+      }</style><script defer="defer" src="/js/chunk-vendors.50f469f2.js"></script><script defer="defer" src="/js/app.df21bca3.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.55d5ac85.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but pblAdminTable doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/js/app.842f60e1.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.842f60e1.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.df21bca3.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.df21bca3.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/chunk-vendors.50f469f2.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/chunk-vendors.50f469f2.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/chunk-vendors.7cdade31.js.map


+ 132 - 65
src/views/login/loginPage.vue

@@ -5,6 +5,7 @@
 				v-if="form.basics && form.basics.loginBanner"
 				:src="form.basics.loginBanner"
 			/>
+			<!-- <img v-if="parent.location.href.includes('lyxx') || parent.location.href.includes('liyuan')" src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/20250421-1139511745206807965.jpg"> -->
 			<img v-else src="@/assets/login2.jpg" />
 		</div>
 		<div class="lp_right">
@@ -36,7 +37,7 @@
 							</div>
 						</div>
 
-						<div class="fa_i_item">
+						<!-- <div class="fa_i_item">
 							<span>组织</span>
 							<div>
 								<el-select
@@ -50,19 +51,17 @@
 									<el-option
 										v-for="item in OrgOptions"
 										:key="item.Uorg"
-										:label="item.name ? item.name + '-' + item.schoolName : item.schoolName"
+										:label="
+											item.name
+												? item.name + '-' + item.schoolName
+												: item.schoolName
+										"
 										:value="item.Uorg"
 									>
 									</el-option>
 								</el-select>
-								<!-- <input
-									type="text"
-									placeholder="请输入组织号"
-									v-model="org"
-									@keyup.enter="loginFn"
-								/> -->
 							</div>
-						</div>
+						</div> -->
 
 						<div class="fa_i_item">
 							<span>密码</span>
@@ -97,23 +96,11 @@
 				>
 					账号密码登录
 				</div>
-				<div
-					class="btn_box"
-					v-if="loginType == 'bind'"
-				>
-					<div
-						class="lp_r_b_btn"
-						@click="loginFn"
-						v-loading="loading"
-					>
+				<div class="btn_box" v-if="loginType == 'bind'">
+					<div class="lp_r_b_btn" @click="loginFn" v-loading="loading">
 						确认绑定
 					</div>
-					<div
-						class="lp_r_b_btn"
-						@click="loginType = 'default'"
-					>
-						返回登录
-					</div>
+					<div class="lp_r_b_btn" @click="loginType = 'default'">返回登录</div>
 				</div>
 				<div class="lp_r_b_line">
 					<template v-if="['default', 'weChat'].includes(loginType)">
@@ -152,7 +139,6 @@ import qs from "qs";
 import { API_CONFIG } from "@/common/apiConfig";
 import "@/common/wxLogin";
 import { getUser } from "@/api/user";
-import { loginOut } from '@/api/user';
 
 export default {
 	name: "loginPage",
@@ -164,7 +150,11 @@ export default {
 			loading: false,
 			loginType: "default",
 			redirect: this.$route.query["redirect"],
-			org2: this.$route.query["org"] || (window.location.href.includes('/liyuan') ? window.sessionStorage.getItem('org2') : ''),
+			org2:
+				this.$route.query["org"] ||
+				(window.location.href.includes("/liyuan")
+					? window.sessionStorage.getItem("org2")
+					: ""),
 			oid: this.$route.query["oid"],
 			// 组织列表
 			OrgOptions: [],
@@ -174,7 +164,9 @@ export default {
 			openid: "",
 			allowOrgList: [
 				{
-					id: "3823a6a5-1b6e-11f0-a66a-005056924926",
+					area:
+						parent.location.href.includes("lyxx") ||
+						parent.location.href.includes("liyuan"),
 					list: [
 						"3823a6a5-1b6e-11f0-a66a-005056924926",
 						"292e34dc-1b6e-11f0-a66a-005056924926",
@@ -199,11 +191,13 @@ export default {
 	methods: {
 		...mapActions({
 			login: "user/login",
-			logout: 'user/logout'
+			logout: "user/logout",
 		}),
 		async loginFn() {
 			if (this.loading) return;
-
+			const regEmail = new RegExp(
+				"^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$"
+			);
 			if (this.account.length <= 0) {
 				this.$message.error("请输入账号");
 				return;
@@ -214,21 +208,37 @@ export default {
 				return;
 			}
 
-			if (this.allowOrgList.find((i) => i.id == this.org2)) {
-				let _list = this.allowOrgList.find((i) => i.id == this.org2).list;
-				let _nowOrgId = this.OrgOptions.find((i) => i.Uorg == this.org).id;
-				if (!_list.includes(_nowOrgId)) {
+			let str = this.account.replace(/(^\s*)|(\s*$)/g, "");
+
+			if (!regEmail.test(str)) {
+				return this.$message.error(
+					"请在账号后添加组织后缀(账号@组织号.com 如:123456@cocorobo.com)"
+				);
+			}
+
+			if (this.allowOrgList.findIndex((i) => i.area) != -1) {
+				let _index = this.allowOrgList.findIndex((i) => i.area);
+				let _list = this.allowOrgList[_index].list;
+				if (
+					!_list.includes(this.OrgOptions.find((i) => i.Uorg == this.org).id)
+				) {
+					return this.$message.error("该组织/学校不允许登录");
+				}
+			} else {
+				let mergedList = this.allowOrgList.reduce((acc, curr) => {
+					return [...acc, ...curr.list];
+				}, []);
+				if (
+					mergedList.includes(
+						this.OrgOptions.find((i) => i.Uorg == this.org).id
+					)
+				) {
 					return this.$message.error("该组织/学校不允许登录");
 				}
-				window.sessionStorage.setItem('org2',this.org2)
 			}
 
 			let orgValue = this.org ? "@" + this.org : "@cocorobo.cc";
 			let email = "";
-			const regEmail = new RegExp(
-				"^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$"
-			);
-			let str = this.account.replace(/(^\s*)|(\s*$)/g, "");
 
 			// 判断用户输入账户带不带后缀
 			if (!regEmail.test(str)) {
@@ -252,15 +262,19 @@ export default {
 					.then(async (res) => {
 						console.log("res", res);
 						let _data = res.data[0][0];
-						let userjson = await getUser({userid: _data.userid})
-						console.log('userjson', userjson);
+						let userjson = await getUser({ userid: _data.userid });
+						console.log("userjson", userjson);
 						if (_data.active === 1) {
 							window.localStorage["identity"] = JSON.stringify(_data.identity);
 							this.$message.success("登录成功");
 							await this.login();
-							if(userjson.data[0][0].type == 1 && userjson.data[0][0].role == 1 && userjson.data[0][0].rrole == 1 ){
+							if (
+								userjson.data[0][0].type == 1 &&
+								userjson.data[0][0].role == 1 &&
+								userjson.data[0][0].rrole == 1
+							) {
 								this.$router.push({ path: "/kanban" });
-							}else {
+							} else {
 								this.$router.push({ path: this.redirect || "/" });
 							}
 						} else {
@@ -305,8 +319,8 @@ export default {
 					.then(async (res) => {
 						console.log("res", res);
 						let _data = res.data[0][0];
-						let userjson = await getUser({userid: _data.userid})
-						console.log('userjson', userjson);
+						let userjson = await getUser({ userid: _data.userid });
+						console.log("userjson", userjson);
 						if (_data.active === 1) {
 							await this.$ajax.post(API_CONFIG.baseUrl2 + "UpdateOpenId", [
 								{ userid: _data.userid, openid: this.openid },
@@ -314,9 +328,13 @@ export default {
 							window.localStorage["identity"] = JSON.stringify(_data.identity);
 							this.$message.success("绑定成功");
 							await this.login();
-							if(userjson.data[0][0].type == 1 && userjson.data[0][0].role == 1 && userjson.data[0][0].rrole == 1 ){
+							if (
+								userjson.data[0][0].type == 1 &&
+								userjson.data[0][0].role == 1 &&
+								userjson.data[0][0].rrole == 1
+							) {
 								this.$router.push({ path: "/kanban" });
-							}else {
+							} else {
 								this.$router.push({ path: this.redirect || "/" });
 							}
 						} else {
@@ -362,12 +380,30 @@ export default {
 					.then((res) => {
 						console.log("res", res);
 						this.org = "";
-						this.OrgOptions = "";
+						this.OrgOptions = [];
+
+						let getList = res.data[0];
 
-						this.OrgOptions = res.data[0];
+						if (this.allowOrgList.findIndex((i) => i.area) != -1) {
+							let _index = this.allowOrgList.findIndex((i) => i.area);
+							let _list = this.allowOrgList[_index].list;
+							getList = getList.filter((i) => _list.includes(i.id));
+						} else {
+							let mergedList = this.allowOrgList.reduce((acc, curr) => {
+								return [...acc, ...curr.list];
+							}, []);
+							getList = getList.filter((i) => !mergedList.includes(i.id));
+						}
+
+						this.OrgOptions = getList;
 						if (this.OrgOptions.length == 1) {
 							this.org = this.OrgOptions[0].Uorg;
-							this.$forceUpdate();
+						} else if (this.OrgOptions.length > 0) {
+							// if (this.OrgOptions.map((i) => i.Uorg).includes("@cocorobo.cc")) {
+							// 	this.org = "@cocorobo.cc";
+							// } else {
+							// 	this.org = this.OrgOptions[0].Uorg;
+							// }
 						}
 						resolve();
 					})
@@ -442,33 +478,63 @@ export default {
 					this.account = _data.username;
 					await this.getOrgData();
 
-					if (this.allowOrgList.find((i) => i.id == this.org2)) {
-						let _list = this.allowOrgList.find((i) => i.id == this.org2).list;
-						let _nowOrgId = this.OrgOptions.find((i) => i.Uorg == this.org).id;
-						if (!_list.includes(_nowOrgId)) {
-							this.wechatLogin();
-							await loginOut()
-							await this.logout();
+					// if (
+					// 	(this.allowOrgList.find((i) => i.id == this.org2) &&
+					// 		parent.location.href.includes("lyxx")) ||
+					// 	parent.location.href.includes("liyuan")
+					// ) {
+					// 	let _list = this.allowOrgList.find((i) => i.id == this.org2).list;
+					// 	let _nowOrgId = this.OrgOptions.find((i) => i.Uorg == this.org).id;
+					// 	if (!_list.includes(_nowOrgId)) {
+					// 		this.wechatLogin();
+					// 		await loginOut();
+					// 		await this.logout();
+					// 		return this.$message.error("该组织/学校不允许登录");
+					// 	}
+					// 	window.sessionStorage.setItem("org2", this.org2);
+					// }
+
+					if (this.allowOrgList.findIndex((i) => i.area) != -1) {
+						let _index = this.allowOrgList.findIndex((i) => i.area);
+						let _list = this.allowOrgList[_index].list;
+						if (
+							!_list.includes(
+								this.OrgOptions.find((i) => i.Uorg == this.org).id
+							)
+						) {
+							return this.$message.error("该组织/学校不允许登录");
+						}
+					} else {
+						let mergedList = this.allowOrgList.reduce((acc, curr) => {
+							return [...acc, ...curr.list];
+						}, []);
+						if (
+							mergedList.includes(
+								this.OrgOptions.find((i) => i.Uorg == this.org).id
+							)
+						) {
 							return this.$message.error("该组织/学校不允许登录");
 						}
-						window.sessionStorage.setItem('org2',this.org2)
 					}
-					let userjson = await getUser({userid: _data.userid})
-					console.log('userjson', userjson);
+					let userjson = await getUser({ userid: _data.userid });
+					console.log("userjson", userjson);
 					if (_data.active === 1) {
 						window.localStorage["identity"] = JSON.stringify(_data.identity);
 						this.$message.success("登录成功");
 						await this.login();
-						if(userjson.data[0][0].type == 1 && userjson.data[0][0].role == 1 && userjson.data[0][0].rrole == 1 ){
+						if (
+							userjson.data[0][0].type == 1 &&
+							userjson.data[0][0].role == 1 &&
+							userjson.data[0][0].rrole == 1
+						) {
 							this.$router.push({ path: "/kanban" });
-						}else {
+						} else {
 							this.$router.push({ path: this.redirect || "/" });
 						}
 					} else {
 						this.$message.error("登录失败");
 					}
 
-					
 					this.loading = false;
 				})
 				.catch((err) => {
@@ -575,12 +641,14 @@ export default {
 	height: 100%;
 	display: flex;
 	flex-direction: column;
-	justify-content: space-around;
+	/* align-items: center; */
+	justify-content: center;
 }
 
 .fa_i_item {
 	width: 100%;
 	height: 70px;
+	margin-bottom: 30px;
 }
 
 .fa_i_item > span {
@@ -730,8 +798,7 @@ export default {
 	height: 100%;
 }
 
-
-.btn_box{
+.btn_box {
 	display: flex;
 	gap: 10px;
 }

Some files were not shown because too many files changed in this diff