diff --git a/src/components/page/articleListEditor_A.vue b/src/components/page/articleListEditor_A.vue index 80fb02f..b68410b 100644 --- a/src/components/page/articleListEditor_A.vue +++ b/src/components/page/articleListEditor_A.vue @@ -103,8 +103,7 @@
- -
+
Manuscript Files

@@ -239,7 +238,7 @@
-
+
AI scoring

Initial review score : @@ -250,7 +249,53 @@ Initial review score : {{ item.scoring }}

-

{{ item.H.google_editor }}

+ +
+
+
+
+ + {{ v.author_account.realname }} + +
+ +
+ + WOS : + + + + Scopus : + + + + Google : + + + + + +
+
+
+
+

- - - -

{{ item.firstname }} {{ item.lastname }}

- - -

{{ item.firstname }} {{ item.lastname }}

-
- -

{{ item.email }}

-
- -

{{ item.author_title }}

-
- -

{{ item.country }}

-
- -

{{ item.company }}

-
- -

{{ item.department }}

-
- - - Personal homepage -

- ( - {{ item.author_account.google_editor }} - {{ - formatDate(item.author_account.google_time) - }} - ) -

-
- - {{ item.author_account.google_index }} -

- ( - {{ item.author_account.google_editor }} - {{ - formatDate(item.author_account.google_time) - }} - ) -

-
-
- - - Binding - Write - + + +
+ +

{{ aiSorform.firstname }} {{ aiSorform.lastname }}

- + + +

{{ aiSorform.email }}

+
+ +

{{ aiSorform.author_title }}

+
+ +

{{ aiSorform.country }}

+
+ +

{{ aiSorform.company }}

+
+ +

{{ aiSorform.department }}

