diff --git a/src/components/page/ReferenceEditor.vue b/src/components/page/ReferenceEditor.vue index c279c46..1150a5f 100644 --- a/src/components/page/ReferenceEditor.vue +++ b/src/components/page/ReferenceEditor.vue @@ -47,9 +47,11 @@ -
+
Upload
@@ -100,7 +102,7 @@

您可以点击 + 在这一行的后面再添加一行引用信息。

  • -

    您也可以全部放弃这些引用信息,重新导入一批引用信息。删除并重新导入

    +

    您也可以全部放弃这些引用信息,重新导入一批引用信息。删除并重新导入

  • @@ -110,8 +112,8 @@ @@ -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):1320–1320. 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):1320–1320. 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):1320–1320. 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):1320–1320. 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):1320–1320. 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):1320–1320. 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):1320–1320. 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):1320–1320. 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'; }, } }