Browse Source

refactor: vben dict

main
xingyu 2 years ago
parent
commit
1c110cc232
  1. 11
      src/components/DictTag/src/DictTag.vue
  2. 9
      src/components/Form/src/components/ApiSelect.vue
  3. 9
      src/components/Table/src/hooks/useRender.ts
  4. 14
      src/utils/dict.ts
  5. 4
      src/views/bpm/form/form.data.ts
  6. 6
      src/views/bpm/group/group.data.ts
  7. 10
      src/views/bpm/model/model.data.ts
  8. 6
      src/views/bpm/oa/leave/leave.data.ts
  9. 4
      src/views/infra/apiAccessLog/apiAccessLog.data.ts
  10. 6
      src/views/infra/apiErrorLog/apiErrorLog.data.ts
  11. 4
      src/views/infra/codegen/codegen.data.ts
  12. 8
      src/views/infra/codegen/components/data.ts
  13. 4
      src/views/infra/config/config.data.ts
  14. 6
      src/views/infra/fileConfig/ficleConfig.data.ts
  15. 4
      src/views/infra/job/job.data.ts
  16. 4
      src/views/infra/job/logger/jobLog.data.ts
  17. 4
      src/views/mp/message/message.data.ts
  18. 6
      src/views/pay/app/app.data.ts
  19. 4
      src/views/pay/demo/demo.data.ts
  20. 6
      src/views/pay/merchant/merchant.data.ts
  21. 10
      src/views/pay/order/order.data.ts
  22. 10
      src/views/pay/refund/refund.data.ts
  23. 4
      src/views/pay/submit/index.vue
  24. 6
      src/views/system/dept/dept.data.ts
  25. 6
      src/views/system/dict/dict.data.ts
  26. 6
      src/views/system/dict/dict.type.ts
  27. 4
      src/views/system/errorCode/errorCode.data.ts
  28. 4
      src/views/system/mail/account/account.data.ts
  29. 6
      src/views/system/mail/log/mailLog.data.ts
  30. 6
      src/views/system/mail/template/template.data.ts
  31. 8
      src/views/system/menu/menu.data.ts
  32. 8
      src/views/system/notice/notice.data.ts
  33. 4
      src/views/system/notify/message/message.data.ts
  34. 8
      src/views/system/notify/my/my.data.ts
  35. 8
      src/views/system/notify/template/template.data.ts
  36. 8
      src/views/system/oauth2/client/client.data.ts
  37. 4
      src/views/system/oauth2/token/token.data.ts
  38. 4
      src/views/system/operatelog/operateLog.data.ts
  39. 6
      src/views/system/post/post.data.ts
  40. 8
      src/views/system/role/role.data.ts
  41. 6
      src/views/system/sensitiveWord/sensitiveWord.data.ts
  42. 8
      src/views/system/sms/channel/smsChannel.data.ts
  43. 6
      src/views/system/sms/log/smsLog.data.ts
  44. 12
      src/views/system/sms/template/smsTemplate.data.ts
  45. 6
      src/views/system/tenant/tenant.data.ts
  46. 6
      src/views/system/tenantPackage/tenantPackage.data.ts
  47. 8
      src/views/system/user/user.data.ts

11
src/components/DictTag/src/DictTag.vue

