diff --git a/src/views/system/message/manage/manage.data.ts b/src/views/system/message/manage/manage.data.ts index db634c9..f0c0418 100644 --- a/src/views/system/message/manage/manage.data.ts +++ b/src/views/system/message/manage/manage.data.ts @@ -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 },