From 31ab7dcf4055e89c758f716af2233c2151a82f24 Mon Sep 17 00:00:00 2001 From: JR <3573153686@qq.com> Date: Sat, 9 Aug 2025 14:58:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor(gear-generator):=20=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=20Date=20=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=9A=84=20@ExcelProperty=20=E6=A0=BC=E5=BC=8F=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除了 vo.java.vm 模板中 Date 类型字段的 @ExcelProperty(format = "yyyy-MM-dd HH:mm:ss") 注解 -保留了 @DateTimeFormat 和 @JsonFormat 注解,用于日期格式的处理 --- gear-generator/src/main/resources/vm/java/bo.java.vm | 4 ++++ gear-generator/src/main/resources/vm/java/vo.java.vm | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/gear-generator/src/main/resources/vm/java/bo.java.vm b/gear-generator/src/main/resources/vm/java/bo.java.vm index 41f115d..7665229 100644 --- a/gear-generator/src/main/resources/vm/java/bo.java.vm +++ b/gear-generator/src/main/resources/vm/java/bo.java.vm @@ -45,6 +45,10 @@ public class ${ClassName}Bo extends ${Entity} { #elseif($column.edit) #set($Group="EditGroup.class") #end +#if($column.javaType == 'Date') + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") +#end #if($column.required) #if($column.javaType == 'String') @NotBlank(message = "$column.columnComment不能为空", groups = { $Group }) diff --git a/gear-generator/src/main/resources/vm/java/vo.java.vm b/gear-generator/src/main/resources/vm/java/vo.java.vm index 36e12d1..9a6a939 100644 --- a/gear-generator/src/main/resources/vm/java/vo.java.vm +++ b/gear-generator/src/main/resources/vm/java/vo.java.vm @@ -43,6 +43,10 @@ public class ${ClassName}Vo { @ExcelDictFormat(readConverterExp = "$column.readConverterExp()") #else @ExcelProperty(value = "${comment}") +#end +#if($column.javaType == 'Date') + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") #end private $column.javaType $column.javaField; From ee01e075cd37c0aef0cae4e76eed82026b507772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Sat, 9 Aug 2025 17:59:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=20feat:=20=E7=BC=96=E5=86=99?= =?UTF-8?q?=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/vm/vue/index.vue.vm | 6 +- gear-ui3/src/components/AllApplications.vue | 241 +++ gear-ui3/src/router/index.js | 2 +- gear-ui3/src/views/components/Hello.vue | 88 + gear-ui3/src/views/index.vue | 1524 +++++------------ 5 files changed, 739 insertions(+), 1122 deletions(-) create mode 100644 gear-ui3/src/components/AllApplications.vue create mode 100644 gear-ui3/src/views/components/Hello.vue diff --git a/gear-generator/src/main/resources/vm/vue/index.vue.vm b/gear-generator/src/main/resources/vm/vue/index.vue.vm index 53adcb0..1852c4b 100644 --- a/gear-generator/src/main/resources/vm/vue/index.vue.vm +++ b/gear-generator/src/main/resources/vm/vue/index.vue.vm @@ -119,7 +119,7 @@ #elseif($column.list && $column.htmlType == "datetime") #elseif($column.list && $column.htmlType == "imageUpload") @@ -368,6 +368,10 @@ const daterange${AttrName} = ref([]); #end #end +function formatterTime = (time) => { + return proxy.parseTime(time, '{y}-{m}-{d}') +} + const data = reactive({ form: {}, queryParams: { diff --git a/gear-ui3/src/components/AllApplications.vue b/gear-ui3/src/components/AllApplications.vue new file mode 100644 index 0000000..1cf7bb1 --- /dev/null +++ b/gear-ui3/src/components/AllApplications.vue @@ -0,0 +1,241 @@ + + + + + \ No newline at end of file diff --git a/gear-ui3/src/router/index.js b/gear-ui3/src/router/index.js index 07302ad..ce17be9 100644 --- a/gear-ui3/src/router/index.js +++ b/gear-ui3/src/router/index.js @@ -66,7 +66,7 @@ export const constantRoutes = [ path: '/index', component: () => import('@/views/index'), name: 'Index', - meta: { title: '首页', icon: 'dashboard', affix: true } + meta: { title: '工作台', icon: 'dashboard', affix: true } } ] }, diff --git a/gear-ui3/src/views/components/Hello.vue b/gear-ui3/src/views/components/Hello.vue new file mode 100644 index 0000000..533b706 --- /dev/null +++ b/gear-ui3/src/views/components/Hello.vue @@ -0,0 +1,88 @@ + + + + + \ No newline at end of file diff --git a/gear-ui3/src/views/index.vue b/gear-ui3/src/views/index.vue index 0d928fd..cde14b1 100644 --- a/gear-ui3/src/views/index.vue +++ b/gear-ui3/src/views/index.vue @@ -1,1131 +1,415 @@ - - +/* 业务功能区标题栏 */ +.business-area-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 16px; +} + +.business-area-title { + font-size: 18px; + font-weight: 600; + color: #333; + margin: 0; +} + +.edit-btn { + display: flex; + align-items: center; + gap: 6px; + padding: 6px 12px; + background: #f3f4f6; + border: none; + border-radius: 6px; + color: #6b7280; + cursor: pointer; + font-size: 14px; + transition: all 0.2s; +} + +.edit-btn:hover { + background: #e5e7eb; + color: #374151; +} + +/* 业务功能区样式 */ +.business-modules { + display: grid; + grid-template-columns: repeat(6, 1fr); + gap: 24px; + margin-bottom: 32px; +} + +.business-module { + display: flex; + align-items: center; + padding: 16px; + border-radius: 12px; + background: #fff; + box-shadow: 0 2px 12px 0 rgba(0,0,0,0.05); + transition: all 0.2s; + cursor: pointer; +} + +.business-module:hover { + box-shadow: 0 4px 16px 0 rgba(0,0,0,0.1); + transform: translateY(-2px); +} + +.business-module-icon { + width: 40px; + height: 40px; + border-radius: 8px; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + margin-right: 12px; + background: #3b82f6; /* 默认图标背景色 */ +} + +.business-module-icon i { + font-size: 20px; + color: #fff; +} + +.business-module-title { + font-size: 16px; + font-weight: 500; + color: #303133; + margin: 0; +} + +/* 弹窗样式 */ +.dialog-mask { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); + display: flex; + align-items: center; + justify-content: center; + z-index: 1000; +} + +.setting-dialog { + width: 500px; + background: #fff; + border-radius: 12px; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); +} + +.dialog-header { + padding: 16px 24px; + border-bottom: 1px solid #f0f0f0; + display: flex; + justify-content: space-between; + align-items: center; +} + +.dialog-header h3 { + margin: 0; + font-size: 18px; + color: #333; +} + +.close-btn { + background: none; + border: none; + cursor: pointer; + color: #999; + font-size: 18px; +} + +.close-btn:hover { + color: #333; +} + +.dialog-content { + padding: 24px; + max-height: 400px; + overflow-y: auto; +} + +.module-list { + list-style: none; + padding: 0; + margin: 0; +} + +.module-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 12px 0; + border-bottom: 1px solid #f5f5f5; +} + +.module-item:last-child { + border-bottom: none; +} + +.module-info { + display: flex; + align-items: center; + gap: 12px; +} + +.module-index { + width: 24px; + height: 24px; + border-radius: 50%; + background: #f3f4f6; + color: #6b7280; + display: flex; + align-items: center; + justify-content: center; + font-size: 12px; +} + +.module-name { + font-size: 16px; + color: #333; +} + +.module-actions { + display: flex; + gap: 8px; +} + +.action-btn { + background: none; + border: none; + width: 32px; + height: 32px; + border-radius: 6px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + transition: all 0.2s; +} + +.move-btn { + color: #9ca3af; + background: #f9fafb; +} + +.move-btn:hover { + background: #f3f4f6; + color: #6b7280; +} + +.move-btn:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.delete-btn { + color: #ef4444; + background: #fee2e2; +} + +.delete-btn:hover { + background: #fecaca; +} + +.empty-tip { + text-align: center; + padding: 40px 0; + color: #9ca3af; + font-size: 14px; + background: #f9fafb; + border-radius: 8px; +} + +.dialog-footer { + padding: 16px 24px; + border-top: 1px solid #f0f0f0; + display: flex; + justify-content: flex-end; + gap: 12px; +} + +.cancel-btn, .confirm-btn { + padding: 8px 16px; + border-radius: 6px; + cursor: pointer; + font-size: 14px; + transition: all 0.2s; +} + +.cancel-btn { + background: #f3f4f6; + border: none; + color: #6b7280; +} + +.cancel-btn:hover { + background: #e5e7eb; + color: #374151; +} + +.confirm-btn { + background: #3b82f6; + border: none; + color: #fff; +} + +.confirm-btn:hover { + background: #2563eb; +} + \ No newline at end of file