feat: dict
parent
9e85d8a280
commit
51beba6968
|
@ -89,6 +89,8 @@ export enum DICT_TYPE {
|
|||
SYSTEM_SMS_RECEIVE_STATUS = 'system_sms_receive_status',
|
||||
SYSTEM_ERROR_CODE_TYPE = 'system_error_code_type',
|
||||
SYSTEM_OAUTH2_GRANT_TYPE = 'system_oauth2_grant_type',
|
||||
SYSTEM_MAIL_SEND_STATUS = 'system_mail_send_status',
|
||||
SYSTEM_NOTIFY_TEMPLATE_TYPE = 'system_notify_template_type',
|
||||
|
||||
// ========== INFRA 模块 ==========
|
||||
INFRA_BOOLEAN_STRING = 'infra_boolean_string',
|
||||
|
@ -120,5 +122,29 @@ export enum DICT_TYPE {
|
|||
PAY_ORDER_STATUS = 'pay_order_status', // 商户支付订单状态
|
||||
PAY_ORDER_REFUND_STATUS = 'pay_order_refund_status', // 商户支付订单退款状态
|
||||
PAY_REFUND_ORDER_STATUS = 'pay_refund_order_status', // 退款订单状态
|
||||
PAY_REFUND_ORDER_TYPE = 'pay_refund_order_type' // 退款订单类别
|
||||
PAY_REFUND_ORDER_TYPE = 'pay_refund_order_type', // 退款订单类别
|
||||
|
||||
// ========== MP 模块 ==========
|
||||
MP_AUTO_REPLY_REQUEST_MATCH = 'mp_auto_reply_request_match', // 自动回复请求匹配类型
|
||||
MP_MESSAGE_TYPE = 'mp_message_type', // 消息类型
|
||||
|
||||
// ========== MALL - PRODUCT 模块 ==========
|
||||
PRODUCT_SPU_STATUS = 'product_spu_status', // 商品 SPU 状态
|
||||
|
||||
// ========== MALL - ORDER 模块 ==========
|
||||
TRADE_AFTER_SALE_STATUS = 'trade_after_sale_status', // 售后 - 状态
|
||||
TRADE_AFTER_SALE_WAY = 'trade_after_sale_way', // 售后 - 方式
|
||||
TRADE_AFTER_SALE_TYPE = 'trade_after_sale_type', // 售后 - 类型
|
||||
TRADE_ORDER_TYPE = 'trade_order_type', // 订单 - 类型
|
||||
TRADE_ORDER_STATUS = 'trade_order_status', // 订单 - 状态
|
||||
TRADE_ORDER_ITEM_AFTER_SALE_STATUS = 'trade_order_item_after_sale_status', // 订单项 - 售后状态
|
||||
|
||||
// ========== MALL - PROMOTION 模块 ==========
|
||||
PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型
|
||||
PROMOTION_PRODUCT_SCOPE = 'promotion_product_scope', // 营销的商品范围
|
||||
PROMOTION_COUPON_TEMPLATE_VALIDITY_TYPE = 'promotion_coupon_template_validity_type', // 优惠劵模板的有限期类型
|
||||
PROMOTION_COUPON_STATUS = 'promotion_coupon_status', // 优惠劵的状态
|
||||
PROMOTION_COUPON_TAKE_TYPE = 'promotion_coupon_take_type', // 优惠劵的领取方式
|
||||
PROMOTION_ACTIVITY_STATUS = 'promotion_activity_status', // 优惠活动的状态
|
||||
PROMOTION_CONDITION_TYPE = 'promotion_condition_type' // 营销的条件类型枚举
|
||||
}
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
<template>
|
||||
<div>开发中</div>
|
||||
<div>
|
||||
<BasicTable @register="registerTable" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup name="OperateLog">
|
||||
import { BasicTable, useTable } from '@/components/Table'
|
||||
import { getMailAccountPageApi } from '@/api/system/mail/log'
|
||||
import { columns, searchFormSchema } from './mailLog.data'
|
||||
|
||||
const [registerTable] = useTable({
|
||||
title: '邮件日志列表',
|
||||
api: getMailAccountPageApi,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
import { getIntDictOptions } from '@/utils/dict'
|
||||
import { BasicColumn, FormSchema, useRender } from '@/components/Table'
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import { getSimpleMailAccountListApi } from '@/api/system/mail/account'
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '编号',
|
||||
dataIndex: 'id',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '发送时间',
|
||||
dataIndex: 'sendTime',
|
||||
width: 180,
|
||||
customRender: ({ text }) => {
|
||||
return useRender.renderDate(text)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '接收邮箱',
|
||||
dataIndex: 'toMail',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: '邮件标题',
|
||||
dataIndex: 'templateTitle',
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: '发送状态',
|
||||
dataIndex: 'sendStatus',
|
||||
width: 180,
|
||||
customRender: ({ text }) => {
|
||||
return useRender.renderDict(text, DICT_TYPE.SYSTEM_MAIL_SEND_STATUS)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '邮箱账号',
|
||||
dataIndex: 'fromMail',
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: '模板编号',
|
||||
dataIndex: 'templateId',
|
||||
width: 180
|
||||
}
|
||||
]
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
label: '接收邮箱',
|
||||
field: 'toMail',
|
||||
component: 'Input',
|
||||
colProps: { span: 8 }
|
||||
},
|
||||
{
|
||||
label: '邮箱账号',
|
||||
field: 'accountId',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleMailAccountListApi(),
|
||||
labelField: 'mail',
|
||||
valueField: 'id'
|
||||
},
|
||||
colProps: { span: 8 }
|
||||
},
|
||||
{
|
||||
label: '模板编号',
|
||||
field: 'templateId',
|
||||
component: 'Input',
|
||||
colProps: { span: 8 }
|
||||
},
|
||||
{
|
||||
label: '发送状态',
|
||||
field: 'sendStatus',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getIntDictOptions(DICT_TYPE.SYSTEM_MAIL_SEND_STATUS)
|
||||
},
|
||||
colProps: { span: 8 }
|
||||
},
|
||||
{
|
||||
label: '用户编号',
|
||||
field: 'userId',
|
||||
component: 'Input',
|
||||
colProps: { span: 8 }
|
||||
},
|
||||
{
|
||||
label: '用户类型',
|
||||
field: 'userType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getIntDictOptions(DICT_TYPE.USER_TYPE)
|
||||
},
|
||||
colProps: { span: 8 }
|
||||
},
|
||||
{
|
||||
label: '发送时间',
|
||||
field: 'sendTime',
|
||||
component: 'RangePicker',
|
||||
colProps: { span: 8 }
|
||||
}
|
||||
]
|
|
@ -1,4 +1,4 @@
|
|||
import { getIntDictOptions } from './../../../utils/dict'
|
||||
import { getIntDictOptions } from '@/utils/dict'
|
||||
import { BasicColumn, FormSchema, useRender } from '@/components/Table'
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import { h } from 'vue'
|
||||
|
|
Loading…
Reference in New Issue