diff --git a/src/components/page/articleAdd.vue b/src/components/page/articleAdd.vue index 13a0543..c6a88ad 100644 --- a/src/components/page/articleAdd.vue +++ b/src/components/page/articleAdd.vue @@ -112,8 +112,8 @@ + :on-exceed="alertlimit" :on-remove="removefilearticleApproval" + :file-list="fileL_articleApproval" :on-preview="dowloadFile">
Upload
@@ -163,6 +163,79 @@
+
+

+ Associated Authors + + + + + + + Show all authors + Hide all authors + + +

+
+
+
+
+

+ {{ item.firstname }} {{ item.lastname }} + ({{item.email}}) + + +

+

+ E-mail : + {{item.email}} +

+

+ ORCID iD : + {{item.orcid}} +

+

+ Title : + {{item.title}} +

+

+ Affiliation : + {{item.company}} +

+

+ Department : + {{item.department}} +

+

+ Address : + {{item.address}} +

+

+ Country : + {{item.country}} +

+
+ + + Add author + +
+ +
+
+
+ +

Author Information @@ -172,97 +245,74 @@ The number of First Authors and Corresponding Authors should not exceed two each.

-
- - - - - - * - E-mail : - - - - - - - * - Name : - - - - - - - - - Register - for an ORCID iD - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * - Country : - - - - - - - +
+
+

+ Author {{ index + 1 }} + + + + + + + + + + + + +

+

+ {{ item.firstname }} {{ item.lastname }} + {{ item.isSuper ? '#' : ''}}{{ item.isReport ? '*' : '' }} +

+

+ E-mail : + {{item.email}} +

+

+ ORCID iD : + {{item.orcid}} +

+

+ Title : + {{item.title}} +

+

+ Affiliation : + {{item.company}} +

+

+ Department : + {{item.department}} +

+

+ Address : + {{item.address}} +

+

+ Country : + {{item.country}} +

+ +
+ +

Please note that based on your input the author names will appear as follows:

+

+ + {{ item.firstname }} {{ item.lastname }} + {{ item.isSuper ? '#' : ''}}{{ item.isReport ? '*' : '' }} + ; + +

+ +
- Save as draft - - Save and proceed to the next + + Proceed to the next step
@@ -605,6 +655,99 @@ OK + + + + +

+ {{ authMeaIN.firstname }} {{ authMeaIN.lastname }} + {{ authMeaIN.isSuper ? '#' : ''}}{{ authMeaIN.isReport ? '*' : '' }} +

