退审显示补充材料
This commit is contained in:
@@ -143,6 +143,22 @@
|
||||
</el-upload>
|
||||
</p>
|
||||
<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>
|
||||
<p>
|
||||
<el-upload class="upload-demo" :action="upload_picturesAndTables" accept=".rar, .zip"
|
||||
@@ -405,6 +421,7 @@
|
||||
manuscirpt: '',
|
||||
picturesAndTables: '',
|
||||
responseFile: '',
|
||||
supplementary:'', //
|
||||
articleId: this.$route.query.id,
|
||||
username: localStorage.getItem('U_name')
|
||||
},
|
||||
@@ -422,6 +439,7 @@
|
||||
totalpageFileList: [],
|
||||
manuscirptFileList: [],
|
||||
supplementaryFileList:[],
|
||||
fileL_supplementary:[]
|
||||
};
|
||||
},
|
||||
created: function() {
|
||||
@@ -441,6 +459,9 @@
|
||||
upload_picturesAndTables: function() {
|
||||
return this.baseUrl + 'api/Article/up_file/type/picturesAndTables';
|
||||
},
|
||||
upload_supplementary: function() {
|
||||
return this.baseUrl + 'api/Article/up_file/type/supplementary';
|
||||
},
|
||||
upload_manuscirpt: function() {
|
||||
return this.baseUrl + 'api/Article/up_file/type/manuscirpt';
|
||||
},
|
||||
@@ -587,6 +608,42 @@
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user