From 10426bb23ea097e9b760a45a4ea20117caf97dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Fri, 25 Jul 2025 13:35:16 +0800 Subject: [PATCH] tijiao --- src/components/page/articleAdd.vue | 86 +++++++------------ .../components/htmlWeChatPreview/index.vue | 13 +-- 2 files changed, 37 insertions(+), 62 deletions(-) diff --git a/src/components/page/articleAdd.vue b/src/components/page/articleAdd.vue index aafd097..2902edd 100644 --- a/src/components/page/articleAdd.vue +++ b/src/components/page/articleAdd.vue @@ -56,52 +56,7 @@ > - - - - + @@ -505,6 +460,9 @@
+ + +

Co-submitting

TMR Publishing Group publishes multiple journals and offers you the opportunity to co-submit your paper. @@ -1436,6 +1394,7 @@ export default { } console.log('this.form.major at line 1512:', this.form.major); //验证文章领域 + this.form.major = this.majorValueList.map((item) => item.selectedValue[item.selectedValue.length - 1]).toString(','); if (this.form.major == '') { this.$message.error('Please select the Research areas'); @@ -2529,6 +2488,9 @@ export default { this.onStaging(2); } } + if(e == 4) { + this.getMajorData(); + } }, showFiles() { @@ -2697,10 +2659,7 @@ export default { console.log('this.form at line 2707:', this.form.abstrart); this.form.keyWords = fstr == '' ? '' : fstr.substring(0, fstr.length - 1); this.form.major = this.majorValueList.map((item) => item.selectedValue[item.selectedValue.length - 1]).toString(','); - if (this.form.major == '') { - this.$message.error('Please select the Research areas'); - return false; - } + if (this.isAbstractTooShort(this.form.abstrart)) { this.$message.error('The abstract should not be less than 200 Chinese characters or English words!'); return false; @@ -2771,6 +2730,7 @@ export default { } }); } else if (e == 4) { + this.$api .post('api/Article/addArticlefile', { article_id: this.form.article_id, @@ -2821,6 +2781,7 @@ export default { }); } }, + isAbstractTooShort(text) { let chineseCount = (text.match(/[\u4e00-\u9fa5]/g) || []).length; let englishCount = (text.match(/[A-Za-z0-9]/g) || []).length; @@ -2829,6 +2790,23 @@ export default { return total < 200; // 不足 200,说明太短 }, + // 读取getMajorData + getMajorData() { + this.$api + .post('api/Article/getArticleField', { + article_id: this.stagingID + }) + .then((res) => { + this.majorValueList = res.data.map((item) => ({ + selectedValue: Array.isArray(item.major) + ? item.shu + : typeof item.shu === 'string' + ? item.shu.split(',').map(Number) + : [item.shu] + })); + console.log(res, '已经保存的值'); + }) + }, // 读取 Temporary() { this.$api @@ -2849,13 +2827,7 @@ export default { console.log(res.data.base); // this.form.topics = res.data.base.topics // 领域 - this.majorValueList = res.data.majors.map((item) => ({ - selectedValue: Array.isArray(item.major) - ? item.major - : typeof item.major === 'string' - ? item.major.split(',').map(Number) - : [item.major] - })); + console.log('this.majorValueList at line 2853:', this.majorValueList); // this.$api // .post('api/Major/getMajorForAddArticle', { diff --git a/src/components/page/components/htmlWeChatPreview/index.vue b/src/components/page/components/htmlWeChatPreview/index.vue index aa415d9..039c77f 100644 --- a/src/components/page/components/htmlWeChatPreview/index.vue +++ b/src/components/page/components/htmlWeChatPreview/index.vue @@ -164,8 +164,7 @@ />

-
- +