diff --git a/src/assets/img/ai.png b/src/assets/img/ai.png new file mode 100644 index 0000000..cfdc0b6 Binary files /dev/null and b/src/assets/img/ai.png differ diff --git a/src/components/common/langs/en.js b/src/components/common/langs/en.js index 0e16142..743dbbf 100644 --- a/src/components/common/langs/en.js +++ b/src/components/common/langs/en.js @@ -414,8 +414,15 @@ Information:'Fill in information', }, Formula:{ FormulaTemplate:'Formula Template' +}, +AI: { + AISummaryAnalysis: 'AI analysis', + AIKeywords: 'Keywords', + AIAbstract: 'Abstract', + AIAbstractInfo: 'Analysis Result', } + } diff --git a/src/components/common/langs/zh.js b/src/components/common/langs/zh.js index 2e10755..a29f908 100644 --- a/src/components/common/langs/zh.js +++ b/src/components/common/langs/zh.js @@ -407,7 +407,13 @@ const zh = { }, Formula:{ FormulaTemplate:'公式模版' - } + }, + AI:{ + AISummaryAnalysis:'AI分析', + AIKeywords:'关键词', + AIAbstract:'摘要', + AIAbstractInfo:'分析结果', + }, } diff --git a/src/components/page/articleAdd.vue b/src/components/page/articleAdd.vue index 51cbbfd..422bb19 100644 --- a/src/components/page/articleAdd.vue +++ b/src/components/page/articleAdd.vue @@ -1462,12 +1462,17 @@ export default { return false; } this.$refs.articleform.validate((valid) => { + if (this.isAbstractTooShort(this.form.abstrart)) { + this.$message.error('The abstract should not be less than 200 Chinese characters or English words!'); + return false; + } //验证文档 if (this.form.manuscirpt == '') { this.$message.error('Manuscirpt is required'); // console.log('file up error'); return false; } + //验证作者 let authorlist = this.form.authorList; let Firsta = 0; @@ -1508,9 +1513,11 @@ export default { this.$message.error('First author and corresponding author must be exist'); return false; } + 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('Major is required'); + this.$message.error('Please select the Research areas'); return false; } //验证选择转投但没选期刊项的情况 @@ -1613,7 +1620,17 @@ export default { }, Submission_of_manuscripts() { - // 提交稿件 + // 提交稿件AI检索 + this.$api + // api/Article/addArticle + .post('api/Aireview/review', { + article_id: this.form.article_id, + abstrart: this.form.abstrart, + keywords: this.form.keyWords, + api_model: 'gpt-4o' + }) + .then((res) => {}); + this.$api // api/Article/addArticle .post('api/Article/addArticlePart4', this.form) diff --git a/src/components/page/articleDetailEditor.vue b/src/components/page/articleDetailEditor.vue index 3d0192a..73eacae 100644 --- a/src/components/page/articleDetailEditor.vue +++ b/src/components/page/articleDetailEditor.vue @@ -5,7 +5,12 @@ Manuscript detail -
+
+
+ + +

{{ AIcontent }}

+
@@ -57,7 +62,7 @@

Special Issues :{{ form.special_title }}

- +
@@ -108,7 +113,7 @@
- + @@ -1124,6 +1170,8 @@ export default { }, data() { return { + isShowAI: false, + currentArticleData: {}, rules: {}, userloading: false, curState: null, @@ -1279,6 +1327,37 @@ export default { } }, methods: { + openAI(data) { + this.isShowAI = true; + this.currentArticleData = { ...data }; + console.log('this.currentArticleData at line 1312:', this.currentArticleData); + + }, + creatAI(data,i){ + const loading = this.$loading({ + lock: true, + text: 'Loading...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); + console.log('data at line 1336:', data) + this.$api + // api/Article/addArticle + .post('api/Aireview/review', { + article_id: data.article_id, + + }) + .then((res) => { + if(res.data.content){ + this.tableData[i].ai_review=res.data.content + loading.close() + this.openAI({...data,ai_review:res.data.content}); + } + }).catch((err) => { + loading.close() + this.$message.error('AI analysis failed') + }) + }, // 保存个人信息 saveUserIndex() { let link_geo = ''; @@ -1802,7 +1881,9 @@ export default { typeName = 'Google'; index = this.userMessage.google_time != 0 ? this.userMessage.google_index : ''; date = this.userMessage.google_time; - website =this.userMessage.g_author?`https://scholar.google.com/citations?hl=en&user=${this.userMessage.g_author}`:''; + website = this.userMessage.g_author + ? `https://scholar.google.com/citations?hl=en&user=${this.userMessage.g_author}` + : ''; editor = this.userMessage.google_editor; g_author = this.userMessage.g_author; this.bankVisible = false; @@ -2704,4 +2785,42 @@ export default { .userIndexBox .s_rol > div.rol_mess > font { width: auto; } +.AISummaryAnalysis p { + margin-top: 10px; + font-size: 14px; + padding-left: 10px; + box-sizing: border-box; +} +.AISummaryAnalysis p span { + display: inline-block; + width: auto; + color: #6157fd; + font-weight: bold; +} +::v-deep .AIDialog .el-dialog__body { + padding: 20px !important; +} +::v-deep .AIDialog .el-dialog__body .auth_collna_ew .el-collapse-item__arrow { + padding-left: 0px !important; +} +::v-deep .AIDialog .el-dialog__body .auth_collna_ew .el-collapse-item__header { + padding-left: 30px !important; +} +::v-deep .AIDialog .el-dialog { + /* background: linear-gradient(135deg, #f0f9fe, #dce6ff, #d7e9fd) !important; + box-shadow: 0 8px 20px rgba(0, 0, 0, 0.01) !important; + border-radius: 16px !important; + padding: 10px !important; + box-sizing: border-box !important; + color: #333 !important; + font-family: "Segoe UI", sans-serif !important; + transition: transform 0.3s ease, box-shadow 0.3s ease !important; */ +} +.beautiful-gradient { +} + +.beautiful-gradient:hover { + transform: translateY(-4px); + box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15); +} diff --git a/src/components/page/components/major/list.vue b/src/components/page/components/major/list.vue index 03a4f9e..f9af797 100644 --- a/src/components/page/components/major/list.vue +++ b/src/components/page/components/major/list.vue @@ -58,7 +58,8 @@ export default { watch: { list: { handler(e) { - this.fields=[...this.list] + + this.fields=this.list.length>0?[...this.list]:[{}] }, immediate: true },