This commit is contained in:
徐哼唧L
2023-06-07 09:22:26 +08:00
parent d20483d6e2
commit 186cc1b552
24 changed files with 3062 additions and 345 deletions

View File

@@ -246,7 +246,7 @@
<h3>
Upload Manuscript
</h3>
<el-form-item label="Cover letter :">
<el-form-item label="Cover letter :" label-width="200px">
<el-upload class="upload-demo up_newstyle" :action="upload_coverLetter"
accept=".pdf, .doc, .docx" name="coverLetter" :before-upload="beforeupload_coverLetter"
:on-error="uperr_coverLetter" :on-success="upSuccess_coverLetter" :limit="1"
@@ -260,7 +260,7 @@
</div>
</el-upload>
</el-form-item>
<el-form-item>
<el-form-item label-width="200px">
<span slot="label">
Figures
<el-popover placement="top-start" width="350" trigger="hover">
@@ -304,7 +304,7 @@
<div class="el-upload__tip" slot="tip">Only word files can be uploaded(.doc,.docx)</div>
</el-upload>
</el-form-item> -->
<el-form-item label="Manuscirpt :" prop="manuscirpt">
<el-form-item label="Manuscirpt :" prop="manuscirpt" label-width="200px">
<el-upload ref="uploadFile" class="upload-demo up_newstyle" :action="upload_manuscirpt"
accept=".docx" name="manuscirpt" :before-upload="beforeupload_manuscirpt"
:on-error="uperr_coverLetter" :on-success="upSuccess_manuscirpt" :limit="1"
@@ -319,6 +319,20 @@
</el-upload>
</a>
</el-form-item>
<el-form-item label="Supplementary Material :" label-width="200px">
<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"
:file-list="fileL_supplementary" :on-preview="dowloadFile">
<div class="el-upload__text">
<em>Upload</em>
</div>
<div class="el-upload__tip" slot="tip">
Only ZIP files can be uploaded (file formats: .zip).
</div>
</el-upload>
</el-form-item>
<div style="text-align: center;margin: 40px 0 0 0;">
<el-button type="primary" @click="onStep(3)" class="pro_ceed">Next Step</el-button>
</div>
@@ -493,7 +507,30 @@
misconduct policy.
</p>
<div style="margin:50px 0 30px 30px">
<div style="margin:50px 0 0 30px">
<el-form-item>
<span slot="label">
Invitation code
<el-popover placement="top-start" width="320" trigger="hover">
<p
style="line-height: 24px;word-wrap: break-word;word-break: normal;text-align: left;">
The journal encourages scientists to invite their colleagues or
collaborators to submit manuscripts in order to promote collaboration and
expand the journal's author network. You will be rewarded with credits that
can be used to offset APC (specific details subject to journal policies) and
gain priority in editorial board selection.
</p>
<i class="el-icon-info" slot="reference"
style="color: #ef8429;cursor: pointer;vertical-align: super;font-size: 20px;"></i>
</el-popover>
:
</span>
<el-input v-model="form.code" placeholder="Please enter invitation code"
style="width: 200px;"></el-input>
</el-form-item>
</div>
<div style="margin:20px 0 30px 30px">
<el-checkbox v-model="agreechecked" style="font-weight: bold;">I accept </el-checkbox>
<el-link @click="licensebox=true" type="primary"
style="padding-left: 5px;font-weight: bold;"> the license
@@ -615,7 +652,9 @@
coverLetter: '',
picturesAndTables: '',
totalpage: '',
manuscirpt: ''
manuscirpt: '',
supplementary: '',
code: ''
},
journal_type: [{
name: 'ARTICLE',
@@ -709,6 +748,7 @@
fileL_coverLetter: [],
fileL_picturesAndTables: [],
fileL_manuscirpt: [],
fileL_supplementary: [],
rules: {
journal: [{
required: true,
@@ -863,6 +903,9 @@
upload_manuscirpt: function() {
return this.baseUrl + 'api/Article/up_file/type/manuscirpt';
},
upload_supplementary: function() {
return this.baseUrl + 'api/Article/up_file/type/supplementary';
},
upload_qualifications: function() {
return this.baseUrl + 'api/Admin/up_file';
},
@@ -1355,6 +1398,23 @@
// }
// return ismau;
},
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;
}
// const ismau =
// file.type === 'application/msword' ||
// file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ||
// file.type === 'application/x-zip-compressed' ||
// file.name.split('.')[1] === 'rar';
// if (!ismau) {
// this.$message.error('Only word and compressed files(.doc,.docx,.rar,.zip)');
// }
// return ismau;
},
//文件上传成功后的操作
upSuccess_coverLetter(res, file) {
if (res.code == 0) {
@@ -1396,6 +1456,17 @@
this.$message.error('service error: ' + res.msg);
}
},
upSuccess_supplementary(res, file) {
if (res.code == 0) {
this.form.supplementary = 'supplementary/' + res.upurl;
this.fileL_supplementary = [{}]
this.fileL_supplementary[0].name = "Supplementary Material";
this.fileL_supplementary[0].url = 'supplementary/' + res.upurl;
this.onStaging(6)
} else {
this.$message.error('service error: ' + res.msg);
}
},
clearUploadedFile() {
this.$refs['uploadFile'].clearFiles();
},
@@ -1452,6 +1523,21 @@
}
});
},
removefilesupplementary() {
this.form.supplementary = '';
this.fileL_supplementary = [];
this.$api
.post('api/Article/delArticleFile', {
file_id: this.form.supplementaryId
})
.then((res) => {
if (res.code == 0) {
this.$message.success('Deletion succeeded!');
} else {
this.$message.error(res.msg);
}
});
},
getOpState(index) {
let a = this.activeNames.indexOf(index) > -1 ? 'Close' : 'Open';
},
@@ -1608,6 +1694,12 @@
this.fileL_manuscirpt[0].name = "Manuscirpt File";
this.fileL_manuscirpt[0].url = this.form.manuscirpt;
}
this.fileL_supplementary = [];
if (this.form.supplementary != '') {
this.fileL_supplementary = [{}];
this.fileL_supplementary[0].name = "Supplementary Material";
this.fileL_supplementary[0].url = this.form.supplementary;
}
},
// 点击进行下一步
@@ -1805,6 +1897,20 @@
this.$message.error(res.msg);
}
});
} else if (e == 6) {
this.$api
.post('api/Article/addArticlefile', {
article_id: this.form.article_id,
type: 'supplementary',
url: this.form.supplementary
})
.then((res) => {
if (res.code == 0) {
this.form.supplementaryId = res.data.file_id
} else {
this.$message.error(res.msg);
}
});
}
},
@@ -1901,6 +2007,10 @@
this.form.manuscirpt = res.data.files[i].file_url
this.form.manuscirptId = res.data.files[i].file_id
}
if (res.data.files[i].type_name == 'supplementary') {
this.form.supplementary = res.data.files[i].file_url
this.form.supplementaryId = res.data.files[i].file_id
}
}
this.showFiles()
}
@@ -2240,4 +2350,10 @@
.tuijian_f .el-form-item>.el-form-item__label:before {
content: "" !important;
}
.el-popover {
word-break: break-word;
text-align: left;
}
</style>