refactor: dictData ==> dictClass

This commit is contained in:
xingyu 2022-11-17 23:09:29 +08:00
parent 5725d4862b
commit 6291a3d7d8
36 changed files with 63 additions and 63 deletions

View File

@ -44,34 +44,34 @@ spring:
primary: master
datasource:
master:
name: ruoyi-vue-pro
url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
name: pro
url: jdbc:mysql://101.201.151.212:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例
# url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例
username: root
password: 123456
username: luoqi
password: luoqikeji
# username: sa
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W
slave: # 模拟从库,可根据自己需要修改
name: ruoyi-vue-pro
url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
name: pro
url: jdbc:mysql://101.201.151.212:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例
# url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例
username: root
password: 123456
username: luoqi
password: luoqikeji
# username: sa
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
redis:
host: 127.0.0.1 # 地址
host: 39.107.87.6 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
database: 10 # 数据库索引
password: xingyu4j # 密码,建议生产环境开启
--- #################### 定时任务相关配置 ####################

View File

@ -17,7 +17,7 @@ export type CrudSchema = Omit<TableColumn, 'children'> & {
detail?: CrudDescriptionsParams // 详情的详细配置
children?: CrudSchema[]
dictType?: string // 字典类型
dictData?: 'string' | 'number' | 'boolean' // 字典数据类型 string | number | boolean
dictClass?: 'string' | 'number' | 'boolean' // 字典数据类型 string | number | boolean
}
type CrudSearchParams = {
@ -157,11 +157,11 @@ const filterFormSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
let comonentProps = {}
if (schemaItem.dictType) {
const options: ComponentOptions[] = []
if (schemaItem.dictData && schemaItem.dictData === 'number') {
if (schemaItem.dictClass && schemaItem.dictClass === 'number') {
getIntDictOptions(schemaItem.dictType).forEach((dict) => {
options.push(dict)
})
} else if (schemaItem.dictData && schemaItem.dictData === 'boolean') {
} else if (schemaItem.dictClass && schemaItem.dictClass === 'boolean') {
getBoolDictOptions(schemaItem.dictType).forEach((dict) => {
options.push(dict)
})

View File

@ -38,7 +38,7 @@ type VxeCrudColumns = Omit<VxeTableColumn, 'children'> & {
print?: CrudPrintParams // vxe 打印的字段
children?: VxeCrudColumns[] // 子级
dictType?: string // 字典类型
dictData?: 'string' | 'number' | 'boolean' // 字典数据类型 string | number | boolean
dictClass?: 'string' | 'number' | 'boolean' // 字典数据类型 string | number | boolean
}
type CrudSearchParams = {
@ -239,11 +239,11 @@ const filterFormSchema = (crudSchema: VxeCrudSchema): FormSchema[] => {
let comonentProps = {}
if (schemaItem.dictType) {
const options: ComponentOptions[] = []
if (schemaItem.dictData && schemaItem.dictData === 'number') {
if (schemaItem.dictClass && schemaItem.dictClass === 'number') {
getIntDictOptions(schemaItem.dictType).forEach((dict) => {
options.push(dict)
})
} else if (schemaItem.dictData && schemaItem.dictData === 'boolean') {
} else if (schemaItem.dictClass && schemaItem.dictClass === 'boolean') {
getBoolDictOptions(schemaItem.dictType).forEach((dict) => {
options.push(dict)
})

View File

@ -34,7 +34,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number'
dictClass: 'number'
},
{
label: '备注',

View File

@ -42,7 +42,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number'
dictClass: 'number'
},
{
label: '备注',

View File

@ -41,7 +41,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '流程分类',
field: 'category',
dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -28,7 +28,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '流程分类',
field: 'category',
dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}
@ -41,7 +41,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}
@ -50,7 +50,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '结果',
field: 'result',
dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -30,7 +30,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '结果',
field: 'result',
dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
dictData: 'number'
dictClass: 'number'
},
{
label: '审批意见',

View File

@ -26,7 +26,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '用户类型',
field: 'userType',
dictType: DICT_TYPE.USER_TYPE,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -69,7 +69,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '处理状态',
field: 'processStatus',
dictType: DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -52,7 +52,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '系统内置',
field: 'type',
dictType: DICT_TYPE.INFRA_CONFIG_TYPE,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -48,7 +48,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '存储器',
field: 'storage',
dictType: DICT_TYPE.INFRA_FILE_STORAGE,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}
@ -57,7 +57,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '主配置',
field: 'primary',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictData: 'number'
dictClass: 'number'
},
{
label: t('form.remark'),

View File

@ -37,7 +37,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.INFRA_JOB_STATUS,
dictData: 'number',
dictClass: 'number',
form: {
show: false
},

View File

@ -74,7 +74,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.INFRA_JOB_LOG_STATUS,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -45,7 +45,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -51,7 +51,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -83,7 +83,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '回调商户状态',
field: 'notifyStatus',
dictType: DICT_TYPE.PAY_ORDER_NOTIFY_STATUS,
dictData: 'number'
dictClass: 'number'
},
{
label: '支付金额',
@ -110,7 +110,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '支付状态',
field: 'status',
dictType: DICT_TYPE.PAY_ORDER_STATUS,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}
@ -139,7 +139,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '退款状态',
field: 'refundStatus',
dictType: DICT_TYPE.PAY_ORDER_REFUND_STATUS,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -67,7 +67,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '退款类型',
field: 'type',
dictType: DICT_TYPE.PAY_REFUND_ORDER_TYPE,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}
@ -76,7 +76,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.PAY_REFUND_ORDER_STATUS,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -65,7 +65,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
isSearch: true
}
]

View File

@ -97,7 +97,7 @@ export const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number'
dictClass: 'number'
},
{
label: t('form.remark'),

View File

@ -41,7 +41,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number'
dictClass: 'number'
},
{
label: t('common.createTime'),

View File

@ -22,7 +22,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '错误码类型',
field: 'type',
dictType: DICT_TYPE.SYSTEM_ERROR_CODE_TYPE,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{

View File

@ -13,7 +13,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '日志类型',
field: 'logType',
dictType: DICT_TYPE.SYSTEM_LOGIN_TYPE,
dictData: 'number'
dictClass: 'number'
},
{
title: '用户名称',
@ -36,7 +36,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '登陆结果',
field: 'result',
dictType: DICT_TYPE.SYSTEM_LOGIN_RESULT,
dictData: 'number'
dictClass: 'number'
},
{
title: '登录日期',

View File

@ -26,13 +26,13 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '公告类型',
field: 'type',
dictType: DICT_TYPE.SYSTEM_NOTICE_TYPE,
dictData: 'number'
dictClass: 'number'
},
{
title: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{

View File

@ -45,7 +45,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{

View File

@ -26,7 +26,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '用户类型',
field: 'userType',
dictType: DICT_TYPE.USER_TYPE,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{

View File

@ -21,7 +21,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '操作类型',
field: 'type',
dictType: DICT_TYPE.SYSTEM_OPERATE_TYPE,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{

View File

@ -36,7 +36,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{

View File

@ -27,7 +27,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '角色类型',
field: 'type',
dictType: DICT_TYPE.SYSTEM_ROLE_TYPE,
dictData: 'number'
dictClass: 'number'
},
{
title: '角色标识',
@ -42,7 +42,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{

View File

@ -39,7 +39,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -34,7 +34,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{

View File

@ -23,21 +23,21 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '短信渠道',
field: 'channelId',
dictType: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{
title: '发送状态',
field: 'sendStatus',
dictType: DICT_TYPE.SYSTEM_SMS_SEND_STATUS,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{
title: '接收状态',
field: 'receiveStatus',
dictType: DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{
@ -49,7 +49,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '短信类型',
field: 'templateType',
dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{

View File

@ -46,7 +46,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '短信类型',
field: 'type',
dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE,
dictData: 'number',
dictClass: 'number',
table: {
width: 80
}
@ -55,7 +55,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
table: {
width: 80
}

View File

@ -105,7 +105,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: '租户状态',
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -39,7 +39,7 @@ const crudSchemas = reactive<CrudSchema[]>([
label: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
search: {
show: true
}

View File

@ -68,7 +68,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictData: 'number',
dictClass: 'number',
isSearch: true
},
{