Browse Source

消息优化

main
cs 2 months ago
parent
commit
9084a05f09
  1. 4
      src/pages/message/my/index.tsx
  2. 3
      src/pages/message/template/index.tsx
  3. 16
      src/types/message/template.ts

4
src/pages/message/my/index.tsx

@ -10,7 +10,7 @@ import {getValueCount, unSetColumnRules} from '@/utils'
import {Table as ProTable} from '@/components/table'
import {msgListAtom, msgSearchAtom, saveMsgAtom} from "@/store/message/my.ts";
import {templateAllListAtom} from "@/store/message/template.ts";
import {IMsgTemplate} from "@/types/message/template.ts";
import {coverType, IMsgTemplate} from "@/types/message/template.ts";
const i18nPrefix = 'msgMy.list'
@ -243,7 +243,7 @@ const MdwMessage = () => {
title: t(`${i18nPrefix}.columns.type`, '类型'),
dataIndex: 'type',
render: (_, record) => {
return <div>{record.type}</div>
return <div>{coverType(record.type)}</div>
}
},
{

3
src/pages/message/template/index.tsx

@ -16,6 +16,7 @@ import {
templateListAtom,
templateSearchAtom
} from "@/store/message/template.ts";
import {coverType} from "@/types/message/template.ts";
const i18nPrefix = 'mdwMessage.list'
@ -214,7 +215,7 @@ const MdwMessage = () => {
title: t(`${i18nPrefix}.columns.type`, '模板类型'),
dataIndex: 'type',
render: (_, record) => {
return <div>{record.type}</div>
return <div>{coverType(record.type)}</div>
}
},
{

16
src/types/message/template.ts

@ -7,3 +7,19 @@ export interface IMsgTemplate {
type: string
fields: string
}
export const coverType = (type: string) => {
let typeText = ''
switch (type) {
case 'SMS':
typeText = '短信'
break
case 'EMAIL':
typeText = '邮件'
break
case 'TG':
typeText = 'Telegram'
break
}
return typeText
}
Loading…
Cancel
Save