This commit is contained in:
@fawn-nine
2023-06-12 18:07:36 +08:00
parent 45d06d5960
commit fa8a3caf9a
2 changed files with 151 additions and 97 deletions

View File

@@ -10,7 +10,7 @@
<el-row :gutter="20">
<!-- 教程 -->
<el-col >
<div class="flexbox whoDo mt20">
<div class=" whoDo mt20">
<div>
<h2>What should I do
<el-tooltip class="item" effect="light" content="click for more help" placement="right">
@@ -30,7 +30,7 @@
placeholder="Put your reference entry here"
v-model="textarea">
</el-input>
<el-button class="mt10" icon="el-icon-check" type="primary" size="mini" @click="importText">Import</el-button>
<el-button class="mt10" icon="el-icon-check" type="primary" size="mini" @click="importText()">Import</el-button>
</div>
</div>
</li>
@@ -39,13 +39,13 @@
<div class="mt20">
<h4>Add in bulk by uploading excel files</h4>
<p class="mt10 c666">Before uploading the file, you need to download the template file,
<el-link @click="" class="downloadbtn" type="primary" >click download</el-link>
<a href="https://submission.tmrjournals.com/public/coverLetter/system/refer.xlsx" download="refer" target="_blank" class="downloadbtn" >click download</a>
,to add your references to the template file, and upload it. &nbsp;&nbsp;&nbsp;
<el-button class="inlinebutton" type="primary" plain size="mini" @click="showUpload">upload</el-button></p>
<div v-if="uploadVisible">
<div class="uploadBox">
<el-upload ref="uploadFile" class="upload-demo up_newstyle" :action="upload_manuscirpt"
accept=".xls, .xlsx" name="manuscirpt" :before-upload="beforeupload_manuscirpt"
accept=".xlsx" name="referFile" :before-upload="beforeupload_manuscirpt"
:on-error="uperr_coverLetter" :on-success="upSuccess_manuscirpt" :limit="1"
:on-exceed="alertlimit"
:on-remove="removefilemanuscirpt"
@@ -56,7 +56,6 @@
</div>
</el-upload>
</div>
<el-button v-if="fileL_manuscirpt.length > 0" class="mt10" icon="el-icon-check" type="primary" size="mini">Import</el-button>
</div>
</div>
</li>
@@ -64,19 +63,6 @@
</div>
</div>
</el-col>
<!-- 辅助信息 -->
<!-- <el-col >
<div class="flexbox helpcontent mt20">
<span class="el-icon-info"></span>
<div>
<h4>Any questions/Help</h4>
<p class="mt20">If you do not understand the operation items on this page or need help, you can find us in the following ways:</p>
<p class="mt20">- Way one</p>
<p class="mt10">- Way two</p>
<p class="mt10">- Way three</p>
</div>
</div>
</el-col> -->
</el-row>
</div>
<!-- 有引用数据-->
@@ -87,9 +73,9 @@
<ul class="mt20">
<li>
<p>需要您调整一下引用条目
<el-button class="status" icon="el-icon-warning-outline" type="warning" plain circle></el-button>
<span class="status warn float" ><i class="el-icon-warning-outline"></i></span>
状态的引用信息调整到
<el-button class="status" icon="el-icon-circle-check" type="success" plain circle></el-button>
<span class="status ok float" ><i class="el-icon-warning-outline"></i></span>
的状态</p>
</li>
<li>
@@ -110,24 +96,30 @@
<el-table :data="tableData" ref="multipleTable"
empty-text="New messages (0)" :show-header="false" :stripe="false" :highlight-current-row="false">
<!-- <el-table-column type="index" label="No." width="55" align="center"></el-table-column> -->
<el-table-column label="status" prop="status" width="55" align="center">
<el-table-column label="state" width="55" align="center">
<template slot-scope="scope">
<el-button autofocus='true' class="status" icon="el-icon-circle-check" v-if="scope.row.status == 1" type="success" plain circle></el-button>
<el-button autofocus='true' class="status" icon="el-icon-warning-outline" v-if="scope.row.status == 0" type="warning" plain circle></el-button>
<span class="status warn" v-if="scope.row.refer_doi == ''" >
<i class="el-icon-warning-outline"></i>
</span>
<span class="status ok" v-else >
<i class="el-icon-circle-check"></i>
</span>
</template>
</el-table-column>
<el-table-column prop="title" label="Title" align="left">
<el-table-column label="Title" align="left">
<template slot-scope="scope">
<p style="text-align: left;">
<!-- <el-badge is-dot :hidden="scope.row.author_act==1?false:true" class="item"> -->
{{scope.row.title}}
<!-- </el-badge> -->
<p style="text-align: left;" v-if="scope.row.refer_doi == ''">
{{scope.row.refer_content}}
</p>
<p style="text-align: left;" v-else>
{{scope.row.refer_doi}}
</p>
</template>
</el-table-column>
<el-table-column align="center" width="360">
<div slot-scope="scope">
<el-button style="margin-left:10px;" @click="change(scope.row)" plain type="primary" size="mini" icon="el-icon-edit">change</el-button>
<el-button v-if="scope.row.refer_doi == ''" style="margin-left:10px;" @click="change(scope.row)" plain type="warning" size="mini" icon="el-icon-edit" >edit</el-button>
<el-button v-else style="margin-left:10px;" @click="change(scope.row)" plain type="primary" size="mini" icon="el-icon-edit">change</el-button>
<el-tooltip popper-class="tps" class="item" effect="light" content="Add one under this line" placement="top">
<el-button type="primary" size="mini" plain>+</el-button>
</el-tooltip>
@@ -138,9 +130,7 @@
</el-table-column>
</el-table>
</div>
</div>
</div>
<!-- 修改引用 -->
<el-dialog title="Add References" :visible.sync="editboxVisible" width="500px">
@@ -166,6 +156,31 @@
<el-button @click="helpVisible = false" type="primary">OK</el-button>
</span>
</el-dialog>
<!-- 临时引用信息 -->
<el-dialog title="Reference List" :visible.sync="linVisible" width="800px">
<div class="refenceCentent mt20" v-if="Tempredable.length > 0">
<el-table :data="Tempredable" ref="tempredableTable"
empty-text="New messages (0)" :show-header="false" :stripe="false" :highlight-current-row="false">
<el-table-column type="index" label="No." width="55" align="center"></el-table-column>
<el-table-column label="Title" align="left">
<template slot-scope="scope">
<p style="text-align: left;">
<!-- <el-badge is-dot :hidden="scope.row.author_act==1?false:true" class="item"> -->
{{scope.row.content}}<br/><el-link type="primary">{{scope.row.doi}}</el-link>
<!-- </el-badge> -->
</p>
</template>
</el-table-column>
</el-table>
<div class="shuoming mt20">
<p class="c888"><i class="el-icon-message-solid"></i>&nbsp;&nbsp;The above is the citation data identified according to your uploaded file, you can choose to import, or discard this data and import again.</p>
</div>
</div>
<span slot="footer" class="dialog-footer" >
<el-button @click="abandon">Abandon and Reimport</el-button>
<el-button type="primary" @click="importText">Import</el-button>
</span>
</el-dialog>
</div>
</template>
@@ -178,29 +193,19 @@
baseUrl: this.Common.baseUrl,
// 引用数据列表
tableData:[
// { id:'01',
// status:0,
// title: `Zhang Y, Ren L, Min S, Lv F, Yu J. Effects of N-Methyl-D-aspartate receptor (NMDAR) and Ca2+/calmodulin-dependent protein kinase IIα (CaMKIIα) on learning and memory impairment in depressed rats with different charge by modified electroconvulsive shock. Ann Transl Med 2021;9(16):13201320. Availa`},
// { id:'02',
// status:1,
// title: `Zhang Y, Ren L, Min S, Lv F, Yu J. Effects of N-Methyl-D-aspartate receptor (NMDAR) and Ca2+/calmodulin-dependent protein kinase IIα (CaMKIIα) on learning and memory impairment in depressed rats with different charge by modified electroconvulsive shock. Ann Transl Med 2021;9(16):13201320. Availa`},
// { id:'01',
// status:0,
// title: `Zhang Y, Ren L, Min S, Lv F, Yu J. Effects of N-Methyl-D-aspartate receptor (NMDAR) and Ca2+/calmodulin-dependent protein kinase IIα (CaMKIIα) on learning and memory impairment in depressed rats with different charge by modified electroconvulsive shock. Ann Transl Med 2021;9(16):13201320. Availa`},
// { id:'02',
// status:0,
// title: `Zhang Y, Ren L, Min S, Lv F, Yu J. Effects of N-Methyl-D-aspartate receptor (NMDAR) and Ca2+/calmodulin-dependent protein kinase IIα (CaMKIIα) on learning and memory impairment in depressed rats with different charge by modified electroconvulsive shock. Ann Transl Med 2021;9(16):13201320. Availa`
// }
],
// 临时引用列表
Tempredable:[
],
editboxVisible:false,
helpVisible:false,
uploadVisible:false,
linVisible:false,
textarea:'',
textareaVisible:false,
fileL_manuscirpt: [],
form: {
manuscirpt: '',
referFile: '',
},
// 引用表单
refenceForm:{
@@ -213,7 +218,31 @@
}
}
},
created(){
this.getRefData()
},
methods:{
// 获取引用文献信息
getRefData(){
this.$api
.post('api/Preaccept/getArticleReferences',{'article_id': this.$route.query.id})
.then(res => {
console.log(res)
if(res.code == 0 && res.data.refers.length > 0){
this.tableData = res.data.refers
}
})
.catch(err => {
console.log(err);
});
},
// 放弃导入数据
abandon(){
this.form.referFile = '';
this.fileL_manuscirpt = [];
this.linVisible = false;
this.Tempredable = []
},
// 显示帮助信息
showHelp(){
this.helpVisible = true
@@ -221,10 +250,27 @@
// 导入文本域
importText(){
this.importIoading = true
setTimeout(()=>{
//console.log(this.form.referFile,'referFile')
this.$api
.post('api/Preaccept/addRefersByExcel', {
'article_id' :this.$route.query.id,
'referFile' : this.form.referFile
})
.then(res => {
if (res.code == 0) {
this.$message.success('Import succeeded')
this.linVisible = false
this.Tempredable = []
this.importIoading = false
this.$message.success('Import successful!')
},3000)
// 有可以可用的文献数据,刷新当前页面
// location.reload() // 刷新本页面
this.getRefData()
}
})
.catch(err => {
console.log(err);
});
},
// 文本域添加
addText(){
@@ -246,13 +292,12 @@
},
beforeupload_manuscirpt(file) {
let flieArr = file.name.split(".")
let fileSuffix = flieArr[flieArr.length - 1];
console.log(fileSuffix)
console.log(this.upload_manuscirpt,'upload_manuscirpt')
// return false
if (fileSuffix != 'xls' && fileSuffix != 'xlsx') {
this.$message.error('Only excel and compressed files can be uploaded(.xls, .xlsx)');
if (fileSuffix != 'xlsx') {
this.$message.error('Only excel and compressed files can be uploaded(.xlsx)');
return false;
}
// const ismau =
@@ -270,11 +315,14 @@
},
upSuccess_manuscirpt(res, file) {
if (res.code == 0) {
this.form.manuscirpt = 'manuscirpt/' + res.upurl;
this.form.referFile = res.upurl;
this.fileL_manuscirpt = [{}];
this.fileL_manuscirpt[0].name = "Manuscirpt File";
this.fileL_manuscirpt[0].url = 'manuscirpt/' + res.upurl;
// this.onStaging(5)
this.fileL_manuscirpt[0].name = "referFile";
this.fileL_manuscirpt[0].url = res.upurl;
if(res.refers.length > 0){
this.Tempredable = res.refers
this.linVisible = true
}
} else {
this.$message.error('service error: ' + res.msg);
}
@@ -284,7 +332,7 @@
this.$message.error('The maximum number of uploaded files has been exceeded');
},
removefilemanuscirpt(file, fileList) {
this.form.manuscirpt = '';
this.form.referFile = '';
this.fileL_manuscirpt = [];
this.$message.success('Deletion succeeded!');
// this.$api
@@ -334,12 +382,16 @@
</script>
<style scoped>
.status{border: none;}
.shuoming{font-size: 14px; line-height: 26px; }
.shuoming i{color: #F5BF6D;}
.status{ display: block; width: 40px; height: 40px; border-radius: 40px; font-size: 22px; line-height: 40px; color: #fff; text-align: center;}
.status.ok{background: #67c23a;}
.status.warn{background: #e6a23c;}
.status.float{display: inline-block;}
.topInfo{padding: 20px; }
.topInfo ul{padding-left: 30px;}
.topInfo ul li{margin-top: 10px;}
.downloadbtn{font-weight: bold;}
.downloadbtn{font-weight: bold; color: #409EFF !important;}
.uploadBox{width: 400px;}
.el-upload__text{width: 80px; height: 80px; text-align: center; line-height: 80px;}
.help{font-size: 18px; color: #F5BF6D; cursor: pointer;}
@@ -360,6 +412,7 @@
.helpcontent{color: #888; margin-top: 150px;}
.helpcontent p{color: inherit; font-size: 12px;}
.c666{color: #666;}
.c888{color: #888;}
/deep/ .el-table tr:nth-child(2n){
background: #fff;

View File

@@ -446,7 +446,8 @@
this.$router.push({
path: 'PreIngested',
query: {
id: id
// id: id
id: 3070
}
});
},