+
+
+ +
- +
+ + + +
+ + +
@@ -964,10 +1124,20 @@ export default { }, data() { return { + rules: {}, + userloading: false, curState: null, baseUrl: this.Common.baseUrl, mediaUrl: this.Common.mediaUrl, items: '', + currentTabIndex: 0, + currentTabName: '', + HIndexList: [ + { name: 'WOS', value: 0, key: 'wos' }, + { name: 'Scopus', value: 1, key: 'scopus' }, + { name: 'Google', value: 2, key: 'google' } + ], + userIndexForm: {}, query: { username: localStorage.getItem('U_name'), journal: 0, @@ -1008,6 +1178,7 @@ export default { Total: 0, geogleList: [], IndexForm: {}, + userMessage: {}, editVisible: false, guestVisible: false, PreAcpVisible: false, @@ -1093,7 +1264,9 @@ export default { state: 6, title: this.$t('artstate.state6') } - ] + ], + bankVisible: false, + googleSearchInfo: '' }; }, created() { @@ -1106,6 +1279,87 @@ export default { } }, methods: { + // 保存个人信息 + saveUserIndex() { + let link_geo = ''; + var data = { ...this.userIndexForm }; + if (data.index == '' && data.type != 2) { + this.$message.error('Please enter the Index!'); + return; + } + if (data.type == 1) { + if (data.website == '') { + this.$message.error('Please enter the Website!'); + return; + } + } + if (this.userIndexForm.type == 2) { + console.log('this.IndexForm.g_author at line 1293:', this.IndexForm.g_author); + if (this.IndexForm.g_author == '' || !this.IndexForm.g_author) { + if (this.bankVisible) { + console.log('this.bankVisible at line 1294:', this.bankVisible); + this.$message.error('Please select one!'); + return; + } else { + if (this.googleSearchInfo != '') { + this.$message.error(this.googleSearchInfo); + return; + } else { + this.$message.error('Please click Certified!'); + return; + } + } + } else { + data = { + ...data, + index: data.index == '' ? 0 : data.index, + g_author: this.IndexForm.g_author, + website: this.IndexForm.g_website + }; + console.log('data at line 1302:', data); + } + link_geo = 'api/User/editUserIndex'; + // link_geo = 'api/User/googleBindAuthor'; + } else { + link_geo = 'api/User/editUserIndex'; + } + var that = this; + this.$api + .post(link_geo, data) + .then((res) => { + if (res.code == 0) { + this.$message.success('Successfully modified personal index'); + setTimeout(() => { + this.aiSorbox = false; + this.bankVisible = false; + this.googleSearchInfo = ''; + that.getdate(); + }, 200); + } else { + this.$message.error(res.msg); + } + }) + .catch((err) => { + this.$message.error(err); + }); + }, + changeHindex(data) { + console.log('data at line 1151:', data); + }, + colorIndex1(num, time) { + let str = ''; + if (num < 10) { + str = '' + num + ''; + } else if (num < 15) { + str = '' + num + ''; + } else { + str = '' + num + ''; + } + if (time == 0) { + str = '0 '; + } + return str; + }, //初始化期刊选项 initselect() { this.$api @@ -1257,32 +1511,33 @@ export default { } } - this.tableData[i].reportList = []; - if (this.tableData[i].reports.length == 1) { - for (let j = 0; j < this.tableData[i].reports.length; j++) { - if ( - this.tableData[i].reports[j].author_account != '' && - this.tableData[i].reports[j].author_account != null - ) { - if (this.tableData[i].reports[j].author_account.google_time == 0) { - this.tableData[i].reports[j].Hindex = 0; - this.tableData[i].reportList.push(this.tableData[i].reports[j]); - } - } - } - } else if (this.tableData[i].reports.length > 1) { - for (let j = 0; j < this.tableData[i].reports.length; j++) { - if ( - this.tableData[i].reports[j].author_account != '' && - this.tableData[i].reports[j].author_account != null - ) { - this.tableData[i].reports[j].Hindex = this.tableData[i].reports[j].author_account.google_index; - if (this.tableData[i].reports[j].author_account.google_time == 0) { - this.tableData[i].reportList = this.tableData[i].reports; - } - } - } - } + this.tableData[i].reportList = [...this.tableData[i].reports]; + console.log('.reportList at line 1265:', this.tableData[i].reportList); + // if (this.tableData[i].reports.length == 1) { + // for (let j = 0; j < this.tableData[i].reports.length; j++) { + // if ( + // this.tableData[i].reports[j].author_account != '' && + // this.tableData[i].reports[j].author_account != null + // ) { + // if (this.tableData[i].reports[j].author_account.google_time == 0) { + // this.tableData[i].reports[j].Hindex = 0; + // this.tableData[i].reportList.push(this.tableData[i].reports[j]); + // } + // } + // } + // } else if (this.tableData[i].reports.length > 1) { + // for (let j = 0; j < this.tableData[i].reports.length; j++) { + // if ( + // this.tableData[i].reports[j].author_account != '' && + // this.tableData[i].reports[j].author_account != null + // ) { + // this.tableData[i].reports[j].Hindex = this.tableData[i].reports[j].author_account.google_index; + // if (this.tableData[i].reports[j].author_account.google_time == 0) { + // this.tableData[i].reportList = this.tableData[i].reports; + // } + // } + // } + // } } for (let i = 0; i < res.state_num.length; i++) { for (let j = 0; j < this.statList.length; j++) { @@ -1422,15 +1677,156 @@ export default { }, // H指数弹出框 aiSoring(e) { - this.aiSorbox = true; - this.aiSorform.article_id = e.article_id; - this.aiSorform.title = e.title; - this.aiSorform.Hindex = e.scoring; - this.aiSorform.author = e.reportList; - for (var i = 0; i < this.aiSorform.author.length; i++) { - this.aiSorform.author[i].Hselct = 1; - } + console.log('e at line 1465:', e); + this.googleSearchInfo = ''; + this.currentTabIndex = 0; + this.currentTabName = this.HIndexList[0].name; + this.aiSorform = { ...e }; + this.IndexForm = {}; + this.userMessage = { ...e.author_account }; + + this.HIndexList = this.HIndexList.map((v) => { + // v.isEdit = this.isEditIndex(v); + v.isEdit = this.isEditIndex(v); + return v; + }); + console.log('this.HIndexList at line 1551:', this.HIndexList); + this.handleUserIndex(this.HIndexList[this.currentTabIndex].key); this.geogleList = []; + this.aiSorbox = true; + }, + isEditIndex(data) { + console.log('data at line 1543:', data); + var status; + var date = ''; + switch (data.key) { + case 'wos': + date = this.userMessage.wos_time; + break; + case 'scopus': + date = this.userMessage.scopus_time; + break; + case 'google': + date = this.userMessage.google_time; + break; + } + + if (date == 0) { + status = true; + } else { + var date1 = new Date(parseInt(date * 1000)); + var date2 = new Date().getTime(); + console.log('date2 at line 1564:', date2); + + // 计算时间差(以毫秒为单位) + var timeDiff = Number(date2 - date1); + console.log('timeDiff at line 1569:', timeDiff); + + // 将半年转换为毫秒 + var halfYearInMilliseconds = 1000 * 60 * 60 * 24 * 182.5; // 假设一年有 365 天 + + // 判断时间差是否大于半年 + status = timeDiff > halfYearInMilliseconds; + if (data.key == 'google' && this.userMessage.g_author == '') { + status = true; + } + } + + return status; + console.log('status at line 1578:', status); + }, + changeSelectTabs(e) { + console.log('e at line 1536:', e); + this.currentTabIndex = e.index; + this.currentTabName = e.name; + this.googleSearchInfo = ''; + this.handleUserIndex(this.HIndexList[this.currentTabIndex].key); + }, + // 个人指数修改 + handleUserIndex(e) { + var type = ''; + var typeName = ''; + var editor = ''; + var index = ''; + var date = ''; + var website = ''; + var editor_id = ''; + var g_author = ''; + if (e == 3) { + this.userloading = true; + this.$api + .post('api/User/googleGetAuthor', { + user_id: this.userMessage.user_id + }) + .then((res) => { + if (res.code == 0) { + this.geogleList = res.data.authors; + this.bankVisible = true; + this.userloading = false; + } else { + if (res.msg == 'no date') { + this.googleSearchInfo = 'No information has been found for this account yet.'; + this.geogleList = []; + this.userloading = false; + } else { + this.$message.error(res.msg); + this.geogleList = []; + this.userloading = false; + } + } + }) + .catch((err) => { + this.$message.error(err); + this.userloading = false; + }); + } else { + switch (e) { + case 'wos': + type = 0; + typeName = 'WOS'; + index = this.userMessage.wos_time != 0 ? this.userMessage.wos_index : ''; + date = this.userMessage.wos_time; + editor = ''; + break; + case 'scopus': + type = 1; + typeName = 'Scopus'; + index = this.userMessage.scopus_time != 0 ? this.userMessage.scopus_index : ''; + date = this.userMessage.scopus_time; + website = this.userMessage.scopus_website; + editor = this.userMessage.scopus_editor; + + break; + case 'google': + type = 2; + 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}`:''; + editor = this.userMessage.google_editor; + g_author = this.userMessage.g_author; + this.bankVisible = false; + this.geogleList = []; + break; + } + + this.userIndexForm = { + type: type, + index: index, + date: date, + website: website, + editor_id: localStorage.getItem('U_id'), + g_author: g_author, + editor: editor, + user_id: this.userMessage.user_id, + account: this.userMessage.account, + typeName: typeName + }; + console.log('this.userIndexForm at line 1641:', this.userIndexForm); + // this.userIndexForm.type = e; + + this.userIndexIsEdit = true; + } }, // 标记弹出框 testedit(e) { @@ -1582,6 +1978,7 @@ export default { choseGego(e) { this.IndexForm.g_author = e.author_id; this.IndexForm.g_website = e.link; + console.log('this.IndexForm.g_website at line 1965:', this.IndexForm); this.$forceUpdate(); }, checkAddType(e) { @@ -1892,6 +2289,27 @@ export default { var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); return Y + M + D; }, + colorIndex2(time) { + if (time != 0) { + let date = new Date(parseInt(time * 1000)); + let Y = date.getFullYear() + '-'; + let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) + '-' : date.getMonth() + 1 + '-'; + let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); + let H = date.getHours() < 10 ? '0' + date.getHours() + ':' : date.getHours() + ':'; + let U = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); + time = Y + M + D; + } + + let str = ''; + + str = ' ' + time + ''; + + if (time == 0) { + str = ''; + // str = '(No time)'; + } + return str; + }, formatDate_(timestamp) { var date = new Date(timestamp * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000 var Y = date.getFullYear() + '-'; @@ -1944,6 +2362,15 @@ export default { diff --git a/src/components/page/partyRole.vue b/src/components/page/partyRole.vue index aa5b058..c9364e5 100644 --- a/src/components/page/partyRole.vue +++ b/src/components/page/partyRole.vue @@ -309,7 +309,12 @@

WOS Index - +

@@ -324,7 +329,12 @@

Scopus Index - +

@@ -335,19 +345,39 @@ Time :
-
- Website : - -
+
Editor :
+
+ Website : + + + {{ + userMessage.scopus_website + }} + +

Google Index - +

@@ -358,15 +388,32 @@ Time :
-
- Website : - -
Editor :
+
+ Google Author : + {{ userMessage.g_author }} +
+