mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
【功能优化】INFRA:VBEN 的 dict 下拉类型不精准的问题
This commit is contained in:
parent
2f9d9723b3
commit
54956fcbb9
@ -42,9 +42,17 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if ($column.listOperation)
|
#if ($column.listOperation)
|
||||||
#set ($dictType=$column.dictType)
|
#set ($dictType=$column.dictType)
|
||||||
|
#set ($javaType = $column.javaType)
|
||||||
#set ($javaField = $column.javaField)
|
#set ($javaField = $column.javaField)
|
||||||
#set ($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
#set ($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||||
#set ($comment=$column.columnComment)
|
#set ($comment=$column.columnComment)
|
||||||
|
#if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short")
|
||||||
|
#set ($dictMethod = "number")
|
||||||
|
#elseif ($javaType == "String")
|
||||||
|
#set ($dictMethod = "string")
|
||||||
|
#elseif ($javaType == "Boolean")
|
||||||
|
#set ($dictMethod = "boolean")
|
||||||
|
#end
|
||||||
{
|
{
|
||||||
label: '${comment}',
|
label: '${comment}',
|
||||||
field: '${javaField}',
|
field: '${javaField}',
|
||||||
@ -54,16 +62,16 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
#if ("" != $dictType)## 设置了 dictType 数据字典的情况
|
#if ("" != $dictType)## 设置了 dictType 数据字典的情况
|
||||||
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase()),
|
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), '$dictMethod'),
|
||||||
#else## 未设置 dictType 数据字典的情况
|
#else## 未设置 dictType 数据字典的情况
|
||||||
options: [],
|
options: [],
|
||||||
#end
|
#end
|
||||||
},
|
},
|
||||||
#elseif ($column.htmlType == "radio")
|
#elseif ($column.htmlType == "radio")
|
||||||
component: 'Radio',
|
component: 'RadioButtonGroup',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
#if ("" != $dictType)## 设置了 dictType 数据字典的情况
|
#if ("" != $dictType)## 设置了 dictType 数据字典的情况
|
||||||
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase()),
|
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), '$dictMethod'),
|
||||||
#else## 未设置 dictType 数据字典的情况
|
#else## 未设置 dictType 数据字典的情况
|
||||||
options: [],
|
options: [],
|
||||||
#end
|
#end
|
||||||
@ -87,9 +95,17 @@ export const createFormSchema: FormSchema[] = [
|
|||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if ($column.createOperation)
|
#if ($column.createOperation)
|
||||||
#set ($dictType = $column.dictType)
|
#set ($dictType = $column.dictType)
|
||||||
|
#set ($javaType = $column.javaType)
|
||||||
#set ($javaField = $column.javaField)
|
#set ($javaField = $column.javaField)
|
||||||
#set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
#set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||||
#set ($comment = $column.columnComment)
|
#set ($comment = $column.columnComment)
|
||||||
|
#if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short")
|
||||||
|
#set ($dictMethod = "number")
|
||||||
|
#elseif ($javaType == "String")
|
||||||
|
#set ($dictMethod = "string")
|
||||||
|
#elseif ($javaType == "Boolean")
|
||||||
|
#set ($dictMethod = "boolean")
|
||||||
|
#end
|
||||||
#if (!$column.primaryKey)## 忽略主键,不用在表单里
|
#if (!$column.primaryKey)## 忽略主键,不用在表单里
|
||||||
{
|
{
|
||||||
label: '${comment}',
|
label: '${comment}',
|
||||||
@ -117,7 +133,7 @@ export const createFormSchema: FormSchema[] = [
|
|||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
#if ("" != $dictType)## 有数据字典
|
#if ("" != $dictType)## 有数据字典
|
||||||
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
|
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), '$dictMethod'),
|
||||||
#else##没数据字典
|
#else##没数据字典
|
||||||
options:[],
|
options:[],
|
||||||
#end
|
#end
|
||||||
@ -126,7 +142,7 @@ export const createFormSchema: FormSchema[] = [
|
|||||||
component: 'Checkbox',
|
component: 'Checkbox',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
#if ("" != $dictType)## 有数据字典
|
#if ("" != $dictType)## 有数据字典
|
||||||
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
|
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), '$dictMethod'),
|
||||||
#else##没数据字典
|
#else##没数据字典
|
||||||
options:[],
|
options:[],
|
||||||
#end
|
#end
|
||||||
@ -135,7 +151,7 @@ export const createFormSchema: FormSchema[] = [
|
|||||||
component: 'RadioButtonGroup',
|
component: 'RadioButtonGroup',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
#if ("" != $dictType)## 有数据字典
|
#if ("" != $dictType)## 有数据字典
|
||||||
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
|
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), '$dictMethod'),
|
||||||
#else##没数据字典
|
#else##没数据字典
|
||||||
options:[],
|
options:[],
|
||||||
#end
|
#end
|
||||||
@ -166,9 +182,17 @@ export const updateFormSchema: FormSchema[] = [
|
|||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if ($column.updateOperation)
|
#if ($column.updateOperation)
|
||||||
#set ($dictType = $column.dictType)
|
#set ($dictType = $column.dictType)
|
||||||
|
#set ($javaType = $column.javaType)
|
||||||
#set ($javaField = $column.javaField)
|
#set ($javaField = $column.javaField)
|
||||||
#set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
#set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||||
#set ($comment = $column.columnComment)
|
#set ($comment = $column.columnComment)
|
||||||
|
#if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short")
|
||||||
|
#set ($dictMethod = "number")
|
||||||
|
#elseif ($javaType == "String")
|
||||||
|
#set ($dictMethod = "string")
|
||||||
|
#elseif ($javaType == "Boolean")
|
||||||
|
#set ($dictMethod = "boolean")
|
||||||
|
#end
|
||||||
#if (!$column.primaryKey)## 忽略主键,不用在表单里
|
#if (!$column.primaryKey)## 忽略主键,不用在表单里
|
||||||
{
|
{
|
||||||
label: '${comment}',
|
label: '${comment}',
|
||||||
@ -196,7 +220,7 @@ export const updateFormSchema: FormSchema[] = [
|
|||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
#if ("" != $dictType)## 有数据字典
|
#if ("" != $dictType)## 有数据字典
|
||||||
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
|
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), '$dictMethod'),
|
||||||
#else##没数据字典
|
#else##没数据字典
|
||||||
options:[],
|
options:[],
|
||||||
#end
|
#end
|
||||||
@ -205,7 +229,7 @@ export const updateFormSchema: FormSchema[] = [
|
|||||||
component: 'Checkbox',
|
component: 'Checkbox',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
#if ("" != $dictType)## 有数据字典
|
#if ("" != $dictType)## 有数据字典
|
||||||
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
|
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), '$dictMethod'),
|
||||||
#else##没数据字典
|
#else##没数据字典
|
||||||
options:[],
|
options:[],
|
||||||
#end
|
#end
|
||||||
@ -214,7 +238,7 @@ export const updateFormSchema: FormSchema[] = [
|
|||||||
component: 'RadioButtonGroup',
|
component: 'RadioButtonGroup',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
#if ("" != $dictType)## 有数据字典
|
#if ("" != $dictType)## 有数据字典
|
||||||
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
|
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), '$dictMethod'),
|
||||||
#else##没数据字典
|
#else##没数据字典
|
||||||
options:[],
|
options:[],
|
||||||
#end
|
#end
|
||||||
|
Loading…
Reference in New Issue
Block a user