diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeComponents.ftl b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeComponents.ftl index d38ed3694..30a4861f6 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeComponents.ftl +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeComponents.ftl @@ -13,6 +13,9 @@ <#if need_popup> JPopup, +<#if need_popup_dict> + JPopupDict, + <#if need_category> JCategorySelect, diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeForm.ftl b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeForm.ftl index 79de5503b..eadf11b79 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeForm.ftl +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeForm.ftl @@ -9,7 +9,7 @@ <#assign form_field_dictCode="${po.dictField}"> - + <#if po.classType =='date'> picker="${po.extendParams.picker}" v-model:value="formData.${po.fieldName}" value-format="YYYY-MM-DD" style="width: 100%" <#if po.readonly=='Y'>disabled allow-clear /> <#elseif po.classType =='datetime'> @@ -33,9 +33,18 @@ :multi="${po.extendParams.popupMulti?c}" :setFieldsValue="setFieldsValue" <#if po.readonly=='Y'>disabled<#rt> allow-clear /> + <#elseif po.classType =='popup_dict'> + <#assign need_popup_dict = true> + <#assign sourceFields = po.dictField?default("")?trim?split(",")/> + <#assign targetFields = po.dictText?default("")?trim?split(",")/> + disabled /> <#elseif po.classType =='sel_depart'> <#assign need_dept = true> - disabled allow-clear /> + labelKey="${po.extendParams.text}" <#if po.extendParams?exists && po.extendParams.store?exists>rowKey="${po.extendParams.store}" <#if po.readonly=='Y'>disabled :multiple="${po.extendParams.multi?default('true')}" checkStrictly <#if po.readonly=='Y'>disabled allow-clear /> <#elseif po.classType =='switch'> <#assign need_switch = true> :options="${po.dictField}" <#if po.readonly=='Y'>disabled> @@ -50,7 +59,7 @@ <#elseif po.classType =='sel_user'> <#assign need_dept_user = true> <#-- update-begin---author:chenrui ---date:20240102 for:[issue/#5711]修复用户选择组件在生成代码后变成部门用户选择组件---------- --> - disabled allow-clear /> + labelKey="${po.extendParams.text}" <#if po.extendParams?exists && po.extendParams.store?exists>rowKey="${po.extendParams.store}" <#if po.readonly=='Y'>disabled allow-clear /> <#-- update-end---author:chenrui ---date:20240102 for:[issue/#5711]修复用户选择组件在生成代码后变成部门用户选择组件---------- --> <#elseif po.classType =='textarea'> disabled/> diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeImport.ftl b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeImport.ftl index e2ea2d71d..5e0e88ef4 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeImport.ftl +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeImport.ftl @@ -13,6 +13,9 @@ <#if need_popup> import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue'; +<#if need_popup_dict> + import JPopupDict from '/@/components/Form/src/jeecg/components/JPopupDict.vue'; + <#if need_category> import JCategorySelect from '/@/components/Form/src/jeecg/components/JCategorySelect.vue'; @@ -47,4 +50,7 @@ <#if need_checkbox> import JCheckbox from "/@/components/Form/src/jeecg/components/JCheckbox.vue"; + +<#if need_range_number> + import JRangeNumber from "/@/components/Form/src/jeecg/components/JRangeNumber.vue"; \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeSearch.ftl b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeSearch.ftl index c85ef1a64..96352c34e 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeSearch.ftl +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeSearch.ftl @@ -56,66 +56,41 @@ <#if query_field_no gt 1> ]" <#if query_field_no gt 1> :multi="${po.extendParams.popupMulti?c}" <#if query_field_no gt 1> :setFieldsValue="setFieldsValue" allow-clear /> + <#elseif po.classType=='popup_dict'> + <#if query_field_no gt 1> placeholder="请选择${po.filedComment}" + <#if query_field_no gt 1> v-model:value="queryParam.${po.fieldName}" + <#if query_field_no gt 1> dictCode="${po.dictTable},${po.dictText},${po.dictField}" + <#if query_field_no gt 1> :multi="${po.extendParams.popupMulti?c}" + <#if query_field_no gt 1> <#if po.readonly=='Y'>disabled /> <#elseif po.classType=='list' || po.classType=='radio' || po.classType=='checkbox'> - <#-- ---------------------------下拉或是单选 判断数据字典是表字典还是普通字典------------------------------- --> - <#if po.dictTable?default("")?trim?length gt 1> + <#-- ---------------------------下拉或是单选 判断数据字典是表字典还是普通字典------------------------------- --> + <#if po.dictTable?default("")?trim?length gt 1> <#if query_field_no gt 1> - <#elseif po.dictField?default("")?trim?length gt 1> + <#elseif po.dictField?default("")?trim?length gt 1> <#if query_field_no gt 1> - <#else> + <#else> <#if query_field_no gt 1> - + <#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'> <#if query_field_no gt 1> - <#else> + <#else> <#if query_field_no gt 1> - + <#if query_field_no gt 1> <#if query_field_no gt 1> <#else> <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1> + <#if query_field_no gt 1> + <#if query_field_no gt 1> <#if po.classType=='date'> - <#if query_field_no gt 1>
- <#if query_field_no gt 1> - <#if query_field_no gt 1> picker="${po.extendParams.picker}" v-model:value="queryParam.${po.fieldName}_begin" class="query-group-cust" allow-clear /> - <#if query_field_no gt 1> - <#if query_field_no gt 1> ~ - <#if query_field_no gt 1> - <#if query_field_no gt 1> picker="${po.extendParams.picker}" v-model:value="queryParam.${po.fieldName}_end" class="query-group-cust" allow-clear /> - <#if query_field_no gt 1> - <#if query_field_no gt 1>
+ <#if query_field_no gt 1> picker="${po.extendParams.picker}" v-model:value="queryParam.${po.fieldName}" class="query-group-cust"/> <#elseif po.classType=='time'> - <#if query_field_no gt 1>
- <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1> ~ - <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1>
+ <#if query_field_no gt 1> <#elseif po.classType=='datetime'> - <#if query_field_no gt 1>
- <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1> ~ - <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1>
+ <#if query_field_no gt 1> <#else> - <#if query_field_no gt 1>
- <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1> ~ - <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1> - <#if query_field_no gt 1>
+ <#if query_field_no gt 1> <#if query_field_no gt 1>
<#if query_field_no gt 1>
diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/utils.ftl b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/utils.ftl index f0dd8f0e6..b26a3bc75 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/utils.ftl +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/utils.ftl @@ -149,6 +149,8 @@ <#-- update-begin---author:chenrui ---date:20231228 for:fix 带条件字典存在单引号导致js编译错误---------- --> <#elseif po.dictField?default("")?trim?length gt 1> <#assign dictCode="dictCode: '${po.dictField}'"> + <#else> + <#assign dictCode="dictCode: ''"> <#if po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='checkbox' || po.classType=='radio'> @@ -229,4 +231,19 @@ <#return flag> + + +<#-- vue3 native 获取范围字段 --> +<#function getRangeField(columns) > + <#assign rangeField = ""> + <#list columns as po> + <#if po.isQuery=='Y'> + <#if po.queryMode!='single'> + <#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time' || po.classType=='date' || po.classType=='datetime'> + <#assign rangeField = rangeField + "${po.fieldName},"> + + + + + <#return rangeField> \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei index c58235625..fc879096a 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei @@ -21,9 +21,9 @@