From 9e85d8a2804ff4f5c8503626fac3b3d59612e41b Mon Sep 17 00:00:00 2001 From: xingyuv Date: Wed, 22 Mar 2023 14:31:54 +0800 Subject: [PATCH] feat: action width --- src/views/system/dept/index.vue | 2 +- src/views/system/dict/DictData.vue | 2 +- src/views/system/dict/index.vue | 2 +- src/views/system/errorCode/index.vue | 2 +- src/views/system/mail/account/index.vue | 2 +- src/views/system/mail/template/index.vue | 2 +- src/views/system/menu/index.vue | 2 +- src/views/system/notice/index.vue | 2 +- src/views/system/oauth2/client/index.vue | 2 +- src/views/system/post/index.vue | 2 +- src/views/system/role/index.vue | 2 +- src/views/system/sensitiveWord/index.vue | 2 +- src/views/system/sms/SmsChannelModal.vue | 54 +++++++++ src/views/system/sms/smsChannel.data.ts | 137 +++++++++++++++++++++++ src/views/system/sms/smsChannel.vue | 79 ++++++++++++- src/views/system/tenant/index.vue | 2 +- src/views/system/tenantPackage/index.vue | 2 +- src/views/system/user/index.vue | 2 +- 18 files changed, 284 insertions(+), 16 deletions(-) create mode 100644 src/views/system/sms/SmsChannelModal.vue create mode 100644 src/views/system/sms/smsChannel.data.ts diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index ef1cd0d..3dbe475 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -66,7 +66,7 @@ const [register, { expandAll, collapseAll, getForm, reload }] = useTable({ showIndexColumn: false, canResize: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/dict/DictData.vue b/src/views/system/dict/DictData.vue index cbe7bf1..1e45f73 100644 --- a/src/views/system/dict/DictData.vue +++ b/src/views/system/dict/DictData.vue @@ -61,7 +61,7 @@ const [registerTable, { reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 0388054..3d1a9f7 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -56,7 +56,7 @@ const [registerTable, { reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/errorCode/index.vue b/src/views/system/errorCode/index.vue index 075a12b..28a4294 100644 --- a/src/views/system/errorCode/index.vue +++ b/src/views/system/errorCode/index.vue @@ -52,7 +52,7 @@ const [registerTable, { getForm, reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/mail/account/index.vue b/src/views/system/mail/account/index.vue index 968c5a0..96f0288 100644 --- a/src/views/system/mail/account/index.vue +++ b/src/views/system/mail/account/index.vue @@ -51,7 +51,7 @@ const [registerTable, { reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/mail/template/index.vue b/src/views/system/mail/template/index.vue index f1d1a09..7dd015c 100644 --- a/src/views/system/mail/template/index.vue +++ b/src/views/system/mail/template/index.vue @@ -51,7 +51,7 @@ const [registerTable, { reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 1e0f4d1..442d18b 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -61,7 +61,7 @@ const [register, { expandAll, collapseAll, getForm, reload }] = useTable({ showIndexColumn: false, canResize: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index 23d014d..ab85022 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -51,7 +51,7 @@ const [registerTable, { reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/oauth2/client/index.vue b/src/views/system/oauth2/client/index.vue index 38a145e..e4ce594 100644 --- a/src/views/system/oauth2/client/index.vue +++ b/src/views/system/oauth2/client/index.vue @@ -51,7 +51,7 @@ const [registerTable, { reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index 2e53244..b0ac2e2 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -53,7 +53,7 @@ const [registerTable, { getForm, reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index e396b9f..980752e 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -54,7 +54,7 @@ const [registerTable, { getForm, reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/sensitiveWord/index.vue b/src/views/system/sensitiveWord/index.vue index 252ecb6..b3bf2f4 100644 --- a/src/views/system/sensitiveWord/index.vue +++ b/src/views/system/sensitiveWord/index.vue @@ -57,7 +57,7 @@ const [registerTable, { getForm, reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/sms/SmsChannelModal.vue b/src/views/system/sms/SmsChannelModal.vue new file mode 100644 index 0000000..ac32a8e --- /dev/null +++ b/src/views/system/sms/SmsChannelModal.vue @@ -0,0 +1,54 @@ + + diff --git a/src/views/system/sms/smsChannel.data.ts b/src/views/system/sms/smsChannel.data.ts new file mode 100644 index 0000000..83b58f2 --- /dev/null +++ b/src/views/system/sms/smsChannel.data.ts @@ -0,0 +1,137 @@ +import { BasicColumn, FormSchema, useRender } from '@/components/Table' +import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' + +export const columns: BasicColumn[] = [ + { + title: '编号', + dataIndex: 'id', + width: 100 + }, + { + title: '短信签名', + dataIndex: 'signature', + width: 180 + }, + { + title: '渠道编码', + dataIndex: 'code', + width: 180, + customRender: ({ text }) => { + return useRender.renderDict(text, DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) + } + }, + { + title: '启用状态', + dataIndex: 'status', + width: 180, + customRender: ({ text }) => { + return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) + } + }, + { + title: '备注', + dataIndex: 'remark', + width: 180 + }, + { + title: '短信 API 的账号', + dataIndex: 'apiKey', + width: 180 + }, + { + title: '短信 API 的密钥', + dataIndex: 'apiSecret', + width: 180 + }, + { + title: '短信发送回调 URL', + dataIndex: 'callbackUrl', + width: 180 + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 180, + customRender: ({ text }) => { + return useRender.renderDate(text) + } + } +] + +export const searchFormSchema: FormSchema[] = [ + { + label: '短信签名', + field: 'signature', + component: 'Input', + colProps: { span: 8 } + }, + { + label: '启用状态', + field: 'status', + component: 'Select', + componentProps: { + options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + }, + colProps: { span: 8 } + }, + { + label: '创建时间', + field: 'createTime', + component: 'RangePicker', + colProps: { span: 8 } + } +] + +export const formSchema: FormSchema[] = [ + { + label: '编号', + field: 'id', + show: false, + component: 'Input' + }, + { + label: '短信签名', + field: 'signature', + required: true, + component: 'Input' + }, + { + label: '渠道编码', + field: 'code', + component: 'Select', + required: true, + componentProps: { + options: getIntDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) + } + }, + { + label: '启用状态', + field: 'status', + component: 'Select', + defaultValue: 0, + componentProps: { + options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + } + }, + { + label: '备注', + field: 'remark', + component: 'InputTextArea' + }, + { + label: '短信 API 的账号', + field: 'apiKey', + required: true, + component: 'Input' + }, + { + label: '短信 API 的密钥', + field: 'apiSecret', + component: 'Input' + }, + { + label: '短信发送回调 URL', + field: 'callbackUrl', + component: 'Input' + } +] diff --git a/src/views/system/sms/smsChannel.vue b/src/views/system/sms/smsChannel.vue index 3b64cfc..302dce1 100644 --- a/src/views/system/sms/smsChannel.vue +++ b/src/views/system/sms/smsChannel.vue @@ -1,3 +1,80 @@ + diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index 8b4742a..4e4dc0c 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -52,7 +52,7 @@ const [registerTable, { getForm, reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue index 5916d87..d92fbe4 100644 --- a/src/views/system/tenantPackage/index.vue +++ b/src/views/system/tenantPackage/index.vue @@ -51,7 +51,7 @@ const [registerTable, { reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right' diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 3c166f2..6b4027a 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -58,7 +58,7 @@ const [registerTable, { getForm, reload }] = useTable({ showTableSetting: true, showIndexColumn: false, actionColumn: { - width: 120, + width: 140, title: t('common.action'), dataIndex: 'action', fixed: 'right'