tijiao
This commit is contained in:
@@ -334,28 +334,127 @@
|
||||
<h2>
|
||||
Reviewer Decision
|
||||
</h2>
|
||||
<div v-for="(item,index) in reviewList" :name="index" :key="index" @click="goReviewerDetail(item)"
|
||||
class="art_author_list">
|
||||
<div
|
||||
class="fixCard reviewer_decision"
|
||||
style="position: relative"
|
||||
>
|
||||
|
||||
<!-- 时间轴 -->
|
||||
<div style="position: relative;width: 100%;padding-left: 10px; height: 48px;
|
||||
line-height: 48px;
|
||||
background-color: #FFF;
|
||||
color: #303133;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
font-size: 13px;
|
||||
font-weight: 500;">
|
||||
<b class="com_shu">{{index+1}}</b>
|
||||
Reviewer Comment
|
||||
<span style="color: #006699;font-weight: 700;margin-left: 10px">
|
||||
<div class="overflow-x-auto">
|
||||
<!-- 上面的表格代码放在这里 -->
|
||||
|
||||
<i class="el-icon-paperclip
|
||||
"></i>
|
||||
<table class="review_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<!-- 补充表头文本,原代码是空,建议加上 -->
|
||||
<th>1<sup>st</sup> review</th>
|
||||
<!-- 表头:按最大重复次数遍历,生成2nd、3rd...列 -->
|
||||
<template v-for="(_, index1) in maxRepeatReviewCount()">
|
||||
<th>{{ index1 + 2 }}<sup>nd</sup> review</th>
|
||||
</template>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 遍历每个评审者 -->
|
||||
<tr v-for="(iken, reviewerIndex) in reviewList">
|
||||
<td>Reviewer {{ reviewerIndex + 1 }}</td>
|
||||
<!-- 1st review:原逻辑不变 -->
|
||||
<td @click="handleClick(iken)" style="cursor: pointer;">
|
||||
<span style="display: inline-block; margin-left: 4px; margin-right: 8px">
|
||||
<font
|
||||
v-if="iken.state == 0"
|
||||
style="
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
display: block;
|
||||
border-radius: 10px;
|
||||
background-color: #ccc;
|
||||
"
|
||||
>
|
||||
</font>
|
||||
<font
|
||||
v-if="iken.state == 1 || iken.state == 3"
|
||||
style="
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
display: block;
|
||||
border-radius: 10px;
|
||||
background-color: #67c23a;
|
||||
"
|
||||
>
|
||||
</font>
|
||||
<font
|
||||
v-if="iken.state == 2"
|
||||
style="
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
display: block;
|
||||
border-radius: 10px;
|
||||
background-color: #f56c6c;
|
||||
"
|
||||
>
|
||||
</font>
|
||||
</span>
|
||||
|
||||
<span>{{ mystate(iken.state) }}</span>
|
||||
</td>
|
||||
<!-- 关键:按最大重复次数遍历,而非仅遍历当前iken.repeat -->
|
||||
<template v-for="(_1, index1) in maxRepeatReviewCount()">
|
||||
<td >
|
||||
<!-- 补全逻辑:判断当前评审者的repeat中是否有第index1条数据 -->
|
||||
<span v-if="Array.isArray(iken.repeat) && iken.repeat[index1]" style="cursor: pointer;" @click="handleClick(iken)">
|
||||
<span style="display: inline-block; margin-left: 4px; margin-right: 8px">
|
||||
<font
|
||||
v-if="iken.repeat[index1].recommend == 1"
|
||||
style="
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
display: block;
|
||||
border-radius: 10px;
|
||||
background-color: #67c23a;
|
||||
"
|
||||
>
|
||||
</font>
|
||||
<font
|
||||
v-if="iken.repeat[index1].recommend == 2"
|
||||
style="
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
display: block;
|
||||
border-radius: 10px;
|
||||
background-color: #f56c6c;
|
||||
"
|
||||
>
|
||||
</font>
|
||||
<font
|
||||
v-if="iken.repeat[index1].recommend == 3"
|
||||
style="
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
display: block;
|
||||
border-radius: 10px;
|
||||
background-color: #006699;
|
||||
"
|
||||
>
|
||||
</font>
|
||||
</span>
|
||||
<!-- 有数据:按原逻辑显示Accept/Reject等 -->
|
||||
<span v-if="iken.repeat[index1].recommend == 1">Accept</span>
|
||||
<span v-else-if="iken.repeat[index1].recommend == 2">Reject</span>
|
||||
<span v-else-if="iken.repeat[index1].recommend == 3">Revision</span>
|
||||
<span v-else>No reply</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
<!-- 无数据:补全空内容(可自定义为“-”“无”等) -->
|
||||
-
|
||||
</span>
|
||||
</td>
|
||||
</template>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -366,11 +465,11 @@
|
||||
<h2>
|
||||
Final Decision
|
||||
</h2>
|
||||
<el-collapse v-model="activeFinalComment" >
|
||||
<el-collapse v-model="activeFinalComment" style="background-color: #fff;">
|
||||
<el-collapse-item v-for="(item,index) in finalList" :name="index" :key="index"
|
||||
class="art_author_list">
|
||||
<template slot="title">
|
||||
<div style="position: relative;width: 100%;padding-left: 10px;">
|
||||
<div style="position: relative;width: 100%;">
|
||||
<b class="com_shu">{{index+1}}</b>
|
||||
Final Decision Comment
|
||||
<span style="color: #006699;font-weight: 700;margin-left: 20px">
|
||||
@@ -1110,6 +1209,32 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
maxRepeatReviewCount() {
|
||||
if (!this.reviewList || !Array.isArray(this.reviewList)) return null; // 边界处理:无数据返回null
|
||||
|
||||
// 遍历所有评审者,找到repeat数组长度最大的那条数据
|
||||
const maxItem = this.reviewList.reduce((maxItem, currentItem) => {
|
||||
// 计算当前项的repeat长度,非数组则视为0
|
||||
const currentLen = Array.isArray(currentItem.repeat) ? currentItem.repeat.length : 0;
|
||||
// 计算当前最大项的repeat长度,非数组则视为0
|
||||
const maxLen = Array.isArray(maxItem.repeat) ? maxItem.repeat.length : 0;
|
||||
|
||||
// 如果当前项长度更大,则更新最大项
|
||||
return currentLen > maxLen ? currentItem : maxItem;
|
||||
}, {}); // 初始值设为一个空对象
|
||||
// console.log('maxItem at line 2142:', maxItem.repeat.length)
|
||||
return maxItem && maxItem.repeat ? maxItem.repeat.length : 0;
|
||||
},
|
||||
handleClick(item){
|
||||
console.log('item at line 1228:', item)
|
||||
this.$router.push({
|
||||
path: 'articleReviewerDetail',
|
||||
query: {
|
||||
id: item.art_rev_id
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
goReviewerDetail(id){
|
||||
console.log('id at line 1112:', id)
|
||||
this.$router.push({
|
||||
@@ -1118,6 +1243,7 @@ export default {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
getFinalList(){
|
||||
|
||||
@@ -1130,7 +1256,7 @@ getFinalList(){
|
||||
if (res.status==1) {
|
||||
|
||||
if(res.status==1){
|
||||
this.finalList = res.data.final_review;
|
||||
this.finalList = [...res.data.final_review,];
|
||||
this.reviewList = res.data.review;
|
||||
}
|
||||
}
|
||||
@@ -2028,8 +2154,39 @@ getFinalList(){
|
||||
.art_author_coment>p>font,.commentfs>font {
|
||||
display: block;
|
||||
margin: 15px 0 5px 0;
|
||||
color: #006699;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
letter-spacing: -0.5px;
|
||||
}
|
||||
.review_table {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
/* margin-top: 10px; */
|
||||
border-collapse: collapse; /* 合并表格边框 */
|
||||
}
|
||||
|
||||
.review_table th,
|
||||
td {
|
||||
padding: 6px;
|
||||
min-width: 70px;
|
||||
border: 1px solid #ddd;
|
||||
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.review_table th {
|
||||
font-size: 14px;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
.review_table td {
|
||||
font-size: 14px;
|
||||
/* background-color: #f0f0f0; */
|
||||
}
|
||||
|
||||
.review_table tr:hover {
|
||||
/* background-color: #fff; */
|
||||
}
|
||||
.overflow-x-auto {
|
||||
overflow-x: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card" style="font-size: 15px;line-height: 24px;">
|
||||
<el-card class="box-card" style="font-size: 15px;line-height: 24px;" v-if="finalState==5">
|
||||
<el-row :gutter="20" class="trah_c">
|
||||
<el-col :span="1"><img src="../../assets/img/icon_8.png" alt="" class="icon_img"></el-col>
|
||||
|
||||
@@ -47,6 +47,46 @@
|
||||
<el-button type="danger" @click="saveRef()" style="width: 250px;">Decline final review</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card" style="font-size: 15px;line-height: 24px;" v-if="finalState==0">
|
||||
<el-row :gutter="20" class="trah_c">
|
||||
<el-col :span="1"><img src="../../assets/img/icon_8.png" alt="" class="icon_img"></el-col>
|
||||
|
||||
<el-col :span="22" >
|
||||
<p style="padding-left: 10px;">
|
||||
You have received the invitation for manuscript review.
|
||||
</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="text-align: center;margin-top: 12px;">
|
||||
<el-button type="success" @click="go()" style="margin-right: 20px;width: 250px;">Final decision
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card" style="font-size: 15px;line-height: 24px;" v-if="finalState==1||finalState==2||finalState==3">
|
||||
<el-row :gutter="20" class="trah_c">
|
||||
<el-col :span="1"><img src="../../assets/img/icon_8.png" alt="" class="icon_img"></el-col>
|
||||
|
||||
<el-col :span="22" >
|
||||
<p style="padding-left: 10px;">
|
||||
The article has been reviewed.
|
||||
</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
<el-card class="box-card" style="font-size: 15px;line-height: 24px;" v-if="finalState==4">
|
||||
<el-row :gutter="20" class="trah_c">
|
||||
<el-col :span="1"><img src="../../assets/img/icon_8.png" alt="" class="icon_img"></el-col>
|
||||
|
||||
<el-col :span="22" >
|
||||
<p style="padding-left: 10px;">
|
||||
You have declined the invitation to review the manuscript.
|
||||
</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,6 +96,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
finalState: '',
|
||||
loading: false,
|
||||
Direct_log: this.$route.query.act,
|
||||
record_id: this.$route.query.r_id,
|
||||
@@ -106,6 +147,9 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
go(){
|
||||
this.$router.push('/edit_per_text?Art_id=' + this.record_id);
|
||||
},
|
||||
getData() {
|
||||
|
||||
|
||||
@@ -113,9 +157,9 @@
|
||||
this.$api
|
||||
.post('api/Finalreview/getById', {
|
||||
'record_id': this.record_id,
|
||||
'record_id': 1,
|
||||
|
||||
'reviewer_id': localStorage.getItem('U_id'),
|
||||
'reviewer_id': 486,
|
||||
|
||||
|
||||
})
|
||||
.then(res => {
|
||||
@@ -123,12 +167,14 @@
|
||||
|
||||
|
||||
if(res.status==1){
|
||||
if(res.data.state==0){
|
||||
this.finalState = res.data.state;
|
||||
// if(res.data.state==0){
|
||||
this.$api
|
||||
.post('api/Finalreview/view', {
|
||||
'record_id': this.record_id,
|
||||
'reviewer_id': localStorage.getItem('U_id'),
|
||||
|
||||
|
||||
})
|
||||
.then(res => {
|
||||
|
||||
@@ -181,9 +227,10 @@
|
||||
.catch(err => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
}else{
|
||||
this.$router.push('/edit_per_text?Art_id=' + this.record_id);
|
||||
}
|
||||
// }
|
||||
// else{
|
||||
// this.$router.push('/edit_per_text?Art_id=' + this.record_id);
|
||||
// }
|
||||
}else{
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user