浏览代码

实名认证详情

Xiao_123 10 月之前
父节点
当前提交
9a08497f18
共有 2 个文件被更改,包括 45 次插入16 次删除
  1. 19 3
      src/views/menduner/system/enterprise/auth/detail.vue
  2. 26 13
      src/views/menduner/system/enterprise/auth/index.vue

+ 19 - 3
src/views/menduner/system/enterprise/auth/detail.vue

@@ -1,5 +1,20 @@
 <template>
   <Dialog :title="dialogTitle" v-model="dialogVisible">
+    <el-descriptions title="" border :column="1">
+      <el-descriptions-item label="用户id">{{ info?.userId || '-' }}</el-descriptions-item>
+      <el-descriptions-item label="所属企业id">{{ info?.enterpriseId || '-' }}</el-descriptions-item>
+      <el-descriptions-item label="认证人姓名">{{ info?.name || '-' }}</el-descriptions-item>
+      <el-descriptions-item label="状态">
+        <dict-tag :type="DICT_TYPE.MENDUNER_ENTERPRISE_AUTH_STATUS" :value="info?.status" />
+      </el-descriptions-item>
+      <el-descriptions-item label="人像照">
+        <el-image style="width: 80px; height: 80px" :src="info?.frontUrl || ''"  :preview-src-list="[info?.frontUrl, info?.backUrl]"/>
+      </el-descriptions-item>
+      <el-descriptions-item label="国徽照">
+        <el-image style="width: 80px; height: 80px" :src="info?.backUrl || ''" :preview-src-list="[info?.frontUrl, info?.backUrl]" />
+      </el-descriptions-item>
+      <el-descriptions-item label="审核原因">{{ info?.reason || '-' }}</el-descriptions-item>
+    </el-descriptions>
     <template #footer>
       <el-button @click="dialogVisible = false">取 消</el-button>
     </template>
@@ -8,10 +23,11 @@
 
 <script setup lang="ts">
 import { EnterpriseAuthApi } from '@/api/menduner/system/enterprise/auth'
+import { DICT_TYPE } from '@/utils/dict'
 
 defineOptions({ name: 'EnterpriseAuthDetails' })
 const dialogVisible = ref(false) // 弹窗的是否展示
-const dialogTitle = ref('详情') // 弹窗的标题
+const dialogTitle = ref('认证信息') // 弹窗的标题
 const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
 
 /** 打开弹窗 */
@@ -20,11 +36,11 @@ const open = async (id: Number) => {
   getData(id)
 }
 
+const info = ref({})
 const getData = async (id) => {
   if (!id) return
   const data = await EnterpriseAuthApi.getEnterpriseAuth(id)
-  console.log(data, 'details');
-  
+  info.value = data
 }
 
 

+ 26 - 13
src/views/menduner/system/enterprise/auth/index.vue

@@ -70,38 +70,50 @@
 
   <!-- 列表 -->
   <ContentWrap>
-    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
-      <el-table-column label="id" align="center" prop="id" />
-      <el-table-column label="用户id" align="center" prop="userId" />
-      <el-table-column label="所属企业id" align="center" prop="enterpriseId" />
+    <el-table v-loading="loading" :data="list" :stripe="true" >
+      <el-table-column label="id" align="center" prop="id" :show-overflow-tooltip="true" />
+      <el-table-column label="用户id" align="center" prop="userId" :show-overflow-tooltip="true" />
+      <el-table-column label="所属企业id" align="center" prop="enterpriseId" :show-overflow-tooltip="true" />
       <el-table-column label="认证人姓名" align="center" prop="name" />
+      <el-table-column label="人像照" align="center" prop="status">
+        <template #default="scope">
+          <el-image style="width: 80px; height: 80px" :src="scope.row.frontUrl" />
+        </template>
+      </el-table-column>
+      <el-table-column label="国徽照" align="center" prop="status">
+        <template #default="scope">
+          <el-image style="width: 80px; height: 80px" :src="scope.row.backUrl" />
+        </template>
+      </el-table-column>
       <el-table-column label="审核状态" align="center" prop="status">
         <template #default="scope">
           <dict-tag :type="DICT_TYPE.MENDUNER_ENTERPRISE_AUTH_STATUS" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column label="审核原因" align="center" prop="reason" />
+      <el-table-column label="审核原因" align="center" prop="reason" :show-overflow-tooltip="true" />
       <el-table-column
         label="创建时间"
         align="center"
         prop="createTime"
         :formatter="dateFormatter"
         width="180px"
+        :show-overflow-tooltip="true"
       />
       <el-table-column label="操作" align="center">
         <template #default="scope">
-          <!-- <el-button
+          <el-button
             link
             type="primary"
             @click="handleDetails(scope.row.id)"
           >
             详情
-          </el-button> -->
+          </el-button>
           <el-button
             v-if="scope.row.status === '0'"
             link
             type="primary"
             @click="handlePass(scope.row.id)"
+            v-hasPermi="['menduner:system:enterprise-auth:update']"
           >
             通过
           </el-button>
@@ -109,6 +121,7 @@
             v-if="scope.row.status === '0'"
             link
             type="danger"
+            v-hasPermi="['menduner:system:enterprise-auth:update']"
             @click="handleReject(scope.row.id)"
           >
             拒绝
@@ -128,7 +141,7 @@
   <!-- 表单弹窗:拒绝 -->
   <EnterpriseAuth ref="applyRef" @success="getList" />
 
-  <!-- <EnterpriseAuthDetails ref="formRef"/> -->
+  <EnterpriseAuthDetails ref="formRef"/>
 </template>
 
 <script setup lang="ts">
@@ -136,7 +149,7 @@ import { dateFormatter } from '@/utils/formatTime'
 import { EnterpriseAuthApi } from '@/api/menduner/system/enterprise/auth'
 import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
 import EnterpriseAuth from './EnterpriseAuth.vue'
-// import EnterpriseAuthDetails from './detail.vue'
+import EnterpriseAuthDetails from './detail.vue'
 /** 门墩儿-企业用户申请 列表 */
 defineOptions({ name: 'EnterpriseAuth' })
 
@@ -182,10 +195,10 @@ const resetQuery = () => {
 }
 
 /** 详情 */
-// const formRef = ref()
-// const handleDetails = (id?: number) => {
-//   formRef.value.open(id)
-// }
+const formRef = ref()
+const handleDetails = (id?: number) => {
+  formRef.value.open(id)
+}
 
 const applyRef = ref() // 拒绝的表单
 const handleReject = (id: number) => {