Files
tougao_web/src/components/page/reviewerApplyDetail.vue
wangjinlei f087543b0f 20230517
2023-05-17 13:21:01 +08:00

199 lines
5.6 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>
<div>
<div class="crumbs">
<el-breadcrumb separator="/">
<el-breadcrumb-item>
<i class="el-icon-lx-calendar"></i> Apply list
</el-breadcrumb-item>
<el-breadcrumb-item>Apply Detail</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="container">
<div class="form-box">
<el-form ref="articleform" :model="form" label-width="200px">
<el-form-item label="Name :">
<span>{{form.name}}</span>
</el-form-item>
<el-form-item label="Journal :">
<span>{{form.journal}}</span>
</el-form-item>
<el-form-item label="Gender :">
<span>{{form.gender==1?'Male':'Female'}}</span>
</el-form-item>
<el-form-item label="Technical :">
<span>{{form.technical}}</span>
</el-form-item>
<el-form-item label="Country :">
<span>{{form.country}}</span>
</el-form-item>
<el-form-item label="Major :">
<span>{{form.major}}</span>
</el-form-item>
<el-form-item label="Field :">
<span>{{form.field}}</span>
</el-form-item>
<el-form-item label="Introduction :">
<span>{{form.introduction}}</span>
</el-form-item>
<el-form-item label="Email :">
<span>{{form.email}}</span>
</el-form-item>
<el-form-item label="Company :">
<span>{{form.company}}</span>
</el-form-item>
<el-form-item label="CV. :" v-if="this.form.qualifications!=''">
<a :href="downloadQualifications" target="_blank">download</a>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="editVisible=true">Adopt</el-button>
<el-button type="primary" @click="rejectVisible=true">Reject</el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-dialog title="confirm" :visible.sync="editVisible" width="30%">
<span>If you want to pass the applicant, the system will generate his user name and password,Users can change their
own password according to the process</span>
<p>username:{{this.form.name}}</p>
<p>password:123456qwe</p>
<span slot="footer" class="dialog-footer">
<el-button @click="editVisible = false"> </el-button>
<el-button type="primary" @click="confirmSubmit"> </el-button>
</span>
</el-dialog>
<el-dialog title="reject" :visible.sync="rejectVisible" width="30%">
<span>Are you sure you want to reject this applicant</span>
<span slot="footer" class="dialog-footer">
<el-button @click="rejectVisible = false"> </el-button>
<el-button type="primary" @click="rejectreviewer"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
baseUrl: this.Common.baseUrl,
mediaUrl: this.Common.mediaUrl,
items: '',
editVisible: false,
rejectVisible: false,
form: {
reviewerId: this.$route.query.id,
name: '',
journal: '',
gender: '',
technical: '',
country: '',
major: '',
field: '',
introduction: '',
email: '',
company: '',
qualifications: ''
}
};
},
created: function() {
this.initApply();
},
computed: {
downloadQualifications: function() {
return this.mediaUrl + 'reviewer/' + this.form.qualifications;
}
},
methods: {
//弹出编辑框
testvis() {
this.editVisible = true;
},
//初始化审稿人信息
initApply() {
this.$api
.post('api/User/getApplyDetail', {
reviewerApplyId: this.form.reviewerId
})
.then((res) => {
this.form.name = res.data.name;
this.form.introduction = res.data.introduction;
this.form.journal = res.data.journal;
this.form.gender = res.data.gender;
this.form.technical = res.data.technical;
this.form.country = res.data.country;
this.form.major = res.data.major_title;
this.form.field = res.data.field;
this.form.email = res.data.email;
this.form.company = res.data.company;
this.form.qualifications = res.data.qualifications;
})
.catch((err) => {
console.log(err);
});
},
filedateformate(row, column, cellValue, index) {
return this.formatDate(cellValue);
},
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;
},
//同意审核人
confirmSubmit() {
this.$api
.post('api/User/agreeReviewerApply', {
ap_reviewer_id: this.form.reviewerId
})
.then((res) => {
this.$message.success('Adopt success!');
this.$router.push('/reviewerApplyList');
})
.catch((err) => {
console.log(err);
});
},
//拒绝审核人
rejectreviewer() {
this.$api
.post('api/User/refuseReviewerApply', {
ap_reviewer_id: this.form.reviewerId
})
.then((res) => {
this.$message.success('Reject success!');
this.initApply();
})
.catch((err) => {
console.log(err);
});
}
}
};
</script>
<style scoped>
.dwnbtn {
margin-bottom: 5px;
}
.container {
min-width: 800px;
}
.tree_box {
padding: 15px 10px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.more_btn {
margin-left: 30px;
}
</style>