feat(消息管理): 新增员工电话列展示与搜索项
- 列表新增「员工电话」列,从esContent提取3~4~4格式手机号显示纯数字 - 搜索表单新增「员工电话」项,参数传后台由后端还原波浪线后模糊查询 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,18 @@ export const columns: BasicColumn[] = [
|
||||
// slots: { customRender: 'esContent' },
|
||||
},
|
||||
{
|
||||
title: '发送人',
|
||||
title: '员工电话',
|
||||
dataIndex: 'employeePhone',
|
||||
width: 140,
|
||||
// 从发送内容中提取 3位~4位~4位 格式的手机号(如 185~9920~5354),取第一个匹配项并去掉分隔符显示纯数字,匹配不到则显示空
|
||||
// 分隔符兼容半角~、全角~、连字符-
|
||||
customRender: ({ record }) => {
|
||||
const match = record?.esContent?.match(/\d{3}[~~\-]\d{4}[~~\-]\d{4}/);
|
||||
return match ? match[0].replace(/[~~\-]/g, '') : '';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '接收人',
|
||||
dataIndex: 'esReceiver',
|
||||
width: 140,
|
||||
},
|
||||
@@ -46,10 +57,16 @@ export const searchFormSchema: FormSchema[] = [
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '发送人',
|
||||
label: '接收人',
|
||||
field: 'esReceiver',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
// 员工电话: 传到后台后由后台拼回波浪线再模糊查询 esContent
|
||||
label: '员工电话',
|
||||
field: 'employeePhone',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '发送状态',
|
||||
field: 'esSendStatus',
|
||||
@@ -95,7 +112,7 @@ export const formSchemas: FormSchema[] = [
|
||||
},
|
||||
|
||||
{
|
||||
label: '发送人',
|
||||
label: '接收人',
|
||||
field: 'esReceiver',
|
||||
component: 'Input',
|
||||
componentProps: { readOnly: true },
|
||||
|
||||
Reference in New Issue
Block a user