1
This commit is contained in:
@@ -1,66 +1,49 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="crumbs">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item>
|
||||
<i class="el-icon-user"></i> Reviewer list
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="handle-box">
|
||||
<el-select
|
||||
v-model="query.journalId"
|
||||
@change="getdate"
|
||||
placeholder="Please select journal"
|
||||
>
|
||||
<el-option :key="0" label="All journal" :value="0"></el-option>
|
||||
<el-option
|
||||
v-for="item in journalList"
|
||||
:key="item.journal_id"
|
||||
:label="item.title"
|
||||
:value="item.journal_id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="addJournal">add</el-button> -->
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
stripe
|
||||
class="table"
|
||||
ref="multipleTable"
|
||||
header-cell-class-name="table-header"
|
||||
>
|
||||
<!-- <el-table-column prop="user_id" label="No." align="center"></el-table-column> -->
|
||||
<el-table-column prop="account" label="Account" align="center"></el-table-column>
|
||||
<el-table-column prop="realname" label="Name" align="center"></el-table-column>
|
||||
<el-table-column prop="country" label="Country" align="center"></el-table-column>
|
||||
<el-table-column prop="company" label="Affiliation" align="center"></el-table-column>
|
||||
<el-table-column label="" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-tickets"
|
||||
@click="showdetail(scope.row)"
|
||||
>Detail</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination">
|
||||
<el-pagination
|
||||
background
|
||||
layout="total, prev, pager, next"
|
||||
:current-page="query.pageIndex"
|
||||
:page-size="query.pageSize"
|
||||
:total="Total"
|
||||
@current-change="handlePageChange"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <el-dialog title="change" :visible.sync="editVisible" width="40%">
|
||||
<div>
|
||||
<div class="crumbs">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item>
|
||||
<i class="el-icon-user"></i> Reviewer list
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="handle-box">
|
||||
<el-select v-model="query.journalId" @change="getDate" placeholder="Please select journal">
|
||||
<el-option :key="0" label="All journal" :value="0"></el-option>
|
||||
<el-option v-for="item in journalList" :key="item.journal_id" :label="item.title" :value="item.journal_id"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="addJournal">add</el-button> -->
|
||||
</div>
|
||||
<el-table :data="tableData" border stripe class="table" ref="multipleTable" header-cell-class-name="table-header">
|
||||
<!-- <el-table-column prop="user_id" label="No." align="center"></el-table-column> -->
|
||||
<el-table-column prop="account" label="Account" align="center"></el-table-column>
|
||||
<el-table-column prop="realname" label="Name" align="center"></el-table-column>
|
||||
<el-table-column prop="country" label="Country" align="center"></el-table-column>
|
||||
<el-table-column prop="company" label="Affiliation" align="center"></el-table-column>
|
||||
<el-table-column label="" width="220" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" plain icon="el-icon-tickets" @click="showdetail(scope.row)">Detail</el-button>
|
||||
<el-button size="mini" type="danger" plain icon="el-icon-delete" @click="showDelete(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination">
|
||||
<el-pagination background layout="total, prev, pager, next" :current-page="query.pageIndex" :page-size="query.pageSize"
|
||||
:total="Total" @current-change="handlePageChange"></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 删除弹出框 -->
|
||||
<el-dialog title="删除" :visible.sync="delOpen" width="40%">
|
||||
<div v-for="item in lineOptions" :name='item.journal_id' :value='item.reviewer_id' style="margin-left: 60px;">
|
||||
{{item.journal.title}} - {{item.reviewer.account}}
|
||||
<el-button type="text" icon="el-icon-delete" @click="lastDelete($event)" style="color: #FF0000;margin-left: 20px;">Delete</el-button>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="delOpen = false;" type="primary">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- <el-dialog title="change" :visible.sync="editVisible" width="40%">
|
||||
<el-form ref="changform" :model="change" label-width="80px">
|
||||
<el-form-item label="editormsg">
|
||||
<span>{{change.title}}</span>
|
||||
@@ -82,105 +65,153 @@
|
||||
<el-button type="primary" @click="">save</el-button>
|
||||
</span>
|
||||
</el-dialog> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:'reviewerList',
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
username: localStorage.getItem('ms_username'),
|
||||
journalId:0,
|
||||
pageIndex: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
tableData: [],
|
||||
journalList:[],
|
||||
Total: 0,
|
||||
editVisible: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getdate();
|
||||
this.initselect();
|
||||
},
|
||||
methods: {
|
||||
// 获取编辑列表数据
|
||||
getdate() {
|
||||
this.$api
|
||||
.post('api/User/getreviewerList', this.query)
|
||||
.then(res => {
|
||||
this.Total = res.total;
|
||||
this.tableData = res.data;
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handlePageChange(val) {
|
||||
this.$set(this.query, 'pageIndex', val);
|
||||
this.getdate();
|
||||
},
|
||||
showdetail(row) {
|
||||
this.$router.push({ path: 'reviewerDetail', query: { id: row.user_id } });
|
||||
},
|
||||
//初始化期刊选项
|
||||
initselect() {
|
||||
this.$api
|
||||
.post('api/Article/getJournal', { username: this.query.username })
|
||||
.then(res => {
|
||||
this.journalList = res;
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
export default {
|
||||
name: 'reviewerList',
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
username: localStorage.getItem('U_name'),
|
||||
journalId: 0,
|
||||
pageIndex: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
tableData: [],
|
||||
journalList: [],
|
||||
Total: 0,
|
||||
// editVisible: false,
|
||||
delForm: {
|
||||
line: []
|
||||
},
|
||||
delOpen: false,
|
||||
addForm: {},
|
||||
lineOptions: [],
|
||||
mess_age: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDate();
|
||||
this.initselect();
|
||||
},
|
||||
methods: {
|
||||
// 获取编辑列表数据
|
||||
getDate() {
|
||||
this.$api
|
||||
.post('api/User/getreviewerList', this.query)
|
||||
.then(res => {
|
||||
this.Total = res.total;
|
||||
this.tableData = res.data;
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handlePageChange(val) {
|
||||
this.$set(this.query, 'pageIndex', val);
|
||||
this.getDate();
|
||||
},
|
||||
// 查看详情
|
||||
showdetail(row) {
|
||||
this.$router.push({
|
||||
path: 'reviewerDetail',
|
||||
query: {
|
||||
id: row.user_id
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除弹窗
|
||||
showDelete(index, row) {
|
||||
this.aid = index;
|
||||
this.delOpen = true;
|
||||
this.$api
|
||||
.post('api/User/getReviewerForDel', {
|
||||
reviewer_id: index.reviewer_id,
|
||||
editor_account: localStorage.getItem('U_name')
|
||||
})
|
||||
.then(res => {
|
||||
this.lineOptions = res.data;
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
// 删除操作
|
||||
lastDelete(e) {
|
||||
this.mess_age.reviewer_id = e.currentTarget.parentElement.getAttribute('value')
|
||||
this.mess_age.journal_id = e.currentTarget.parentElement.getAttribute('name')
|
||||
// 二次确认删除
|
||||
this.$confirm('确定要删除吗?', '提示', {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.$api
|
||||
.post('api/User/deleteArticleReviewer',this.mess_age)
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
this.delOpen = false;
|
||||
this.$message.success('删除成功');
|
||||
this.getDate();
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
//初始化期刊选项
|
||||
initselect() {
|
||||
this.$api
|
||||
.post('api/Article/getJournal', {
|
||||
username: this.query.username
|
||||
})
|
||||
.then(res => {
|
||||
this.journalList = res;
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.handle-box {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.handle-box {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.handle-select {
|
||||
width: 120px;
|
||||
}
|
||||
.table {
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.handle-input {
|
||||
width: 300px;
|
||||
display: inline-block;
|
||||
}
|
||||
.table {
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
}
|
||||
.red {
|
||||
color: #ff0000;
|
||||
}
|
||||
.mr10 {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.table-td-thumb {
|
||||
display: block;
|
||||
margin: auto;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
.el-table .warning-row {
|
||||
background: #f3ca7f;
|
||||
}
|
||||
.el-table .success-row {
|
||||
background: #bcfc9a;
|
||||
}
|
||||
.el-table .normol-row{
|
||||
background: #d8f1c7
|
||||
}
|
||||
.el-table .red-row{
|
||||
background: #f05555;
|
||||
}
|
||||
.table-td-thumb {
|
||||
display: block;
|
||||
margin: auto;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.el-table .warning-row {
|
||||
background: #f3ca7f;
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
background: #bcfc9a;
|
||||
}
|
||||
|
||||
.el-table .normol-row {
|
||||
background: #d8f1c7
|
||||
}
|
||||
|
||||
.el-table .red-row {
|
||||
background: #f05555;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user