@ -2,7 +2,7 @@
import { defineComponent, PropType, ref } from 'vue' import { defineComponent, PropType, ref } from 'vue'
import { isHexColor } from '@/utils/color' import { isHexColor } from '@/utils/color'
import { Tag } from 'ant-design-vue' 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' import { propTypes } from '@/utils/propTypes'
export default defineComponent({ export default defineComponent({
@ -13,20 +13,13 @@ export default defineComponent({
required: true required: true
}, },
value: propTypes.oneOfType([propTypes.string, propTypes.number, propTypes.bool]), value: propTypes.oneOfType([propTypes.string, propTypes.number, propTypes.bool]),
dictType: propTypes.oneOf(['string', 'boolean', 'number']).def('number'),
icon: { type: String } icon: { type: String }
}, },
setup(props) { setup(props) {
const dictData = ref<DictDataType>() const dictData = ref<DictDataType>()
const getDictObj = (dictType: string, value: string) => { const getDictObj = (dictType: string, value: string) => {
let dictOptions: DictDataType[] = [] let dictOptions: DictDataType[] = []
if (props.dictType && props.dictType === 'boolean') { dictOptions = getDictOpts(dictType)
dictOptions = getBoolDictOptions(dictType)
} else if (props.dictType && props.dictType === 'string') {
dictOptions = getStrDictOptions(dictType)
} else {
dictOptions = getDictOptions(dictType)
}
if (dictOptions && dictOptions.length === 0) { if (dictOptions && dictOptions.length === 0) {
return return
} }

9
src/components/Form/src/components/ApiSelect.vue

@ -1,5 +1,12 @@
<template> <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)"> <template #[item]="data" v-for="item in Object.keys($slots)">
<slot :name="item" v-bind="data || {}"></slot> <slot :name="item" v-bind="data || {}"></slot>
</template> </template>

9
src/components/Table/src/hooks/useRender.ts

@ -94,13 +94,12 @@ export const useRender = {
/** /**
* *
* @param text * @param text
* @param type * @param dictType
* @param dictType number | string | boolean
* @returns * @returns
*/ */
renderDict: (text, type, dictType?) => { renderDict: (text, dictType) => {
if (type) { if (dictType) {
return h(DictTag, { type: type, value: text, dictType: dictType }) return h(DictTag, { type: dictType, value: text })
} }
return '' return ''
}, },

14
src/utils/dict.ts

@ -23,15 +23,27 @@ export const getDictOptions = (dictType: string) => {
return dictStore.getDictMap[dictType] return dictStore.getDictMap[dictType]
} }
export const getIntDictOptions = (dictType: string) => { export const getDictOpts = (dictType: string) => {
const dictOption: DictDataType[] = [] const dictOption: DictDataType[] = []
const dictOptions: DictDataType[] = getDictOptions(dictType) const dictOptions: DictDataType[] = getDictOptions(dictType)
if (dictOptions && dictOptions.length > 0) { if (dictOptions && dictOptions.length > 0) {
dictOptions.forEach((dict: DictDataType) => { dictOptions.forEach((dict: DictDataType) => {
if (typeof dict.value === 'number') {
dictOption.push({ dictOption.push({
...dict, ...dict,
value: parseInt(dict.value + '') 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
})
}
}) })
} }

4
src/views/bpm/form/form.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -47,7 +47,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }

6
src/views/bpm/group/group.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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' import { getListSimpleUsers } from '@/api/system/user'
let users: any[] = [] let users: any[] = []
@ -80,7 +80,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -129,7 +129,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
} }
] ]

10
src/views/bpm/model/model.data.ts

@ -2,7 +2,7 @@ import { getSimpleForms } from '@/api/bpm/form'
import { updateModelState } from '@/api/bpm/model' import { updateModelState } from '@/api/bpm/model'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { useMessage } from '@/hooks/web/useMessage' 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 { Button, Switch } from 'ant-design-vue'
import { h } from 'vue' import { h } from 'vue'
@ -28,7 +28,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'category', dataIndex: 'category',
width: 120, width: 120,
customRender: ({ text }) => { 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', field: 'category',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY) options: getDictOpts(DICT_TYPE.BPM_MODEL_CATEGORY)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }
@ -165,7 +165,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { 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', component: 'Select',
ifShow: ({ values }) => !!values.id, ifShow: ({ values }) => !!values.id,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.BPM_MODEL_FORM_TYPE) options: getDictOpts(DICT_TYPE.BPM_MODEL_FORM_TYPE)
} }
}, },
{ {

6
src/views/bpm/oa/leave/leave.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -60,7 +60,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.BPM_OA_LEAVE_TYPE) options: getDictOpts(DICT_TYPE.BPM_OA_LEAVE_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -75,7 +75,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) options: getDictOpts(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

4
src/views/infra/apiAccessLog/apiAccessLog.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -73,7 +73,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'userType', field: 'userType',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.USER_TYPE) options: getDictOpts(DICT_TYPE.USER_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

6
src/views/infra/apiErrorLog/apiErrorLog.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'userType', field: 'userType',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.USER_TYPE) options: getDictOpts(DICT_TYPE.USER_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -103,7 +103,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'processStatus', field: 'processStatus',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS) options: getDictOpts(DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }

4
src/views/infra/codegen/codegen.data.ts

@ -1,6 +1,6 @@
import { getDataSourceConfigList } from '@/api/infra/dataSourceConfig' import { getDataSourceConfigList } from '@/api/infra/dataSourceConfig'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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() const dataSourceConfigs = await getDataSourceConfigList()
@ -104,7 +104,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

8
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 { listSimpleMenus } from '@/api/system/menu'
import { FormSchema } from '@/components/Form' import { FormSchema } from '@/components/Form'
import { BasicColumn } from '@/components/Table' import { BasicColumn } from '@/components/Table'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict' import { getDictOpts, DICT_TYPE } from '@/utils/dict'
async function getDictTypeOptions() { async function getDictTypeOptions() {
const dictTypeOptions: any[] = [] const dictTypeOptions: any[] = []
@ -59,7 +59,7 @@ export const basicInfoSchemas: FormSchema[] = [
required: true, required: true,
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_TEMPLATE_TYPE) options: getDictOpts(DICT_TYPE.INFRA_CODEGEN_TEMPLATE_TYPE)
}, },
colProps: { span: 12 } colProps: { span: 12 }
}, },
@ -69,7 +69,7 @@ export const basicInfoSchemas: FormSchema[] = [
required: true, required: true,
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_FRONT_TYPE) options: getDictOpts(DICT_TYPE.INFRA_CODEGEN_FRONT_TYPE)
}, },
colProps: { span: 12 } colProps: { span: 12 }
}, },
@ -79,7 +79,7 @@ export const basicInfoSchemas: FormSchema[] = [
required: true, required: true,
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_SCENE) options: getDictOpts(DICT_TYPE.INFRA_CODEGEN_SCENE)
}, },
colProps: { span: 12 } colProps: { span: 12 }
}, },

