Browse Source

审核查看详情

sunjh 6 years ago
parent
commit
17b56da27c
1 changed files with 48 additions and 36 deletions
  1. 48 36
      src/components/authen/AuthenticationManage.vue

+ 48 - 36
src/components/authen/AuthenticationManage.vue

@@ -30,7 +30,7 @@
         </el-table-column>
         <el-table-column prop="detail" label="认证详情">
           <template slot-scope="scope">
-            <el-link type="primary">认证详情</el-link>
+            <el-link type="primary" @click="handleAuthDetail(scope.row.userId,scope.row.type)">认证详情</el-link>
           </template>
         </el-table-column>
         <el-table-column prop="status" label="认证状态">
@@ -50,12 +50,38 @@
             <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 type="danger" size="mini" @click="handleAuthenticationReject(scope.row.userId,scope.row.type)">
               驳回
             </el-button>
           </template>
         </el-table-column>
       </el-table>
+      <el-dialog title="认证详情" :visible.sync="showDialog" center width="30%">
+        <el-form :model="authInfoDetail">
+          <el-form-item label="userId">
+            <span>{{authInfoDetail.userId}}</span>
+          </el-form-item>
+          <el-form-item label="type">
+            <span>{{authInfoDetail.type}}</span>
+          </el-form-item>
+          <el-form-item label="日期">
+            <span>{{authInfoDetail.date}}</span>
+          </el-form-item>
+          <el-form-item label="姓名">
+            <span>{{authInfoDetail.name}}</span>
+          </el-form-item>
+          <el-form-item label="地址">
+            <span>{{authInfoDetail.address}}</span>
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="info" size="mini" @click="hideAuthDialog()">返回</el-button>
+
+          <el-button type="danger" size="mini" @click="handleAuthenticationReject(authInfoDetail.userId,authInfoDetail.userId)">驳回</el-button>
+
+          <el-button type="primary" size="mini" @click="handleAuthenticationPass(authInfoDetail.userId,authInfoDetail.userId)">通过</el-button>
+        </div>
+      </el-dialog>
       <!--<el-pagination-->
       <!--:page-size="20"-->
       <!--hide-on-single-page-->
@@ -85,44 +111,19 @@ export default {
     return {
       currentPage: 1,
       loading: false,
+      showDialog: false,
       authenticationStatusUntreated: '审核中',
       authenticationStatusPass: '审核通过',
       authenticationStatusReject: '审核未通过',
       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 弄'
-        }]
+      authInfoDetail: {
+        userId: '',
+        type: '',
+        date: 'ads',
+        name: 'qweqweqwe',
+        address: 'qweqweqwe'
+      }
     }
   },
   mounted () {
@@ -202,6 +203,11 @@ export default {
       console.log(error)
       notify('error', '拒绝失败:' + error.data)
     },
+    handleAuthDetail (userId, type) {
+      this.authInfoDetail.userId = userId
+      this.authInfoDetail.type = type
+      this.showAuthDialog()
+    },
     showLoading () {
       this.loading = true
     },
@@ -214,7 +220,13 @@ export default {
     rowClassName ({row, rowIndex}) {
       //把每一行的索引放进row.id
       row.id = rowIndex + 1
-    }
+    },
+    showAuthDialog () {
+      this.showDialog = true
+    },
+    hideAuthDialog () {
+      this.showDialog = false
+    },
   }
 }
 </script>