diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index ed535d9..1f6bc24 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -2,7 +2,7 @@ import { defineComponent, PropType, ref } from 'vue' import { isHexColor } from '@/utils/color' import { Tag } from 'ant-design-vue' -import { DictDataType, getBoolDictOptions, getDictOptions, getStrDictOptions } from '@/utils/dict' +import { DictDataType, getDictOpts } from '@/utils/dict' import { propTypes } from '@/utils/propTypes' export default defineComponent({ @@ -13,20 +13,13 @@ export default defineComponent({ required: true }, value: propTypes.oneOfType([propTypes.string, propTypes.number, propTypes.bool]), - dictType: propTypes.oneOf(['string', 'boolean', 'number']).def('number'), icon: { type: String } }, setup(props) { const dictData = ref<DictDataType>() const getDictObj = (dictType: string, value: string) => { let dictOptions: DictDataType[] = [] - if (props.dictType && props.dictType === 'boolean') { - dictOptions = getBoolDictOptions(dictType) - } else if (props.dictType && props.dictType === 'string') { - dictOptions = getStrDictOptions(dictType) - } else { - dictOptions = getDictOptions(dictType) - } + dictOptions = getDictOpts(dictType) if (dictOptions && dictOptions.length === 0) { return } diff --git a/src/components/Form/src/components/ApiSelect.vue b/src/components/Form/src/components/ApiSelect.vue index d1c2200..5eb242a 100644 --- a/src/components/Form/src/components/ApiSelect.vue +++ b/src/components/Form/src/components/ApiSelect.vue @@ -1,5 +1,12 @@ <template> - <Select @dropdown-visible-change="handleFetch" v-bind="attrs" @change="handleChange" :options="getOptions" v-model:value="state"> + <Select + @dropdown-visible-change="handleFetch" + style="max-height: 150px" + v-bind="attrs" + @change="handleChange" + :options="getOptions" + v-model:value="state" + > <template #[item]="data" v-for="item in Object.keys($slots)"> <slot :name="item" v-bind="data || {}"></slot> </template> diff --git a/src/components/Table/src/hooks/useRender.ts b/src/components/Table/src/hooks/useRender.ts index 472f7ee..e55976c 100644 --- a/src/components/Table/src/hooks/useRender.ts +++ b/src/components/Table/src/hooks/useRender.ts @@ -94,13 +94,12 @@ export const useRender = { /** * 渲染字典 * @param text 字典值 - * @param type 字典类型 - * @param dictType number | string | boolean + * @param dictType 字典类型 * @returns 字典标签 */ - renderDict: (text, type, dictType?) => { - if (type) { - return h(DictTag, { type: type, value: text, dictType: dictType }) + renderDict: (text, dictType) => { + if (dictType) { + return h(DictTag, { type: dictType, value: text }) } return '' }, diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 5d26ffd..04be54e 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -23,15 +23,27 @@ export const getDictOptions = (dictType: string) => { return dictStore.getDictMap[dictType] } -export const getIntDictOptions = (dictType: string) => { +export const getDictOpts = (dictType: string) => { const dictOption: DictDataType[] = [] const dictOptions: DictDataType[] = getDictOptions(dictType) if (dictOptions && dictOptions.length > 0) { dictOptions.forEach((dict: DictDataType) => { - dictOption.push({ - ...dict, - value: parseInt(dict.value + '') - }) + if (typeof dict.value === 'number') { + dictOption.push({ + ...dict, + value: parseInt(dict.value + '') + }) + } else if (typeof dict.value === 'string') { + dictOption.push({ + ...dict, + value: dict.value + '' + }) + } else if (typeof dict.value === 'boolean') { + dictOption.push({ + ...dict, + value: dict.value + '' === 'true' ? true : false + }) + } }) } diff --git a/src/views/bpm/form/form.data.ts b/src/views/bpm/form/form.data.ts index 5d4b606..b4cb395 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -47,7 +47,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(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 6b4937b..1d80798 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } 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: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -129,7 +129,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } } ] diff --git a/src/views/bpm/model/model.data.ts b/src/views/bpm/model/model.data.ts index 58e589b..33e9936 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' import { Button, Switch } from 'ant-design-vue' import { h } from 'vue' @@ -28,7 +28,7 @@ export const columns: BasicColumn[] = [ dataIndex: 'category', width: 120, customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.BPM_MODEL_CATEGORY, 'string') + return useRender.renderDict(text, DICT_TYPE.BPM_MODEL_CATEGORY) } }, { @@ -132,7 +132,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'category', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY) + options: getDictOpts(DICT_TYPE.BPM_MODEL_CATEGORY) }, colProps: { span: 8 } } @@ -165,7 +165,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY) + options: getDictOpts(DICT_TYPE.BPM_MODEL_CATEGORY) } }, { @@ -179,7 +179,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', ifShow: ({ values }) => !!values.id, componentProps: { - options: getIntDictOptions(DICT_TYPE.BPM_MODEL_FORM_TYPE) + options: getDictOpts(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 0a9dbcb..8d09c14 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -60,7 +60,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.BPM_OA_LEAVE_TYPE) + options: getDictOpts(DICT_TYPE.BPM_OA_LEAVE_TYPE) }, colProps: { span: 8 } }, @@ -75,7 +75,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) + options: getDictOpts(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 833f095..1d60018 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -73,7 +73,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'userType', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.USER_TYPE) + options: getDictOpts(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 7c69bce..e6e2bfd 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'userType', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.USER_TYPE) + options: getDictOpts(DICT_TYPE.USER_TYPE) }, colProps: { span: 8 } }, @@ -103,7 +103,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'processStatus', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS) + options: getDictOpts(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 43b3367..29f234b 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' const dataSourceConfigs = await getDataSourceConfigList() @@ -104,7 +104,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/infra/codegen/components/data.ts b/src/views/infra/codegen/components/data.ts index c2499b8..bdad5aa 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 { getIntDictOptions, DICT_TYPE } from '@/utils/dict' +import { getDictOpts, 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: getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_TEMPLATE_TYPE) + options: getDictOpts(DICT_TYPE.INFRA_CODEGEN_TEMPLATE_TYPE) }, colProps: { span: 12 } }, @@ -69,7 +69,7 @@ export const basicInfoSchemas: FormSchema[] = [ required: true, component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_FRONT_TYPE) + options: getDictOpts(DICT_TYPE.INFRA_CODEGEN_FRONT_TYPE) }, colProps: { span: 12 } }, @@ -79,7 +79,7 @@ export const basicInfoSchemas: FormSchema[] = [ required: true, component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_SCENE) + options: getDictOpts(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 4d79f8a..16d2cb2 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.INFRA_CONFIG_TYPE) + options: getDictOpts(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 cc5d26d..d8c88d8 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -55,7 +55,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'storage', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.INFRA_FILE_STORAGE) + options: getDictOpts(DICT_TYPE.INFRA_FILE_STORAGE) }, colProps: { span: 8 } }, @@ -87,7 +87,7 @@ export const formSchema: FormSchema[] = [ required: true, dynamicDisabled: ({ values }) => !!values.id, componentProps: { - options: getIntDictOptions(DICT_TYPE.INFRA_FILE_STORAGE) + options: getDictOpts(DICT_TYPE.INFRA_FILE_STORAGE) } }, { diff --git a/src/views/infra/job/job.data.ts b/src/views/infra/job/job.data.ts index 6307833..f7b2dfd 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -50,7 +50,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.INFRA_JOB_STATUS) + options: getDictOpts(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 06d6b81..46d9ced 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -78,7 +78,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.INFRA_JOB_STATUS) + options: getDictOpts(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 a6031b9..a1b2b9f 100644 --- a/src/views/mp/message/message.data.ts +++ b/src/views/mp/message/message.data.ts @@ -1,4 +1,4 @@ -import { getStrDictOptions } from '@/utils/dict' +import { getDictOpts } from '@/utils/dict' import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { DICT_TYPE } from '@/utils/dict' import { getSimpleAccounts } from '@/api/mp/account' @@ -121,7 +121,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getStrDictOptions(DICT_TYPE.MP_MESSAGE_TYPE) + options: getDictOpts(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 9465f87..5dbe6d0 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } 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: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -210,7 +210,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/pay/demo/demo.data.ts b/src/views/pay/demo/demo.data.ts index a183eca..3bbcd38 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -84,7 +84,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'payed', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING) + options: getDictOpts(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 01ff858..812537c 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } 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: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -140,7 +140,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/pay/order/order.data.ts b/src/views/pay/order/order.data.ts index 8b1ee20..daab9bd 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -128,7 +128,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'channelCode', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.PAY_CHANNEL_CODE_TYPE) + options: getDictOpts(DICT_TYPE.PAY_CHANNEL_CODE_TYPE) }, colProps: { span: 8 } }, @@ -149,7 +149,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.PAY_ORDER_STATUS) + options: getDictOpts(DICT_TYPE.PAY_ORDER_STATUS) }, colProps: { span: 8 } }, @@ -158,7 +158,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'refundStatus', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.PAY_ORDER_REFUND_STATUS) + options: getDictOpts(DICT_TYPE.PAY_ORDER_REFUND_STATUS) }, colProps: { span: 8 } }, @@ -167,7 +167,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'notifyStatus', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS) + options: getDictOpts(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 c86fcd3..7c98ad7 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -143,7 +143,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'channelCode', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.PAY_CHANNEL_CODE_TYPE) + options: getDictOpts(DICT_TYPE.PAY_CHANNEL_CODE_TYPE) }, colProps: { span: 8 } }, @@ -152,7 +152,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.PAY_REFUND_ORDER_TYPE) + options: getDictOpts(DICT_TYPE.PAY_REFUND_ORDER_TYPE) }, colProps: { span: 8 } }, @@ -173,7 +173,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.PAY_REFUND_ORDER_STATUS) + options: getDictOpts(DICT_TYPE.PAY_REFUND_ORDER_STATUS) }, colProps: { span: 8 } }, @@ -182,7 +182,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'notifyStatus', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS) + options: getDictOpts(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 56c7e8b..2eb460f 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, getStrDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } 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' @@ -83,7 +83,7 @@ const otherPayChannels = ref<any[]>([]) function initPayChannels() { // 微信支付 - for (const dict of getStrDictOptions(DICT_TYPE.PAY_CHANNEL_CODE_TYPE)) { + for (const dict of getDictOpts(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 efca803..054ee2f 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' let userOptions: any[] = [] @@ -70,7 +70,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -147,7 +147,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } } ] diff --git a/src/views/system/dict/dict.data.ts b/src/views/system/dict/dict.data.ts index aa5da44..c5f6ff3 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const dataColumns: BasicColumn[] = [ { @@ -67,7 +67,7 @@ export const dataSearchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -112,7 +112,7 @@ export const dataFormSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/dict/dict.type.ts b/src/views/system/dict/dict.type.ts index 87439d3..fc77554 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const typeColumns: BasicColumn[] = [ { @@ -47,7 +47,7 @@ export const typeSearchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -78,7 +78,7 @@ export const typeFormSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/errorCode/errorCode.data.ts b/src/views/system/errorCode/errorCode.data.ts index 41d515e..d0fef1e 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -51,7 +51,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_ERROR_CODE_TYPE) + options: getDictOpts(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 c764208..b359e56 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, getBoolDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -102,7 +102,7 @@ export const formSchema: FormSchema[] = [ field: 'sslEnable', component: 'Switch', componentProps: { - options: getBoolDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING) + options: getDictOpts(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 1150889..e8d5afa 100644 --- a/src/views/system/mail/log/mailLog.data.ts +++ b/src/views/system/mail/log/mailLog.data.ts @@ -1,4 +1,4 @@ -import { getIntDictOptions } from '@/utils/dict' +import { getDictOpts } from '@/utils/dict' import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { DICT_TYPE } from '@/utils/dict' import { getSimpleMailAccountList } from '@/api/system/mail/account' @@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'sendStatus', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_MAIL_SEND_STATUS) + options: getDictOpts(DICT_TYPE.SYSTEM_MAIL_SEND_STATUS) }, colProps: { span: 8 } }, @@ -91,7 +91,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'userType', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.USER_TYPE) + options: getDictOpts(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 3e4f451..b23fc07 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -83,7 +83,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -151,7 +151,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/menu/menu.data.ts b/src/views/system/menu/menu.data.ts index 069cd80..22a401a 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } 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: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -100,7 +100,7 @@ export const formSchema: FormSchema[] = [ defaultValue: '0', component: 'RadioButtonGroup', componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_MENU_TYPE) + options: getDictOpts(DICT_TYPE.SYSTEM_MENU_TYPE) }, colProps: { lg: 24, md: 24 } }, @@ -160,7 +160,7 @@ export const formSchema: FormSchema[] = [ defaultValue: 0, helpMessage: '选择停用时,路由将不会出现在侧边栏,也不能被访问', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/notice/notice.data.ts b/src/views/system/notice/notice.data.ts index e583d26..5bf587f 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -49,7 +49,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -75,7 +75,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_NOTICE_TYPE) + options: getDictOpts(DICT_TYPE.SYSTEM_NOTICE_TYPE) } }, { @@ -84,7 +84,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(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 14ed168..f3e67b1 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -93,7 +93,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'templateType', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) + options: getDictOpts(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 ccb0c5b..7ee59af 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -44,7 +44,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'readStatus', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING) + options: getDictOpts(DICT_TYPE.INFRA_BOOLEAN_STRING) }, colProps: { span: 8 } }, @@ -93,7 +93,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) + options: getDictOpts(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) } }, { @@ -102,7 +102,7 @@ export const formSchema: FormSchema[] = [ component: 'RadioGroup', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(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 284e186..fda7f5d 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -71,7 +71,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -120,7 +120,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) + options: getDictOpts(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) } }, { @@ -129,7 +129,7 @@ export const formSchema: FormSchema[] = [ component: 'RadioGroup', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(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 68a7fd4..dc59152 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, getIntDictOptions, getStrDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -79,7 +79,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -131,7 +131,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, { @@ -154,7 +154,7 @@ export const formSchema: FormSchema[] = [ required: true, component: 'Select', componentProps: { - options: getStrDictOptions(DICT_TYPE.SYSTEM_OAUTH2_GRANT_TYPE), + options: getDictOpts(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 d9c5d02..b4b76f9 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -61,7 +61,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'userType', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.USER_TYPE) + options: getDictOpts(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 2b4d5cb..3e771a4 100644 --- a/src/views/system/operatelog/operateLog.data.ts +++ b/src/views/system/operatelog/operateLog.data.ts @@ -1,4 +1,4 @@ -import { getIntDictOptions } from '@/utils/dict' +import { getDictOpts } from '@/utils/dict' import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { DICT_TYPE } from '@/utils/dict' @@ -80,7 +80,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_OPERATE_TYPE) + options: getDictOpts(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 db5a024..48a06a5 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -63,7 +63,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } } @@ -101,7 +101,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/role/role.data.ts b/src/views/system/role/role.data.ts index 04e0f8b..7cce4fd 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } 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: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -111,7 +111,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, { @@ -173,7 +173,7 @@ export const dataScopeFormSchema: FormSchema[] = [ required: true, component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_DATA_SCOPE) + options: getDictOpts(DICT_TYPE.SYSTEM_DATA_SCOPE) } }, { diff --git a/src/views/system/sensitiveWord/sensitiveWord.data.ts b/src/views/system/sensitiveWord/sensitiveWord.data.ts index 33c4d0e..51a6cc7 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -61,7 +61,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -92,7 +92,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(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 2cca160..10ff8e9 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, getIntDictOptions, getStrDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -70,7 +70,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -101,7 +101,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', required: true, componentProps: { - options: getStrDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) + options: getDictOpts(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) } }, { @@ -110,7 +110,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(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 d536d88..47235c1 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 { getIntDictOptions } from '@/utils/dict' +import { getDictOpts } 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: getIntDictOptions(DICT_TYPE.SYSTEM_SMS_SEND_STATUS) + options: getDictOpts(DICT_TYPE.SYSTEM_SMS_SEND_STATUS) }, colProps: { span: 8 } }, @@ -120,7 +120,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'receiveStatus', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS) + options: getDictOpts(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 cc8387b..a4678c1 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -67,7 +67,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'type', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE) + options: getDictOpts(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE) }, colProps: { span: 8 } }, @@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -97,7 +97,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'channelId', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) + options: getDictOpts(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) }, colProps: { span: 8 } }, @@ -128,7 +128,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE) + options: getDictOpts(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE) } }, { @@ -155,7 +155,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, { diff --git a/src/views/system/tenant/tenant.data.ts b/src/views/system/tenant/tenant.data.ts index f792a6a..410ebb5 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -96,7 +96,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -185,7 +185,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } } ] diff --git a/src/views/system/tenantPackage/tenantPackage.data.ts b/src/views/system/tenantPackage/tenantPackage.data.ts index c0aec05..0acec26 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } from '@/utils/dict' export const columns: BasicColumn[] = [ { @@ -47,7 +47,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -84,7 +84,7 @@ export const formSchema: FormSchema[] = [ component: 'Select', defaultValue: 0, componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } } ] diff --git a/src/views/system/user/user.data.ts b/src/views/system/user/user.data.ts index ab295ac..7d54cc9 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, getIntDictOptions } from '@/utils/dict' +import { DICT_TYPE, getDictOpts } 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: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) }, colProps: { span: 8 } }, @@ -173,7 +173,7 @@ export const formSchema: FormSchema[] = [ field: 'sex', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX) + options: getDictOpts(DICT_TYPE.SYSTEM_USER_SEX) } }, { @@ -192,7 +192,7 @@ export const formSchema: FormSchema[] = [ field: 'status', component: 'Select', componentProps: { - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + options: getDictOpts(DICT_TYPE.COMMON_STATUS) } }, {