4
src/views/infra/config/config.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'type', field: 'type',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_CONFIG_TYPE) options: getDictOpts(DICT_TYPE.INFRA_CONFIG_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

6
src/views/infra/fileConfig/ficleConfig.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -55,7 +55,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'storage', field: 'storage',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_FILE_STORAGE) options: getDictOpts(DICT_TYPE.INFRA_FILE_STORAGE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -87,7 +87,7 @@ export const formSchema: FormSchema[] = [
required: true, required: true,
dynamicDisabled: ({ values }) => !!values.id, dynamicDisabled: ({ values }) => !!values.id,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_FILE_STORAGE) options: getDictOpts(DICT_TYPE.INFRA_FILE_STORAGE)
} }
}, },
{ {

4
src/views/infra/job/job.data.ts

@ -1,6 +1,6 @@
import { DescItem } from '@/components/Description' import { DescItem } from '@/components/Description'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -50,7 +50,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_JOB_STATUS) options: getDictOpts(DICT_TYPE.INFRA_JOB_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

4
src/views/infra/job/logger/jobLog.data.ts

@ -1,6 +1,6 @@
import { DescItem } from '@/components/Description' import { DescItem } from '@/components/Description'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -78,7 +78,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_JOB_STATUS) options: getDictOpts(DICT_TYPE.INFRA_JOB_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

4
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 { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { getSimpleAccounts } from '@/api/mp/account' import { getSimpleAccounts } from '@/api/mp/account'
@ -121,7 +121,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'type', field: 'type',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getStrDictOptions(DICT_TYPE.MP_MESSAGE_TYPE) options: getDictOpts(DICT_TYPE.MP_MESSAGE_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

6
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 { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { PayChannelEnum } from '@/enums/systemEnum' import { PayChannelEnum } from '@/enums/systemEnum'
import { useMessage } from '@/hooks/web/useMessage' 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 { Tag, Switch } from 'ant-design-vue'
import { h } from 'vue' import { h } from 'vue'
@ -168,7 +168,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -210,7 +210,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

4
src/views/pay/demo/demo.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -84,7 +84,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'payed', field: 'payed',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING) options: getDictOpts(DICT_TYPE.INFRA_BOOLEAN_STRING)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }

6
src/views/pay/merchant/merchant.data.ts

@ -1,7 +1,7 @@
import { changeMerchantStatus } from '@/api/pay/merchant' import { changeMerchantStatus } from '@/api/pay/merchant'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { useMessage } from '@/hooks/web/useMessage' 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 { Switch } from 'ant-design-vue'
import { h } from 'vue' import { h } from 'vue'
@ -97,7 +97,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -140,7 +140,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

10
src/views/pay/order/order.data.ts

@ -1,7 +1,7 @@
import { getMerchantListByName } from '@/api/pay/merchant' import { getMerchantListByName } from '@/api/pay/merchant'
import { DescItem } from '@/components/Description' import { DescItem } from '@/components/Description'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -128,7 +128,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'channelCode', field: 'channelCode',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.PAY_CHANNEL_CODE_TYPE) options: getDictOpts(DICT_TYPE.PAY_CHANNEL_CODE_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -149,7 +149,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.PAY_ORDER_STATUS) options: getDictOpts(DICT_TYPE.PAY_ORDER_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -158,7 +158,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'refundStatus', field: 'refundStatus',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.PAY_ORDER_REFUND_STATUS) options: getDictOpts(DICT_TYPE.PAY_ORDER_REFUND_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -167,7 +167,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'notifyStatus', field: 'notifyStatus',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS) options: getDictOpts(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

10
src/views/pay/refund/refund.data.ts

@ -1,7 +1,7 @@
import { getMerchantListByName } from '@/api/pay/merchant' import { getMerchantListByName } from '@/api/pay/merchant'
import { DescItem } from '@/components/Description' import { DescItem } from '@/components/Description'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -143,7 +143,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'channelCode', field: 'channelCode',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.PAY_CHANNEL_CODE_TYPE) options: getDictOpts(DICT_TYPE.PAY_CHANNEL_CODE_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -152,7 +152,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'type', field: 'type',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.PAY_REFUND_ORDER_TYPE) options: getDictOpts(DICT_TYPE.PAY_REFUND_ORDER_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -173,7 +173,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.PAY_REFUND_ORDER_STATUS) options: getDictOpts(DICT_TYPE.PAY_REFUND_ORDER_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -182,7 +182,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'notifyStatus', field: 'notifyStatus',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS) options: getDictOpts(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

4
src/views/pay/submit/index.vue

@ -49,7 +49,7 @@ import { Card, List } from 'ant-design-vue'
import { Description } from '@/components/Description' import { Description } from '@/components/Description'
import { descSchema } from './submit.data' import { descSchema } from './submit.data'
import { getOrder, submitOrder } from '@/api/pay/order' 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 { useRoute } from 'vue-router'
import alipay_qr from '@/assets/images/pay/icon/alipay_qr.svg' import alipay_qr from '@/assets/images/pay/icon/alipay_qr.svg'
import alipay_app from '@/assets/images/pay/icon/alipay_app.svg' import alipay_app from '@/assets/images/pay/icon/alipay_app.svg'
@ -83,7 +83,7 @@ const otherPayChannels = ref<any[]>([])
function initPayChannels() { 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 = { const payChannel = {
name: dict.label, name: dict.label,
code: dict.value as string code: dict.value as string

6
src/views/system/dept/dept.data.ts

@ -1,7 +1,7 @@
import { listSimpleDept } from '@/api/system/dept' import { listSimpleDept } from '@/api/system/dept'
import { getListSimpleUsers } from '@/api/system/user' import { getListSimpleUsers } from '@/api/system/user'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getDictOpts } from '@/utils/dict'
let userOptions: any[] = [] let userOptions: any[] = []
@ -70,7 +70,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }
@ -147,7 +147,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
} }
] ]

