fix: dict

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

View File

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