This commit is contained in:
@fawn-nine
2023-06-12 11:18:53 +08:00
parent de67e6e742
commit 45d06d5960

View File

@@ -47,9 +47,11 @@
<el-upload ref="uploadFile" class="upload-demo up_newstyle" :action="upload_manuscirpt"
accept=".xls, .xlsx" name="manuscirpt" :before-upload="beforeupload_manuscirpt"
:on-error="uperr_coverLetter" :on-success="upSuccess_manuscirpt" :limit="1"
:on-exceed="alertlimit" :on-remove="removefilemanuscirpt" :file-list="fileL_manuscirpt"
:on-exceed="alertlimit"
:on-remove="removefilemanuscirpt"
:file-list="fileL_manuscirpt"
>
<div v-show="fileL_manuscirpt.length <= 0" class="el-upload__text" @click="clearUploadedFile">
<div class="el-upload__text" @click="clearUploadedFile">
<em>Upload</em>
</div>
</el-upload>
@@ -100,7 +102,7 @@
<p>您可以点击 <el-button type="primary" size="mini" plain>+</el-button> 在这一行的后面再添加一行引用信息</p>
</li>
<li>
<p>您也可以全部放弃这些引用信息重新导入一批引用信息<el-link type="primary">删除并重新导入</el-link></p>
<p>您也可以全部放弃这些引用信息重新导入一批引用信息<el-link type="primary" @click="removeAll">删除并重新导入</el-link></p>
</li>
</ul>
</div>
@@ -110,8 +112,8 @@
<!-- <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">
<template slot-scope="scope">
<el-button class="status" icon="el-icon-circle-check" v-if="scope.row.status == 1" type="success" plain circle></el-button>
<el-button class="status" icon="el-icon-warning-outline" v-if="scope.row.status == 0" type="warning" plain circle></el-button>
<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>
</template>
</el-table-column>
<el-table-column prop="title" label="Title" align="left">
@@ -176,19 +178,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`
}
// { 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`
// }
],
editboxVisible:false,
@@ -244,8 +246,12 @@
},
beforeupload_manuscirpt(file) {
let flieArr = file.name.split(".")
let fileSuffix = flieArr[flieArr.length - 1];
if (fileSuffix != 'docx') {
console.log(fileSuffix)
// return false
if (fileSuffix != 'xls' && fileSuffix != 'xlsx') {
this.$message.error('Only excel and compressed files can be uploaded(.xls, .xlsx)');
return false;
}
@@ -296,10 +302,32 @@
clearUploadedFile() {
this.$refs['uploadFile'].clearFiles();
},
// 清空引用文献
removeAll(){
this.$api
.post('api/Preaccept/discardRefers', {
'article_id': this.$route.query.id
})
.then(res => {
if (res.code == 0) {
this.$message.success('success')
setTimeout(()=>{
location.reload() // 刷新本页面
},2000)
} else {
this.$message.error(res.msg);
}
})
.catch(err => {
this.$message.error(err);
});
},
},
computed: {
upload_manuscirpt: function() {
return this.baseUrl + 'api/Article/up_file/type/manuscirpt';
// return this.baseUrl + 'api/Article/up_file/type/manuscirpt';
return this.baseUrl + 'api/Preaccept/up_refer_file';
},
}
}