|
@@ -1,6 +1,6 @@
|
|
-import type { BasicColumn, FormSchema } from '@/components/Table'
|
|
|
|
-import { useRender } from '@/components/Table'
|
|
|
|
-import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
|
|
|
|
|
+import type {BasicColumn, FormSchema} from '@/components/Table'
|
|
|
|
+import {useRender} from '@/components/Table'
|
|
|
|
+import {DICT_TYPE, getDictOptions} from '@/utils/dict'
|
|
|
|
|
|
export const columns: BasicColumn[] = [
|
|
export const columns: BasicColumn[] = [
|
|
#foreach($column in $columns)
|
|
#foreach($column in $columns)
|
|
@@ -50,7 +50,7 @@ export const searchFormSchema: FormSchema[] = [
|
|
field: '${javaField}',
|
|
field: '${javaField}',
|
|
#if ($column.htmlType == "input")
|
|
#if ($column.htmlType == "input")
|
|
component: 'Input',
|
|
component: 'Input',
|
|
- #elseif ($column.htmlType == "select" || $column.htmlType == "radio")
|
|
|
|
|
|
+ #elseif ($column.htmlType == "select")
|
|
component: 'Select',
|
|
component: 'Select',
|
|
componentProps: {
|
|
componentProps: {
|
|
#if ("" != $dictType)## 设置了 dictType 数据字典的情况
|
|
#if ("" != $dictType)## 设置了 dictType 数据字典的情况
|
|
@@ -59,6 +59,15 @@ export const searchFormSchema: FormSchema[] = [
|
|
options: [],
|
|
options: [],
|
|
#end
|
|
#end
|
|
},
|
|
},
|
|
|
|
+ #elseif ($column.htmlType == "radio")
|
|
|
|
+ component: 'Radio',
|
|
|
|
+ componentProps: {
|
|
|
|
+ #if ("" != $dictType)## 设置了 dictType 数据字典的情况
|
|
|
|
+ options: getDictOptions(DICT_TYPE.$dictType.toUpperCase()),
|
|
|
|
+ #else## 未设置 dictType 数据字典的情况
|
|
|
|
+ options: [],
|
|
|
|
+ #end
|
|
|
|
+ },
|
|
#elseif($column.htmlType == "datetime")
|
|
#elseif($column.htmlType == "datetime")
|
|
component: 'RangePicker',
|
|
component: 'RangePicker',
|
|
#end
|
|
#end
|
|
@@ -181,7 +190,8 @@ export const updateFormSchema: FormSchema[] = [
|
|
fileType: 'file',
|
|
fileType: 'file',
|
|
maxCount: 1,
|
|
maxCount: 1,
|
|
},
|
|
},
|
|
- #elseif($column.htmlType == "editor")## 文本编辑器component: 'Editor',
|
|
|
|
|
|
+ #elseif($column.htmlType == "editor")## 文本编辑器
|
|
|
|
+ component: 'Editor',
|
|
#elseif($column.htmlType == "select")## 下拉框
|
|
#elseif($column.htmlType == "select")## 下拉框
|
|
component: 'Select',
|
|
component: 'Select',
|
|
componentProps: {
|
|
componentProps: {
|