6
src/views/system/dict/dict.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const dataColumns: BasicColumn[] = [
{ {
@ -67,7 +67,7 @@ export const dataSearchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }
@ -112,7 +112,7 @@ export const dataFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

6
src/views/system/dict/dict.type.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const typeColumns: BasicColumn[] = [
{ {
@ -47,7 +47,7 @@ export const typeSearchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }
@ -78,7 +78,7 @@ export const typeFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

4
src/views/system/errorCode/errorCode.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -51,7 +51,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'type', field: 'type',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.SYSTEM_ERROR_CODE_TYPE) options: getDictOpts(DICT_TYPE.SYSTEM_ERROR_CODE_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

4
src/views/system/mail/account/account.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -102,7 +102,7 @@ export const formSchema: FormSchema[] = [
field: 'sslEnable', field: 'sslEnable',
component: 'Switch', component: 'Switch',
componentProps: { componentProps: {
options: getBoolDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING) options: getDictOpts(DICT_TYPE.INFRA_BOOLEAN_STRING)
} }
} }
] ]

6
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 { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { getSimpleMailAccountList } from '@/api/system/mail/account' import { getSimpleMailAccountList } from '@/api/system/mail/account'
@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'sendStatus', field: 'sendStatus',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.SYSTEM_MAIL_SEND_STATUS) options: getDictOpts(DICT_TYPE.SYSTEM_MAIL_SEND_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -91,7 +91,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'userType', field: 'userType',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.USER_TYPE) options: getDictOpts(DICT_TYPE.USER_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

6
src/views/system/mail/template/template.data.ts

@ -1,6 +1,6 @@
import { getSimpleMailAccountList } from '@/api/system/mail/account' import { getSimpleMailAccountList } from '@/api/system/mail/account'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -83,7 +83,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -151,7 +151,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

8
src/views/system/menu/menu.data.ts

@ -1,6 +1,6 @@
import { listSimpleMenus } from '@/api/system/menu' import { listSimpleMenus } from '@/api/system/menu'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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' import { SystemMenuTypeEnum } from '@/enums/systemEnum'
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
@ -63,7 +63,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }
@ -100,7 +100,7 @@ export const formSchema: FormSchema[] = [
defaultValue: '0', defaultValue: '0',
component: 'RadioButtonGroup', component: 'RadioButtonGroup',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.SYSTEM_MENU_TYPE) options: getDictOpts(DICT_TYPE.SYSTEM_MENU_TYPE)
}, },
colProps: { lg: 24, md: 24 } colProps: { lg: 24, md: 24 }
}, },
@ -160,7 +160,7 @@ export const formSchema: FormSchema[] = [
defaultValue: 0, defaultValue: 0,
helpMessage: '选择停用时,路由将不会出现在侧边栏,也不能被访问', helpMessage: '选择停用时,路由将不会出现在侧边栏,也不能被访问',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

8
src/views/system/notice/notice.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -49,7 +49,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }
@ -75,7 +75,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { 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', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

4
src/views/system/notify/message/message.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -93,7 +93,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'templateType', field: 'templateType',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) options: getDictOpts(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

8
src/views/system/notify/my/my.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -44,7 +44,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'readStatus', field: 'readStatus',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING) options: getDictOpts(DICT_TYPE.INFRA_BOOLEAN_STRING)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -93,7 +93,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { 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', component: 'RadioGroup',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

8
src/views/system/notify/template/template.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -71,7 +71,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -120,7 +120,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { 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', component: 'RadioGroup',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

8
src/views/system/oauth2/client/client.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -79,7 +79,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }
@ -131,7 +131,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {
@ -154,7 +154,7 @@ export const formSchema: FormSchema[] = [
required: true, required: true,
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getStrDictOptions(DICT_TYPE.SYSTEM_OAUTH2_GRANT_TYPE), options: getDictOpts(DICT_TYPE.SYSTEM_OAUTH2_GRANT_TYPE),
mode: 'multiple' mode: 'multiple'
} }
}, },

