diff --git a/src/pages/message/my/index.tsx b/src/pages/message/my/index.tsx
index 63971f4..f1f4080 100644
--- a/src/pages/message/my/index.tsx
+++ b/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
{record.type}
+ return {coverType(record.type)}
}
},
{
diff --git a/src/pages/message/template/index.tsx b/src/pages/message/template/index.tsx
index dcc1ccc..c481efc 100644
--- a/src/pages/message/template/index.tsx
+++ b/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 {record.type}
+ return {coverType(record.type)}
}
},
{
diff --git a/src/types/message/template.ts b/src/types/message/template.ts
index 25cf08c..7ff2eec 100644
--- a/src/types/message/template.ts
+++ b/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
+}