From 7c8aeb8998b21650dcc7e2c5af65e2bcc796b3ac Mon Sep 17 00:00:00 2001 From: xingyu Date: Sun, 14 May 2023 16:36:27 +0800 Subject: [PATCH] fix: dict --- src/utils/dict.ts | 39 ++++++++----------- src/views/bpm/form/form.data.ts | 4 +- src/views/bpm/group/group.data.ts | 6 +-- src/views/bpm/model/model.data.ts | 8 ++-- src/views/bpm/oa/leave/leave.data.ts | 6 +-- .../infra/apiAccessLog/apiAccessLog.data.ts | 4 +- .../infra/apiErrorLog/apiErrorLog.data.ts | 6 +-- src/views/infra/codegen/codegen.data.ts | 4 +- src/views/infra/codegen/components/data.ts | 8 ++-- src/views/infra/config/config.data.ts | 4 +- .../infra/fileConfig/ficleConfig.data.ts | 6 +-- src/views/infra/job/job.data.ts | 4 +- src/views/infra/job/logger/jobLog.data.ts | 4 +- src/views/mp/message/message.data.ts | 5 +-- src/views/pay/app/app.data.ts | 6 +-- src/views/pay/demo/demo.data.ts | 4 +- src/views/pay/merchant/merchant.data.ts | 6 +-- src/views/pay/order/order.data.ts | 10 ++--- src/views/pay/refund/refund.data.ts | 10 ++--- src/views/pay/submit/index.vue | 4 +- src/views/system/dept/dept.data.ts | 6 +-- src/views/system/dict/dict.data.ts | 6 +-- src/views/system/dict/dict.type.ts | 6 +-- src/views/system/errorCode/errorCode.data.ts | 4 +- src/views/system/mail/account/account.data.ts | 4 +- src/views/system/mail/log/mailLog.data.ts | 7 ++-- .../system/mail/template/template.data.ts | 6 +-- src/views/system/menu/menu.data.ts | 8 ++-- src/views/system/notice/notice.data.ts | 8 ++-- .../system/notify/message/message.data.ts | 4 +- src/views/system/notify/my/my.data.ts | 8 ++-- .../system/notify/template/template.data.ts | 8 ++-- src/views/system/oauth2/client/client.data.ts | 8 ++-- src/views/system/oauth2/token/token.data.ts | 4 +- .../system/operatelog/operateLog.data.ts | 5 +-- src/views/system/post/post.data.ts | 6 +-- src/views/system/role/role.data.ts | 8 ++-- .../sensitiveWord/sensitiveWord.data.ts | 6 +-- .../system/sms/channel/smsChannel.data.ts | 8 ++-- src/views/system/sms/log/smsLog.data.ts | 6 +-- .../system/sms/template/smsTemplate.data.ts | 12 +++--- src/views/system/tenant/tenant.data.ts | 6 +-- .../tenantPackage/tenantPackage.data.ts | 6 +-- src/views/system/user/user.data.ts | 10 +++-- 44 files changed, 150 insertions(+), 158 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 04be54ee..853d8bac 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -19,13 +19,13 @@ export interface DictDataType { cssClass: string } -export const getDictOptions = (dictType: string) => { - return dictStore.getDictMap[dictType] +export function getDictDatas(dictType: string) { + return dictStore.getDictMap[dictType] || [] } -export const getDictOpts = (dictType: string) => { +export function getDictOpts(dictType: string) { const dictOption: DictDataType[] = [] - const dictOptions: DictDataType[] = getDictOptions(dictType) + const dictOptions: DictDataType[] = getDictDatas(dictType) if (dictOptions && dictOptions.length > 0) { dictOptions.forEach((dict: DictDataType) => { if (typeof dict.value === 'number') { @@ -50,36 +50,29 @@ export const getDictOpts = (dictType: string) => { return dictOption } -export const getStrDictOptions = (dictType: string) => { +export function getDictOptions(dictType: string, valueType?: 'string' | 'number' | 'boolean') { const dictOption: DictDataType[] = [] - const dictOptions: DictDataType[] = getDictOptions(dictType) + const dictOptions: DictDataType[] = getDictDatas(dictType) if (dictOptions && dictOptions.length > 0) { dictOptions.forEach((dict: DictDataType) => { dictOption.push({ ...dict, - value: dict.value + '' + value: + valueType === 'string' + ? dict.value + '' + : valueType === 'boolean' + ? dict.value + '' === 'true' + ? true + : false + : parseInt(dict.value + '') }) }) } return dictOption } -export const getBoolDictOptions = (dictType: string) => { - const dictOption: DictDataType[] = [] - const dictOptions: DictDataType[] = getDictOptions(dictType) - if (dictOptions && dictOptions.length > 0) { - dictOptions.forEach((dict: DictDataType) => { - dictOption.push({ - ...dict, - value: dict.value + '' === 'true' ? true : false - }) - }) - } - return dictOption -} - -export const getDictObj = (dictType: string, value: any) => { - const dictOptions: DictDataType[] = getDictOptions(dictType) +export function getDictObj(dictType: string, value: any) { + const dictOptions: DictDataType[] = getDictDatas(dictType) if (dictOptions) { dictOptions.forEach((dict: DictDataType) => { if (dict.value === value.toString()) { diff --git a/src/views/bpm/form/form.data.ts b/src/views/bpm/form/form.data.ts index b4cb3956..93b926a2 100644 --- a/src/views/bpm/form/form.data.ts +++ b/src/views/bpm/form/form.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -47,7 +47,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } diff --git a/src/views/bpm/group/group.data.ts b/src/views/bpm/group/group.data.ts index 1d807982..047b5d75 100644 --- a/src/views/bpm/group/group.data.ts +++ b/src/views/bpm/group/group.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { getListSimpleUsers } from '@/api/system/user' let users: any[] = [] @@ -80,7 +80,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -129,7 +129,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } } ] diff --git a/src/views/bpm/model/model.data.ts b/src/views/bpm/model/model.data.ts index 33e99362..1b5f00f4 100644 --- a/src/views/bpm/model/model.data.ts +++ b/src/views/bpm/model/model.data.ts @@ -2,7 +2,7 @@ import { getSimpleForms } from '@/api/bpm/form' import { updateModelState } from '@/api/bpm/model' import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { useMessage } from '@/hooks/web/useMessage' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { Button, Switch } from 'ant-design-vue' import { h } from 'vue' @@ -132,7 +132,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'category', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.BPM_MODEL_CATEGORY) + options: getDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY) }, colProps: { span: 8 } } @@ -165,7 +165,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.BPM_MODEL_CATEGORY) + options: getDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY) } }, { @@ -179,7 +179,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', ifShow: ({ values }) => !!values.id, componentProps: { - options: getDictOpts(DICT_TYPE.BPM_MODEL_FORM_TYPE) + options: getDictOptions(DICT_TYPE.BPM_MODEL_FORM_TYPE) } }, { diff --git a/src/views/bpm/oa/leave/leave.data.ts b/src/views/bpm/oa/leave/leave.data.ts index 8d09c143..babd00ff 100644 --- a/src/views/bpm/oa/leave/leave.data.ts +++ b/src/views/bpm/oa/leave/leave.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -60,7 +60,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.BPM_OA_LEAVE_TYPE) + options: getDictOptions(DICT_TYPE.BPM_OA_LEAVE_TYPE) }, colProps: { span: 8 } }, @@ -75,7 +75,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) + options: getDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) }, colProps: { span: 8 } }, diff --git a/src/views/infra/apiAccessLog/apiAccessLog.data.ts b/src/views/infra/apiAccessLog/apiAccessLog.data.ts index 1d600189..3d165942 100644 --- a/src/views/infra/apiAccessLog/apiAccessLog.data.ts +++ b/src/views/infra/apiAccessLog/apiAccessLog.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -73,7 +73,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'userType', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.USER_TYPE) + options: getDictOptions(DICT_TYPE.USER_TYPE) }, colProps: { span: 8 } }, diff --git a/src/views/infra/apiErrorLog/apiErrorLog.data.ts b/src/views/infra/apiErrorLog/apiErrorLog.data.ts index e6e2bfd0..f3191681 100644 --- a/src/views/infra/apiErrorLog/apiErrorLog.data.ts +++ b/src/views/infra/apiErrorLog/apiErrorLog.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'userType', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.USER_TYPE) + options: getDictOptions(DICT_TYPE.USER_TYPE) }, colProps: { span: 8 } }, @@ -103,7 +103,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'processStatus', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS) + options: getDictOptions(DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS) }, colProps: { span: 8 } } diff --git a/src/views/infra/codegen/codegen.data.ts b/src/views/infra/codegen/codegen.data.ts index 29f234bd..8945041e 100644 --- a/src/views/infra/codegen/codegen.data.ts +++ b/src/views/infra/codegen/codegen.data.ts @@ -1,6 +1,6 @@ import { getDataSourceConfigList } from '@/api/infra/dataSourceConfig' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' const dataSourceConfigs = await getDataSourceConfigList() @@ -104,7 +104,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/infra/codegen/components/data.ts b/src/views/infra/codegen/components/data.ts index bdad5aaa..873b3097 100644 --- a/src/views/infra/codegen/components/data.ts +++ b/src/views/infra/codegen/components/data.ts @@ -2,7 +2,7 @@ import { listSimpleDictType } from '@/api/system/dict/type' import { listSimpleMenus } from '@/api/system/menu' import { FormSchema } from '@/components/Form' import { BasicColumn } from '@/components/Table' -import { getDictOpts, DICT_TYPE } from '@/utils/dict' +import { getDictOptions, DICT_TYPE } from '@/utils/dict' async function getDictTypeOptions() { const dictTypeOptions: any[] = [] @@ -59,7 +59,7 @@ export const basicInfoSchemas: FormSchema[] = [ required: true, component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_CODEGEN_TEMPLATE_TYPE) + options: getDictOptions(DICT_TYPE.INFRA_CODEGEN_TEMPLATE_TYPE) }, colProps: { span: 12 } }, @@ -69,7 +69,7 @@ export const basicInfoSchemas: FormSchema[] = [ required: true, component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_CODEGEN_FRONT_TYPE) + options: getDictOptions(DICT_TYPE.INFRA_CODEGEN_FRONT_TYPE) }, colProps: { span: 12 } }, @@ -79,7 +79,7 @@ export const basicInfoSchemas: FormSchema[] = [ required: true, component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_CODEGEN_SCENE) + options: getDictOptions(DICT_TYPE.INFRA_CODEGEN_SCENE) }, colProps: { span: 12 } }, diff --git a/src/views/infra/config/config.data.ts b/src/views/infra/config/config.data.ts index 16d2cb2a..c3a8a022 100644 --- a/src/views/infra/config/config.data.ts +++ b/src/views/infra/config/config.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_CONFIG_TYPE) + options: getDictOptions(DICT_TYPE.INFRA_CONFIG_TYPE) }, colProps: { span: 8 } }, diff --git a/src/views/infra/fileConfig/ficleConfig.data.ts b/src/views/infra/fileConfig/ficleConfig.data.ts index d8c88d86..4f784544 100644 --- a/src/views/infra/fileConfig/ficleConfig.data.ts +++ b/src/views/infra/fileConfig/ficleConfig.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -55,7 +55,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'storage', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_FILE_STORAGE) + options: getDictOptions(DICT_TYPE.INFRA_FILE_STORAGE) }, colProps: { span: 8 } }, @@ -87,7 +87,7 @@ export const formSchema: FormSchema[] = [ required: true, dynamicDisabled: ({ values }) => !!values.id, componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_FILE_STORAGE) + options: getDictOptions(DICT_TYPE.INFRA_FILE_STORAGE) } }, { diff --git a/src/views/infra/job/job.data.ts b/src/views/infra/job/job.data.ts index 922f6c7e..bf370e39 100644 --- a/src/views/infra/job/job.data.ts +++ b/src/views/infra/job/job.data.ts @@ -1,6 +1,6 @@ import { DescItem } from '@/components/Description' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { useComponentRegister } from '@/components/Form' import { CronTab } from '@/components/CronTab' @@ -54,7 +54,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_JOB_STATUS) + options: getDictOptions(DICT_TYPE.INFRA_JOB_STATUS) }, colProps: { span: 8 } }, diff --git a/src/views/infra/job/logger/jobLog.data.ts b/src/views/infra/job/logger/jobLog.data.ts index 46d9cedf..bce1b332 100644 --- a/src/views/infra/job/logger/jobLog.data.ts +++ b/src/views/infra/job/logger/jobLog.data.ts @@ -1,6 +1,6 @@ import { DescItem } from '@/components/Description' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -78,7 +78,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_JOB_STATUS) + options: getDictOptions(DICT_TYPE.INFRA_JOB_STATUS) }, colProps: { span: 8 } }, diff --git a/src/views/mp/message/message.data.ts b/src/views/mp/message/message.data.ts index d12494b9..8e390be3 100644 --- a/src/views/mp/message/message.data.ts +++ b/src/views/mp/message/message.data.ts @@ -1,6 +1,5 @@ -import { getDictOpts } from '@/utils/dict' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { getSimpleAccounts } from '@/api/mp/account' export enum MsgType { @@ -121,7 +120,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.MP_MESSAGE_TYPE) + options: getDictOptions(DICT_TYPE.MP_MESSAGE_TYPE) }, colProps: { span: 8 } }, diff --git a/src/views/pay/app/app.data.ts b/src/views/pay/app/app.data.ts index 5dbe6d01..d5b3f827 100644 --- a/src/views/pay/app/app.data.ts +++ b/src/views/pay/app/app.data.ts @@ -3,7 +3,7 @@ import { getMerchantListByName } from '@/api/pay/merchant' import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { PayChannelEnum } from '@/enums/systemEnum' import { useMessage } from '@/hooks/web/useMessage' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { Tag, Switch } from 'ant-design-vue' import { h } from 'vue' @@ -168,7 +168,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -210,7 +210,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/pay/demo/demo.data.ts b/src/views/pay/demo/demo.data.ts index 3bbcd387..42826fd9 100644 --- a/src/views/pay/demo/demo.data.ts +++ b/src/views/pay/demo/demo.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -84,7 +84,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'payed', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_BOOLEAN_STRING) + options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING) }, colProps: { span: 8 } } diff --git a/src/views/pay/merchant/merchant.data.ts b/src/views/pay/merchant/merchant.data.ts index 812537cb..0ead293f 100644 --- a/src/views/pay/merchant/merchant.data.ts +++ b/src/views/pay/merchant/merchant.data.ts @@ -1,7 +1,7 @@ import { changeMerchantStatus } from '@/api/pay/merchant' import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { useMessage } from '@/hooks/web/useMessage' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { Switch } from 'ant-design-vue' import { h } from 'vue' @@ -97,7 +97,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -140,7 +140,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/pay/order/order.data.ts b/src/views/pay/order/order.data.ts index daab9bd4..b3c1c9ef 100644 --- a/src/views/pay/order/order.data.ts +++ b/src/views/pay/order/order.data.ts @@ -1,7 +1,7 @@ import { getMerchantListByName } from '@/api/pay/merchant' import { DescItem } from '@/components/Description' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -128,7 +128,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'channelCode', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.PAY_CHANNEL_CODE_TYPE) + options: getDictOptions(DICT_TYPE.PAY_CHANNEL_CODE_TYPE) }, colProps: { span: 8 } }, @@ -149,7 +149,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.PAY_ORDER_STATUS) + options: getDictOptions(DICT_TYPE.PAY_ORDER_STATUS) }, colProps: { span: 8 } }, @@ -158,7 +158,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'refundStatus', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.PAY_ORDER_REFUND_STATUS) + options: getDictOptions(DICT_TYPE.PAY_ORDER_REFUND_STATUS) }, colProps: { span: 8 } }, @@ -167,7 +167,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'notifyStatus', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS) + options: getDictOptions(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS) }, colProps: { span: 8 } }, diff --git a/src/views/pay/refund/refund.data.ts b/src/views/pay/refund/refund.data.ts index 7c98ad76..62bf77a6 100644 --- a/src/views/pay/refund/refund.data.ts +++ b/src/views/pay/refund/refund.data.ts @@ -1,7 +1,7 @@ import { getMerchantListByName } from '@/api/pay/merchant' import { DescItem } from '@/components/Description' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -143,7 +143,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'channelCode', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.PAY_CHANNEL_CODE_TYPE) + options: getDictOptions(DICT_TYPE.PAY_CHANNEL_CODE_TYPE) }, colProps: { span: 8 } }, @@ -152,7 +152,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.PAY_REFUND_ORDER_TYPE) + options: getDictOptions(DICT_TYPE.PAY_REFUND_ORDER_TYPE) }, colProps: { span: 8 } }, @@ -173,7 +173,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.PAY_REFUND_ORDER_STATUS) + options: getDictOptions(DICT_TYPE.PAY_REFUND_ORDER_STATUS) }, colProps: { span: 8 } }, @@ -182,7 +182,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'notifyStatus', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS) + options: getDictOptions(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS) }, colProps: { span: 8 } }, diff --git a/src/views/pay/submit/index.vue b/src/views/pay/submit/index.vue index cde99d1d..48e9fc18 100644 --- a/src/views/pay/submit/index.vue +++ b/src/views/pay/submit/index.vue @@ -49,7 +49,7 @@ import { Card, List } from 'ant-design-vue' import { Description } from '@/components/Description' import { descSchema } from './submit.data' import { getOrder, submitOrder } from '@/api/pay/order' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { useRoute } from 'vue-router' import alipay_qr from '@/assets/images/pay/icon/alipay_qr.svg' import alipay_app from '@/assets/images/pay/icon/alipay_app.svg' @@ -85,7 +85,7 @@ const otherPayChannels = ref([]) function initPayChannels() { // 微信支付 - for (const dict of getDictOpts(DICT_TYPE.PAY_CHANNEL_CODE_TYPE)) { + for (const dict of getDictOptions(DICT_TYPE.PAY_CHANNEL_CODE_TYPE)) { const payChannel = { name: dict.label, code: dict.value as string diff --git a/src/views/system/dept/dept.data.ts b/src/views/system/dept/dept.data.ts index 054ee2f8..684b88b4 100644 --- a/src/views/system/dept/dept.data.ts +++ b/src/views/system/dept/dept.data.ts @@ -1,7 +1,7 @@ import { listSimpleDept } from '@/api/system/dept' import { getListSimpleUsers } from '@/api/system/user' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' let userOptions: any[] = [] @@ -70,7 +70,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -147,7 +147,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } } ] diff --git a/src/views/system/dict/dict.data.ts b/src/views/system/dict/dict.data.ts index c5f6ff38..e65731a4 100644 --- a/src/views/system/dict/dict.data.ts +++ b/src/views/system/dict/dict.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const dataColumns: BasicColumn[] = [ { @@ -67,7 +67,7 @@ export const dataSearchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -112,7 +112,7 @@ export const dataFormSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/dict/dict.type.ts b/src/views/system/dict/dict.type.ts index fc775541..b5b0c793 100644 --- a/src/views/system/dict/dict.type.ts +++ b/src/views/system/dict/dict.type.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const typeColumns: BasicColumn[] = [ { @@ -47,7 +47,7 @@ export const typeSearchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -78,7 +78,7 @@ export const typeFormSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/errorCode/errorCode.data.ts b/src/views/system/errorCode/errorCode.data.ts index d0fef1e0..16572579 100644 --- a/src/views/system/errorCode/errorCode.data.ts +++ b/src/views/system/errorCode/errorCode.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -51,7 +51,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_ERROR_CODE_TYPE) + options: getDictOptions(DICT_TYPE.SYSTEM_ERROR_CODE_TYPE) }, colProps: { span: 8 } }, diff --git a/src/views/system/mail/account/account.data.ts b/src/views/system/mail/account/account.data.ts index b359e56f..8f270548 100644 --- a/src/views/system/mail/account/account.data.ts +++ b/src/views/system/mail/account/account.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -102,7 +102,7 @@ export const formSchema: FormSchema[] = [ field: 'sslEnable', component: 'Switch', componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_BOOLEAN_STRING) + options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING) } } ] diff --git a/src/views/system/mail/log/mailLog.data.ts b/src/views/system/mail/log/mailLog.data.ts index e8d5afa6..7106cca1 100644 --- a/src/views/system/mail/log/mailLog.data.ts +++ b/src/views/system/mail/log/mailLog.data.ts @@ -1,6 +1,5 @@ -import { getDictOpts } from '@/utils/dict' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { getSimpleMailAccountList } from '@/api/system/mail/account' export const columns: BasicColumn[] = [ @@ -76,7 +75,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'sendStatus', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_MAIL_SEND_STATUS) + options: getDictOptions(DICT_TYPE.SYSTEM_MAIL_SEND_STATUS) }, colProps: { span: 8 } }, @@ -91,7 +90,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'userType', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.USER_TYPE) + options: getDictOptions(DICT_TYPE.USER_TYPE) }, colProps: { span: 8 } }, diff --git a/src/views/system/mail/template/template.data.ts b/src/views/system/mail/template/template.data.ts index b23fc073..d753c701 100644 --- a/src/views/system/mail/template/template.data.ts +++ b/src/views/system/mail/template/template.data.ts @@ -1,6 +1,6 @@ import { getSimpleMailAccountList } from '@/api/system/mail/account' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -83,7 +83,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -151,7 +151,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/menu/menu.data.ts b/src/views/system/menu/menu.data.ts index 22a401ac..1077f6f2 100644 --- a/src/views/system/menu/menu.data.ts +++ b/src/views/system/menu/menu.data.ts @@ -1,6 +1,6 @@ import { listSimpleMenus } from '@/api/system/menu' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { SystemMenuTypeEnum } from '@/enums/systemEnum' export const columns: BasicColumn[] = [ @@ -63,7 +63,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -100,7 +100,7 @@ export const formSchema: FormSchema[] = [ defaultValue: '0', component: 'RadioButtonGroup', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_MENU_TYPE) + options: getDictOptions(DICT_TYPE.SYSTEM_MENU_TYPE) }, colProps: { lg: 24, md: 24 } }, @@ -160,7 +160,7 @@ export const formSchema: FormSchema[] = [ defaultValue: 0, helpMessage: '选择停用时,路由将不会出现在侧边栏,也不能被访问', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/notice/notice.data.ts b/src/views/system/notice/notice.data.ts index 5bf587fe..7fb433a2 100644 --- a/src/views/system/notice/notice.data.ts +++ b/src/views/system/notice/notice.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -49,7 +49,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -75,7 +75,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_NOTICE_TYPE) + options: getDictOptions(DICT_TYPE.SYSTEM_NOTICE_TYPE) } }, { @@ -84,7 +84,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/notify/message/message.data.ts b/src/views/system/notify/message/message.data.ts index f3e67b11..f7c7ab04 100644 --- a/src/views/system/notify/message/message.data.ts +++ b/src/views/system/notify/message/message.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -93,7 +93,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'templateType', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) + options: getDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) }, colProps: { span: 8 } }, diff --git a/src/views/system/notify/my/my.data.ts b/src/views/system/notify/my/my.data.ts index 7ee59af1..3831dbd8 100644 --- a/src/views/system/notify/my/my.data.ts +++ b/src/views/system/notify/my/my.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -44,7 +44,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'readStatus', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.INFRA_BOOLEAN_STRING) + options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING) }, colProps: { span: 8 } }, @@ -93,7 +93,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) + options: getDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) } }, { @@ -102,7 +102,7 @@ export const formSchema: FormSchema[] = [ component: 'RadioGroup', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/notify/template/template.data.ts b/src/views/system/notify/template/template.data.ts index fda7f5d4..82dede8e 100644 --- a/src/views/system/notify/template/template.data.ts +++ b/src/views/system/notify/template/template.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -71,7 +71,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -120,7 +120,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) + options: getDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) } }, { @@ -129,7 +129,7 @@ export const formSchema: FormSchema[] = [ component: 'RadioGroup', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/oauth2/client/client.data.ts b/src/views/system/oauth2/client/client.data.ts index dc59152a..4060c006 100644 --- a/src/views/system/oauth2/client/client.data.ts +++ b/src/views/system/oauth2/client/client.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -79,7 +79,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -131,7 +131,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { @@ -154,7 +154,7 @@ export const formSchema: FormSchema[] = [ required: true, component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_OAUTH2_GRANT_TYPE), + options: getDictOptions(DICT_TYPE.SYSTEM_OAUTH2_GRANT_TYPE), mode: 'multiple' } }, diff --git a/src/views/system/oauth2/token/token.data.ts b/src/views/system/oauth2/token/token.data.ts index b4b76f9c..949596dc 100644 --- a/src/views/system/oauth2/token/token.data.ts +++ b/src/views/system/oauth2/token/token.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -61,7 +61,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'userType', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.USER_TYPE) + options: getDictOptions(DICT_TYPE.USER_TYPE) }, colProps: { span: 8 } } diff --git a/src/views/system/operatelog/operateLog.data.ts b/src/views/system/operatelog/operateLog.data.ts index 3e771a44..a37a252f 100644 --- a/src/views/system/operatelog/operateLog.data.ts +++ b/src/views/system/operatelog/operateLog.data.ts @@ -1,6 +1,5 @@ -import { getDictOpts } from '@/utils/dict' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -80,7 +79,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_OPERATE_TYPE) + options: getDictOptions(DICT_TYPE.SYSTEM_OPERATE_TYPE) }, colProps: { span: 8 } }, diff --git a/src/views/system/post/post.data.ts b/src/views/system/post/post.data.ts index 48a06a51..d549eac5 100644 --- a/src/views/system/post/post.data.ts +++ b/src/views/system/post/post.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -63,7 +63,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -101,7 +101,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/role/role.data.ts b/src/views/system/role/role.data.ts index 7cce4fd3..2237df19 100644 --- a/src/views/system/role/role.data.ts +++ b/src/views/system/role/role.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { SystemDataScopeEnum } from '@/enums/systemEnum' export const columns: BasicColumn[] = [ @@ -67,7 +67,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -111,7 +111,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { @@ -173,7 +173,7 @@ export const dataScopeFormSchema: FormSchema[] = [ required: true, component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_DATA_SCOPE) + options: getDictOptions(DICT_TYPE.SYSTEM_DATA_SCOPE) } }, { diff --git a/src/views/system/sensitiveWord/sensitiveWord.data.ts b/src/views/system/sensitiveWord/sensitiveWord.data.ts index 51a6cc74..7bb643f3 100644 --- a/src/views/system/sensitiveWord/sensitiveWord.data.ts +++ b/src/views/system/sensitiveWord/sensitiveWord.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -61,7 +61,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -92,7 +92,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/sms/channel/smsChannel.data.ts b/src/views/system/sms/channel/smsChannel.data.ts index 10ff8e9b..210a5bde 100644 --- a/src/views/system/sms/channel/smsChannel.data.ts +++ b/src/views/system/sms/channel/smsChannel.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -70,7 +70,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -101,7 +101,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', required: true, componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) + options: getDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) } }, { @@ -110,7 +110,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/sms/log/smsLog.data.ts b/src/views/system/sms/log/smsLog.data.ts index 47235c1d..e5e7f7f8 100644 --- a/src/views/system/sms/log/smsLog.data.ts +++ b/src/views/system/sms/log/smsLog.data.ts @@ -1,5 +1,5 @@ import { getSimpleSmsChannels } from '@/api/system/sms/smsChannel' -import { getDictOpts } from '@/utils/dict' +import { getDictOptions } from '@/utils/dict' import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { DICT_TYPE } from '@/utils/dict' @@ -105,7 +105,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'sendStatus', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_SMS_SEND_STATUS) + options: getDictOptions(DICT_TYPE.SYSTEM_SMS_SEND_STATUS) }, colProps: { span: 8 } }, @@ -120,7 +120,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'receiveStatus', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS) + options: getDictOptions(DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS) }, colProps: { span: 8 } }, diff --git a/src/views/system/sms/template/smsTemplate.data.ts b/src/views/system/sms/template/smsTemplate.data.ts index a4678c1f..487fa7a2 100644 --- a/src/views/system/sms/template/smsTemplate.data.ts +++ b/src/views/system/sms/template/smsTemplate.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -67,7 +67,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE) + options: getDictOptions(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE) }, colProps: { span: 8 } }, @@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -97,7 +97,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'channelId', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) + options: getDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) }, colProps: { span: 8 } }, @@ -128,7 +128,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE) + options: getDictOptions(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE) } }, { @@ -155,7 +155,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/tenant/tenant.data.ts b/src/views/system/tenant/tenant.data.ts index 410ebb55..42e8ed76 100644 --- a/src/views/system/tenant/tenant.data.ts +++ b/src/views/system/tenant/tenant.data.ts @@ -1,6 +1,6 @@ import { getTenantPackageList } from '@/api/system/tenantPackage' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -96,7 +96,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -185,7 +185,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } } ] diff --git a/src/views/system/tenantPackage/tenantPackage.data.ts b/src/views/system/tenantPackage/tenantPackage.data.ts index 0acec26a..737c92cf 100644 --- a/src/views/system/tenantPackage/tenantPackage.data.ts +++ b/src/views/system/tenantPackage/tenantPackage.data.ts @@ -1,5 +1,5 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -47,7 +47,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -84,7 +84,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } } ] diff --git a/src/views/system/user/user.data.ts b/src/views/system/user/user.data.ts index 7d54cc92..f5d30c73 100644 --- a/src/views/system/user/user.data.ts +++ b/src/views/system/user/user.data.ts @@ -4,7 +4,7 @@ import { useMessage } from '@/hooks/web/useMessage' import { listSimpleDept } from '@/api/system/dept' import { listSimplePosts } from '@/api/system/post' import { BasicColumn, FormSchema, useRender } from '@/components/Table' -import { DICT_TYPE, getDictOpts } from '@/utils/dict' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { updateUserStatus } from '@/api/system/user' import { listSimpleRoles } from '@/api/system/role' @@ -100,7 +100,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -173,13 +173,14 @@ export const formSchema: FormSchema[] = [ field: 'sex', component: 'Select', componentProps: { - options: getDictOpts(DICT_TYPE.SYSTEM_USER_SEX) + options: getDictOptions(DICT_TYPE.SYSTEM_USER_SEX) } }, { label: '岗位', field: 'postIds', component: 'ApiSelect', + defaultValue: [], componentProps: { api: () => listSimplePosts(), labelField: 'name', @@ -191,8 +192,9 @@ export const formSchema: FormSchema[] = [ label: '状态', field: 'status', component: 'Select', + defaultValue: 0, componentProps: { - options: getDictOpts(DICT_TYPE.COMMON_STATUS) + options: getDictOptions(DICT_TYPE.COMMON_STATUS) } }, {