diff --git a/src/pages/user/list/index.vue b/src/pages/user/list/index.vue index 141f955..4390ddc 100644 --- a/src/pages/user/list/index.vue +++ b/src/pages/user/list/index.vue @@ -241,6 +241,8 @@ export default { importToken: '', accountRepeat: false, workNumberRepeat: false, + originalAccount: '', + originalWorkNumber: '' }; }, computed: { @@ -331,7 +333,8 @@ export default { }, accountChange(){ if(this.form.account !== this.originalAccount){ - this.$post(`${this.api.checkAccount}?account=${this.form.account}&type=1&platformId=${Setting.platformId}${this.form.userId ? '&accountId=' + this.form.account : ''}`).then(res => { + // type: 0:教师端,1:学生端,2:无端 + this.$post(`${this.api.checkAccount}?account=${this.form.account}&type=2&platformId=${Setting.platformId}${this.form.accountId ? '&accountId=' + this.form.accountId : ''}`).then(res => { this.accountRepeat = false }).catch(res => { this.accountRepeat = true @@ -342,7 +345,7 @@ export default { }, workNumberChange(){ if(this.form.workNumber !== this.originalWorkNumber){ - this.$post(`${this.api.checkAccount}?workNumber=${this.form.workNumber}&type=1&platformId=${Setting.platformId}`).then(res => { + this.$post(`${this.api.checkAccount}?workNumber=${this.form.workNumber}&type=2&platformId=${Setting.platformId}`).then(res => { this.workNumberRepeat = false }).catch(res => { this.workNumberRepeat = true @@ -354,6 +357,9 @@ export default { closeUser(){ this.$refs.form.resetFields() this.form.userId = '' + this.form.accountId = '' + this.originalAccount = '' + this.originalWorkNumber = '' this.accountRepeat = false this.workNumberRepeat = false }, @@ -376,7 +382,7 @@ export default { workNumber: data.workNumber, email: data.email, schoolId: data.schoolId, - password: '', + password: '' } this.originalAccount = data.account this.originalWorkNumber = data.workNumber