fix(sms): 修复短信渠道列表展示不一致
parent
5710761dbe
commit
d910450426
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue