From 1183249080af344ae9d667129a6858a05365a99c Mon Sep 17 00:00:00 2001 From: dataprince Date: Wed, 31 Jan 2024 15:43:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E6=94=AF?= =?UTF-8?q?=E6=8C=81:=E4=B8=BB=E5=AD=90=E8=A1=A8=EF=BC=88element-ts?= =?UTF-8?q?=E7=89=88=E6=9C=AC=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +- .../service/GenTableServiceImpl.java | 1 + .../main/resources/vm/api/element.ts.types.vm | 23 ++- .../vm/vue/element.js.index-tree.vue.vm | 20 +-- .../resources/vm/vue/element.js.index.vue.vm | 94 +++++------ .../vm/vue/element.ts.index-tree.vue.vm | 4 +- .../resources/vm/vue/element.ts.index.vue.vm | 155 ++++++++++++++++-- 7 files changed, 223 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index a72a3d0..1078eb8 100644 --- a/README.md +++ b/README.md @@ -37,15 +37,15 @@ Ruoyi-Flex已集成各种开源开发框架,扫平了技术障碍,可直接 ## 3、前端项目 Ruoyi-Flex实行前后端分离仓库,本项目是java后端部分,目前有3个前端项目: -### (1)flex-elementplus-ui - 使用elementplus、js构建,项目地址: [flex-elementplus-ui](https://gitee.com/dataprince/flex-elementplus-ui) - -### (2)ruoyiflex-elementplus-ts +### (1)ruoyiflex-elementplus-ts 使用elementplus、typescript构建,项目地址: [ruoyiflex-elementplus-ts](https://gitee.com/dataprince/ruoyiflex-elementplus-ts) -### (3)ruoyiflex-antdesign-vben +### (2)ruoyiflex-antdesign-vben 使用antdesign、vben、typescript构建,项目地址: [ruoyiflex-antdesign-vben](https://gitee.com/dataprince/ruoyiflex-antdesign-vben) +### (3)flex-elementplus-ui +使用elementplus、js构建,项目地址: [flex-elementplus-ui](https://gitee.com/dataprince/flex-elementplus-ui) + ## 4、内置功能 1. 租户管理:系统内租户的管理 如:租户套餐、过期时间、用户数量、企业信息等。 diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java index 306619a..ab2646e 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java +++ b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java @@ -75,6 +75,7 @@ public class GenTableServiceImpl extends BaseServiceImpl; +#end +} + +export interface ${subClassName}VO extends BaseEntity { + /** 列表序号 */ + index:number; +#foreach ($column in $subTable.columns) +#if($column.list) + /** + * $column.columnComment + */ + $column.javaField:#if($column.javaField.indexOf("id") != -1 || $column.javaField.indexOf("Id") != -1) string | number; +#elseif($column.javaType == 'Long' || $column.javaType == 'Integer' || $column.javaType == 'Double' || $column.javaType == 'Float' || $column.javaType == 'BigDecimal') number; +#elseif($column.javaType == 'Boolean') boolean; +#else string; +#end +#end +#end } export interface ${BusinessName}Form { diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/element.js.index-tree.vue.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/element.js.index-tree.vue.vm index 7aff166..3e99f73 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/element.js.index-tree.vue.vm +++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/element.js.index-tree.vue.vm @@ -22,7 +22,7 @@ #elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) - + #elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) - + @@ -157,7 +157,8 @@ #foreach($column in $columns) #set($field=$column.javaField) -#if(($column.insert || $column.edit) && !$column.pk) +#if($column.insert && !$column.pk) +#if(($column.usableColumn) || (!$column.superColumn)) #set($parentheseIndex=$column.columnComment.indexOf("(")) #if($parentheseIndex != -1) #set($comment=$column.columnComment.substring(0, $parentheseIndex)) @@ -177,15 +178,9 @@ /> #elseif($column.htmlType == "input") - #if(${field} == "version") - - - - #else - + - #end #elseif($column.htmlType == "imageUpload") @@ -271,6 +266,7 @@ #end #end +#end #end