Ver Fonte

修改组织号登录判断

11wqe1 há 1 mês atrás
pai
commit
a1b6126eb1
4 ficheiros alterados com 23 adições e 7 exclusões
  1. 3 1
      src/lang/cn.json
  2. 3 1
      src/lang/en.json
  3. 3 1
      src/lang/hk.json
  4. 14 4
      src/views/login/loginPage.vue

+ 3 - 1
src/lang/cn.json

@@ -146,5 +146,7 @@
 	"student":"学生",
 	"organization":"组织",
 	"Identifyaccount":"输入账号后识别",
-	"selectlogorg":"请选择登录组织"
+	"selectlogorg":"请选择登录组织",
+	"waitfororg":"请等待组织识别",
+	"completeaccountnumber":"请输入完整账号"
 }

+ 3 - 1
src/lang/en.json

@@ -146,5 +146,7 @@
 	"student":"student",
   "organization":"organization",
 	"Identifyaccount":"Identify after entering the account",
-	"selectlogorg":"Please select the login organization"
+	"selectlogorg":"Please select the login organization",
+  "waitfororg":"Please wait for organizational identification",
+	"completeaccountnumber":"Please enter the complete account number"
 }

+ 3 - 1
src/lang/hk.json

@@ -146,5 +146,7 @@
 	"student":"學生",
   "organization":"組織",
 	"Identifyaccount":"輸入帳號後識別",
-	"selectlogorg":"請選擇登入組織"
+	"selectlogorg":"請選擇登入組織",
+  "waitfororg":"請等待組織識別",
+	"completeaccountnumber":"請輸入完整帳號"
 }

+ 14 - 4
src/views/login/loginPage.vue

@@ -336,7 +336,7 @@
 							</div>
 
 							<div
-								@click="(loginType = 'default'), ((SuffixData = ''), (org = ''))"
+								@click="Seldefault"
 								v-if="['default', 'weChat', 'orgL', 'code'].includes(loginType)"
 							>
 								<el-tooltip
@@ -532,6 +532,14 @@ export default {
 			this.SuffixData = '';
 			this.icode = '';
 			this.logIdentity = 0;
+			this.accOrgName = []
+		},
+		Seldefault(){
+			this.loginType = 'default'
+			this.SuffixData = ''
+			this.org = ''
+			this.account=''
+			this.accOrgName = []
 		},
 		somp(val){
 			const element = document.getElementById(`group-${val}`);
@@ -615,7 +623,7 @@ export default {
 		}, 300),
 		async loginFn() {
 			if (this.loading) return;
-			if (this.inpGetAccOrgNameloading) return this.$message.error('请等待组织识别');
+			if (this.inpGetAccOrgNameloading && this.loginType == 'default') return this.$message.error(this.lang.waitfororg);
 
 			// loginType == orgL为组织号登录
 			let str = this.account.replace(/(^\s*)|(\s*$)/g, "");
@@ -629,9 +637,9 @@ export default {
 				this.loading = false;
 				// 请输入组织号
 				if (this.accOrgName.length == 0) {
-					return this.$message.error('请输入完整账号');
+					return this.$message.error(this.lang.completeaccountnumber);
 				}
-				return this.$message.error('请选择登录组织');
+				return this.$message.error(this.lang.selectlogorg);
 			}
 
 			
@@ -894,6 +902,8 @@ export default {
 		},
 		// async inpGetAccOrgName(){
 		inpGetAccOrgName: _.debounce(async function() {
+			if (this.loginType != 'default' && this.loginType != 'bind') return
+
 			if (!this.account) {
 				this.accOrgName = []
 			}