1
This commit is contained in:
@@ -242,11 +242,11 @@
|
||||
<el-form-item label="Confidential Comments to the Editor">
|
||||
<el-input type="textarea" placeholder="please input content" v-model="questionform.confident" :rows="8"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Comments for the Authors" prop="comment">
|
||||
<el-form-item label="Comments for the Authors" v-if="this.txt_mess.atype == 'Comment' || this.txt_mess.atype == 'News'">
|
||||
<el-input type="textarea" placeholder="please input content" v-model="questionform.comment" :rows="8"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Comments for the Authors" prop="comment" v-if="this.txt_mess.atype != 'Comment' && this.txt_mess.atype != 'News'">
|
||||
<el-input type="textarea" placeholder="please input content" v-model="questionform.comment" :rows="8"></el-input>
|
||||
<p style="color: #e6a23c;font-size: 13px;" v-if="this.txt_mess.atype!='Comment'||this.txt_mess.atype!='News'">
|
||||
Dear reviewer, we recommend the available comment should be more than 40 words.
|
||||
</p>
|
||||
</el-form-item>
|
||||
<el-form-item label="Please choose disclose your name or remain anonymous">
|
||||
<el-radio-group v-model="questionform.is_anonymous" style="line-height: 24px;">
|
||||
@@ -328,36 +328,6 @@
|
||||
required: true,
|
||||
message: "please input content",
|
||||
trigger: "blur"
|
||||
}, {
|
||||
validator: function(rule, value, callback) {
|
||||
if (new RegExp("[\\u4E00-\\u9FFF]+", "g").test(value)) {
|
||||
//中文
|
||||
let blankCount = 0;
|
||||
for (let i in value.match(/ /g)) {
|
||||
blankCount++
|
||||
}
|
||||
let wenziCount = 0;
|
||||
for (let j = 0; j < value.length; j++) {
|
||||
if ((value.charCodeAt(j) < 0) || (value.charCodeAt(j) > 255)) {
|
||||
wenziCount++
|
||||
}
|
||||
}
|
||||
if (blankCount + wenziCount <= 60) {
|
||||
callback(new Error(
|
||||
"Dear reviewer, we recommend the available comment should be more than 60 Chinese words."));
|
||||
}
|
||||
} else {
|
||||
//英文
|
||||
let blankCount = 0;
|
||||
for (let i in value.match(/ /g)) {
|
||||
blankCount++
|
||||
}
|
||||
if (blankCount <= 40) {
|
||||
callback(new Error("Dear reviewer, we recommend the available comment should be more than 40 words."));
|
||||
}
|
||||
}
|
||||
},
|
||||
trigger: "blur"
|
||||
}],
|
||||
}
|
||||
}
|
||||
@@ -392,7 +362,6 @@
|
||||
this.$message.error(err);
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
@@ -513,23 +482,64 @@
|
||||
if (this.questionform.is_anonymous == "" && this.questionform.is_anonymous != "0") {
|
||||
this.$message.error('Please choose disclose your name or remain anonymous.');
|
||||
} else {
|
||||
// 验证相加的字数
|
||||
let Char_Cter = this.questionform.qu9contents + ' ' + this.questionform.qu10contents + ' ' +
|
||||
this.questionform.qu11contents + ' ' + this.questionform.qu12contents + ' ' +
|
||||
this.questionform.qu13contents + ' ' + this.questionform.comment
|
||||
if (new RegExp("[\\u4E00-\\u9FFF]+", "g").test(Char_Cter)) {
|
||||
//中文
|
||||
let blankCount = 0;
|
||||
for (let i in Char_Cter.match(/ /g)) {
|
||||
blankCount++
|
||||
}
|
||||
let wenziCount = 0;
|
||||
for (let j = 0; j < Char_Cter.length; j++) {
|
||||
if ((Char_Cter.charCodeAt(j) < 0) || (Char_Cter.charCodeAt(j) > 255)) {
|
||||
wenziCount++
|
||||
}
|
||||
}
|
||||
if (blankCount + wenziCount <= 60) {
|
||||
this.$message({
|
||||
offset: '380',
|
||||
type: 'error',
|
||||
message: "We encourage you to enrich your comment further to help improve the peer paper."
|
||||
})
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
//英文
|
||||
let blankCount = 0;
|
||||
for (let i in Char_Cter.match(/ /g)) {
|
||||
blankCount++
|
||||
}
|
||||
if (blankCount <= 40) {
|
||||
this.$message({
|
||||
offset: '380',
|
||||
type: 'error',
|
||||
message: "We encourage you to enrich your comment further to help improve the peer paper."
|
||||
})
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// 提交接口
|
||||
this.loading = true
|
||||
this.$refs.question.validate((valid) => {
|
||||
if (valid) {
|
||||
// this.$api.post('api/Reviewer/questionSubmit', this.questionform)
|
||||
// .then((res) => {
|
||||
// if (res.code == 0) {
|
||||
// this.loading = false;
|
||||
// this.$message.success('Success!!');
|
||||
// this.getData();
|
||||
// } else {
|
||||
// this.loading = false;
|
||||
// this.$message.error('question submit error');
|
||||
// }
|
||||
// });
|
||||
this.$api.post('api/Reviewer/questionSubmit', this.questionform)
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.loading = false;
|
||||
this.$message.success('Success!!');
|
||||
this.getData();
|
||||
this.$router.push('/per_text_success');
|
||||
} else {
|
||||
this.loading = false;
|
||||
this.$message.error('question submit error');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.error('Please complete the information!');
|
||||
this.loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user