+ + + + * + E-mail : + + + + + + + + + * + Name : + + + + + + + + + Register + for an ORCID iD + + + + + + + + + + + + * + Title : + + + + + + + + + + + + + + + + + + + * + Address : + + + + + + * + Country : + + + + + + + + Cancel + OK + +
+
@@ -655,19 +798,24 @@ major_a: '', major_b: '', major_c: '', - authorList: [{ - firstname: '', - lastname: '', - orcid: '', - company: '', - department: '', - title: '', - country: '', - email: '', - address: '', - isSuper: false, - isReport: false - }], + authorList: [ + // { + // firstname: '', + // lastname: '', + // orcid: '', + // company: '', + // department: '', + // title: '', + // country: '', + // email: '', + // address: '', + // isSuper: false, + // isReport: false, + // load: false, + // sort: 0 + // }, + ], + checkedjours: [], abstrart: '', type: '', @@ -682,11 +830,12 @@ totalpage: '', manuscirpt: '', supplementary: '', - approval_file:'', - approval_content:'', + approval_file: '', + approval_content: '', code: '', // topics:null }, + raltiAutList: [], journal_type: [{ name: 'ARTICLE', value: 'A' @@ -894,6 +1043,23 @@ trigger: 'blur' }], }, + forWard: false, + authorVisible: false, + authMeaIN: { + firstname: '', + lastname: '', + orcid: '', + company: '', + department: '', + title: '', + country: '', + email: '', + address: '', + isSuper: false, + isReport: false, + load: false, + sort: 0 + }, activeNames: [1], keywordsList: [{ ke: '' @@ -944,6 +1110,7 @@ }, created() { this.initSelect(); + this.getAutData(); if (this.stagingID != undefined) { this.form.article_id = this.stagingID this.Temporary() @@ -1167,21 +1334,6 @@ }); }, - addAuthor() { - this.form.authorList.push({ - firstname: '', - lastname: '', - orcid: '', - company: '', - department: '', - title: '', - country: '', - email: '', - address: '', - isSuper: false, - isReport: false - }); - }, addfund() { this.keywordsList.push({ @@ -1189,16 +1341,7 @@ }); }, - deleteAuthor(item, index) { - // 二次确认删除 - this.$confirm('Are you sure you want to delete this author?', 'Delete', { - type: 'warning' - }) - .then(() => { - this.form.authorList.splice(index, 1); - }) - .catch(() => {}); - }, + //初始化期刊选项 initSelect() { @@ -1216,13 +1359,11 @@ .catch((err) => { console.log(err); }); - this.$api .post('api/Admin/getCountrys') .then((res) => { this.countrys = res; }); - this.$api .post('api/Article/getAllCompany') .then((res) => { @@ -1242,7 +1383,6 @@ .post('api/User/getMajorList') .then(res => { this.majorList = res.data; - }) } }) @@ -1254,17 +1394,290 @@ .catch(err => { this.$message.error(err); }); - this.checkReviewer() - this.$api .post('api/Major/getMajorList') .then(res => { console.log(res, 99) this.step4MajorList = res.data.majors; - }) + }, + + + // 邮箱用户模糊搜索 + chaMateFit(value, cb, num) { + // var mailRegular = /^\w+([-+._']\w+)*@\w+(\.[a-zA-Z]{2,3}){1,2}$/ + var mailRegular = /^\w+([-+._']\w+)*@/ + if (mailRegular.test(value)) { + this.form.authorList[num].load = true + // this.$forceUpdate(); + this.$api + .post('api/Article/getRelationAuthorByEmail', { + email: value, + page: 1, + limit: 10, + }).then((res) => { + + var restaurants = res.data.authors; + for (let i in restaurants) { + restaurants[i].value = restaurants[i].email + ' | ' + restaurants[i].firstname + + restaurants[i].lastname + } + var results = value ? restaurants.filter(this.createMata(value)) : restaurants; + // 调用 callback 返回建议列表的数据 + cb(results); + this.form.authorList[num].load = false + this.$forceUpdate(); + }); + } + + }, + + createMata(queryString) { + return (restList) => { + return (restList.value.toLowerCase().indexOf(queryString.toLowerCase()) != -1); + }; + }, + + // 选中用户 + chaSelChose(value, num) { + console.log(value) + console.log(num) + this.authMeaIN.firstname = value.firstname ? value.firstname : '' + this.authMeaIN.lastname = value.lastname ? value.lastname : '' + this.authMeaIN.orcid = value.orcid ? value.orcid : '' + this.authMeaIN.company = value.company ? value.company : '' + this.authMeaIN.department = value.department ? value.department : '' + this.authMeaIN.title = value.title ? value.title : '' + this.authMeaIN.country = value.country ? value.country : '' + this.authMeaIN.email = value.email ? value.email : '' + this.authMeaIN.address = value.address ? value.address : '' + this.authMeaIN.isSuper = false + this.authMeaIN.isReport = false + this.authMeaIN.load = false + this.authMeaIN.sort = num + this.$forceUpdate(); + }, + + // 相关作者展开隐藏 + forWarMark() { + if (this.forWard) { + this.forWard = false + } else { + this.forWard = true + } + }, + raltSHpin(index, num) { + if (num == 0) { + this.raltiAutList[index].showHide = false + } else { + this.raltiAutList[index].showHide = true + } + this.$forceUpdate(); + }, + + // 选择推荐作者 + checkAuthor(value, num) { + // this.form.authorList.push({ + // firstname: value.firstname ? value.firstname : '', + // lastname: value.lastname ? value.lastname : '', + // orcid: value.orcid ? value.orcid : '', + // company: value.company ? value.company : '', + // department: value.department ? value.department : '', + // title: value.title ? value.title : '', + // country: value.country ? value.country : '', + // email: value.email ? value.email : '', + // address: value.address ? value.address : '', + // isSuper: false, + // isReport: value.address ? true : false, + // load: false, + // sort: this.form.authorList.length + // }); + value.firstname = value.firstname ? value.firstname : '' + value.lastname = value.lastname ? value.lastname : '' + value.orcid = value.orcid ? value.orcid : '' + value.company = value.company ? value.company : '' + value.department = value.department ? value.department : '' + value.title = value.title ? value.title : '' + value.country = value.country ? value.country : '' + value.email = value.email ? value.email : '' + value.address = value.address ? value.address : '' + value.isSuper = false + value.isReport = false + value.load = false + value.sort = num + value.article_id = this.stagingID + this.$api + .post('api/Article/addAuthor', value) + .then((res) => { + this.TempoAuthor() + this.$message.success("Added successfully"); + }); + + }, + + // 添加作者信息 + addAuthor() { + // this.form.authorList.push({ + // firstname: '', + // lastname: '', + // orcid: '', + // company: '', + // department: '', + // title: '', + // country: '', + // email: '', + // address: '', + // isSuper: false, + // isReport: false, + // load: false, + // sort: this.form.authorList.length + // }); + this.authorVisible = true + this.authMeaIN.art_aut_id = '' + this.authMeaIN.firstname = '' + this.authMeaIN.lastname = '' + this.authMeaIN.orcid = '' + this.authMeaIN.company = '' + this.authMeaIN.department = '' + this.authMeaIN.title = '' + this.authMeaIN.country = '' + this.authMeaIN.email = '' + this.authMeaIN.address = '' + this.authMeaIN.isSuper = false + this.authMeaIN.isReport = false + this.authMeaIN.load = false + this.authMeaIN.sort = this.form.authorList.length + console.log(this.form.authorList) + }, + + + + + // 修改用户信息 + editAuthor(value, num) { + this.authMeaIN.art_aut_id = value.art_aut_id ? value.art_aut_id : '' + this.authMeaIN.firstname = value.firstname ? value.firstname : '' + this.authMeaIN.lastname = value.lastname ? value.lastname : '' + this.authMeaIN.orcid = value.orcid ? value.orcid : '' + this.authMeaIN.company = value.company ? value.company : '' + this.authMeaIN.department = value.department ? value.department : '' + this.authMeaIN.title = value.title ? value.title : '' + this.authMeaIN.country = value.country ? value.country : '' + this.authMeaIN.email = value.email ? value.email : '' + this.authMeaIN.address = value.address ? value.address : '' + this.authMeaIN.isSuper = (value.isSuper == 1 ? true : false) + this.authMeaIN.isReport = (value.isReport == 1 ? true : false) + this.authMeaIN.load = false + this.authMeaIN.sort = num + this.authorVisible = true + }, + + // 保存修改用户信息 + saveAuthor(value) { + if (value.firstname == '' || value.lastname == '' || value.title == '' || value.Country == '' || value + .email == '') { + this.$message.error('Please provide complete author information!'); + return + } + if (value.isReport) { + if (value.address == '') { + this.$message.error('Please provide complete author information!'); + return + } + } + value.article_id = this.stagingID + var urlLink = '' + if (!value.art_aut_id) { + urlLink = 'api/Article/addAuthor' + } else { + urlLink = 'api/Article/editAuthor' + } + this.$api + .post(urlLink, value) + .then((res) => { + if (res.code == 0) { + this.TempoAuthor() + this.authorVisible = false + this.$message.success("Successfully saved"); + } else { + this.$message.error(res.msg); + } + }); + + }, + + + // 删除作者信息 + deleteAuthor(item, index) { + // 二次确认删除 + this.$confirm('Are you sure you want to delete this author?', 'Delete', { + type: 'warning' + }) + .then(() => { + item.article_id = this.stagingID + this.$api + .post('api/Article/delAuthor', { + art_aut_id: item.art_aut_id + }) + .then((res) => { + if (res.code == 0) { + this.TempoAuthor() + this.$message.success('Delete successful'); + } else { + this.$message.error(res.msg); + } + }); + }) + .catch(() => {}); + }, + + // 用户排序更改 + gaPaiXu(value, inx) { + if (inx == "top") { + this.$api + .post('api/Article/upAuthors', { + art_aut_id: value.art_aut_id + }) + .then((res) => { + if (res.code == 0) { + this.TempoAuthor() + } else { + this.$message.error(res.msg); + } + }); + } else { + this.$api + .post('api/Article/downAuthors', { + art_aut_id: value.art_aut_id + }) + .then((res) => { + if (res.code == 0) { + this.TempoAuthor() + } else { + this.$message.error(res.msg); + } + }); + } + // for (let i in this.form.authorList) { + // this.form.authorList[i].sort = i + // } + }, + + + + // 获取相关作者列表 + getAutData() { + this.$api + .post('api/Article/getRelationAuthor', { + user_id: localStorage.getItem('U_id'), + }).then((res) => { + this.raltiAutList = res.data.authors; + for (let i in this.raltiAutList) { + this.raltiAutList[i].showHide = false + } + }); }, // 机构模糊搜索 @@ -1274,14 +1687,17 @@ // 调用 callback 返回建议列表的数据 cb(results); }, + createFilter(queryString) { return (companyList) => { return (companyList.value.toLowerCase().indexOf(queryString.toLowerCase()) != -1); }; }, + selCompany(item, index) { this.form.authorList[index].company = item.value }, + checkReviewer() { this.$api .post('api/Reviewer/checkReviewerOfJournal', this.Reviewerof) @@ -1357,9 +1773,11 @@ } } }, + uperr_coverLetter(err) { this.$message.error('Upload error'); }, + // 共同投稿 changeSwitch(val) { if (val === true) { @@ -1414,9 +1832,11 @@ major_all: '' }); }, + onDeleteTuijian(item, index) { this.tuiJianForm.splice(index, 1); }, + // 下载文件 dowloadFile(file) { let filePath = '/public/' + file.url; @@ -1929,39 +2349,39 @@ } }); } else if (e == 2) { - for (let i = 0; i < this.form.authorList.length; i++) { - if (this.form.authorList[i].art_aut_id == undefined) { - this.form.authorList[i].art_aut_id = 0 - } - // 空信息的作者删除 - let authMark = 0 - for (let key in this.form.authorList[i]) { - if (key != 'isSuper' && key != 'isReport' && key != 'is_super' && key != 'is_report' && - key != 'state' && key != 'article_id' && key != 'art_aut_id') { - if (this.form.authorList[i][key] != '') { - authMark++ - } - } - } - if (authMark == 0) { - this.form.authorList.splice(i, 1) - i = i - 1 - } - } - if (this.form.authorList.length != 0) { - this.$api - .post('api/Article/saveArticleAuthor', { - article_id: this.form.article_id, - authors: this.form.authorList - }) - .then((res) => { - if (res.code == 0) { - this.$message.success('Saving succeeded!'); - } else { - this.$message.error(res.msg); - } - }); - } + // for (let i = 0; i < this.form.authorList.length; i++) { + // if (this.form.authorList[i].art_aut_id == undefined) { + // this.form.authorList[i].art_aut_id = 0 + // } + // // 空信息的作者删除 + // let authMark = 0 + // for (let key in this.form.authorList[i]) { + // if (key != 'isSuper' && key != 'isReport' && key != 'is_super' && key != 'is_report' && + // key != 'state' && key != 'article_id' && key != 'art_aut_id') { + // if (this.form.authorList[i][key] != '') { + // authMark++ + // } + // } + // } + // if (authMark == 0) { + // this.form.authorList.splice(i, 1) + // i = i - 1 + // } + // } + // if (this.form.authorList.length != 0) { + // this.$api + // .post('api/Article/saveArticleAuthor', { + // article_id: this.form.article_id, + // authors: this.form.authorList + // }) + // .then((res) => { + // if (res.code == 0) { + // this.$message.success('Saving succeeded!'); + // } else { + // this.$message.error(res.msg); + // } + // }); + // } } else if (e == 3) { this.$api @@ -2085,25 +2505,7 @@ 'ke': keyList[i] }) } - // 作者 - if (res.data.authors.length > 0) { - this.form.authorList = res.data.authors - this.activeNames = [] - for (let i = 0; i < this.form.authorList.length; i++) { - if (this.form.authorList[i].is_report == 1) { - this.form.authorList[i].isReport = true - } else { - this.form.authorList[i].isReport = false - } - if (this.form.authorList[i].is_super == 1) { - this.form.authorList[i].isSuper = true - } else { - this.form.authorList[i].isSuper = false - } - this.form.authorList[i].title = this.form.authorList[i].author_title - this.activeNames.push(i + 1) - } - } + // 文件 if (res.data.files.length > 0) { for (let i = 0; i < res.data.files.length; i++) { @@ -2134,8 +2536,47 @@ this.$message.error(res.msg); } }); + + this.TempoAuthor() + }, + // 读取作者 + TempoAuthor() { + this.$api + .post('api/Article/getAuthors', { + 'article_id': this.stagingID + }) + .then((res) => { + if (res.code == 0) { + // 作者 + if (res.data.authors.length > 0) { + this.form.authorList = res.data.authors + this.activeNames = [] + for (let i = 0; i < this.form.authorList.length; i++) { + if (this.form.authorList[i].is_report == 1) { + this.form.authorList[i].isReport = true + } else { + this.form.authorList[i].isReport = false + } + if (this.form.authorList[i].is_super == 1) { + this.form.authorList[i].isSuper = true + } else { + this.form.authorList[i].isSuper = false + } + this.form.authorList[i].title = this.form.authorList[i].author_title + this.activeNames.push(i + 1) + } + } else { + this.form.authorList = [] + } + } else { + this.$message.error(res.msg); + } + }); + }, + + // 选择 chanSelt() { this.$forceUpdate() @@ -2399,6 +2840,47 @@ top: 0; } + .forWard { + line-height: 20px; + color: #333; + font-size: 14px; + padding: 10px 10px 0 10px; + background-color: #ffffff80; + border: 1px dashed #dae8f7; + margin-top: -10px; + margin-bottom: 20px; + } + + + .forWard>div { + border-bottom: 1px solid #dae8f7; + padding: 0 20px 10px 20px; + margin-bottom: 10px; + } + + + .forWard>div:nth-last-child(1) { + border-bottom: 0; + } + + + .forWard>div>p { + margin: 0 0 3px 0; + line-height: 22px; + color: #333; + } + + .forWard>div>p>font { + color: #777; + } + + .forWard .jiantouBiao { + cursor: pointer; + color: #006699; + margin-left: 10px; + font-size: 20px; + } + .jour_ku { font-size: 14px; float: left; @@ -2498,4 +2980,31 @@ word-break: break-word; text-align: left; } + + .partyAry {} + + .partyAry>div { + font-size: 14px; + /* width: 258px; */ + width: 96%; + display: inline-block; + padding: 5px 15px 10px 15px; + margin-bottom: 20px; + box-shadow: 0 0 8px #b7d2ed; + background-color: #ffffff80; + } + + /* .partyAry>div:nth-child(3n+2) { + margin-left: 20px; + margin-right: 20px; + } */ + + .partyAry>div>p { + margin: 0 0 3px 0; + line-height: 22px; + } + + .partyAry>div>p>font { + color: #777; + } \ No newline at end of file