generated from Leo_Ding/web-template
认证列表
This commit is contained in:
parent
eae3e10430
commit
6e73436894
@ -38,9 +38,34 @@ class PayTypeDict extends BaseDict {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 认证状态
|
||||||
|
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
|
//如何使用:import {payTypeDict} from '@/enums/dict
|
||||||
//获取下拉框列表:payTypeDict.options
|
//获取下拉框列表:payTypeDict.options
|
||||||
//获取label:payTypeDict.getLabel(1)
|
//获取label:payTypeDict.getLabel(1)
|
||||||
export const payTypeDict = new PayTypeDict()
|
export const payTypeDict = new PayTypeDict()
|
||||||
export const payStatusDict = new PayStatusDict()
|
export const payStatusDict = new PayStatusDict()
|
||||||
|
export const authenticationDict = new AuthenticationDict()
|
||||||
|
export const authenticationTypeDict = new AuthenticationTypeDict()
|
||||||
|
|||||||
@ -1,15 +1,40 @@
|
|||||||
<template>
|
<template>
|
||||||
<x-search-bar class="mb-8-2">
|
<x-search-bar class="mb-8-2">
|
||||||
<template #default="{ gutter, colSpan }">
|
<template #default="{ gutter, colSpan }">
|
||||||
<a-form :model="searchFormData" layout="inline">
|
<a-form :model="searchFormData" layout="inline" :label-col="{ style: { width: '100px' } }">
|
||||||
<a-row :gutter="gutter">
|
<a-row :gutter="gutter" :wrap="false">
|
||||||
<a-col v-bind="colSpan">
|
<!-- 每个字段占 6 栅格,共 4 个 -->
|
||||||
<a-form-item :label="'用户姓名'" name="userName">
|
<a-col :span="6">
|
||||||
<a-input :placeholder="'请输入用户姓名'"
|
<a-form-item label="用户姓名" name="userName">
|
||||||
v-model:value="searchFormData.userName"></a-input>
|
<a-input v-model:value="searchFormData.userName" placeholder="请输入用户姓名" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</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-space>
|
||||||
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||||
<a-button ghost type="primary" @click="handleSearch">
|
<a-button ghost type="primary" @click="handleSearch">
|
||||||
@ -21,48 +46,22 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</template>
|
</template>
|
||||||
</x-search-bar>
|
</x-search-bar>
|
||||||
|
|
||||||
<a-row :gutter="8" :wrap="false">
|
<a-row :gutter="8" :wrap="false">
|
||||||
<a-col flex="auto">
|
<a-col flex="auto">
|
||||||
<a-card type="flex">
|
<a-card type="flex">
|
||||||
<x-action-bar class="mb-8-2">
|
<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>
|
<template #icon>
|
||||||
<plus-outlined></plus-outlined>
|
<plus-outlined></plus-outlined>
|
||||||
</template>
|
</template>
|
||||||
添加图片
|
添加图片
|
||||||
</a-button>
|
</a-button> -->
|
||||||
</x-action-bar>
|
</x-action-bar>
|
||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" :pagination="paginationState"
|
||||||
:scroll="{ x: 1000 }" @change="onTableChange">
|
:scroll="{ x: 1000 }" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="'banner_type' === column.key">
|
<!-- <template v-if="'action' === 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">
|
|
||||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
|
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title> {{ $t('pages.system.role.edit') }}</template>
|
<template #title> {{ $t('pages.system.role.edit') }}</template>
|
||||||
@ -75,7 +74,7 @@
|
|||||||
<delete-outlined style="color: #ff4d4f" />
|
<delete-outlined style="color: #ff4d4f" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</x-action-button>
|
</x-action-button>
|
||||||
</template>
|
</template> -->
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
@ -96,17 +95,30 @@ import { usePagination, useForm } from '@/hooks'
|
|||||||
import EditDialog from './components/EditDialog.vue'
|
import EditDialog from './components/EditDialog.vue'
|
||||||
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
|
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { authenticationDict, authenticationTypeDict } from '@/enums/dict'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'systemRole',
|
name: 'systemRole',
|
||||||
})
|
})
|
||||||
const { t } = useI18n() // 解构出t方法
|
const { t } = useI18n() // 解构出t方法
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '缩略图', dataIndex: 'code', width: 200 },
|
// { title: '序号', dataIndex: 'id', width: 200 },
|
||||||
{ title: '名称', dataIndex: 'name', width: 150 },
|
{ title: '用户名', dataIndex: 'userName', width: 150 },
|
||||||
{ title: '类型', dataIndex: 'banner_type', key: 'banner_type', width: 150 },
|
{ title: '手机号', dataIndex: 'phone', key: 'phone', 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: '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 },
|
{ title: t('button.action'), key: 'action', fixed: 'right', width: 120 },
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -195,8 +207,8 @@ function handleResetSearch() {
|
|||||||
* 搜索
|
* 搜索
|
||||||
*/
|
*/
|
||||||
function handleSearch() {
|
function handleSearch() {
|
||||||
resetForm()
|
// resetForm()
|
||||||
resetPagination()
|
// resetPagination()
|
||||||
getPageList()
|
getPageList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user