Commit e8658d2a15f6140e4747ff1b5a80ce246fb40e60

Authored by 黄 x
1 parent e038a147

fix(front): 使用后台返回的DictText

... ... @@ -15,28 +15,12 @@ export const columns: BasicColumn[] = [
15 15 },
16 16 {
17 17 title: '消息类型',
18   - dataIndex: 'messageType',
19   - format: (_, record: Recordable) => {
20   - return record.messageType === 'PHONE_MESSAGE'
21   - ? '短信'
22   - : record.type === 'DING_TALK_MESSAGE'
23   - ? '钉钉'
24   - : '邮件';
25   - },
  18 + dataIndex: 'messageTypeDictText',
26 19 width: 200,
27 20 },
28 21 {
29 22 title: '平台类型',
30   - dataIndex: 'platformType',
31   - format: (_, record: Recordable) => {
32   - return record.messageType === MessageTypeEnum.EMAIL_MESSAGE
33   - ? '无'
34   - : record.messageType === MessageTypeEnum.PHONE_MESSAGE
35   - ? record.platformType === 'ALI_CLOUD'
36   - ? '阿里云平台'
37   - : '腾讯云平台'
38   - : '无';
39   - },
  23 + dataIndex: 'platformTypeDictText',
40 24 width: 180,
41 25 },
42 26 {
... ...
... ... @@ -17,10 +17,15 @@ export const columns: BasicColumn[] = [
17 17 {
18 18 title: '配置名称',
19 19 dataIndex: 'messageConfig.configName',
20   - width: 200,
  20 + width: 180,
21 21 slots: { customRender: 'config' },
22 22 },
23 23 {
  24 + title: '配置类型',
  25 + dataIndex: 'messageTypeDictText',
  26 + width: 100,
  27 + },
  28 + {
24 29 title: '模板编码',
25 30 dataIndex: 'templateCode',
26 31 width: 180,
... ... @@ -38,7 +43,7 @@ export const columns: BasicColumn[] = [
38 43 {
39 44 title: '状态',
40 45 dataIndex: 'status',
41   - width: 180,
  46 + width: 100,
42 47 customRender: ({ record }) => {
43 48 if (!Reflect.has(record, 'pendingStatus')) {
44 49 record.pendingStatus = false;
... ...