diff --git a/src/components/page/components/reviewerList/add.vue b/src/components/page/components/reviewerList/add.vue index 8264be2..1d9585f 100644 --- a/src/components/page/components/reviewerList/add.vue +++ b/src/components/page/components/reviewerList/add.vue @@ -528,7 +528,11 @@ export default { this.initMajor(); this.getCountry(); this.addVisible = true; - this.$refs.add_Form.resetFields(); + this.btn_alert = false; + if(this.$refs.add_Form){ + this.$refs.add_Form.resetFields(); + } + this.addForm.email = ''; this.email_num = 0; this.reviewerForm = {}; @@ -649,6 +653,7 @@ export default { .then((res) => { console.log('res at line 554:', res); if (res.code == 0) { + this.btn_alert=false; this.reviewerForm = res.data.result; this.addForm = { account: this.reviewerForm.account, @@ -922,12 +927,7 @@ export default { // 保存用户的添加 saveAdd(addForm) { this.$refs.add_Form.validate((valid) => { - if (this.cvitaTable.length == 0) { - if (this.addForm.qualifications == '' || this.addForm.qualifications == undefined) { - this.$message.error('Please make sure that CV. document is uploaded successfully'); - return false; - } - } + if (valid) { let path_add = ''; @@ -963,11 +963,20 @@ export default { if (this.email_num == 2) { // 新的 path_add = this.urlList.addReviewer; + if(this.btn_alert){ + return false + } } else { // 重复 path_add = this.urlList.addReviewerBee; data.user_id = data.reviewer_id; } + if (this.cvitaTable.length == 0) { + if (this.addForm.qualifications == '' || this.addForm.qualifications == undefined) { + this.$message.error('Please make sure that CV. document is uploaded successfully'); + return false; + } + } this.$api .post(path_add, data) .then((res) => {