fix: dict

This commit is contained in:
xingyu4j 2022-11-17 09:21:35 +08:00
parent a595539e8b
commit 4d7ac3ebc8

View File

@ -21,7 +21,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
action: true,
actionWidth: '200', // 3个按钮默认200如有删减对应增减即可
columns: [
#foreach($column in $columns)
#foreach($column in $columns)
#if ($column.listOperation || $column.listOperationResult || $column.createOperation || $column.updateOperation)
#set ($dictType = $column.dictType)
#if(!$column.primaryKey)
@ -30,9 +30,14 @@ const crudSchemas = reactive<VxeCrudSchema>({
field: '${column.javaField}',
#if ("" != $dictType)## 有数据字典
dictType: DICT_TYPE.$dictType.toUpperCase(),
#if (${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer")
dictData: 'number',
#else
dictData: 'string',
#end
#end
#if (!$column.createOperation && !$column.updateOperation)
isForm: false
isForm: false,
#elseif(!("" != $column.dictType))
#if ($column.htmlType == "datetime")## 时间框
form: {
@ -42,7 +47,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
type: 'datetime',
valueFormat: 'YYYY-MM-DD HH:mm:ss'
}
}
},
#elseif($column.htmlType == "editor")## 文本编辑器
form: {
show: true,
@ -53,7 +58,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
componentProps: {
valueHtml: ''
}
}
},
#elseif($column.htmlType == "textarea")## 文本框
form: {
show: true,
@ -65,27 +70,27 @@ const crudSchemas = reactive<VxeCrudSchema>({
colProps: {
span: 24
}
}
},
#end
#end
#if ($column.listOperationResult)
#if($column.htmlType == "input")
isSearch: true
isSearch: true,
#elseif("" != $dictType)
isSearch: true
isSearch: true,
#elseif($column.htmlType == "datetime")
search: {
show: true,
itemRender: {
name: 'XDataTimePicker'
}
}
},
#end
#end
#end
},
#end
#end
#end
]
})
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)