tijiao
This commit is contained in:
@@ -1,24 +1,27 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="crumbs">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-page-header @back="goBack" content="Add manuscript reviewer">
|
||||
</el-page-header>
|
||||
<!-- <el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item> <i class="el-icon-lx-calendar"></i> Add manuscript reviewer</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</el-breadcrumb> -->
|
||||
</div>
|
||||
<div
|
||||
class="container"
|
||||
class="container" style="padding: 20px;"
|
||||
v-loading="loading"
|
||||
element-loading-text="Loading..."
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(255, 255, 255, 0.8)"
|
||||
|
||||
>
|
||||
>
|
||||
<span
|
||||
style="float: right; display: flex; align-items: center; color: #6843ff; font-weight: bold"
|
||||
@click="isSelectAI = !isSelectAI"
|
||||
> <el-checkbox v-model="isSelectAI"></el-checkbox><img src="@/assets/img/ai.png" style="width: 30px; height: 30px; margin-left: 10px" /> </span
|
||||
>
|
||||
|
||||
<el-checkbox v-model="isSelectAI"></el-checkbox
|
||||
><img src="@/assets/img/ai.png" style="width: 30px; height: 30px; margin-left: 10px" />
|
||||
</span>
|
||||
|
||||
<!-- <el-select v-model="messform.major_a" placeholder="Please select major" @change="majorChange(1)"
|
||||
style="width: 200px;margin: 0 10px 0 0;">
|
||||
<el-option :key="0" label="All major" :value="0"></el-option>
|
||||
@@ -38,33 +41,32 @@
|
||||
<el-option v-for="item in majors_c" :key="item.major_id" :label="item.major_title"
|
||||
:value="item.major_id"></el-option>
|
||||
</el-select> -->
|
||||
|
||||
|
||||
|
||||
<div v-if="!isSelectAI"><span style="font-size: 14px; color: #606266; margin: 0 10px 0 0">Research direction :</span>
|
||||
<div v-if="!isSelectAI">
|
||||
<span style="font-size: 14px; color: #606266; margin: 0 10px 0 0">Research direction :</span>
|
||||
<el-cascader
|
||||
placeholder="Please select major"
|
||||
v-model="selectFileds"
|
||||
style="width: 300px; margin-right: 10px"
|
||||
@change="fieldChange"
|
||||
:options="allFileds"
|
||||
:props="fieldsProps"
|
||||
collapse-tags
|
||||
clearable
|
||||
></el-cascader>
|
||||
<el-input
|
||||
v-model="messform.email"
|
||||
clearable
|
||||
placeholder="Please enter email"
|
||||
style="width: 190px; display: inline-block; margin: 0 10px 20px 0"
|
||||
></el-input>
|
||||
<el-input
|
||||
v-model="messform.field"
|
||||
clearable
|
||||
placeholder="Please enter field"
|
||||
style="width: 190px; display: inline-block; margin: 0 10px 20px 0"
|
||||
></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">Search</el-button>
|
||||
placeholder="Please select major"
|
||||
v-model="selectFileds"
|
||||
style="width: 300px; margin-right: 10px"
|
||||
@change="fieldChange"
|
||||
:options="allFileds"
|
||||
:props="fieldsProps"
|
||||
collapse-tags
|
||||
clearable
|
||||
></el-cascader>
|
||||
<el-input
|
||||
v-model="messform.email"
|
||||
clearable
|
||||
placeholder="Please enter email"
|
||||
style="width: 190px; display: inline-block; margin: 0 10px 20px 0"
|
||||
></el-input>
|
||||
<el-input
|
||||
v-model="messform.field"
|
||||
clearable
|
||||
placeholder="Please enter field"
|
||||
style="width: 190px; display: inline-block; margin: 0 10px 20px 0"
|
||||
></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">Search</el-button>
|
||||
<el-table
|
||||
:data="revTable"
|
||||
border
|
||||
@@ -74,10 +76,21 @@
|
||||
header-cell-class-name="table-header"
|
||||
empty-text="New messages (0)"
|
||||
>
|
||||
<el-table-column width="300" label="Base Information">
|
||||
<el-table-column width="360" label="Base Information">
|
||||
<template slot-scope="scope">
|
||||
<p class="tab_tie_col">
|
||||
<span>Realname: </span><b style="font-size: 14px">{{ scope.row.realname }}</b>
|
||||
|
||||
<el-button
|
||||
|
||||
size="mini"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-tickets"
|
||||
@click="openDetail(scope.row)"
|
||||
style="margin-left: 10px;padding:4px;float: right;"
|
||||
>Detail</el-button
|
||||
>
|
||||
</p>
|
||||
<p class="tab_tie_col"><span>Account: </span>{{ scope.row.account }}</p>
|
||||
<p class="tab_tie_col"><span>Email: </span>{{ scope.row.email }}</p>
|
||||
@@ -87,7 +100,17 @@
|
||||
<template slot-scope="scope">
|
||||
<p class="tab_tie_col" v-if="scope.row.company != ''"><span>Affiliation: </span>{{ scope.row.company }}</p>
|
||||
<p class="tab_tie_col" v-if="scope.row.field != ''"><span>Field: </span>{{ scope.row.field }}</p>
|
||||
<p class="tab_tie_col" v-if="scope.row.majorstr != ''"><span>Major: </span>{{ scope.row.majorstr }}</p>
|
||||
<!-- <p class="tab_tie_col" v-if="scope.row.majorstr != ''"><span>Major: </span>{{ scope.row.majorstr }}</p> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Research areas" width="300">
|
||||
<template slot-scope="scope">
|
||||
<commonMajorTableList
|
||||
:user_id="scope.row.reviewer_id"
|
||||
:baseInfo="scope.row"
|
||||
:key="scope.row.reviewer_id"
|
||||
:disabled="true"
|
||||
></commonMajorTableList>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rs_num" label="Reviewed Times" width="160">
|
||||
@@ -96,15 +119,22 @@
|
||||
<font style="margin-left: 5px">(Reviewing:{{ scope.row.now }})</font>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column prop="rd_num" label="Fail number" width="140"></el-table-column> -->
|
||||
<el-table-column label="" width="200" align="center">
|
||||
<el-table-column label="" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="success" plain icon="el-icon-tickets" @click="openDetail(scope.row)"
|
||||
>Detail</el-button
|
||||
>
|
||||
<el-button size="mini" type="primary" plain icon="el-icon-check" @click="openSelect(scope.row)">
|
||||
Select</el-button
|
||||
>
|
||||
<div style="display: flex; align-items: center; flex-wrap: wrap; flex-direction: column">
|
||||
<el-button
|
||||
style="margin-bottom: 10px"
|
||||
size="mini"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-check"
|
||||
@click="openSelect(scope.row)"
|
||||
>Select</el-button
|
||||
>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -120,7 +150,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="isSelectAI">
|
||||
<commonAI @openSelect="openSelect" @openDetail="openDetail" @loading="(status)=>loading=status"></commonAI>
|
||||
<commonAI @openSelect="openSelect" @openDetail="openDetail" @loading="(status) => (loading = status)"></commonAI>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog
|
||||
@@ -145,8 +175,11 @@
|
||||
<el-form-item label="Affiliation :">
|
||||
<span>{{ mesOpen.company }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Major :">
|
||||
<span>{{ mesOpen.major_title }}</span>
|
||||
<el-form-item label="Research areas :">
|
||||
<p v-for="(v, i) in majorData" >
|
||||
<span style="font-weight: bold">{{ i + 1 }}.</span>
|
||||
{{ v.major_title.replace('Medicine >', '').trim() }}
|
||||
</p>
|
||||
</el-form-item>
|
||||
<el-form-item label="Field :">
|
||||
<span>{{ mesOpen.field }}</span>
|
||||
@@ -164,9 +197,11 @@
|
||||
|
||||
<script>
|
||||
import commonAI from './articleReviewerAIAdd.vue';
|
||||
import commonMajorTableList from '../page/components/major/tableList.vue';
|
||||
export default {
|
||||
components: {
|
||||
commonAI
|
||||
commonAI,
|
||||
commonMajorTableList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -208,6 +243,16 @@ export default {
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
goBack() {
|
||||
this.$router.push({
|
||||
path: 'articleReviewer',
|
||||
query: {
|
||||
id: this.$route.query.id
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
fieldChange(e) {
|
||||
this.messform.major_id = this.selectFileds[this.selectFileds.length - 1];
|
||||
},
|
||||
@@ -246,11 +291,35 @@ export default {
|
||||
// console.log(this.messform)
|
||||
this.getDate();
|
||||
},
|
||||
|
||||
async fetchMajorData(userId) {
|
||||
// if (!this.majorData[userId]) {
|
||||
// 判断是否已经加载过该用户的数据
|
||||
this.majorData = await this.getMajorData(userId);
|
||||
console.log('this.majorData at line 279:', this.majorData)
|
||||
this.$forceUpdate();
|
||||
// }
|
||||
},
|
||||
// 修改标记
|
||||
async getMajorData(userId) {
|
||||
try {
|
||||
const res = await this.$api.post('api/Reviewer/getUserField', { user_id: userId });
|
||||
this.loading = false; // 开始加载数据
|
||||
if (res.status === 1) {
|
||||
return res.data; // 返回数据
|
||||
} else {
|
||||
return []; // 如果没有数据,返回空数组
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error fetching data:', error);
|
||||
return []; // 如果发生错误,返回空数组
|
||||
}
|
||||
},
|
||||
// 审稿人详情
|
||||
openDetail(row) {
|
||||
this.mesOpen={}
|
||||
this.mesOpen = {};
|
||||
this.mesOpenVisble = true;
|
||||
this.majorData=[]
|
||||
|
||||
this.$api
|
||||
.post('api/Article/getReviewerdetail', {
|
||||
uid: row.user_id
|
||||
@@ -260,7 +329,7 @@ export default {
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
});this.fetchMajorData(row.user_id);
|
||||
},
|
||||
// 保存添加操作
|
||||
openSelect(row) {
|
||||
@@ -381,4 +450,8 @@ export default {
|
||||
margin: 0 5px 0 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
::v-deep .el-page-header__left, ::v-deep .el-page-header__content{
|
||||
font-size:14px !important ;
|
||||
color:#606266 !important ;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user