退审显示补充材料

This commit is contained in:
@fawn-nine
2023-06-28 16:22:25 +08:00
parent fe127451a8
commit f162c29b92

View File

@@ -143,6 +143,22 @@
</el-upload> </el-upload>
</p> </p>
<br clear="both"> <br clear="both">
<h4>Supplementary Material :</h4>
<p>
<el-upload class="upload-demo up_newstyle" :action="upload_supplementary" accept=".zip"
name="supplementary" :before-upload="beforeupload_supplementary"
:on-error="uperr_coverLetter" :on-success="upSuccess_supplementary" :limit="1"
:on-exceed="alertlimit" :on-remove="removefilesupplementary"
>
<div class="el-upload__text" style="padding:8px 5px;">
<em>Click Upload</em>
</div>
<div class="el-upload__tip" slot="tip">
Only ZIP files can be uploaded (file formats: .zip).
</div>
</el-upload>
</p>
<br clear="both">
<h4>Figures :</h4> <h4>Figures :</h4>
<p> <p>
<el-upload class="upload-demo" :action="upload_picturesAndTables" accept=".rar, .zip" <el-upload class="upload-demo" :action="upload_picturesAndTables" accept=".rar, .zip"
@@ -405,6 +421,7 @@
manuscirpt: '', manuscirpt: '',
picturesAndTables: '', picturesAndTables: '',
responseFile: '', responseFile: '',
supplementary:'', //
articleId: this.$route.query.id, articleId: this.$route.query.id,
username: localStorage.getItem('U_name') username: localStorage.getItem('U_name')
}, },
@@ -422,6 +439,7 @@
totalpageFileList: [], totalpageFileList: [],
manuscirptFileList: [], manuscirptFileList: [],
supplementaryFileList:[], supplementaryFileList:[],
fileL_supplementary:[]
}; };
}, },
created: function() { created: function() {
@@ -441,6 +459,9 @@
upload_picturesAndTables: function() { upload_picturesAndTables: function() {
return this.baseUrl + 'api/Article/up_file/type/picturesAndTables'; return this.baseUrl + 'api/Article/up_file/type/picturesAndTables';
}, },
upload_supplementary: function() {
return this.baseUrl + 'api/Article/up_file/type/supplementary';
},
upload_manuscirpt: function() { upload_manuscirpt: function() {
return this.baseUrl + 'api/Article/up_file/type/manuscirpt'; return this.baseUrl + 'api/Article/up_file/type/manuscirpt';
}, },
@@ -587,6 +608,42 @@
this.msgform.ad_content = '' this.msgform.ad_content = ''
}); });
}, },
beforeupload_supplementary(file) {
let flieArr = file.name.split(".")
let fileSuffix = flieArr[flieArr.length - 1];
if (fileSuffix != 'zip') {
this.$message.error('Only zip files can be uploaded(.zip)');
return false;
}
},
upSuccess_supplementary(res, file) {
if (res.code == 0) {
this.fileMesForm.supplementary = 'supplementary/' + res.upurl;
this.fileL_supplementary = [{}]
this.fileL_supplementary[0].name = "Supplementary Material";
this.fileL_supplementary[0].url = 'supplementary/' + res.upurl;
} else {
this.$message.error('service error: ' + res.msg);
}
},
removefilesupplementary() {
this.fileMesForm.supplementary = '';
this.fileL_supplementary = [];
// this.$api
// .post('api/Article/delArticleFile', {
// file_id: this.fileMesForm.supplementaryId
// })
// .then((res) => {
// if (res.code == 0) {
// this.$message.success('Deletion succeeded!');
// } else {
// this.$message.error(res.msg);
// }
// });
},
// 上传文件 // 上传文件
onSubmit() { onSubmit() {