|
@@ -53,26 +53,24 @@
|
|
|
>
|
|
>
|
|
|
{{ lang.login }}
|
|
{{ lang.login }}
|
|
|
<!-- 返回到选择身份 -->
|
|
<!-- 返回到选择身份 -->
|
|
|
- <div v-if="logIdentity != 0" @click="backIDyData" class="backIDy">重选身份</div>
|
|
|
|
|
|
|
+ <div v-if="logIdentity != 0" @click="backIDyData" class="backIDy">{{ lang.Reidentity }}</div>
|
|
|
</span>
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 选择身份登录页 -->
|
|
<!-- 选择身份登录页 -->
|
|
|
<div class="logIdy" v-if="logIdentity == 0">
|
|
<div class="logIdy" v-if="logIdentity == 0">
|
|
|
<div>
|
|
<div>
|
|
|
- 请选择您的身份
|
|
|
|
|
|
|
+ {{ lang.chooseidentity }}
|
|
|
</div>
|
|
</div>
|
|
|
<div style="display: flex;gap: 20px;">
|
|
<div style="display: flex;gap: 20px;">
|
|
|
<div class="logIdImg" @click="logIdentity = 1">
|
|
<div class="logIdImg" @click="logIdentity = 1">
|
|
|
<img src="../../assets/login/logTea.svg" alt="">
|
|
<img src="../../assets/login/logTea.svg" alt="">
|
|
|
- <span>教师</span>
|
|
|
|
|
|
|
+ <span>{{ lang.teacher }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="logIdImg" @click="logIdentity = 2,getData()">
|
|
<div class="logIdImg" @click="logIdentity = 2,getData()">
|
|
|
<img src="../../assets/login/logStu.svg" alt="">
|
|
<img src="../../assets/login/logStu.svg" alt="">
|
|
|
- <span>学生</span>
|
|
|
|
|
|
|
+ <span>{{ lang.student }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- <el-button size="mini">教师</el-button>
|
|
|
|
|
- <el-button size="mini">学生</el-button> -->
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 登录页 -->
|
|
<!-- 登录页 -->
|
|
@@ -120,11 +118,44 @@
|
|
|
type="text"
|
|
type="text"
|
|
|
:placeholder="lang.enteraccount"
|
|
:placeholder="lang.enteraccount"
|
|
|
v-model.trim="account"
|
|
v-model.trim="account"
|
|
|
|
|
+ @input="inpGetAccOrgName"
|
|
|
@keyup.enter="loginFn"
|
|
@keyup.enter="loginFn"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <div class="fa_i_item" v-if="loginType == 'default' || loginType == 'bind'">
|
|
|
|
|
+ <span>{{ lang.organization }}</span>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <input
|
|
|
|
|
+ v-if="accOrgName.length == 0"
|
|
|
|
|
+ disabled
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ :placeholder="lang.Identifyaccount"
|
|
|
|
|
+ />
|
|
|
|
|
+ <input
|
|
|
|
|
+ v-else-if="accOrgName.length == 1"
|
|
|
|
|
+ disabled
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ :placeholder="lang.Identifyaccount"
|
|
|
|
|
+ v-model="accOrgName[0].name"
|
|
|
|
|
+ />
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-else
|
|
|
|
|
+ v-model.trim="org"
|
|
|
|
|
+ :placeholder="lang.selectlogorg"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in accOrgName"
|
|
|
|
|
+ :key="item.Uorg"
|
|
|
|
|
+ :label="item.schoolName"
|
|
|
|
|
+ :value="item.Uorg"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
<div class="fa_i_item">
|
|
<div class="fa_i_item">
|
|
|
<span>{{ lang.password }}</span>
|
|
<span>{{ lang.password }}</span>
|
|
|
<div>
|
|
<div>
|
|
@@ -405,6 +436,9 @@ export default {
|
|
|
// 后缀
|
|
// 后缀
|
|
|
org: "",
|
|
org: "",
|
|
|
account: "",
|
|
account: "",
|
|
|
|
|
+
|
|
|
|
|
+ // 查询组织名称
|
|
|
|
|
+ accOrgName:[],
|
|
|
password: "",
|
|
password: "",
|
|
|
loading: false,
|
|
loading: false,
|
|
|
loginType: "default",
|
|
loginType: "default",
|
|
@@ -585,6 +619,14 @@ export default {
|
|
|
const regEmail = new RegExp(
|
|
const regEmail = new RegExp(
|
|
|
"^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$"
|
|
"^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$"
|
|
|
);
|
|
);
|
|
|
|
|
+ if (this.loginType == "default" && !this.org) {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ // 请输入组织号
|
|
|
|
|
+ if (this.accOrgName.length == 0) {
|
|
|
|
|
+ return this.$message.error('请输入完整账号');
|
|
|
|
|
+ }
|
|
|
|
|
+ return this.$message.error('请选择登录组织');
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
// 组织号页面,没有账号后缀提示需要添加组织号
|
|
// 组织号页面,没有账号后缀提示需要添加组织号
|
|
@@ -607,11 +649,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
// if (this.loginType != 'orgL') {
|
|
// if (this.loginType != 'orgL') {
|
|
|
// 返回2就是多账户,荔园提示联系管理员关闭多余账户,非荔园跳转组织号登录
|
|
// 返回2就是多账户,荔园提示联系管理员关闭多余账户,非荔园跳转组织号登录
|
|
|
- if ((await this.getOrgData()) == 2) {
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- return
|
|
|
|
|
- // return (this.loginType = "orgL");
|
|
|
|
|
|
|
+ if (this.loginType == 'orgL') {
|
|
|
|
|
+ if ((await this.getOrgData()) == 2) {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ return
|
|
|
|
|
+ // return (this.loginType = "orgL");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
// 荔园平台登录账号进行判断
|
|
// 荔园平台登录账号进行判断
|
|
@@ -622,12 +667,19 @@ export default {
|
|
|
let _index = this.allowOrgList.findIndex((i) => i.area);
|
|
let _index = this.allowOrgList.findIndex((i) => i.area);
|
|
|
let _list = this.allowOrgList[_index].list;
|
|
let _list = this.allowOrgList[_index].list;
|
|
|
if (
|
|
if (
|
|
|
- !_list.includes(this.OrgOptions.find((i) => i.Uorg == this.org).id)
|
|
|
|
|
|
|
+ this.loginType == 'orgL' && this.loginType == 'weChat' && !_list.includes(this.OrgOptions.find((i) => i.Uorg == this.org).id)
|
|
|
) {
|
|
) {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
// 账号不可登录,请使用您的专属网址
|
|
// 账号不可登录,请使用您的专属网址
|
|
|
return this.$message.error(this.lang.Accountcannot);
|
|
return this.$message.error(this.lang.Accountcannot);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (this.loginType == 'default' && !_list.includes(this.accOrgName.find((i) => i.Uorg == this.org).id)) {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ // 账号不可登录,请使用您的专属网址
|
|
|
|
|
+ return this.$message.error(this.lang.Accountcannot);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// if (
|
|
// if (
|
|
|
// this.OrgOptions.find((i) => i.Uorg == this.org) &&
|
|
// this.OrgOptions.find((i) => i.Uorg == this.org) &&
|
|
|
// !_list.includes(this.OrgOptions.find((i) => i.Uorg == this.org).id)
|
|
// !_list.includes(this.OrgOptions.find((i) => i.Uorg == this.org).id)
|
|
@@ -649,15 +701,25 @@ export default {
|
|
|
// 这一步是为了判断登录时,账户是否在组织下有账户问题(但现在获取账户时那部分已经被隐藏,多账号返回数字,这行代码没用了)
|
|
// 这一步是为了判断登录时,账户是否在组织下有账户问题(但现在获取账户时那部分已经被隐藏,多账号返回数字,这行代码没用了)
|
|
|
// if (this.OrgOptions.find((i) => i.Uorg == this.org)) {
|
|
// if (this.OrgOptions.find((i) => i.Uorg == this.org)) {
|
|
|
// console.log('555',this.OrgOptions.find((i) => i.Uorg == this.org).id);
|
|
// console.log('555',this.OrgOptions.find((i) => i.Uorg == this.org).id);
|
|
|
- if (regEmail.test(str) && this.OrgOptions.find((i) => mergedList.includes(i.id)) && this.OrgOptions.find((i) => mergedList.includes(i.id)).id) {
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- // 账号不可登录,请使用您的专属网址
|
|
|
|
|
- return this.$message.error(this.lang.Accountcannot);
|
|
|
|
|
- }else if (this.org && this.OrgOptions.find((i) => i.Uorg == this.org) && mergedList.includes(this.OrgOptions.find((i) => i.Uorg == this.org).id)) {
|
|
|
|
|
|
|
+ if (this.loginType == 'orgL' || this.loginType == 'weChat') {
|
|
|
|
|
+ if (regEmail.test(str) && this.OrgOptions.find((i) => mergedList.includes(i.id)) && this.OrgOptions.find((i) => mergedList.includes(i.id)).id) {
|
|
|
|
|
+ console.log('99999999999');
|
|
|
|
|
+
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ // 账号不可登录,请使用您的专属网址
|
|
|
|
|
+ return this.$message.error(this.lang.Accountcannot);
|
|
|
|
|
+ }else if (this.org && this.OrgOptions.find((i) => i.Uorg == this.org) && mergedList.includes(this.OrgOptions.find((i) => i.Uorg == this.org).id)) {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ // 账号不可登录,请使用您的专属网址
|
|
|
|
|
+ return this.$message.error(this.lang.Accountcannot);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.loginType == 'default' && mergedList.includes(this.accOrgName.find((i) => i.Uorg == this.org).id)) {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
// 账号不可登录,请使用您的专属网址
|
|
// 账号不可登录,请使用您的专属网址
|
|
|
return this.$message.error(this.lang.Accountcannot);
|
|
return this.$message.error(this.lang.Accountcannot);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -824,6 +886,30 @@ export default {
|
|
|
this.$router.push({ path: this.redirect || "/" });
|
|
this.$router.push({ path: this.redirect || "/" });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ inpGetAccOrgName(){
|
|
|
|
|
+ let params = [
|
|
|
|
|
+ {
|
|
|
|
|
+ functionName: API_CONFIG.ajax_liYuanOrg.functionName,
|
|
|
|
|
+ uname: this.account,
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+ this.$ajax
|
|
|
|
|
+ .post(API_CONFIG.baseUrl, params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ console.log("res", res.data[0]);
|
|
|
|
|
+ this.accOrgName = []
|
|
|
|
|
+ if (res.data[0].length == 1) {
|
|
|
|
|
+ this.org = res.data[0][0].Uorg
|
|
|
|
|
+ }else if (res.data[0].length == 0) {
|
|
|
|
|
+ this.org = ''
|
|
|
|
|
+ }
|
|
|
|
|
+ this.accOrgName = [...res.data[0]]
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.log(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
// 输入账号获取组织
|
|
// 输入账号获取组织
|
|
|
getOrgData() {
|
|
getOrgData() {
|
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
@@ -925,8 +1011,9 @@ export default {
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
// 该账号须使用“组织号登陆”
|
|
// 该账号须使用“组织号登陆”
|
|
|
- this.$message.error(this.lang.accountmustOrg);
|
|
|
|
|
- this.loginType = "orgL";
|
|
|
|
|
|
|
+ // this.$message.error(this.lang.accountmustOrg);
|
|
|
|
|
+
|
|
|
|
|
+ // this.loginType = "orgL";
|
|
|
return resolve(2);
|
|
return resolve(2);
|
|
|
|
|
|
|
|
}
|
|
}
|