审稿报告字数统计 加入限制 排除 空格之类的

This commit is contained in:
2026-04-15 10:39:44 +08:00
parent ae5be5f20f
commit 1844d2d125
4 changed files with 82 additions and 56 deletions

View File

@@ -17,9 +17,6 @@
:form="baseQuestionform"
@update="(e) => (questionform = e)"
></newForm>
</el-form>
</div>
</template>
@@ -134,7 +131,6 @@ export default {
recommend: [{ required: true, message: 'please select', trigger: 'blur' }]
};
}
},
questionSubmit() {
if (this.questionform.is_anonymous == '' && this.questionform.is_anonymous != '0') {
@@ -161,30 +157,29 @@ export default {
}
let Char_Cter = null;
// 验证相加的字数
if (this.isNewForm) {
Char_Cter = [
this.questionform.qu5contents,
this.questionform.qu6contents,
this.questionform.qu7contents,
this.questionform.qu8contents,
this.questionform.qu9contents,
this.questionform.qu10contents,
this.questionform.qu11contents,
this.questionform.qu12contents,
this.questionform.qu13contents,
this.questionform.qu14contents,
this.questionform.comment
].join(' ');
} else {
Char_Cter = [
this.questionform.qu9contents,
this.questionform.qu10contents,
this.questionform.qu11contents,
this.questionform.qu12contents,
this.questionform.qu13contents,
this.questionform.comment
].join(' ');
}
const contents = this.isNewForm
? [
this.questionform.qu5contents,
this.questionform.qu6contents,
this.questionform.qu7contents,
this.questionform.qu8contents,
this.questionform.qu9contents,
this.questionform.qu10contents,
this.questionform.qu11contents,
this.questionform.qu12contents,
this.questionform.qu13contents,
this.questionform.qu14contents,
this.questionform.comment
]
: [
this.questionform.qu9contents,
this.questionform.qu10contents,
this.questionform.qu11contents,
this.questionform.qu12contents,
this.questionform.qu13contents,
this.questionform.comment
];
Char_Cter = this.$commonJS.getCleanTextForCount(contents.join(' '));
if (new RegExp('[\\u4E00-\\u9FFF]+', 'g').test(Char_Cter)) {
//中文

View File

@@ -342,6 +342,7 @@ export default {
return content;
},
async questionSubmit() {
if (this.questionform.is_anonymous == '' && this.questionform.is_anonymous != '0') {
@@ -368,30 +369,29 @@ export default {
}
let Char_Cter = null;
// 验证相加的字数
if (this.isNewForm) {
Char_Cter = [
this.questionform.qu5contents,
this.questionform.qu6contents,
this.questionform.qu7contents,
this.questionform.qu8contents,
this.questionform.qu9contents,
this.questionform.qu10contents,
this.questionform.qu11contents,
this.questionform.qu12contents,
this.questionform.qu13contents,
this.questionform.qu14contents,
this.questionform.comment
].join(' ');
} else {
Char_Cter = [
this.questionform.qu9contents,
this.questionform.qu10contents,
this.questionform.qu11contents,
this.questionform.qu12contents,
this.questionform.qu13contents,
this.questionform.comment
].join(' ');
}
const contents = this.isNewForm ? [
this.questionform.qu5contents,
this.questionform.qu6contents,
this.questionform.qu7contents,
this.questionform.qu8contents,
this.questionform.qu9contents,
this.questionform.qu10contents,
this.questionform.qu11contents,
this.questionform.qu12contents,
this.questionform.qu13contents,
this.questionform.qu14contents,
this.questionform.comment
] : [
this.questionform.qu9contents,
this.questionform.qu10contents,
this.questionform.qu11contents,
this.questionform.qu12contents,
this.questionform.qu13contents,
this.questionform.comment
];
Char_Cter = this.$commonJS.getCleanTextForCount(contents.join(' '));
if (new RegExp('[\\u4E00-\\u9FFF]+', 'g').test(Char_Cter)) {
//中文
@@ -447,7 +447,7 @@ if(this.questionform.confident != ''){
confidentStr = await this.abstractFormat(this.questionform.confident);
}
return
this.$refs.question.validate((valid) => {
if (valid) {