认证列表

This commit is contained in:
qiuyuan 2026-01-22 16:39:11 +08:00
parent eae3e10430
commit 6e73436894
2 changed files with 88 additions and 51 deletions

View File

@ -27,20 +27,45 @@ class PayTypeDict extends BaseDict {
])
}
}
//支付状态
class PayStatusDict extends BaseDict {
//支付状态
class PayStatusDict extends BaseDict {
constructor() {
super([
['PaymentProcessing', '支付中'],
['PaymentSuccessful', '支付成功'],
['PaymentFailed', '支付失败'],
['PaymentCancelled','已取消']
['PaymentCancelled', '已取消']
])
}
}
// 认证状态
class AuthenticationDict extends BaseDict {
constructor() {
super([
['PENDING_CERTIFICATION', '待认证'],
['CERTIFICATION_DFFILED', '已提交'],
['CERTIFICATION_PASSED', '认证通过'],
['CERTIFICATION_FAILED', '认证失败']
])
}
}
// 认证类型
class AuthenticationTypeDict extends BaseDict {
constructor() {
super([
['USER', '个人'],
['COMPANY', '企业']
])
}
}
//如何使用:import {payTypeDict} from '@/enums/dict
//获取下拉框列表payTypeDict.options
//获取label:payTypeDict.getLabel(1)
export const payTypeDict=new PayTypeDict()
export const payStatusDict=new PayStatusDict()
export const payTypeDict = new PayTypeDict()
export const payStatusDict = new PayStatusDict()
export const authenticationDict = new AuthenticationDict()
export const authenticationTypeDict = new AuthenticationTypeDict()

View File

@ -1,15 +1,40 @@
<template>
<x-search-bar class="mb-8-2">
<template #default="{ gutter, colSpan }">
<a-form :model="searchFormData" layout="inline">
<a-row :gutter="gutter">
<a-col v-bind="colSpan">
<a-form-item :label="'用户姓名'" name="userName">
<a-input :placeholder="'请输入用户姓名'"
v-model:value="searchFormData.userName"></a-input>
<a-form :model="searchFormData" layout="inline" :label-col="{ style: { width: '100px' } }">
<a-row :gutter="gutter" :wrap="false">
<!-- 每个字段占 6 栅格 4 -->
<a-col :span="6">
<a-form-item label="用户姓名" name="userName">
<a-input v-model:value="searchFormData.userName" placeholder="请输入用户姓名" />
</a-form-item>
</a-col>
<a-col class="align-right" v-bind="colSpan">
<a-col :span="6">
<a-form-item label="认证状态" name="status">
<a-select v-model:value="searchFormData.status" placeholder="请选择认证状态">
<a-select-option v-for="item in authenticationDict.options" :key="item.value"
:value="item.value">
{{ item.label }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="认证类型" name="ctfType">
<a-select v-model:value="searchFormData.ctfType" placeholder="请选择认证类型">
<a-select-option v-for="item in authenticationTypeDict.options" :key="item.value"
:value="item.value">
{{ item.label }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 操作按钮列右对齐 6 栅格 -->
<a-col :span="6" class="align-right">
<a-space>
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
<a-button ghost type="primary" @click="handleSearch">
@ -21,48 +46,22 @@
</a-form>
</template>
</x-search-bar>
<a-row :gutter="8" :wrap="false">
<a-col flex="auto">
<a-card type="flex">
<x-action-bar class="mb-8-2">
<a-button v-action="'add'" type="primary" @click="$refs.editDialogRef.handleCreate()">
<!-- <a-button v-action="'add'" type="primary" @click="$refs.editDialogRef.handleCreate()">
<template #icon>
<plus-outlined></plus-outlined>
</template>
添加图片
</a-button>
</a-button> -->
</x-action-bar>
<a-table :columns="columns" :data-source="listData" :loading="loading" :pagination="paginationState"
:scroll="{ x: 1000 }" @change="onTableChange">
<template #bodyCell="{ column, record }">
<template v-if="'banner_type' === column.key">
<!--状态-->
<a-tag v-if="record.banner_type == 1" color="processing">
首页轮播图
</a-tag>
<!--状态-->
<a-tag v-else color="processing">
营销活动图
</a-tag>
</template>
<template v-if="'is_recommend' === column.key">
<!--状态-->
<a-tag v-if="record.banner_type == true" color="processing">
启用
</a-tag>
<!--状态-->
<a-tag v-else color="processing">
禁用
</a-tag>
</template>
<template v-if="'createAt' === column.key">
{{ formatUtcDateTime(record.created_at) }}
</template>
<template v-if="'action' === column.key">
<!-- <template v-if="'action' === column.key">
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
<a-tooltip>
<template #title> {{ $t('pages.system.role.edit') }}</template>
@ -75,7 +74,7 @@
<delete-outlined style="color: #ff4d4f" />
</a-tooltip>
</x-action-button>
</template>
</template> -->
</template>
</a-table>
</a-card>
@ -96,17 +95,30 @@ import { usePagination, useForm } from '@/hooks'
import EditDialog from './components/EditDialog.vue'
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
import { useI18n } from 'vue-i18n'
import { authenticationDict, authenticationTypeDict } from '@/enums/dict'
defineOptions({
name: 'systemRole',
})
const { t } = useI18n() // t
const columns = [
{ title: '缩略图', dataIndex: 'code', width: 200 },
{ title: '名称', dataIndex: 'name', width: 150 },
{ title: '类型', dataIndex: 'banner_type', key: 'banner_type', width: 150 },
{ title: t('pages.system.role.form.created_at'), key: 'createAt', fixed: 'right', width: 120 },
{ title: '是否启用', key: 'is_recommend', fixed: 'is_recommend', width: 120 },
// { title: '', dataIndex: 'id', width: 200 },
{ title: '用户名', dataIndex: 'userName', width: 150 },
{ title: '手机号', dataIndex: 'phone', key: 'phone', width: 150 },
{
title: '认证类型',
dataIndex: 'certificationType',
key: 'certificationType',
width: 120,
customRender: ({ text }) => authenticationTypeDict.getLabel(text) || text,
},
{
title: '认证状态',
dataIndex: 'certificationStatus',
key: 'certificationStatus',
width: 120,
customRender: ({ text }) => authenticationDict.getLabel(text) || text,
},
{ title: t('button.action'), key: 'action', fixed: 'right', width: 120 },
]
@ -195,8 +207,8 @@ function handleResetSearch() {
* 搜索
*/
function handleSearch() {
resetForm()
resetPagination()
// resetForm()
// resetPagination()
getPageList()
}