| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- <template>
- <div class="main-card__body" v-loading="pageLoading">
- <h1 class="main-card__title">
- 认证审核
- </h1>
- <el-table
- :data="applications"
- stripe
- class="main-card__table"
- >
- <el-table-column
- fixed
- type="index"
- width="50">
- </el-table-column>
- <el-table-column
- prop="realName"
- label="姓名"
- fixed
- width="120">
- </el-table-column>
- <el-table-column
- prop="organization"
- label="所属单位"
- width="120">
- </el-table-column>
- <el-table-column
- prop="jobNumber"
- label="工号"
- width="120">
- </el-table-column>
- <el-table-column
- prop="phone"
- label="手机"
- width="120">
- </el-table-column>
- <el-table-column
- prop="email"
- label="邮箱"
- width="200">
- </el-table-column>
- <el-table-column
- fixed="right"
- label="操作"
- width="100">
- <template slot-scope="scope">
- <el-button @click="pass(scope.row)" type="text" size="small">通过</el-button>
- <el-button @click="reject(scope.row)" type="text" size="small">否决</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </template>
- <script>
- export default {
- name: "checkApplications",
- layout: 'admin',
- data(){
- return{
- applications: [],
- pageLoading: true
- }
- },
- mounted(){
- this.getApplications();
- this.pageLoading = false;
- },
- methods: {
- getApplications(){
- this.$api.$get('/admin/getApplications').then((res) =>
- {
- if(res.code === 0){
- this.applications = res.data;
- }else{
- this.$message({
- showClose: true,
- message: res.message,
- type: 'error'
- });
- }
- }
- ).catch((e)=>{
- console.log(e);
- });
- },
- pass(row){
- this.$api.$post('/admin/passApplication', {id: row.id, uid: row.uid}).then((res) =>
- {
- if(res.code === 0){
- this.$message({
- showClose: true,
- message: "已通过" + row.realName + "的认证",
- type: 'success'
- });
- this.applications.splice(this.applications.indexOf(row), 1);
- }else{
- this.$message({
- showClose: true,
- message: res.message,
- type: 'error'
- });
- }
- }
- ).catch((e)=>{
- console.log(e);
- });
- },
- reject(row){
- this.$api.$post('/admin/rejectApplication', {id: row.id}).then((res) =>
- {
- if(res.code === 0){
- this.$message({
- showClose: true,
- message: "已否决" + row.realName + "的认证",
- type: 'success'
- });
- this.applications.splice(this.applications.indexOf(row), 1);
- }else{
- this.$message({
- showClose: true,
- message: res.message,
- type: 'error'
- });
- }
- }
- ).catch((e)=>{
- console.log(e);
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- @import '~/assets/css/person.scss';
- </style>
|