新增审稿人

This commit is contained in:
2024-10-15 14:55:50 +08:00
parent bb55ac555b
commit 8215d4f924

View File

@@ -528,7 +528,11 @@ export default {
this.initMajor(); this.initMajor();
this.getCountry(); this.getCountry();
this.addVisible = true; 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.addForm.email = '';
this.email_num = 0; this.email_num = 0;
this.reviewerForm = {}; this.reviewerForm = {};
@@ -649,6 +653,7 @@ export default {
.then((res) => { .then((res) => {
console.log('res at line 554:', res); console.log('res at line 554:', res);
if (res.code == 0) { if (res.code == 0) {
this.btn_alert=false;
this.reviewerForm = res.data.result; this.reviewerForm = res.data.result;
this.addForm = { this.addForm = {
account: this.reviewerForm.account, account: this.reviewerForm.account,
@@ -922,12 +927,7 @@ export default {
// 保存用户的添加 // 保存用户的添加
saveAdd(addForm) { saveAdd(addForm) {
this.$refs.add_Form.validate((valid) => { 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) { if (valid) {
let path_add = ''; let path_add = '';
@@ -963,11 +963,20 @@ export default {
if (this.email_num == 2) { if (this.email_num == 2) {
// 新的 // 新的
path_add = this.urlList.addReviewer; path_add = this.urlList.addReviewer;
if(this.btn_alert){
return false
}
} else { } else {
// 重复 // 重复
path_add = this.urlList.addReviewerBee; path_add = this.urlList.addReviewerBee;
data.user_id = data.reviewer_id; 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 this.$api
.post(path_add, data) .post(path_add, data)
.then((res) => { .then((res) => {