Commit 4d7ac3ebc8425b7b443fa5205d78ba83a6eebcac
1 parent
a595539e
fix: dict
Showing
1 changed file
with
66 additions
and
61 deletions
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/data.ts.vm
| @@ -21,71 +21,76 @@ const crudSchemas = reactive<VxeCrudSchema>({ | @@ -21,71 +21,76 @@ const crudSchemas = reactive<VxeCrudSchema>({ | ||
| 21 | action: true, | 21 | action: true, |
| 22 | actionWidth: '200', // 3个按钮默认200,如有删减对应增减即可 | 22 | actionWidth: '200', // 3个按钮默认200,如有删减对应增减即可 |
| 23 | columns: [ | 23 | columns: [ |
| 24 | -#foreach($column in $columns) | ||
| 25 | - #if ($column.listOperation || $column.listOperationResult || $column.createOperation || $column.updateOperation) | ||
| 26 | - #set ($dictType = $column.dictType) | ||
| 27 | - #if(!$column.primaryKey) | ||
| 28 | - { | ||
| 29 | - title: '${column.columnComment}', | ||
| 30 | - field: '${column.javaField}', | ||
| 31 | - #if ("" != $dictType)## 有数据字典 | ||
| 32 | - dictType: DICT_TYPE.$dictType.toUpperCase(), | ||
| 33 | - #end | ||
| 34 | - #if (!$column.createOperation && !$column.updateOperation) | ||
| 35 | - isForm: false | ||
| 36 | - #elseif(!("" != $column.dictType)) | ||
| 37 | - #if ($column.htmlType == "datetime")## 时间框 | ||
| 38 | - form: { | ||
| 39 | - show: true, | ||
| 40 | - component: 'DatePicker', | ||
| 41 | - componentProps: { | ||
| 42 | - type: 'datetime', | ||
| 43 | - valueFormat: 'YYYY-MM-DD HH:mm:ss' | ||
| 44 | - } | ||
| 45 | - } | ||
| 46 | - #elseif($column.htmlType == "editor")## 文本编辑器 | ||
| 47 | - form: { | ||
| 48 | - show: true, | ||
| 49 | - component: 'Editor', | ||
| 50 | - colProps: { | ||
| 51 | - span: 24 | 24 | + #foreach($column in $columns) |
| 25 | + #if ($column.listOperation || $column.listOperationResult || $column.createOperation || $column.updateOperation) | ||
| 26 | + #set ($dictType = $column.dictType) | ||
| 27 | + #if(!$column.primaryKey) | ||
| 28 | + { | ||
| 29 | + title: '${column.columnComment}', | ||
| 30 | + field: '${column.javaField}', | ||
| 31 | + #if ("" != $dictType)## 有数据字典 | ||
| 32 | + dictType: DICT_TYPE.$dictType.toUpperCase(), | ||
| 33 | + #if (${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer") | ||
| 34 | + dictData: 'number', | ||
| 35 | + #else | ||
| 36 | + dictData: 'string', | ||
| 37 | + #end | ||
| 38 | + #end | ||
| 39 | + #if (!$column.createOperation && !$column.updateOperation) | ||
| 40 | + isForm: false, | ||
| 41 | + #elseif(!("" != $column.dictType)) | ||
| 42 | + #if ($column.htmlType == "datetime")## 时间框 | ||
| 43 | + form: { | ||
| 44 | + show: true, | ||
| 45 | + component: 'DatePicker', | ||
| 46 | + componentProps: { | ||
| 47 | + type: 'datetime', | ||
| 48 | + valueFormat: 'YYYY-MM-DD HH:mm:ss' | ||
| 49 | + } | ||
| 52 | }, | 50 | }, |
| 53 | - componentProps: { | ||
| 54 | - valueHtml: '' | ||
| 55 | - } | ||
| 56 | - } | ||
| 57 | - #elseif($column.htmlType == "textarea")## 文本框 | ||
| 58 | - form: { | ||
| 59 | - show: true, | ||
| 60 | - component: 'Input', | ||
| 61 | - componentProps: { | ||
| 62 | - type: 'textarea', | ||
| 63 | - rows: 4 | 51 | + #elseif($column.htmlType == "editor")## 文本编辑器 |
| 52 | + form: { | ||
| 53 | + show: true, | ||
| 54 | + component: 'Editor', | ||
| 55 | + colProps: { | ||
| 56 | + span: 24 | ||
| 57 | + }, | ||
| 58 | + componentProps: { | ||
| 59 | + valueHtml: '' | ||
| 60 | + } | ||
| 64 | }, | 61 | }, |
| 65 | - colProps: { | ||
| 66 | - span: 24 | ||
| 67 | - } | ||
| 68 | - } | ||
| 69 | - #end | ||
| 70 | - #end | ||
| 71 | - #if ($column.listOperationResult) | ||
| 72 | - #if($column.htmlType == "input") | ||
| 73 | - isSearch: true | ||
| 74 | - #elseif("" != $dictType) | ||
| 75 | - isSearch: true | ||
| 76 | - #elseif($column.htmlType == "datetime") | ||
| 77 | - search: { | ||
| 78 | - show: true, | ||
| 79 | - itemRender: { | ||
| 80 | - name: 'XDataTimePicker' | ||
| 81 | - } | ||
| 82 | - } | ||
| 83 | - #end | ||
| 84 | - #end | 62 | + #elseif($column.htmlType == "textarea")## 文本框 |
| 63 | + form: { | ||
| 64 | + show: true, | ||
| 65 | + component: 'Input', | ||
| 66 | + componentProps: { | ||
| 67 | + type: 'textarea', | ||
| 68 | + rows: 4 | ||
| 69 | + }, | ||
| 70 | + colProps: { | ||
| 71 | + span: 24 | ||
| 72 | + } | ||
| 73 | + }, | ||
| 74 | + #end | ||
| 75 | + #end | ||
| 76 | + #if ($column.listOperationResult) | ||
| 77 | + #if($column.htmlType == "input") | ||
| 78 | + isSearch: true, | ||
| 79 | + #elseif("" != $dictType) | ||
| 80 | + isSearch: true, | ||
| 81 | + #elseif($column.htmlType == "datetime") | ||
| 82 | + search: { | ||
| 83 | + show: true, | ||
| 84 | + itemRender: { | ||
| 85 | + name: 'XDataTimePicker' | ||
| 86 | + } | ||
| 87 | + }, | ||
| 88 | + #end | ||
| 89 | + #end | ||
| 90 | + #end | ||
| 91 | + }, | ||
| 85 | #end | 92 | #end |
| 86 | - }, | ||
| 87 | #end | 93 | #end |
| 88 | -#end | ||
| 89 | ] | 94 | ] |
| 90 | }) | 95 | }) |
| 91 | export const { allSchemas } = useVxeCrudSchemas(crudSchemas) | 96 | export const { allSchemas } = useVxeCrudSchemas(crudSchemas) |
| 92 | \ No newline at end of file | 97 | \ No newline at end of file |