Commit 918c85aecbfd4fd06c59eb3c28fc52d866c55474
1 parent
695c207f
升级代码生成器模板
1、支持自定义下拉树的生成 2、oracle下 三级联动配置了,导致生成报错 3、高级查询支持下拉搜索和下拉多选 4、树表单支持更多的控件生成
Showing
13 changed files
with
212 additions
and
16 deletions
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/common/utils.ftl
... | ... | @@ -76,12 +76,22 @@ |
76 | 76 | |
77 | 77 | <#-- ** 高级查询生成 * --> |
78 | 78 | <#function superQueryFieldList po> |
79 | + <#assign superQuery_dictTable=""> | |
80 | + <#assign superQuery_dictText=""> | |
81 | + <#if po.dictTable?default("")?trim?length gt 1> | |
82 | + <#assign superQuery_dictTable="${po.dictTable}"> | |
83 | + </#if> | |
84 | + <#if po.dictText?default("")?trim?length gt 1> | |
85 | + <#assign superQuery_dictText="${po.dictText}"> | |
86 | + </#if> | |
79 | 87 | <#if po.classType=="popup"> |
80 | 88 | <#return "{type:'${po.classType}',value:'${po.fieldName}',text:'${po.filedComment}', popup:{code:'${po.dictTable}',field:'${po.dictField?split(',')[0]}',orgFields:'${po.dictField?split(',')[0]}',destFields:'${po.dictText?split(',')[0]}'}}"> |
81 | 89 | <#elseif po.classType=="sel_user" || po.classType=="sel_depart" || po.classType=="datetime" || po.classType=="date" || po.classType=="pca" || po.classType=="switch"> |
82 | 90 | <#return "{type:'${po.classType}',value:'${po.fieldName}',text:'${po.filedComment}'}"> |
83 | 91 | <#else> |
84 | - <#if po.dictTable?? && po.dictTable!="" && po.classType!="sel_tree" && po.classType!="cat_tree" && po.classType!="link_down"> | |
92 | + <#if po.classType=="sel_search" || po.classType=="list_multi"> | |
93 | + <#return "{type:'${po.classType}',value:'${po.fieldName}',text:'${po.filedComment}',dictTable:'${superQuery_dictTable}', dictText:'${superQuery_dictText}', dictCode:'${po.dictField}'}"> | |
94 | + <#elseif po.dictTable?? && po.dictTable!="" && po.classType!="sel_tree" && po.classType!="cat_tree" && po.classType!="link_down"> | |
85 | 95 | <#return "{type:'${po.fieldDbType}',value:'${po.fieldName}',text:'${po.filedComment}',dictCode:'${po.dictTable},${po.dictText},${po.dictField}'}"> |
86 | 96 | <#elseif po.dictField?? && po.classType!="sel_tree" && po.classType!="cat_tree" && po.classType!="link_down"> |
87 | 97 | <#return "{type:'${po.fieldDbType}',value:'${po.fieldName}',text:'${po.filedComment}',dictCode:'${po.dictField}'}"> |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | <#list columns as po> |
32 | 32 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
33 | 33 | <#assign form_field_dictCode=""> |
34 | - <#if po.dictTable?default("")?trim?length gt 1> | |
34 | + <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> | |
35 | 35 | <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}"> |
36 | 36 | <#elseif po.dictField?default("")?trim?length gt 1> |
37 | 37 | <#assign form_field_dictCode="${po.dictField}"> |
... | ... | @@ -101,6 +101,24 @@ |
101 | 101 | <j-editor v-decorator="['${po.fieldName}',{trigger:'input'}]" <#if po.readonly=='Y'>disabled</#if>/> |
102 | 102 | <#elseif po.fieldDbType=='Blob'> |
103 | 103 | <a-input v-decorator="['${po.fieldName}String'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
104 | + <#elseif po.classType == 'sel_tree'> | |
105 | + <#assign form_tree_select = true> | |
106 | + <j-tree-select | |
107 | + ref="treeSelect" | |
108 | + placeholder="请选择${po.filedComment}" | |
109 | + v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" | |
110 | + <#if po.dictText??> | |
111 | + <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??> | |
112 | + dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}" | |
113 | + <#elseif po.dictText?split(',')[1]??> | |
114 | + pidField="${po.dictText?split(',')[1]}" | |
115 | + <#elseif po.dictText?split(',')[3]??> | |
116 | + hasChildField="${po.dictText?split(',')[3]}" | |
117 | + </#if> | |
118 | + </#if> | |
119 | + pidValue="${po.dictField}" | |
120 | + <#if po.readonly=='Y'>disabled</#if>> | |
121 | + </j-tree-select> | |
104 | 122 | <#else> |
105 | 123 | <a-input v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if> ></a-input> |
106 | 124 | </#if> |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | <#list columns as po> |
32 | 32 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
33 | 33 | <#assign form_field_dictCode=""> |
34 | - <#if po.dictTable?default("")?trim?length gt 1> | |
34 | + <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> | |
35 | 35 | <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}"> |
36 | 36 | <#elseif po.dictField?default("")?trim?length gt 1> |
37 | 37 | <#assign form_field_dictCode="${po.dictField}"> |
... | ... | @@ -106,6 +106,24 @@ |
106 | 106 | <j-editor v-decorator="['${po.fieldName}',{trigger:'input'}]" <#if po.readonly=='Y'>disabled</#if>/> |
107 | 107 | <#elseif po.fieldDbType=='Blob'> |
108 | 108 | <a-input v-decorator="['${po.fieldName}String'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
109 | + <#elseif po.classType == 'sel_tree'> | |
110 | + <#assign form_tree_select = true> | |
111 | + <j-tree-select | |
112 | + ref="treeSelect" | |
113 | + placeholder="请选择${po.filedComment}" | |
114 | + v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" | |
115 | + <#if po.dictText??> | |
116 | + <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??> | |
117 | + dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}" | |
118 | + <#elseif po.dictText?split(',')[1]??> | |
119 | + pidField="${po.dictText?split(',')[1]}" | |
120 | + <#elseif po.dictText?split(',')[3]??> | |
121 | + hasChildField="${po.dictText?split(',')[3]}" | |
122 | + </#if> | |
123 | + </#if> | |
124 | + pidValue="${po.dictField}" | |
125 | + <#if po.readonly=='Y'>disabled</#if>> | |
126 | + </j-tree-select> | |
109 | 127 | <#else> |
110 | 128 | <a-input v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
111 | 129 | </#if> |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/[1-n]Form.vuei
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | <#list sub.colums as po> |
33 | 33 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
34 | 34 | <#assign form_field_dictCode=""> |
35 | - <#if po.dictTable?default("")?trim?length gt 1> | |
35 | + <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> | |
36 | 36 | <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}"> |
37 | 37 | <#elseif po.dictField?default("")?trim?length gt 1> |
38 | 38 | <#assign form_field_dictCode="${po.dictField}"> |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei
... | ... | @@ -182,6 +182,8 @@ |
182 | 182 | ref="table" |
183 | 183 | size="middle" |
184 | 184 | rowKey="id" |
185 | + class="j-table-force-nowrap" | |
186 | + :scroll="{x:true}" | |
185 | 187 | :columns="columns" |
186 | 188 | :dataSource="dataSource" |
187 | 189 | :pagination="ipagination" |
... | ... | @@ -219,7 +221,7 @@ |
219 | 221 | <a @click="handleAddChild(record)">添加下级</a> |
220 | 222 | </a-menu-item> |
221 | 223 | <a-menu-item> |
222 | - <a-popconfirm title="确定删除吗?" @confirm="() => handleDeleteNode(record.id)"> | |
224 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDeleteNode(record.id)" placement="topLeft"> | |
223 | 225 | <a>删除</a> |
224 | 226 | </a-popconfirm> |
225 | 227 | </a-menu-item> |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei
... | ... | @@ -23,11 +23,17 @@ |
23 | 23 | <#assign form_tree_select = false> |
24 | 24 | <#assign form_switch=false> |
25 | 25 | <#assign pidFieldName = ""> |
26 | - | |
26 | +<#assign form_select_search = false> | |
27 | +<#assign form_cat_tree = false> | |
28 | +<#assign form_cat_back = ""> | |
29 | +<#assign form_pca = false> | |
30 | +<#assign form_editor = false> | |
31 | +<#assign form_md = false> | |
32 | +<#assign form_sel_tree = false> | |
27 | 33 | <#list columns as po> |
28 | 34 | <#if po.isShow =='Y'> |
29 | 35 | <#assign form_field_dictCode=""> |
30 | - <#if po.dictTable?default("")?trim?length gt 1> | |
36 | + <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> | |
31 | 37 | <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}"> |
32 | 38 | <#elseif po.dictField?default("")?trim?length gt 1> |
33 | 39 | <#assign form_field_dictCode="${po.dictField}"> |
... | ... | @@ -87,10 +93,51 @@ |
87 | 93 | <#elseif po.classType=='image'> |
88 | 94 | <#assign form_image = true> |
89 | 95 | <j-image-upload isMultiple <#if po.uploadnum??>:number=${po.uploadnum}</#if> v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" <#if po.readonly=='Y'>disabled</#if>></j-image-upload> |
96 | + <#elseif po.classType=='sel_search'> | |
97 | + <#assign form_select_search = true> | |
98 | + <j-search-select-tag v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" dict="${form_field_dictCode}" <#if po.readonly=='Y'>disabled</#if> /> | |
99 | + <#elseif po.classType=='cat_tree'> | |
100 | + <#assign form_cat_tree = true> | |
101 | + <j-category-select v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" pcode="${po.dictField?default("")}" placeholder="请选择${po.filedComment}" <#if po.dictText?default("")?trim?length gt 1>back="${po.dictText}" @change="handleCategoryChange"</#if> <#if po.readonly=='Y'>disabled</#if>/> | |
102 | + <#if po.dictText?default("")?trim?length gt 1> | |
103 | + <#assign form_cat_back = "${po.dictText}"> | |
104 | + </#if> | |
105 | + <#elseif po.classType =='pca'> | |
106 | + <#assign form_pca=true> | |
107 | + <j-area-linkage type="cascader" v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" placeholder="请输入省市区" <#if po.readonly=='Y'>disabled</#if> /> | |
108 | + <#elseif po.classType=='umeditor'> | |
109 | + <#assign form_editor = true> | |
110 | + <j-editor v-decorator="['${po.fieldName}',{trigger:'input'}]" <#if po.readonly=='Y'>disabled</#if>/> | |
111 | + <#elseif po.classType =='markdown'> | |
112 | + <#assign form_md=true> | |
113 | + <j-markdown-editor v-decorator="['${po.fieldName}']" id="${po.fieldName}"></j-markdown-editor> | |
114 | + <#elseif po.classType == 'sel_tree'> | |
115 | + <#assign form_tree_select = true> | |
116 | + <j-tree-select | |
117 | + ref="treeSelect" | |
118 | + placeholder="请选择${po.filedComment}" | |
119 | + v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" | |
120 | + <#if po.dictText??> | |
121 | + <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??> | |
122 | + dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}" | |
123 | + <#elseif po.dictText?split(',')[1]??> | |
124 | + pidField="${po.dictText?split(',')[1]}" | |
125 | + <#elseif po.dictText?split(',')[3]??> | |
126 | + hasChildField="${po.dictText?split(',')[3]}" | |
127 | + </#if> | |
128 | + </#if> | |
129 | + pidValue="${po.dictField}" | |
130 | + <#if po.readonly=='Y'>disabled</#if>> | |
131 | + </j-tree-select> | |
90 | 132 | <#else> |
91 | 133 | <a-input v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
92 | 134 | </#if> |
93 | 135 | </a-form-item> |
136 | + <#if form_cat_tree && form_cat_back?length gt 1> | |
137 | + <a-form-item v-show="false"> | |
138 | + <a-input v-decorator="['${form_cat_back}']"></a-input> | |
139 | + </a-form-item> | |
140 | + </#if> | |
94 | 141 | </#if> |
95 | 142 | </#list> |
96 | 143 | |
... | ... | @@ -131,7 +178,21 @@ |
131 | 178 | <#if form_switch==true > |
132 | 179 | import JSwitch from '@/components/jeecg/JSwitch' |
133 | 180 | </#if> |
134 | - | |
181 | + <#if form_select_search> | |
182 | + import JSearchSelectTag from '@/components/dict/JSearchSelectTag' | |
183 | + </#if> | |
184 | + <#if form_cat_tree> | |
185 | + import JCategorySelect from '@/components/jeecg/JCategorySelect' | |
186 | + </#if> | |
187 | + <#if form_pca> | |
188 | + import JAreaLinkage from '@comp/jeecg/JAreaLinkage' | |
189 | + </#if> | |
190 | + <#if form_editor> | |
191 | + import JEditor from '@/components/jeecg/JEditor' | |
192 | + </#if> | |
193 | + <#if form_md> | |
194 | + import JMarkdownEditor from '@/components/jeecg/JMarkdownEditor/index' | |
195 | + </#if> | |
135 | 196 | export default { |
136 | 197 | name: "${entityName}Modal", |
137 | 198 | components: { |
... | ... | @@ -160,8 +221,23 @@ |
160 | 221 | JSwitch, |
161 | 222 | </#if> |
162 | 223 | <#if form_tree_select> |
163 | - JTreeSelect | |
224 | + JTreeSelect, | |
164 | 225 | </#if> |
226 | + <#if form_select_search> | |
227 | + JSearchSelectTag, | |
228 | + </#if> | |
229 | + <#if form_cat_tree> | |
230 | + JCategorySelect, | |
231 | + </#if> | |
232 | + <#if form_pca> | |
233 | + JAreaLinkage, | |
234 | + </#if> | |
235 | + <#if form_editor> | |
236 | + JEditor, | |
237 | + </#if> | |
238 | + <#if form_md> | |
239 | + JMarkdownEditor, | |
240 | + </#if> | |
165 | 241 | }, |
166 | 242 | data () { |
167 | 243 | return { |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | <#list columns as po> |
32 | 32 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
33 | 33 | <#assign form_field_dictCode=""> |
34 | - <#if po.dictTable?default("")?trim?length gt 1> | |
34 | + <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> | |
35 | 35 | <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}"> |
36 | 36 | <#elseif po.dictField?default("")?trim?length gt 1> |
37 | 37 | <#assign form_field_dictCode="${po.dictField}"> |
... | ... | @@ -101,6 +101,24 @@ |
101 | 101 | <j-editor v-decorator="['${po.fieldName}',{trigger:'input'}]" <#if po.readonly=='Y'>disabled</#if>/> |
102 | 102 | <#elseif po.fieldDbType=='Blob'> |
103 | 103 | <a-input v-decorator="['${po.fieldName}String'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
104 | + <#elseif po.classType == 'sel_tree'> | |
105 | + <#assign form_tree_select = true> | |
106 | + <j-tree-select | |
107 | + ref="treeSelect" | |
108 | + placeholder="请选择${po.filedComment}" | |
109 | + v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" | |
110 | + <#if po.dictText??> | |
111 | + <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??> | |
112 | + dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}" | |
113 | + <#elseif po.dictText?split(',')[1]??> | |
114 | + pidField="${po.dictText?split(',')[1]}" | |
115 | + <#elseif po.dictText?split(',')[3]??> | |
116 | + hasChildField="${po.dictText?split(',')[3]}" | |
117 | + </#if> | |
118 | + </#if> | |
119 | + pidValue="${po.dictField}" | |
120 | + <#if po.readonly=='Y'>disabled</#if>> | |
121 | + </j-tree-select> | |
104 | 122 | <#else> |
105 | 123 | <a-input v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
106 | 124 | </#if> |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/[1-n]Modal.vuei
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | <#list sub.originalColumns as po> |
34 | 34 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
35 | 35 | <#assign form_field_dictCode=""> |
36 | - <#if po.dictTable?default("")?trim?length gt 1> | |
36 | + <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> | |
37 | 37 | <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}"> |
38 | 38 | <#elseif po.dictField?default("")?trim?length gt 1> |
39 | 39 | <#assign form_field_dictCode="${po.dictField}"> |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | <#list columns as po> |
33 | 33 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
34 | 34 | <#assign form_field_dictCode=""> |
35 | - <#if po.dictTable?default("")?trim?length gt 1> | |
35 | + <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> | |
36 | 36 | <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}"> |
37 | 37 | <#elseif po.dictField?default("")?trim?length gt 1> |
38 | 38 | <#assign form_field_dictCode="${po.dictField}"> |
... | ... | @@ -107,6 +107,24 @@ |
107 | 107 | <j-editor v-decorator="['${po.fieldName}',{trigger:'input'}]" <#if po.readonly=='Y'>disabled</#if>/> |
108 | 108 | <#elseif po.fieldDbType=='Blob'> |
109 | 109 | <a-input v-decorator="['${po.fieldName}String'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
110 | + <#elseif po.classType == 'sel_tree'> | |
111 | + <#assign form_tree_select = true> | |
112 | + <j-tree-select | |
113 | + ref="treeSelect" | |
114 | + placeholder="请选择${po.filedComment}" | |
115 | + v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" | |
116 | + <#if po.dictText??> | |
117 | + <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??> | |
118 | + dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}" | |
119 | + <#elseif po.dictText?split(',')[1]??> | |
120 | + pidField="${po.dictText?split(',')[1]}" | |
121 | + <#elseif po.dictText?split(',')[3]??> | |
122 | + hasChildField="${po.dictText?split(',')[3]}" | |
123 | + </#if> | |
124 | + </#if> | |
125 | + pidValue="${po.dictField}" | |
126 | + <#if po.readonly=='Y'>disabled</#if>> | |
127 | + </j-tree-select> | |
110 | 128 | <#else> |
111 | 129 | <a-input v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
112 | 130 | </#if> |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/[1-n]Form.vuei
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | <#list sub.colums as po> |
20 | 20 | <#if po.isShow =='Y'> |
21 | 21 | <#assign form_field_dictCode=""> |
22 | - <#if po.dictTable?default("")?trim?length gt 1> | |
22 | + <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> | |
23 | 23 | <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}"> |
24 | 24 | <#elseif po.dictField?default("")?trim?length gt 1> |
25 | 25 | <#assign form_field_dictCode="${po.dictField}"> |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | <#list columns as po> |
32 | 32 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
33 | 33 | <#assign form_field_dictCode=""> |
34 | - <#if po.dictTable?default("")?trim?length gt 1> | |
34 | + <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> | |
35 | 35 | <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}"> |
36 | 36 | <#elseif po.dictField?default("")?trim?length gt 1> |
37 | 37 | <#assign form_field_dictCode="${po.dictField}"> |
... | ... | @@ -106,6 +106,24 @@ |
106 | 106 | <j-editor v-decorator="['${po.fieldName}',{trigger:'input'}]" <#if po.readonly=='Y'>disabled</#if>/> |
107 | 107 | <#elseif po.fieldDbType=='Blob'> |
108 | 108 | <a-input v-decorator="['${po.fieldName}String'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
109 | + <#elseif po.classType == 'sel_tree'> | |
110 | + <#assign form_tree_select = true> | |
111 | + <j-tree-select | |
112 | + ref="treeSelect" | |
113 | + placeholder="请选择${po.filedComment}" | |
114 | + v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" | |
115 | + <#if po.dictText??> | |
116 | + <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??> | |
117 | + dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}" | |
118 | + <#elseif po.dictText?split(',')[1]??> | |
119 | + pidField="${po.dictText?split(',')[1]}" | |
120 | + <#elseif po.dictText?split(',')[3]??> | |
121 | + hasChildField="${po.dictText?split(',')[3]}" | |
122 | + </#if> | |
123 | + </#if> | |
124 | + pidValue="${po.dictField}" | |
125 | + <#if po.readonly=='Y'>disabled</#if>> | |
126 | + </j-tree-select> | |
109 | 127 | <#else> |
110 | 128 | <a-input v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
111 | 129 | </#if> |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/[1-n]Form.vuei
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | <#list sub.colums as po> |
33 | 33 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
34 | 34 | <#assign form_field_dictCode=""> |
35 | - <#if po.dictTable?default("")?trim?length gt 1> | |
35 | + <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> | |
36 | 36 | <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}"> |
37 | 37 | <#elseif po.dictField?default("")?trim?length gt 1> |
38 | 38 | <#assign form_field_dictCode="${po.dictField}"> |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | <#list columns as po> |
35 | 35 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
36 | 36 | <#assign form_field_dictCode=""> |
37 | - <#if po.dictTable?default("")?trim?length gt 1> | |
37 | + <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> | |
38 | 38 | <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}"> |
39 | 39 | <#elseif po.dictField?default("")?trim?length gt 1> |
40 | 40 | <#assign form_field_dictCode="${po.dictField}"> |
... | ... | @@ -109,6 +109,24 @@ |
109 | 109 | <j-editor v-decorator="['${po.fieldName}',{trigger:'input'}]" <#if po.readonly=='Y'>disabled</#if>/> |
110 | 110 | <#elseif po.fieldDbType=='Blob'> |
111 | 111 | <a-input v-decorator="['${po.fieldName}String'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
112 | + <#elseif po.classType == 'sel_tree'> | |
113 | + <#assign form_tree_select = true> | |
114 | + <j-tree-select | |
115 | + ref="treeSelect" | |
116 | + placeholder="请选择${po.filedComment}" | |
117 | + v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" | |
118 | + <#if po.dictText??> | |
119 | + <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??> | |
120 | + dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}" | |
121 | + <#elseif po.dictText?split(',')[1]??> | |
122 | + pidField="${po.dictText?split(',')[1]}" | |
123 | + <#elseif po.dictText?split(',')[3]??> | |
124 | + hasChildField="${po.dictText?split(',')[3]}" | |
125 | + </#if> | |
126 | + </#if> | |
127 | + pidValue="${po.dictField}" | |
128 | + <#if po.readonly=='Y'>disabled</#if>> | |
129 | + </j-tree-select> | |
112 | 130 | <#else> |
113 | 131 | <a-input v-decorator="['${po.fieldName}'${autoWriteRules(po)}]" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input> |
114 | 132 | </#if> |
... | ... |