|
@@ -1,125 +1,214 @@
|
|
|
<template>
|
|
|
- <div class="create-container">
|
|
|
+ <div class="create-container" v-loading="loading">
|
|
|
<div class="create-body">
|
|
|
<div class="title">审核认证信息</div>
|
|
|
<el-table
|
|
|
- :data="authenticationList"
|
|
|
+ :data="handlingAuthList"
|
|
|
+ :row-class-name="rowClassName"
|
|
|
stripe
|
|
|
style="width: 100%">
|
|
|
- <el-table-column prop="code" label="编号">
|
|
|
+ <el-table-column prop="id" label="编号">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{scope.row.code}}</span>
|
|
|
+ <span>{{scope.row.id}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="userInfo" label="用户信息">
|
|
|
<template slot-scope="scope">
|
|
|
<span style="cursor: pointer">
|
|
|
- <el-link type="primary">{{scope.row.userInfo}}</el-link>
|
|
|
+ <el-link type="primary">{{scope.row.userName}}</el-link>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="type" label="认证类型">
|
|
|
<template slot-scope="scope">
|
|
|
<span>
|
|
|
- <el-tag v-if="scope.row.type=='个人'" type="success">{{scope.row.type}}</el-tag>
|
|
|
- <el-tag v-if="scope.row.type=='机构'">{{scope.row.type}}</el-tag>
|
|
|
- <el-tag v-if="scope.row.type=='企业'" type="warning">{{scope.row.type}}</el-tag>
|
|
|
+ <el-tag v-if="scope.row.type=='personal'" type="success">个人</el-tag>
|
|
|
+ <el-tag v-if="scope.row.type=='agency'">机构</el-tag>
|
|
|
+ <el-tag v-if="scope.row.type=='enterprise'" type="warning">企业</el-tag>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="detail" label="认证详情">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-link type="primary">{{scope.row.detail}}</el-link>
|
|
|
+ <el-link type="primary">认证详情</el-link>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="status" label="认证状态">
|
|
|
<template slot-scope="scope">
|
|
|
<span>
|
|
|
- <el-tag v-if="scope.row.status==authenticationStatusUntreated" type="info">{{scope.row.status}}</el-tag>
|
|
|
- <el-tag v-if="scope.row.status==authenticationStatusPass" type="success">{{scope.row.status}}</el-tag>
|
|
|
- <el-tag v-if="scope.row.status===authenticationStatusReject" type="danger">{{scope.row.status}}</el-tag>
|
|
|
+ <el-tag :type="scope.row.authStatus.style">{{scope.row.authStatus.text}}</el-tag>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="date" label="申请时间" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{scope.row.date}}</span>
|
|
|
+ <span>{{reformTime(new Date(scope.row.applytime))}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="primary" size="mini" @click="handleAuthenticationPass(scope.row)">通过</el-button>
|
|
|
- <el-button type="warning" size="mini" @click="handleAuthenticationReject(scope.row)">驳回</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="handleAuthenticationPass(scope.row.userId,scope.row.type)">
|
|
|
+ 通过
|
|
|
+ </el-button>
|
|
|
+ <el-button type="warning" size="mini" @click="handleAuthenticationReject(scope.row.userId,scope.row.type)">
|
|
|
+ 驳回
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-pagination
|
|
|
- :page-size="20"
|
|
|
- hide-on-single-page
|
|
|
- :pager-count="5"
|
|
|
- :current-page.sync="currentPage"
|
|
|
- layout="prev, pager, next"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :total="100">
|
|
|
- </el-pagination>
|
|
|
+ <!--<el-pagination-->
|
|
|
+ <!--:page-size="20"-->
|
|
|
+ <!--hide-on-single-page-->
|
|
|
+ <!--:pager-count="5"-->
|
|
|
+ <!--:current-page.sync="currentPage"-->
|
|
|
+ <!--layout="prev, pager, next"-->
|
|
|
+ <!--@current-change="handleCurrentChange"-->
|
|
|
+ <!--:total="100">-->
|
|
|
+ <!--</el-pagination>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {
|
|
|
+ checkPassAuth,
|
|
|
+ checkRejectAuth,
|
|
|
+ getAllHandledAuthInfo,
|
|
|
+ getAllHandlingAuthInfo,
|
|
|
+ getFormalTimeFromDate,
|
|
|
+} from '@/js/index'
|
|
|
+import {notify} from '@/constants/index'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'AuthenticationManage',
|
|
|
data () {
|
|
|
return {
|
|
|
currentPage: 1,
|
|
|
+ loading: false,
|
|
|
authenticationStatusUntreated: '审核中',
|
|
|
authenticationStatusPass: '审核通过',
|
|
|
authenticationStatusReject: '审核未通过',
|
|
|
- authenticationList: [{
|
|
|
- code: '123122',
|
|
|
- userInfo: '郭超',
|
|
|
- type: '个人',
|
|
|
- status: '审核中',
|
|
|
- detail: '查看详情',
|
|
|
- date: '2016-05-04'
|
|
|
- }, {
|
|
|
- code: '123123',
|
|
|
- userInfo: '郭超',
|
|
|
- type: '企业',
|
|
|
- status: '审核未通过',
|
|
|
- detail: '查看详情',
|
|
|
- date: '2016-05-04'
|
|
|
- }, {
|
|
|
- code: '123124',
|
|
|
- userInfo: '郭超',
|
|
|
- type: '机构',
|
|
|
- status: '审核通过',
|
|
|
- detail: '查看详情',
|
|
|
- date: '2016-05-04'
|
|
|
- }],
|
|
|
- tableData: [{
|
|
|
- date: '2016-05-02',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-04',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
|
|
- }]
|
|
|
+ handlingAuthList: [],
|
|
|
+ handledAuthList: [],
|
|
|
+ authenticationList: [
|
|
|
+ {
|
|
|
+ code: '123122',
|
|
|
+ userInfo: '郭超',
|
|
|
+ type: '个人',
|
|
|
+ status: '审核中',
|
|
|
+ detail: '查看详情',
|
|
|
+ date: '2016-05-04'
|
|
|
+ }, {
|
|
|
+ code: '123123',
|
|
|
+ userInfo: '郭超',
|
|
|
+ type: '企业',
|
|
|
+ status: '审核未通过',
|
|
|
+ detail: '查看详情',
|
|
|
+ date: '2016-05-04'
|
|
|
+ }, {
|
|
|
+ code: '123124',
|
|
|
+ userInfo: '郭超',
|
|
|
+ type: '机构',
|
|
|
+ status: '审核通过',
|
|
|
+ detail: '查看详情',
|
|
|
+ date: '2016-05-04'
|
|
|
+ }],
|
|
|
+ tableData: [
|
|
|
+ {
|
|
|
+ date: '2016-05-02',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路 1518 弄'
|
|
|
+ }, {
|
|
|
+ date: '2016-05-04',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路 1517 弄'
|
|
|
+ }]
|
|
|
}
|
|
|
},
|
|
|
+ mounted () {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.init()
|
|
|
+ })
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ init () {
|
|
|
+ this.getHandlingAuthList()
|
|
|
+ this.getHandledAuthList()
|
|
|
+ },
|
|
|
+ //获取所有未认证信息
|
|
|
+ getHandlingAuthList () {
|
|
|
+ this.showLoading()
|
|
|
+ getAllHandlingAuthInfo(this.getHandlingAuthListSuccess, this.getHandlingAuthListFail)
|
|
|
+ },
|
|
|
+ //获取所有已认证信息
|
|
|
+ getHandlingAuthListSuccess (res) {
|
|
|
+ this.handlingAuthList = res
|
|
|
+ this.hideLoading()
|
|
|
+ },
|
|
|
+ getHandlingAuthListFail (error) {
|
|
|
+ this.hideLoading()
|
|
|
+ notify('error', '获取认证信息失败:' + error.data)
|
|
|
+ },
|
|
|
+ getHandledAuthList () {
|
|
|
+ this.showLoading()
|
|
|
+ getAllHandledAuthInfo(this.getHandledAuthListSuccess, this.getHandledAuthListFail)
|
|
|
+ },
|
|
|
+ getHandledAuthListSuccess (res) {
|
|
|
+ this.handledAuthList = res
|
|
|
+ this.hideLoading()
|
|
|
+ },
|
|
|
+ getHandledAuthListFail (error) {
|
|
|
+ this.hideLoading()
|
|
|
+ notify('error', '获取已认证信息失败:' + error.data)
|
|
|
+ },
|
|
|
handleCurrentChange (param) {
|
|
|
console.log(param)
|
|
|
},
|
|
|
- handleAuthenticationPass (item) {
|
|
|
- item.status = this.authenticationStatusPass
|
|
|
- console.log('通过')
|
|
|
+ handleAuthenticationPass (userId, type) {
|
|
|
+ this.showLoading()
|
|
|
+ checkPassAuth(type, userId, this.handleAuthenticationPassSuccess, this.handleAuthenticationPassFail)
|
|
|
+ // item.status = this.authenticationStatusPass
|
|
|
+ // console.log('通过')
|
|
|
},
|
|
|
- handleAuthenticationReject (item) {
|
|
|
- item.status = this.authenticationStatusReject
|
|
|
- console.log('拒绝')
|
|
|
+ handleAuthenticationPassSuccess (res) {
|
|
|
+ this.hideLoading()
|
|
|
+ this.getHandlingAuthList()
|
|
|
+ console.log(res)
|
|
|
},
|
|
|
+ handleAuthenticationPassFail (error) {
|
|
|
+ this.hideLoading()
|
|
|
+ console.log(error)
|
|
|
+ notify('error', '通过失败:' + error.data)
|
|
|
+ },
|
|
|
+ handleAuthenticationReject (userId, type) {
|
|
|
+ this.showLoading()
|
|
|
+ // console.log(userId)
|
|
|
+ // console.log(type)
|
|
|
+ checkRejectAuth(type, userId, this.handleAuthenticationRejectSuccess, this.handleAuthenticationRejectFail)
|
|
|
+ },
|
|
|
+ handleAuthenticationRejectSuccess (res) {
|
|
|
+ this.hideLoading()
|
|
|
+ this.getHandlingAuthList()
|
|
|
+ console.log(res)
|
|
|
+ },
|
|
|
+ handleAuthenticationRejectFail (error) {
|
|
|
+ this.hideLoading()
|
|
|
+ console.log(error)
|
|
|
+ notify('error', '拒绝失败:' + error.data)
|
|
|
+ },
|
|
|
+ showLoading () {
|
|
|
+ this.loading = true
|
|
|
+ },
|
|
|
+ hideLoading () {
|
|
|
+ this.loading = false
|
|
|
+ },
|
|
|
+ reformTime (date) {
|
|
|
+ return getFormalTimeFromDate(date)
|
|
|
+ },
|
|
|
+ rowClassName ({row, rowIndex}) {
|
|
|
+ //把每一行的索引放进row.id
|
|
|
+ row.id = rowIndex + 1
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|