From d91045042666d73edd481abf437b5b2f8e9fcedc Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 23 May 2026 16:41:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(sms):=20=E4=BF=AE=E5=A4=8D=E7=9F=AD?= =?UTF-8?q?=E4=BF=A1=E6=B8=A0=E9=81=93=E5=88=97=E8=A1=A8=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/system/sms/log/data.ts | 16 +++++++++++----- .../src/views/system/sms/template/data.ts | 16 +++++++++++----- .../src/views/system/sms/log/data.ts | 16 +++++++++++----- .../src/views/system/sms/template/data.ts | 16 +++++++++++----- apps/web-ele/src/views/system/sms/log/data.ts | 16 +++++++++++----- .../src/views/system/sms/template/data.ts | 16 +++++++++++----- apps/web-naive/src/views/system/sms/log/data.ts | 16 +++++++++++----- .../src/views/system/sms/template/data.ts | 16 +++++++++++----- .../web-tdesign/src/views/system/sms/log/data.ts | 16 +++++++++++----- .../src/views/system/sms/template/data.ts | 16 +++++++++++----- 10 files changed, 110 insertions(+), 50 deletions(-) diff --git a/apps/web-antd/src/views/system/sms/log/data.ts b/apps/web-antd/src/views/system/sms/log/data.ts index 3babce416..9eed1257a 100644 --- a/apps/web-antd/src/views/system/sms/log/data.ts +++ b/apps/web-antd/src/views/system/sms/log/data.ts @@ -1,5 +1,6 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { SystemSmsChannelApi } from '#/api/system/sms/channel'; import type { DescriptionItemSchema } from '#/components/description'; import { h } from 'vue'; @@ -12,6 +13,10 @@ import { getSimpleSmsChannelList } from '#/api/system/sms/channel'; import { DictTag } from '#/components/dict-tag'; import { getRangePickerDefaultProps } from '#/utils'; +/** 关联数据 */ +let channelList: SystemSmsChannelApi.SmsChannel[] = []; +getSimpleSmsChannelList().then((data) => (channelList = data)); + /** 列表的搜索表单 */ export function useGridFormSchema(): VbenFormSchema[] { return [ @@ -135,13 +140,14 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { formatter: 'formatDateTime', }, { - field: 'channelCode', + field: 'channelId', title: '短信渠道', minWidth: 120, - cellRender: { - name: 'CellDict', - props: { type: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE }, - }, + formatter: ({ cellValue, row }) => + channelList.find((channel) => channel.id === cellValue)?.signature ?? + channelList.find((channel) => channel.code === row.channelCode) + ?.signature ?? + '-', }, { field: 'templateId', diff --git a/apps/web-antd/src/views/system/sms/template/data.ts b/apps/web-antd/src/views/system/sms/template/data.ts index 13786c56a..79ae3c811 100644 --- a/apps/web-antd/src/views/system/sms/template/data.ts +++ b/apps/web-antd/src/views/system/sms/template/data.ts @@ -1,5 +1,6 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { SystemSmsChannelApi } from '#/api/system/sms/channel'; import { CommonStatusEnum, DICT_TYPE } from '@vben/constants'; import { getDictOptions } from '@vben/hooks'; @@ -8,6 +9,10 @@ import { z } from '#/adapter/form'; import { getSimpleSmsChannelList } from '#/api/system/sms/channel'; import { getRangePickerDefaultProps } from '#/utils'; +/** 关联数据 */ +let channelList: SystemSmsChannelApi.SmsChannel[] = []; +getSimpleSmsChannelList().then((data) => (channelList = data)); + /** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { return [ @@ -245,13 +250,14 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { minWidth: 180, }, { - field: 'channelCode', + field: 'channelId', title: '短信渠道', minWidth: 100, - cellRender: { - name: 'CellDict', - props: { type: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE }, - }, + formatter: ({ cellValue, row }) => + channelList.find((channel) => channel.id === cellValue)?.signature ?? + channelList.find((channel) => channel.code === row.channelCode) + ?.signature ?? + '-', }, { field: 'createTime', diff --git a/apps/web-antdv-next/src/views/system/sms/log/data.ts b/apps/web-antdv-next/src/views/system/sms/log/data.ts index 3babce416..9eed1257a 100644 --- a/apps/web-antdv-next/src/views/system/sms/log/data.ts +++ b/apps/web-antdv-next/src/views/system/sms/log/data.ts @@ -1,5 +1,6 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { SystemSmsChannelApi } from '#/api/system/sms/channel'; import type { DescriptionItemSchema } from '#/components/description'; import { h } from 'vue'; @@ -12,6 +13,10 @@ import { getSimpleSmsChannelList } from '#/api/system/sms/channel'; import { DictTag } from '#/components/dict-tag'; import { getRangePickerDefaultProps } from '#/utils'; +/** 关联数据 */ +let channelList: SystemSmsChannelApi.SmsChannel[] = []; +getSimpleSmsChannelList().then((data) => (channelList = data)); + /** 列表的搜索表单 */ export function useGridFormSchema(): VbenFormSchema[] { return [ @@ -135,13 +140,14 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { formatter: 'formatDateTime', }, { - field: 'channelCode', + field: 'channelId', title: '短信渠道', minWidth: 120, - cellRender: { - name: 'CellDict', - props: { type: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE }, - }, + formatter: ({ cellValue, row }) => + channelList.find((channel) => channel.id === cellValue)?.signature ?? + channelList.find((channel) => channel.code === row.channelCode) + ?.signature ?? + '-', }, { field: 'templateId', diff --git a/apps/web-antdv-next/src/views/system/sms/template/data.ts b/apps/web-antdv-next/src/views/system/sms/template/data.ts index fdd0fcce8..53f6160c5 100644 --- a/apps/web-antdv-next/src/views/system/sms/template/data.ts +++ b/apps/web-antdv-next/src/views/system/sms/template/data.ts @@ -1,5 +1,6 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { SystemSmsChannelApi } from '#/api/system/sms/channel'; import { CommonStatusEnum, DICT_TYPE } from '@vben/constants'; import { getDictOptions } from '@vben/hooks'; @@ -8,6 +9,10 @@ import { z } from '#/adapter/form'; import { getSimpleSmsChannelList } from '#/api/system/sms/channel'; import { getRangePickerDefaultProps } from '#/utils'; +/** 关联数据 */ +let channelList: SystemSmsChannelApi.SmsChannel[] = []; +getSimpleSmsChannelList().then((data) => (channelList = data)); + /** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { return [ @@ -245,13 +250,14 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { minWidth: 180, }, { - field: 'channelCode', + field: 'channelId', title: '短信渠道', minWidth: 100, - cellRender: { - name: 'CellDict', - props: { type: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE }, - }, + formatter: ({ cellValue, row }) => + channelList.find((channel) => channel.id === cellValue)?.signature ?? + channelList.find((channel) => channel.code === row.channelCode) + ?.signature ?? + '-', }, { field: 'createTime', diff --git a/apps/web-ele/src/views/system/sms/log/data.ts b/apps/web-ele/src/views/system/sms/log/data.ts index 3657516b6..f6881d7ef 100644 --- a/apps/web-ele/src/views/system/sms/log/data.ts +++ b/apps/web-ele/src/views/system/sms/log/data.ts @@ -1,5 +1,6 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { SystemSmsChannelApi } from '#/api/system/sms/channel'; import type { DescriptionItemSchema } from '#/components/description'; import { h } from 'vue'; @@ -12,6 +13,10 @@ import { getSimpleSmsChannelList } from '#/api/system/sms/channel'; import { DictTag } from '#/components/dict-tag'; import { getRangePickerDefaultProps } from '#/utils'; +/** 关联数据 */ +let channelList: SystemSmsChannelApi.SmsChannel[] = []; +getSimpleSmsChannelList().then((data) => (channelList = data)); + /** 列表的搜索表单 */ export function useGridFormSchema(): VbenFormSchema[] { return [ @@ -135,13 +140,14 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { formatter: 'formatDateTime', }, { - field: 'channelCode', + field: 'channelId', title: '短信渠道', minWidth: 120, - cellRender: { - name: 'CellDict', - props: { type: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE }, - }, + formatter: ({ cellValue, row }) => + channelList.find((channel) => channel.id === cellValue)?.signature ?? + channelList.find((channel) => channel.code === row.channelCode) + ?.signature ?? + '-', }, { field: 'templateId', diff --git a/apps/web-ele/src/views/system/sms/template/data.ts b/apps/web-ele/src/views/system/sms/template/data.ts index 0a3d3e814..031ba137f 100644 --- a/apps/web-ele/src/views/system/sms/template/data.ts +++ b/apps/web-ele/src/views/system/sms/template/data.ts @@ -1,5 +1,6 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { SystemSmsChannelApi } from '#/api/system/sms/channel'; import { CommonStatusEnum, DICT_TYPE } from '@vben/constants'; import { getDictOptions } from '@vben/hooks'; @@ -8,6 +9,10 @@ import { z } from '#/adapter/form'; import { getSimpleSmsChannelList } from '#/api/system/sms/channel'; import { getRangePickerDefaultProps } from '#/utils'; +/** 关联数据 */ +let channelList: SystemSmsChannelApi.SmsChannel[] = []; +getSimpleSmsChannelList().then((data) => (channelList = data)); + /** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { return [ @@ -243,13 +248,14 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { minWidth: 180, }, { - field: 'channelCode', + field: 'channelId', title: '短信渠道', minWidth: 100, - cellRender: { - name: 'CellDict', - props: { type: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE }, - }, + formatter: ({ cellValue, row }) => + channelList.find((channel) => channel.id === cellValue)?.signature ?? + channelList.find((channel) => channel.code === row.channelCode) + ?.signature ?? + '-', }, { field: 'createTime', diff --git a/apps/web-naive/src/views/system/sms/log/data.ts b/apps/web-naive/src/views/system/sms/log/data.ts index 6fea4bb36..b54a661cb 100644 --- a/apps/web-naive/src/views/system/sms/log/data.ts +++ b/apps/web-naive/src/views/system/sms/log/data.ts @@ -1,5 +1,6 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { SystemSmsChannelApi } from '#/api/system/sms/channel'; import type { DescriptionItemSchema } from '#/components/description'; import { h } from 'vue'; @@ -12,6 +13,10 @@ import { getSimpleSmsChannelList } from '#/api/system/sms/channel'; import { DictTag } from '#/components/dict-tag'; import { getRangePickerDefaultProps } from '#/utils'; +/** 关联数据 */ +let channelList: SystemSmsChannelApi.SmsChannel[] = []; +getSimpleSmsChannelList().then((data) => (channelList = data)); + /** 列表的搜索表单 */ export function useGridFormSchema(): VbenFormSchema[] { return [ @@ -135,13 +140,14 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { formatter: 'formatDateTime', }, { - field: 'channelCode', + field: 'channelId', title: '短信渠道', minWidth: 120, - cellRender: { - name: 'CellDict', - props: { type: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE }, - }, + formatter: ({ cellValue, row }) => + channelList.find((channel) => channel.id === cellValue)?.signature ?? + channelList.find((channel) => channel.code === row.channelCode) + ?.signature ?? + '-', }, { field: 'templateId', diff --git a/apps/web-naive/src/views/system/sms/template/data.ts b/apps/web-naive/src/views/system/sms/template/data.ts index d8b381040..675901177 100644 --- a/apps/web-naive/src/views/system/sms/template/data.ts +++ b/apps/web-naive/src/views/system/sms/template/data.ts @@ -1,5 +1,6 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { SystemSmsChannelApi } from '#/api/system/sms/channel'; import { CommonStatusEnum, DICT_TYPE } from '@vben/constants'; import { getDictOptions } from '@vben/hooks'; @@ -8,6 +9,10 @@ import { z } from '#/adapter/form'; import { getSimpleSmsChannelList } from '#/api/system/sms/channel'; import { getRangePickerDefaultProps } from '#/utils'; +/** 关联数据 */ +let channelList: SystemSmsChannelApi.SmsChannel[] = []; +getSimpleSmsChannelList().then((data) => (channelList = data)); + /** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { return [ @@ -246,13 +251,14 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { minWidth: 180, }, { - field: 'channelCode', + field: 'channelId', title: '短信渠道', minWidth: 100, - cellRender: { - name: 'CellDict', - props: { type: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE }, - }, + formatter: ({ cellValue, row }) => + channelList.find((channel) => channel.id === cellValue)?.signature ?? + channelList.find((channel) => channel.code === row.channelCode) + ?.signature ?? + '-', }, { field: 'createTime', diff --git a/apps/web-tdesign/src/views/system/sms/log/data.ts b/apps/web-tdesign/src/views/system/sms/log/data.ts index 3babce416..9eed1257a 100644 --- a/apps/web-tdesign/src/views/system/sms/log/data.ts +++ b/apps/web-tdesign/src/views/system/sms/log/data.ts @@ -1,5 +1,6 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { SystemSmsChannelApi } from '#/api/system/sms/channel'; import type { DescriptionItemSchema } from '#/components/description'; import { h } from 'vue'; @@ -12,6 +13,10 @@ import { getSimpleSmsChannelList } from '#/api/system/sms/channel'; import { DictTag } from '#/components/dict-tag'; import { getRangePickerDefaultProps } from '#/utils'; +/** 关联数据 */ +let channelList: SystemSmsChannelApi.SmsChannel[] = []; +getSimpleSmsChannelList().then((data) => (channelList = data)); + /** 列表的搜索表单 */ export function useGridFormSchema(): VbenFormSchema[] { return [ @@ -135,13 +140,14 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { formatter: 'formatDateTime', }, { - field: 'channelCode', + field: 'channelId', title: '短信渠道', minWidth: 120, - cellRender: { - name: 'CellDict', - props: { type: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE }, - }, + formatter: ({ cellValue, row }) => + channelList.find((channel) => channel.id === cellValue)?.signature ?? + channelList.find((channel) => channel.code === row.channelCode) + ?.signature ?? + '-', }, { field: 'templateId', diff --git a/apps/web-tdesign/src/views/system/sms/template/data.ts b/apps/web-tdesign/src/views/system/sms/template/data.ts index 13786c56a..79ae3c811 100644 --- a/apps/web-tdesign/src/views/system/sms/template/data.ts +++ b/apps/web-tdesign/src/views/system/sms/template/data.ts @@ -1,5 +1,6 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { SystemSmsChannelApi } from '#/api/system/sms/channel'; import { CommonStatusEnum, DICT_TYPE } from '@vben/constants'; import { getDictOptions } from '@vben/hooks'; @@ -8,6 +9,10 @@ import { z } from '#/adapter/form'; import { getSimpleSmsChannelList } from '#/api/system/sms/channel'; import { getRangePickerDefaultProps } from '#/utils'; +/** 关联数据 */ +let channelList: SystemSmsChannelApi.SmsChannel[] = []; +getSimpleSmsChannelList().then((data) => (channelList = data)); + /** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { return [ @@ -245,13 +250,14 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { minWidth: 180, }, { - field: 'channelCode', + field: 'channelId', title: '短信渠道', minWidth: 100, - cellRender: { - name: 'CellDict', - props: { type: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE }, - }, + formatter: ({ cellValue, row }) => + channelList.find((channel) => channel.id === cellValue)?.signature ?? + channelList.find((channel) => channel.code === row.channelCode) + ?.signature ?? + '-', }, { field: 'createTime',