diff --git a/ruoyi-admin/src/main/resources/static/css/style.css b/ruoyi-admin/src/main/resources/static/css/style.css index f6cfe9b8..dcba3ff7 100644 --- a/ruoyi-admin/src/main/resources/static/css/style.css +++ b/ruoyi-admin/src/main/resources/static/css/style.css @@ -1829,6 +1829,10 @@ table.dataTable thead .sorting:after { font-size: 14px; } +.form-control.kv-fileinput-caption { + height: 34px!important; +} + .form-control:focus, .single-line:focus { border-color: #3c8dbc !important; } @@ -4917,14 +4921,13 @@ dd.project-people { font-size: 10px; text-transform: uppercase; } - /* Chat view */ .message-input { height: 90px !important; } .chat-avatar { - width: 36px; + white: 36px; height: 36px; float: left; margin-right: 10px; @@ -4951,10 +4954,9 @@ dd.project-people { margin-left: -30px; } -@media (max-width: 992px) { - .chat-users, - .chat-statistic { - margin-left: 0; +@media ( max-width : 992px) { + .chat-users, .chat-statistic { + margin-left: 0px; } } @@ -4974,12 +4976,12 @@ dd.project-people { margin-top: 1px; } -.chat-discussion .chat-message.left .message-avatar { +.chat-discussion .chat-message:nth-child(2n+1) .message-avatar { float: left; margin-right: 10px; } -.chat-discussion .chat-message.right .message-avatar { +.chat-discussion .chat-message:nth-child(2n) .message-avatar { float: right; margin-left: 10px; } @@ -4994,20 +4996,20 @@ dd.project-people { border-radius: 4px; } -.chat-discussion .chat-message.left .message-date { +.chat-discussion .chat-message:nth-child(2n+1) .message-date { float: right; } -.chat-discussion .chat-message.right .message-date { +.chat-discussion .chat-message:nth-child(2n) .message-date { float: left; } -.chat-discussion .chat-message.left .message { +.chat-discussion .chat-message:nth-child(2n+1) .message { text-align: left; margin-left: 55px; } -.chat-discussion .chat-message.right .message { +.chat-discussion .chat-message:nth-child(2n) .message { text-align: right; margin-right: 55px; } @@ -5036,7 +5038,6 @@ dd.project-people { .chat-message-form .form-group { margin-bottom: 0; } - /* jsTree */ .jstree-open>.jstree-anchor>.fa-folder:before { content: "\f07c"; diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java index ae8ab42e..6254f1f9 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java @@ -71,6 +71,9 @@ public class GenConstants /** 日期控件 */ public static final String HTML_DATETIME = "datetime"; + /** 上传控件 */ + public static final String HTML_UPLOAD = "upload"; + /** 字符串类型 */ public static final String TYPE_STRING = "String"; diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java index a9ca64f4..c034905f 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java @@ -59,7 +59,7 @@ public class GenTableColumn extends BaseEntity /** 查询方式(EQ等于、NE不等于、GT大于、LT小于、LIKE模糊、BETWEEN范围) */ private String queryType; - /** 显示类型(input文本框、textarea文本域、select下拉框、checkbox复选框、radio单选框、datetime日期控件) */ + /** 显示类型(input文本框、textarea文本域、select下拉框、checkbox复选框、radio单选框、datetime日期控件、upload上传控件) */ private String htmlType; /** 字典类型 */ diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java index 2061756c..89ea6af0 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java @@ -111,6 +111,11 @@ public class GenUtils { column.setHtmlType(GenConstants.HTML_SELECT); } + // 文件字段设置上传控件 + else if (StringUtils.endsWithIgnoreCase(columnName, "file")) + { + column.setHtmlType(GenConstants.HTML_UPLOAD); + } } /** diff --git a/ruoyi-generator/src/main/resources/templates/tool/gen/edit.html b/ruoyi-generator/src/main/resources/templates/tool/gen/edit.html index 8d46839d..b274094d 100644 --- a/ruoyi-generator/src/main/resources/templates/tool/gen/edit.html +++ b/ruoyi-generator/src/main/resources/templates/tool/gen/edit.html @@ -520,6 +520,7 @@ + diff --git a/ruoyi-generator/src/main/resources/vm/html/add.html.vm b/ruoyi-generator/src/main/resources/vm/html/add.html.vm index 0d32c365..4de1d1bf 100644 --- a/ruoyi-generator/src/main/resources/vm/html/add.html.vm +++ b/ruoyi-generator/src/main/resources/vm/html/add.html.vm @@ -8,6 +8,12 @@ #break #end #end +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "upload") + +#break +#end +#end
@@ -46,6 +52,16 @@
+#elseif($column.htmlType == "upload") +
+ +
+ +
+ +
+
+
#elseif($column.htmlType == "select" && "" != $dictType)
@@ -146,6 +162,12 @@ #break #end +#end +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "upload") + +#break +#end #end