4
src/views/system/oauth2/token/token.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -61,7 +61,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'userType', field: 'userType',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.USER_TYPE) options: getDictOpts(DICT_TYPE.USER_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }

4
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 { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
@ -80,7 +80,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'type', field: 'type',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.SYSTEM_OPERATE_TYPE) options: getDictOpts(DICT_TYPE.SYSTEM_OPERATE_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

6
src/views/system/post/post.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -63,7 +63,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
} }
@ -101,7 +101,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

8
src/views/system/role/role.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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' import { SystemDataScopeEnum } from '@/enums/systemEnum'
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
@ -67,7 +67,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -111,7 +111,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {
@ -173,7 +173,7 @@ export const dataScopeFormSchema: FormSchema[] = [
required: true, required: true,
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.SYSTEM_DATA_SCOPE) options: getDictOpts(DICT_TYPE.SYSTEM_DATA_SCOPE)
} }
}, },
{ {

6
src/views/system/sensitiveWord/sensitiveWord.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -61,7 +61,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -92,7 +92,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

8
src/views/system/sms/channel/smsChannel.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -70,7 +70,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -101,7 +101,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
required: true, required: true,
componentProps: { 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', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

6
src/views/system/sms/log/smsLog.data.ts

@ -1,5 +1,5 @@
import { getSimpleSmsChannels } from '@/api/system/sms/smsChannel' 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 { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
@ -105,7 +105,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'sendStatus', field: 'sendStatus',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.SYSTEM_SMS_SEND_STATUS) options: getDictOpts(DICT_TYPE.SYSTEM_SMS_SEND_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -120,7 +120,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'receiveStatus', field: 'receiveStatus',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS) options: getDictOpts(DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },

12
src/views/system/sms/template/smsTemplate.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -67,7 +67,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'type', field: 'type',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE) options: getDictOpts(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -97,7 +97,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'channelId', field: 'channelId',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) options: getDictOpts(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -128,7 +128,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { 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', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {

6
src/views/system/tenant/tenant.data.ts

@ -1,6 +1,6 @@
import { getTenantPackageList } from '@/api/system/tenantPackage' import { getTenantPackageList } from '@/api/system/tenantPackage'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -96,7 +96,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -185,7 +185,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
} }
] ]

6
src/views/system/tenantPackage/tenantPackage.data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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[] = [ export const columns: BasicColumn[] = [
{ {
@ -47,7 +47,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -84,7 +84,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
} }
] ]

8
src/views/system/user/user.data.ts

@ -4,7 +4,7 @@ import { useMessage } from '@/hooks/web/useMessage'
import { listSimpleDept } from '@/api/system/dept' import { listSimpleDept } from '@/api/system/dept'
import { listSimplePosts } from '@/api/system/post' import { listSimplePosts } from '@/api/system/post'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' 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 { updateUserStatus } from '@/api/system/user'
import { listSimpleRoles } from '@/api/system/role' import { listSimpleRoles } from '@/api/system/role'
@ -100,7 +100,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },
@ -173,7 +173,7 @@ export const formSchema: FormSchema[] = [
field: 'sex', field: 'sex',
component: 'Select', component: 'Select',
componentProps: { 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', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) options: getDictOpts(DICT_TYPE.COMMON_STATUS)
} }
}, },
{ {