Files
tougao_web/src/components/page/articleEditorDetail.vue
2026-03-09 16:50:59 +08:00

681 lines
31 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<el-dialog destroy-on-close title="Final Decision Detail" :visible.sync="editVisible1" width="1200px" :close-on-click-modal="false">
<div>
<div class="crumbs">
<!-- <el-breadcrumb separator="/">
<el-breadcrumb-item> <i class="el-icon-lx-calendar"></i> Manuscript reviewer list </el-breadcrumb-item>
<el-breadcrumb-item>Manuscript reviewer detail</el-breadcrumb-item>
</el-breadcrumb> -->
</div>
<div class="container">
<el-row :gutter="24">
<el-col :span="24">
<div class="form-box" style="width: 100%">
<el-form ref="articleform" :model="detailDate" label-width="160px">
<el-form-item label="Article : ">
<span>{{ detailDate.article }}</span>
</el-form-item>
<el-form-item label="Final Decision : ">
<span>{{ detailDate.reviewer }}</span>
</el-form-item>
<el-form-item label="Final Decision Time : ">
<span>{{ detailDate.ctime }}</span>
</el-form-item>
<el-form-item label="Feedback : ">
<span v-if="detailDate.article_final">{{ mystate(detailDate.article_final.state) }}</span>
</el-form-item>
<el-form-item label="" v-if="detailDate.article_final">
<common-editor-article
type="questionform"
ref="commonEditor"
pagetype="Editor"
:form="detailDate.article_final"
:txt_mess="txt_mess"
:btn_submit="1"
:articleId="articleId"
:journal_id="journal_id"
></common-editor-article>
</el-form-item>
<!-- <el-form-item label="Article file">
<el-popover placement="right" width="350" trigger="click">
<el-table :data="articlefileList">
<el-table-column
width="150"
:formatter="filedateformate"
property="ctime"
align="center"
label="Date"
></el-table-column>
<el-table-column
width="100"
property="up_username"
align="center"
label="Uploader"
></el-table-column>
<el-table-column
width="100"
label="download"
align="center"
>
<template slot-scope="scope">
<el-link
type="primary"
icon="el-icon-download"
:href="getlinkurl(scope.row)"
></el-link>
</template>
</el-table-column>
</el-table>
<el-button
class="more_btn"
icon="el-icon-download"
type="text"
slot="reference"
>Download</el-button>
</el-popover>
<el-upload
class="upload-demo"
drag
:action="upload_file('articlefile')"
accept=".doc, .docx"
name="articlefile"
:before-upload="beforeupload_file"
:on-error="uperr_file"
:on-success="upSuccess_file"
:limit="1"
:on-exceed="alertlimit"
:on-remove="removefilearticlefile"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
<em>Upload</em>
</div>
<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="Others">
<el-popover placement="right" width="350" trigger="click">
<el-table :data="articlezipList">
<el-table-column
width="150"
:formatter="filedateformate"
property="ctime"
align="center"
label="Date"
></el-table-column>
<el-table-column
width="100"
property="up_username"
align="center"
label="Uploader"
></el-table-column>
<el-table-column
width="100"
label="Download"
align="center"
>
<template slot-scope="scope">
<el-link
type="primary"
icon="el-icon-download"
:href="getlinkurl(scope.row)"
></el-link>
</template>
</el-table-column>
</el-table>
<el-button
class="more_btn"
icon="el-icon-download"
type="text"
slot="reference"
>Download</el-button>
</el-popover>
<el-upload
class="upload-demo"
drag
:action="upload_file('articlezip')"
accept=".rar, .zip"
name="articlezip"
:before-upload="beforeupload_articlezip"
:on-error="uperr_file"
:on-success="upSuccess_articlezip"
:limit="1"
:on-exceed="alertlimit"
:on-remove="removefilearticlezip"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
<em>Upload</em>
</div>
<div
class="el-upload__tip"
slot="tip"
>Only compressed files can be uploaded(.rar,.zip)</div>
</el-upload>
</el-form-item> -->
<!-- <el-form-item>
<el-button type="primary" @click="onSubmit">submit</el-button>
</el-form-item> -->
</el-form>
</div>
</el-col>
<el-col :span="8" v-if="recordList && recordList.length > 0">
<div class="clearfix fsheader">
<h4>Final Decision Archive</h4>
</div>
<div class="time">
<el-timeline>
<el-timeline-item
reverse="true"
:timestamp="item.ctime | formatDatehms"
placement="top"
v-for="(item, index) in recordList"
:key="index"
>
<el-card>
<h4></h4>
<div>
<div v-if="index == recordList.length - 1">
<!-- 初审 -->
<el-tag>Under review</el-tag>
<p style="margin-top: 10px">
Comments:
<el-button
style="margin-left: 10px"
type="text"
@click="showUnderReview(item)"
icon="el-icon-view"
>Details</el-button
>
</p>
</div>
<div v-else>
<!-- 复审 -->
<el-tag type="success">Second review</el-tag>
<p style="margin-top: 10px">
Comments:
<el-button
style="margin-left: 10px"
type="text"
@click="showSecondReview(item)"
icon="el-icon-view"
>Details</el-button
>
</p>
<p v-if="item.stime > 0" style="" class="stime">
Response time: {{ item.stime | formatDatehms }}
</p>
<p v-else style="" class="stime">Response time: Re-reviewing...</p>
</div>
</div>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
<!-- <div class="tree_box">
<h2>State tracking</h2>
<div class="block">
<el-timeline>
<el-timeline-item
:timestamp="formatDate(form.ctime)"
placement="top"
>
<el-card>
<h4>Article submission</h4>
<p>{{form.username}} Submit articles</p>
</el-card>
</el-timeline-item>
<el-timeline-item
v-for="(activity, index) in msgs"
:key="index"
:timestamp="formatDate(activity.ctime)"
placement="top"
>
<el-card>
<p>state change :{{statetostr(activity.state_from)}} to {{statetostr(activity.state_to)}}</p>
<p>{{activity.content}}</p>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
</div>-->
</el-col>
</el-row>
</div>
<el-dialog title="Feedback questionnaire" :visible.sync="dialogFormVisible" width="900px" :close-on-click-modal="false">
<!-- 审稿人表单修改 -->
<common-review-article v-if="dialogFormVisible"
type="questionform"
pagetype="Editor"
:form="questionform"
:txt_mess="txt_mess"
:btn_submit="1"
:articleId="articleId"
:journal_id="journal_id"
></common-review-article>
</el-dialog>
<!-- 初审问卷 -->
<el-dialog title="Feedback questionnaire" :visible.sync="dialogFormVisible1" width="900px" @close="closeUnderDia" :close-on-click-modal="false">
<!-- 审稿人表单修改 -->
<common-review-article v-if="dialogFormVisible1"
type="undeQuestion"
pagetype="Editor"
:form="undeQuestion"
:txt_mess="txt_mess"
:btn_submit="1"
:articleId="articleId"
:journal_id="journal_id"
></common-review-article>
</el-dialog>
<!-- 复审问卷 -->
<el-dialog title="Second review questionnaire" :visible.sync="FdialogFormVisible" width="900px" @close="closeSecDia" :close-on-click-modal="false">
<el-form :model="ReReviewQuestion" ref="question" label-width="300px" label-position="top">
<el-divider content-position="center">REFEREE'S RECOMMENDATIONS</el-divider>
<el-form-item label="REFEREE'S RECOMMENDATIONS" prop="recommend">
<el-radio-group v-model="ReReviewQuestion.recommend" style="line-height: 30px">
<el-radio :label="1" :disabled="ReReviewQuestion.recommend != 1">Accept</el-radio>
<el-radio :label="2" :disabled="ReReviewQuestion.recommend != 2">Reject</el-radio>
<!-- 退修改 -->
<el-radio :label="3" :disabled="ReReviewQuestion.recommend != 3">Revison</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="Confidential Comments to the Editor" v-if="ReReviewQuestion.recommend == 3">
<el-input
readonly
type="textarea"
placeholder="please input content"
v-model="ReReviewQuestion.content"
:rows="8"
></el-input>
</el-form-item>
</el-form>
</el-dialog>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="editVisible1 = false">Cancel</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
dateId: {
type: Number,
default: 0
}
},
components: {
},
data() {
return {
editVisible1: false,
FdialogFormVisible: false,
FdialogFormVisible: false,
dialogFormVisible1: false,
recordList: [],
journal_id: null,
baseUrl: this.Common.baseUrl,
mediaUrl: this.Common.mediaUrl,
articleId: null,
username: localStorage.getItem('U_name'),
articlefileList: [],
articlezipList: [],
dialogFormVisible: false,
activeNames: ['1', '2', '3', '4', '5', '6', '7'],
detailDate: {
editor: localStorage.getItem('U_name'),
artrevid: '',
article: '',
reviewer: '',
articlefile: '',
articlezip: '',
ctime: '',
state: '',
article_final: {}
},
txt_mess: {},
questionform: {
rev_qu_id: '',
art_rev_id: this.$route.query.id,
qu1: '',
qu2: '',
qu3: '',
qu4: '',
qu5: '',
qu6: '',
qu7: '',
qu8: '',
qu9: '',
qu9contents: '',
qu10: '',
qu10contents: '',
qu11: '',
qu11contents: '',
qu12: '',
qu12contents: '',
qu13: '',
qu13contents: '',
qu14: '',
qu14contents: '',
qu15: '',
qu15contents: '',
rated: '',
recommend: '',
other: '',
confident: '',
comment: ''
},
canRepeat: null,
undeQuestion: {},
ReReviewQuestion: {}
};
},
created: function () {
// this.dateId = this.$route.query.id
// this.init()
// this.getHistoryList();
},
computed: {},
methods: {
init() {
this.getDate();
},
// 显示复审对话框
showSecondReview(item) {
this.FdialogFormVisible = true;
this.ReReviewQuestion = item;
},
// 显示初审对话框
showUnderReview(item) {
this.dialogFormVisible1 = true;
this.undeQuestion = { ...item };
this.undeQuestion.qu9 = item.qu9 == 0 ? false : true;
this.undeQuestion.qu9contents = item.qu9_contents;
this.undeQuestion.qu10 = item.qu10 == 0 ? false : true;
this.undeQuestion.qu10contents = item.qu10_contents;
this.undeQuestion.qu11 = item.qu11 == 0 ? false : true;
this.undeQuestion.qu11contents = item.qu11_contents;
this.undeQuestion.qu12 = item.qu12 == 0 ? false : true;
this.undeQuestion.qu12contents = item.qu12_contents;
this.undeQuestion.qu13 = item.qu13 == 0 ? false : true;
this.undeQuestion.qu13contents = item.qu13_contents;
this.undeQuestion.qu14 = item.qu14 == 0 ? false : true;
this.undeQuestion.qu14contents = item.qu14_contents;
this.undeQuestion.qu15 = item.qu15 == 0 ? false : true;
this.undeQuestion.qu15contents = item.qu15_contents;
this.undeQuestion.confident = item.confidential;
this.undeQuestion.comment = item.comments;
},
// 关闭初审对话框
closeUnderDia() {
this.dialogFormVisible1 = false;
this.undeQuestion = {};
},
closeSecDia() {
this.FdialogFormVisible = false;
this.ReReviewQuestion = {};
},
// 获取历史审稿列表
getHistoryList() {
this.loading = true;
this.$api
.post('api/Reviewer/getReviewerRepeatDetail', {
art_rev_id: this.$route.query.id
})
.then((res) => {
this.loading = false;
if (res.code == 0) {
if (res.data.art_rev_info.question && res.data.art_rev_info.question[0] != null) {
this.recordList = res.data.art_rev_info.question.reverse();
}
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
this.loading = false;
console.log(err);
});
},
upload_file(type) {
return this.baseUrl + 'api/reviewer/up_file/type/' + type;
},
onSubmit() {
if (this.detailDate.articlefile == '') {
this.$message.error('you must upload article file');
console.log('file up error');
return false;
}
this.$api
.post('api/Reviewer/articleReviewerUpSubmit/type/editor', this.detailDate)
.then((res) => {
if (res.code == 0) {
this.$message.success('success');
this.$router.go(0);
} else {
this.$message.error('Failed to submit, please contact administrator!');
console.log(res.msg);
}
})
.catch((err) => {
console.log(err);
});
},
//初始化详情信息
getDate() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)',
zIndex: 9999 // 设置一个足够高的层级
});
this.$api
.post('api/Finalreview/view', {
record_id: this.dateId
// reviewer_id: this.$route.query.reviewer_id
})
.then((res) => {loading.close();
this.detailDate.artrevid = res.art_rev_id;
this.detailDate.article = res.data.article.title;
this.detailDate.reviewer = res.data.article_final.realname;
this.detailDate.ctime = res.data.article_final.update_time;
this.detailDate.article_final = res.data.article_final;
this.detailDate.state = res.state;
this.txt_mess = res;
this.canRepeat = res.can_repeat;
this.journal_id = res.journal_id;
this.articleId = res.data.article.article_id;
this.editVisible1 = true;
this.$nextTick(() => {
this.$refs.commonEditor.getData();
});
this.$forceUpdate();
})
.catch((err) => {
console.log(err);
});
},
//初始化filelist
initFileList() {
this.$api
.post('api/Reviewer/getFilelistByID', {
revid: this.dateId
})
.then((res) => {
this.articlefileList = res.hasOwnProperty('articlefile') ? res.articlefile : [];
this.articlezipList = res.hasOwnProperty('articlezip') ? res.articlezip : [];
})
.catch((err) => {
console.log(err);
});
},
//初始化问卷
initquesion() {
this.$api
.post('api/Reviewer/getQuestion', {
artrevid: this.dateId
})
.then((res) => {
if (res.code == 0) {
this.questionform = res.data;
this.questionform.rev_qu_id = res.data.rev_qu_id;
this.questionform.qu1 = res.data.qu1;
this.questionform.qu2 = res.data.qu2;
this.questionform.qu3 = res.data.qu3;
this.questionform.qu4 = res.data.qu4;
this.questionform.qu5 = res.data.qu5;
this.questionform.qu6 = res.data.qu6;
this.questionform.qu7 = res.data.qu7;
this.questionform.qu8 = res.data.qu8;
this.questionform.qu9 = res.data.qu9 == 0 ? false : true;
this.questionform.qu9contents = res.data.qu9_contents;
this.questionform.qu10 = res.data.qu10 == 0 ? false : true;
this.questionform.qu10contents = res.data.qu10_contents;
this.questionform.qu11 = res.data.qu11 == 0 ? false : true;
this.questionform.qu11contents = res.data.qu11_contents;
this.questionform.qu12 = res.data.qu12 == 0 ? false : true;
this.questionform.qu12contents = res.data.qu12_contents;
this.questionform.qu13 = res.data.qu13 == 0 ? false : true;
this.questionform.qu13contents = res.data.qu13_contents;
this.questionform.qu14 = res.data.qu14 == 0 ? false : true;
this.questionform.qu14contents = res.data.qu14_contents;
this.questionform.qu15 = res.data.qu15 == 0 ? false : true;
this.questionform.qu15contents = res.data.qu15_contents;
this.questionform.rated = res.data.rated;
this.questionform.recommend = res.data.recommend;
this.questionform.other = res.data.other;
this.questionform.confident = res.data.confidential;
this.questionform.comment = res.data.comments;
this.questionform.is_anonymous = res.data.is_anonymous;
this.questionform.type = res.data.type;
this.questionform.score = res.data.score;
}
});
},
//检验上传文件的格式
beforeupload_file(file) {
// const isWORd =
// file.type === 'application/msword' ||
// file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
// if (!isWORd) {
// this.$message.error('Only word files can be uploaded(.doc,.docx)');
// }
// return isWORd;
},
beforeupload_articlezip(file) {
// const iszip = file.type === 'application/x-zip-compressed' || file.name.split('.')[1] === 'rar';
// if (!iszip) {
// this.$message.error('Only compressed files can be uploaded(.rar,.zip)');
// }
// return iszip;
},
getlinkurl(row) {
return this.mediaUrl + row.file_url;
},
filedateformate(row, column, cellValue, index) {
return this.formatDate(cellValue);
},
uperr_file(err) {
this.$message.error('上传失败');
},
beforeupload() {},
upSuccess_file(res, file) {
if (res.code == 0) {
this.detailDate.articlefile = 'articlefile/' + res.upurl;
} else {
this.$message.error('服务器上传错误:' + res.msg);
}
},
upSuccess_articlezip(res, file) {
if (res.code == 0) {
this.detailDate.articlezip = 'articlezip/' + res.upurl;
} else {
this.$message.error('服务器上传错误:' + res.msg);
}
},
formatDate(timestamp) {
var date = new Date(timestamp * 1000); //时间戳为10位需*1000时间戳为13位的话不需乘1000
var Y = date.getFullYear() + '-';
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return Y + M + D + ' ' + h + ':' + m + ':' + s;
},
//超出传送文件个数限制
alertlimit() {
this.$message.error('超过最大上传文件个数');
},
//清除文件时的事件
removefilearticlefile(file, fileList) {
this.detailDate.articlefile = '';
},
removefilearticlezip(file, fileList) {
this.detailDate.articlezip = '';
},
mystate(mystate) {
let str = '';
switch (mystate) {
case 1:
str = 'Accept';
break;
case 2:
str = 'Reject';
break;
case 3:
// str = 'Accept';
str = 'Revision';
break;
}
return str;
}
}
};
</script>
<style scoped>
.fsheader {
margin-bottom: 15px;
}
.dwnbtn {
margin-bottom: 5px;
}
.container {
min-width: 1000px;
}
.tree_box {
padding: 15px 10px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
::v-deep .el-dialog__body {
padding: 10px 20px 20px !important;
}
</style>