From 819555e61235251e3f6d105f11a61ec357e44db7 Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Sat, 13 Jul 2024 18:08:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=99=A8=E4=B8=93=E9=A1=B9=E4=BC=98=E5=8C=96=E3=80=91=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E6=B2=A1=E6=9C=89=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=89=8D=E7=AB=AF=E6=9D=83=E9=99=90=E6=8C=87=E4=BB=A4?= =?UTF-8?q?v-auth=20=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=96=B0=E7=BB=84=E4=BB=B6JPopupDict=E5=AD=97=E5=85=B8=20?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E8=8C=83=E5=9B=B4=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E6=9B=B4=E6=8D=A2=E7=BE=8E=E8=A7=82=E7=9A=84=E6=95=88?= =?UTF-8?q?=E6=9E=9C:=20=E6=97=A5=E6=9C=9F=E8=8C=83=E5=9B=B4=E3=80=81?= =?UTF-8?q?=E6=95=B0=E5=AD=97=E8=8C=83=E5=9B=B4=E3=80=81=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E7=AD=89=20=E7=94=A8=E6=88=B7=E5=92=8C?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=BB=84=E4=BB=B6=EF=BC=8C=E7=94=9F=E6=88=90?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=9A=84=E6=97=B6=E5=80=99=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=A0=B9=E6=8D=AEOnline=E5=AD=98=E5=82=A8=E5=AD=97=E6=AE=B5?= =?UTF-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90=20?= =?UTF-8?q?int=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5=E7=9A=84=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E6=88=90=E6=95=B0=E5=80=BC=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=20=E6=97=A0=E8=AE=BA=E6=98=AF=E5=8E=9F=E7=94=9Ferp=E8=BF=98?= =?UTF-8?q?=E6=98=AF=E9=9D=9E=E5=8E=9F=E7=94=9F=EF=BC=8C=E4=B8=8D=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E4=B8=BB=E8=A1=A8=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=AF=BC=E5=87=BA=E5=AD=90=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E5=8F=91=E7=8E=B0=E5=AF=BC=E5=87=BA=E4=BA=86=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=20=E4=B8=80=E5=AF=B9=E5=A4=9Aerp=EF=BC=8C?= =?UTF-8?q?=E4=B9=9F=E6=94=B9=E6=88=90=E7=82=B9=E5=87=BB=E8=A1=8C=E5=B0=B1?= =?UTF-8?q?=E9=80=89=E4=B8=AD=20=E4=B8=80=E5=AF=B9Tab=E9=A3=8E=E6=A0=BC?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E7=BE=8E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/native/vue3NativeComponents.ftl | 3 + .../common/form/native/vue3NativeForm.ftl | 15 ++- .../common/form/native/vue3NativeImport.ftl | 6 ++ .../common/form/native/vue3NativeSearch.ftl | 65 ++++--------- .../code-template-online/common/utils.ftl | 17 ++++ .../vue3/${entityName}List.vuei | 17 ++-- .../vue3/${entityName}__data.tsi | 49 +++++++++- .../vue3/components/${entityName}Modal.vuei | 12 ++- .../vue3Native/${entityName}List.vuei | 64 +++++++++++-- .../vue3Native/${entityName}__data.tsi | 2 +- .../components/${entityName}Form.vuei | 25 ++++- .../vue3/${entityName}List.vuei | 22 +++-- .../vue3/${entityName}__data.tsi | 49 +++++++++- .../vue3/components/${entityName}Modal.vuei | 12 ++- .../vue3Native/${entityName}List.vuei | 57 +++++++++++- .../vue3Native/${entityName}__data.tsi | 2 +- .../components/${entityName}Form.vuei | 25 ++++- .../vue3/${entityName}List.vuei | 19 ++-- .../vue3/${entityName}__data.tsi | 77 +++++++++++++++- .../${entityPackage}/vue3/[1-n]List.vuei | 1 + .../vue3/components/${entityName}Modal.vuei | 12 ++- .../vue3/components/[1-n]Modal.vuei | 11 ++- .../vue3Native/${entityName}List.vuei | 68 ++++++++++++-- .../vue3Native/${entityName}__data.tsi | 4 +- .../vue3Native/[1-n]List.vuei | 1 + .../components/${entityName}Form.vuei | 19 +++- .../vue3Native/components/[1-n]Form.vuei | 18 +++- .../vue3/${entityName}List.vuei | 21 +++-- .../vue3/${entityName}__data.tsi | 91 +++++++++++++++++-- .../vue3/components/${entityName}Modal.vuei | 8 +- .../vue3/components/[1-n]Form.vuei | 14 ++- .../vue3/${entityName}List.vuei | 21 +++-- .../vue3/${entityName}__data.tsi | 72 ++++++++++++++- .../vue3/components/${entityName}Modal.vuei | 8 +- .../vue3/components/[1-n]Form.vuei | 16 +++- .../vue3Native/${entityName}List.vuei | 67 ++++++++++++-- .../vue3Native/${entityName}__data.tsi | 2 +- .../components/${entityName}Form.vuei | 23 ++++- .../vue3Native/components/[1-n]Form.vuei | 28 +++++- .../vue3/${entityName}List.vuei | 21 +++-- .../vue3/${entityName}__data.tsi | 89 +++++++++++++++++- .../vue3/components/${entityName}Modal.vuei | 8 +- .../vue3/components/[1-n]Form.vuei | 16 +++- 43 files changed, 973 insertions(+), 204 deletions(-) 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 @@