From 93135363c6e2ef408c6ddced1d7efaf352ef9c20 Mon Sep 17 00:00:00 2001 From: huangyemin Date: Wed, 12 Oct 2022 11:26:38 +0800 Subject: [PATCH 001/142] =?UTF-8?q?=E9=98=BF=E9=87=8C=E4=BA=91OSS=E8=A7=A3?= =?UTF-8?q?=E6=9E=90region=E6=97=B6=E5=85=BC=E5=AE=B9=E5=B8=A6https?= =?UTF-8?q?=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/file/core/client/s3/S3FileClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/core/client/s3/S3FileClient.java b/yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/core/client/s3/S3FileClient.java index 8de178bfcc..ab95d4bda8 100644 --- a/yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/core/client/s3/S3FileClient.java +++ b/yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/core/client/s3/S3FileClient.java @@ -75,7 +75,8 @@ public class S3FileClient extends AbstractFileClient { // 阿里云必须有 region,否则会报错 if (config.getEndpoint().contains(ENDPOINT_ALIYUN)) { return StrUtil.subBefore(config.getEndpoint(), '.', false) - .replaceAll("-internal", ""); // 去除内网 Endpoint 的后缀 + .replaceAll("-internal", "")// 去除内网 Endpoint 的后缀 + .replaceAll("https://", ""); } return null; } From ba206052402da2fe595efccf690df4f14ef9bea3 Mon Sep 17 00:00:00 2001 From: huangyemin Date: Wed, 12 Oct 2022 14:52:26 +0800 Subject: [PATCH 002/142] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=88=97=E8=A1=A8=E7=9A=84=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/src/views/infra/config/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-ui-admin/src/views/infra/config/index.vue b/yudao-ui-admin/src/views/infra/config/index.vue index 23c204864c..83baa45e44 100644 --- a/yudao-ui-admin/src/views/infra/config/index.vue +++ b/yudao-ui-admin/src/views/infra/config/index.vue @@ -41,7 +41,7 @@ - + From 29d302a90160895d246c58b9cab5d9803999ac64 Mon Sep 17 00:00:00 2001 From: huangyemin Date: Wed, 12 Oct 2022 15:28:00 +0800 Subject: [PATCH 003/142] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/optional/mall/coupon.sql | 8 ++++---- sql/optional/mall/mall.sql | 32 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sql/optional/mall/coupon.sql b/sql/optional/mall/coupon.sql index 4ab7b1ff95..734a4793d3 100644 --- a/sql/optional/mall/coupon.sql +++ b/sql/optional/mall/coupon.sql @@ -20,10 +20,10 @@ CREATE TABLE `coupon` `whether_noticed` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否已提醒', `state` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '优惠券状态 1已领用(未使用) 2已使用 3已过期', `get_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '获取方式1订单2.直接领取3.活动领取 4转赠 5分享获取', - `fetch_time` datetime NOT NULL DEFAULT 0 COMMENT '领取时间', - `use_time` datetime NOT NULL DEFAULT 0 COMMENT '使用时间', - `start_time` datetime NOT NULL DEFAULT 0 COMMENT '可使用的开始时间', - `end_time` datetime NOT NULL DEFAULT 0 COMMENT '有效期结束时间', + `fetch_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '领取时间', + `use_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '使用时间', + `start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '可使用的开始时间', + `end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '有效期结束时间', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', diff --git a/sql/optional/mall/mall.sql b/sql/optional/mall/mall.sql index 486b6f2fc5..8210a9866c 100644 --- a/sql/optional/mall/mall.sql +++ b/sql/optional/mall/mall.sql @@ -23,18 +23,18 @@ SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS `market_activity`; CREATE TABLE `market_activity` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '活动编号', - `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '活动标题', + `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '活动标题', `activity_type` tinyint NOT NULL COMMENT '活动类型', `status` tinyint NOT NULL DEFAULT -1 COMMENT '活动状态', `start_time` datetime NOT NULL COMMENT '开始时间', `end_time` datetime NOT NULL COMMENT '结束时间', `invalid_time` datetime NULL DEFAULT NULL COMMENT '失效时间', `delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间', - `time_limited_discount` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '限制折扣字符串,使用 JSON 序列化成字符串存储', - `full_privilege` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '限制折扣字符串,使用 JSON 序列化成字符串存储', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者', + `time_limited_discount` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '限制折扣字符串,使用 JSON 序列化成字符串存储', + `full_privilege` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '限制折扣字符串,使用 JSON 序列化成字符串存储', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', @@ -53,18 +53,18 @@ COMMIT; DROP TABLE IF EXISTS `market_banner`; CREATE TABLE `market_banner` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'Banner编号', - `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'Banner标题', - `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图片URL', + `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Banner标题', + `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '图片URL', `status` tinyint NOT NULL DEFAULT -1 COMMENT '活动状态', - `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '跳转地址', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者', + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '跳转地址', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', `sort` tinyint NULL DEFAULT NULL COMMENT '排序', - `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '描述', + `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '描述', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'Banner管理'; @@ -81,11 +81,11 @@ DROP TABLE IF EXISTS `member_address`; CREATE TABLE `member_address` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '收件地址编号', `user_id` bigint NOT NULL COMMENT '用户编号', - `name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '收件人名称', - `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '手机号', + `name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '收件人名称', + `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '手机号', `area_id` bigint NOT NULL COMMENT '地区编码', - `post_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '邮编', - `detail_address` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '收件详细地址', + `post_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邮编', + `detail_address` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '收件详细地址', `defaulted` bit(1) NOT NULL COMMENT '是否默认', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', @@ -95,7 +95,7 @@ CREATE TABLE `member_address` ( `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE, INDEX `idx_userId`(`user_id` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户收件地址'; +) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户收件地址'; -- ---------------------------- -- Records of member_address From eb48817f7bc9b4de18f49210bd2c909114ad383b Mon Sep 17 00:00:00 2001 From: huangyemin Date: Wed, 12 Oct 2022 15:42:45 +0800 Subject: [PATCH 004/142] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC=E4=B8=ADbanner?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=85=8D=E7=BD=AE=E9=94=99=E8=AF=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/optional/mall/mall.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/optional/mall/mall.sql b/sql/optional/mall/mall.sql index 8210a9866c..43e44c910c 100644 --- a/sql/optional/mall/mall.sql +++ b/sql/optional/mall/mall.sql @@ -307,7 +307,7 @@ INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, ` INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2022, '规格更新', 'product:property:update', 3, 3, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2023, '规格删除', 'product:property:delete', 3, 4, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2024, '规格导出', 'product:property:export', 3, 5, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2025, 'Banner管理', '', 2, 1, 2000, 'brand', '', 'mall/market/banner/index', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2025, 'Banner管理', '', 2, 1, 2000, 'banner', '', 'mall/market/banner/index', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2026, 'Banner查询', 'market:banner:query', 3, 1, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2027, 'Banner创建', 'market:banner:create', 3, 2, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2028, 'Banner更新', 'market:banner:update', 3, 3, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); From 66cef17fa132855578ec0c8cb79998775f68bb83 Mon Sep 17 00:00:00 2001 From: huzhibo <527188553@qq.com> Date: Thu, 13 Oct 2022 10:57:13 +0000 Subject: [PATCH 005/142] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=AE=A1=E7=90=86=E4=B8=AD=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huzhibo <527188553@qq.com> --- yudao-ui-admin/src/views/infra/config/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-ui-admin/src/views/infra/config/index.vue b/yudao-ui-admin/src/views/infra/config/index.vue index 23c204864c..83baa45e44 100644 --- a/yudao-ui-admin/src/views/infra/config/index.vue +++ b/yudao-ui-admin/src/views/infra/config/index.vue @@ -41,7 +41,7 @@ - + From 469f3d09be0ae92724e0877fb85a9c7d1fe14a6c Mon Sep 17 00:00:00 2001 From: xingyu Date: Tue, 18 Oct 2022 10:21:06 +0800 Subject: [PATCH 006/142] feat: update 1.8.2 --- yudao-ui-admin-vue3/package.json | 5 +++-- .../src/layout/components/ToolHeader.vue | 10 +++++----- .../src/layout/components/useRenderLayout.tsx | 6 +++--- yudao-ui-admin-vue3/windi.config.ts | 4 ++-- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/yudao-ui-admin-vue3/package.json b/yudao-ui-admin-vue3/package.json index ab056d30be..aab38555a0 100644 --- a/yudao-ui-admin-vue3/package.json +++ b/yudao-ui-admin-vue3/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi-vue-pro-vue3", - "version": "1.6.4.1811", + "version": "1.6.4.1821", "description": "基于vue3、element-plus、typesScript、vite3", "author": "xingyu", "private": false, @@ -22,7 +22,8 @@ "lint:style": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", "lint:lint-staged": "lint-staged -c ", "lint:pretty": "pretty-quick --staged", - "p": "plop" + "p": "plop", + "analysis": "windicss-analysis" }, "dependencies": { "@iconify/iconify": "^3.0.0", diff --git a/yudao-ui-admin-vue3/src/layout/components/ToolHeader.vue b/yudao-ui-admin-vue3/src/layout/components/ToolHeader.vue index 091a25a322..2c6d86c130 100644 --- a/yudao-ui-admin-vue3/src/layout/components/ToolHeader.vue +++ b/yudao-ui-admin-vue3/src/layout/components/ToolHeader.vue @@ -48,25 +48,25 @@ export default defineComponent({ {layout.value !== 'top' ? (
{hamburger.value && layout.value !== 'cutMenu' ? ( - + ) : undefined} {breadcrumb.value ? : undefined}
) : undefined}
{screenfull.value ? ( - + ) : undefined} {size.value ? ( - + ) : undefined} {locale.value ? ( ) : undefined} - +
) diff --git a/yudao-ui-admin-vue3/src/layout/components/useRenderLayout.tsx b/yudao-ui-admin-vue3/src/layout/components/useRenderLayout.tsx index 40134a667c..d388d5f5b5 100644 --- a/yudao-ui-admin-vue3/src/layout/components/useRenderLayout.tsx +++ b/yudao-ui-admin-vue3/src/layout/components/useRenderLayout.tsx @@ -110,7 +110,7 @@ export const useRenderLayout = () => { return ( <>
- {logo.value ? : undefined} + {logo.value ? : undefined}
@@ -167,7 +167,7 @@ export const useRenderLayout = () => { return ( <>
- {logo.value ? : undefined} + {logo.value ? : undefined}
@@ -204,7 +204,7 @@ export const useRenderLayout = () => { return ( <>
- {logo.value ? : undefined} + {logo.value ? : undefined}
diff --git a/yudao-ui-admin-vue3/windi.config.ts b/yudao-ui-admin-vue3/windi.config.ts index d8712bb315..cf32f97520 100644 --- a/yudao-ui-admin-vue3/windi.config.ts +++ b/yudao-ui-admin-vue3/windi.config.ts @@ -38,7 +38,7 @@ export default defineConfig({ } }) addComponents({ - '.hover-tigger': { + '.hover-trigger': { display: 'flex', height: '100%', padding: '1px 10px 0', @@ -49,7 +49,7 @@ export default defineConfig({ backgroundColor: 'var(--top-header-hover-color)' } }, - '.dark .hover-tigger': { + '.dark .hover-trigger': { '&:hover': { backgroundColor: 'var(--el-bg-color-overlay)' } From b982d875732fdb3740984f969ec9eac2df4f0343 Mon Sep 17 00:00:00 2001 From: huangyemin Date: Tue, 18 Oct 2022 11:01:47 +0800 Subject: [PATCH 007/142] =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E6=9C=AA=E6=B7=BB=E5=8A=A0@TenantJob=E6=B3=A8=E8=A7=A3?= =?UTF-8?q?=EF=BC=8C=E5=AF=BC=E8=87=B4=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java index 820bca4718..fab0c8143f 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.pay.job.notify; import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler; +import cn.iocoder.yudao.framework.tenant.core.job.TenantJob; import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -15,6 +16,7 @@ import javax.annotation.Resource; */ @Component @Slf4j +@TenantJob public class PayNotifyJob implements JobHandler { @Resource From 2fcbee040071b688f9ade09bb56a1c6324668483 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 19 Oct 2022 10:42:37 +0800 Subject: [PATCH 008/142] docs: update --- yudao-ui-admin-vue3/README.md | 2 +- yudao-ui-admin-vue3/package.json | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/yudao-ui-admin-vue3/README.md b/yudao-ui-admin-vue3/README.md index b9032638ef..7e6ebb455d 100644 --- a/yudao-ui-admin-vue3/README.md +++ b/yudao-ui-admin-vue3/README.md @@ -2,7 +2,7 @@

- + diff --git a/yudao-ui-admin-vue3/package.json b/yudao-ui-admin-vue3/package.json index aab38555a0..ca72ce7c12 100644 --- a/yudao-ui-admin-vue3/package.json +++ b/yudao-ui-admin-vue3/package.json @@ -22,8 +22,7 @@ "lint:style": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", "lint:lint-staged": "lint-staged -c ", "lint:pretty": "pretty-quick --staged", - "p": "plop", - "analysis": "windicss-analysis" + "p": "plop" }, "dependencies": { "@iconify/iconify": "^3.0.0", @@ -102,8 +101,7 @@ "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-windicss": "^1.8.8", "vue-tsc": "^1.0.8", - "windicss": "^3.5.6", - "windicss-analysis": "^0.3.5" + "windicss": "^3.5.6" }, "engines": { "node": ">= 14.18.0" From 4e415486eb26ce0a59e2922814e743a4929e008c Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 19 Oct 2022 17:10:19 +0800 Subject: [PATCH 009/142] feat: add vxe-table --- yudao-ui-admin-vue3/package.json | 4 +- .../src/components/ProTable/index.ts | 3 + .../src/components/ProTable/src/ProTable.vue | 62 +++++++++ yudao-ui-admin-vue3/src/main.ts | 5 + .../src/plugins/vxeTable/index.ts | 120 ++++++++++++++++++ yudao-ui-admin-vue3/vite.config.ts | 10 +- 6 files changed, 201 insertions(+), 3 deletions(-) create mode 100644 yudao-ui-admin-vue3/src/components/ProTable/index.ts create mode 100644 yudao-ui-admin-vue3/src/components/ProTable/src/ProTable.vue create mode 100644 yudao-ui-admin-vue3/src/plugins/vxeTable/index.ts diff --git a/yudao-ui-admin-vue3/package.json b/yudao-ui-admin-vue3/package.json index ca72ce7c12..12b6dabc0f 100644 --- a/yudao-ui-admin-vue3/package.json +++ b/yudao-ui-admin-vue3/package.json @@ -51,7 +51,9 @@ "vue-i18n": "9.2.2", "vue-router": "^4.1.5", "vue-types": "^4.2.1", - "web-storage-cache": "^1.1.1" + "vxe-table": "^4.3.5", + "web-storage-cache": "^1.1.1", + "xe-utils": "^3.5.7" }, "devDependencies": { "@commitlint/cli": "^17.1.2", diff --git a/yudao-ui-admin-vue3/src/components/ProTable/index.ts b/yudao-ui-admin-vue3/src/components/ProTable/index.ts new file mode 100644 index 0000000000..7785146026 --- /dev/null +++ b/yudao-ui-admin-vue3/src/components/ProTable/index.ts @@ -0,0 +1,3 @@ +import ProTable from './src/ProTable.vue' + +export { ProTable } diff --git a/yudao-ui-admin-vue3/src/components/ProTable/src/ProTable.vue b/yudao-ui-admin-vue3/src/components/ProTable/src/ProTable.vue new file mode 100644 index 0000000000..6921afcad4 --- /dev/null +++ b/yudao-ui-admin-vue3/src/components/ProTable/src/ProTable.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/yudao-ui-admin-vue3/src/main.ts b/yudao-ui-admin-vue3/src/main.ts index 785f3e9e49..03369099de 100644 --- a/yudao-ui-admin-vue3/src/main.ts +++ b/yudao-ui-admin-vue3/src/main.ts @@ -16,6 +16,9 @@ import { setupGlobCom } from '@/components' // 引入element-plus import { setupElementPlus } from '@/plugins/elementPlus' +// 引入vxe-table +import { setupVxeTable } from '@/plugins/vxeTable' + // 引入全局样式 import '@/styles/index.less' @@ -44,6 +47,8 @@ const setupAll = async () => { setupElementPlus(app) + setupVxeTable(app) + setupRouter(app) setupAuth(app) diff --git a/yudao-ui-admin-vue3/src/plugins/vxeTable/index.ts b/yudao-ui-admin-vue3/src/plugins/vxeTable/index.ts new file mode 100644 index 0000000000..8a8ce8c871 --- /dev/null +++ b/yudao-ui-admin-vue3/src/plugins/vxeTable/index.ts @@ -0,0 +1,120 @@ +import { App, unref } from 'vue' +import 'xe-utils' +import XEUtils from 'xe-utils' +import { i18n } from '@/plugins/vueI18n' +import zhCN from 'vxe-table/es/locale/lang/zh-CN' +import enUS from 'vxe-table/lib/locale/lang/en-US' +import { + // 全局对象 + VXETable, + + // 表格功能 + Filter, + Edit, + Menu, + Export, + Keyboard, + Validator, + + // 可选组件 + Icon, + Column, + Colgroup, + Grid, + Tooltip, + Toolbar, + Pager, + Form, + FormItem, + FormGather, + Checkbox, + CheckboxGroup, + Radio, + RadioGroup, + RadioButton, + Switch, + Input, + Select, + Optgroup, + Option, + Textarea, + Button, + Modal, + List, + Pulldown, + + // 表格 + Table +} from 'vxe-table' + +// 全局默认参数 +VXETable.setup({ + size: 'medium', // 全局尺寸 + version: 0, // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据 + zIndex: 1008, // 全局 zIndex 起始值,如果项目的的 z-index 样式值过大时就需要跟随设置更大,避免被遮挡 + loadingText: '加载中...', // 全局loading提示内容,如果为null则不显示文本 + table: { + // 自动监听父元素的变化去重新计算表格 + autoResize: true, + emptyText: '暂无数据', + // 鼠标移到行是否要高亮显示 + highlightHoverRow: true + }, + pager: { + autoHidden: false, + perfect: true, + pageSize: 10, + pagerCount: 7, + pageSizes: [10, 15, 20, 50, 100], + layouts: ['PrevJump', 'PrevPage', 'Jump', 'PageCount', 'NextPage', 'NextJump', 'Sizes', 'Total'] + }, + input: { + clearable: true + }, + i18n: (key, args) => { + return unref(i18n.global.locale) === 'zh' + ? XEUtils.toFormatString(XEUtils.get(zhCN, key), args) + : XEUtils.toFormatString(XEUtils.get(enUS, key), args) + } +}) +export const setupVxeTable = (app: App) => { + // 表格功能 + app.use(Filter).use(Edit).use(Menu).use(Export).use(Keyboard).use(Validator) + + // 可选组件 + app + .use(Icon) + .use(Column) + .use(Colgroup) + .use(Grid) + .use(Tooltip) + .use(Toolbar) + .use(Pager) + .use(Form) + .use(FormItem) + .use(FormGather) + .use(Checkbox) + .use(CheckboxGroup) + .use(Radio) + .use(RadioGroup) + .use(RadioButton) + .use(Switch) + .use(Input) + .use(Select) + .use(Optgroup) + .use(Option) + .use(Textarea) + .use(Button) + .use(Modal) + .use(List) + .use(Pulldown) + + // 安装表格 + .use(Table) + + // 给 vue 实例挂载内部对象,例如: + // app.config.globalProperties.$XModal = VXETable.modal + // app.config.globalProperties.$XPrint = VXETable.print + // app.config.globalProperties.$XSaveFile = VXETable.saveFile + // app.config.globalProperties.$XReadFile = VXETable.readFile +} diff --git a/yudao-ui-admin-vue3/vite.config.ts b/yudao-ui-admin-vue3/vite.config.ts index 83b03c0bce..12d958c832 100644 --- a/yudao-ui-admin-vue3/vite.config.ts +++ b/yudao-ui-admin-vue3/vite.config.ts @@ -6,7 +6,7 @@ import WindiCSS from 'vite-plugin-windicss' import VueJsx from '@vitejs/plugin-vue-jsx' import EslintPlugin from 'vite-plugin-eslint' import VueI18n from '@intlify/vite-plugin-vue-i18n' -import { createStyleImportPlugin, ElementPlusResolve } from 'vite-plugin-style-import' +import { createStyleImportPlugin, ElementPlusResolve, VxeTableResolve } from 'vite-plugin-style-import' import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' import PurgeIcons from 'vite-plugin-purge-icons' import { createHtmlPlugin } from 'vite-plugin-html' @@ -56,13 +56,19 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { VueJsx(), WindiCSS(), createStyleImportPlugin({ - resolves: [ElementPlusResolve()], + resolves: [ElementPlusResolve(),VxeTableResolve()], libs: [{ libraryName: 'element-plus', esModule: true, resolveStyle: (name) => { return `element-plus/es/components/${name.substring(3)}/style/css` } + },{ + libraryName: 'vxe-table', + esModule: true, + resolveStyle: (name) => { + return `vxe-table/es/${name}/style.css` + } }] }), EslintPlugin({ From aa3aa56140fdb1462ffb94443084ff8340ee389e Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 19 Oct 2022 18:08:42 +0800 Subject: [PATCH 010/142] feat: add vxe-table --- .../src/components/ProTable/src/ProTable.vue | 174 ++++++++++++++++-- .../src/plugins/vxeTable/index.ts | 2 +- 2 files changed, 163 insertions(+), 13 deletions(-) diff --git a/yudao-ui-admin-vue3/src/components/ProTable/src/ProTable.vue b/yudao-ui-admin-vue3/src/components/ProTable/src/ProTable.vue index 6921afcad4..0f40b9b522 100644 --- a/yudao-ui-admin-vue3/src/components/ProTable/src/ProTable.vue +++ b/yudao-ui-admin-vue3/src/components/ProTable/src/ProTable.vue @@ -1,35 +1,185 @@ diff --git a/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue b/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue index 04a4eb8c8c..04bcd1a03d 100644 --- a/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue +++ b/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue @@ -132,7 +132,7 @@ const doSocialLogin = async (type: string) => { location.origin + '/social-login?type=' + type + '&redirect=' + (redirect.value || '/') // 进行跳转 const res = await LoginApi.socialAuthRedirectApi(type, encodeURIComponent(redirectUri)) - window.open = res + window.location.href = res } watch( () => currentRoute.value, diff --git a/yudao-ui-admin-vue3/src/views/system/user/index.vue b/yudao-ui-admin-vue3/src/views/system/user/index.vue index 78e702192e..c907232eb8 100644 --- a/yudao-ui-admin-vue3/src/views/system/user/index.vue +++ b/yudao-ui-admin-vue3/src/views/system/user/index.vue @@ -121,9 +121,10 @@ const handleAdd = () => { // 修改操作 const handleUpdate = async (row: UserVO) => { await setDialogTile('update') + unref(formRef)?.delSchema('username') + unref(formRef)?.delSchema('password') // 设置数据 const res = await UserApi.getUserApi(row.id) - console.info(res) deptId.value = res.deptId postIds.value = res.postIds unref(formRef)?.setValues(res) @@ -358,9 +359,6 @@ onMounted(async () => { v-model:currentPage="tableObject.currentPage" @register="register" > - - diff --git a/yudao-ui-admin-vue3/src/views/system/user/user.data.ts b/yudao-ui-admin-vue3/src/views/system/user/user.data.ts index ec7d6a502c..4d83c6f7b8 100644 --- a/yudao-ui-admin-vue3/src/views/system/user/user.data.ts +++ b/yudao-ui-admin-vue3/src/views/system/user/user.data.ts @@ -36,13 +36,20 @@ const crudSchemas = reactive([ { label: '用户账号', field: 'username', - form: { - show: false - }, search: { show: true } }, + { + label: '用户密码', + field: 'password', + form: { + component: 'InputPassword' + }, + detail: { + show: false + } + }, { label: '用户昵称', field: 'nickname' @@ -58,11 +65,6 @@ const crudSchemas = reactive([ show: true } }, - { - label: '用户性别', - field: 'sex', - dictType: DICT_TYPE.SYSTEM_USER_SEX - }, { label: '部门', field: 'deptId', From 74dfc60ef0b15be784f7bf601865ae6de240a311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=9D=A4?= <> Date: Fri, 28 Oct 2022 09:28:20 +0800 Subject: [PATCH 018/142] =?UTF-8?q?fix=20:token=E5=88=B7=E6=96=B0=E3=80=81?= =?UTF-8?q?rememberMe=20=E3=80=81=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=20=E3=80=81=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E5=BC=80=E5=85=B3=20bug=20add:=20=E5=AD=97=E4=BD=93=E6=8A=97?= =?UTF-8?q?=E9=94=AF=E9=BD=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin-vue3/.vscode/settings.json | 3 +- yudao-ui-admin-vue3/package.json | 1 + yudao-ui-admin-vue3/src/App.vue | 13 +++---- yudao-ui-admin-vue3/src/config/axios/index.ts | 11 +++--- yudao-ui-admin-vue3/src/styles/var.css | 6 ++++ yudao-ui-admin-vue3/src/utils/jsencrypt.ts | 2 +- .../src/views/Login/components/LoginForm.vue | 34 +++++++++++-------- yudao-ui-admin-vue3/types/env.d.ts | 4 +-- 8 files changed, 45 insertions(+), 29 deletions(-) diff --git a/yudao-ui-admin-vue3/.vscode/settings.json b/yudao-ui-admin-vue3/.vscode/settings.json index 7b2554efc4..38cc3052ad 100644 --- a/yudao-ui-admin-vue3/.vscode/settings.json +++ b/yudao-ui-admin-vue3/.vscode/settings.json @@ -39,5 +39,6 @@ "i18n-ally.sourceLanguage": "en", "i18n-ally.displayLanguage": "zh-CN", "i18n-ally.enabledFrameworks": ["vue", "react"], - "god.tsconfig": "./tsconfig.json" + "god.tsconfig": "./tsconfig.json", + "vue-i18n.i18nPaths": "src/locales" } diff --git a/yudao-ui-admin-vue3/package.json b/yudao-ui-admin-vue3/package.json index ab056d30be..b36f0cfd2a 100644 --- a/yudao-ui-admin-vue3/package.json +++ b/yudao-ui-admin-vue3/package.json @@ -38,6 +38,7 @@ "echarts-wordcloud": "^2.0.0", "element-plus": "2.2.18", "intro.js": "^6.0.0", + "js-cookie": "^3.0.1", "jsencrypt": "^3.2.1", "lodash-es": "^4.17.21", "mitt": "^3.0.0", diff --git a/yudao-ui-admin-vue3/src/App.vue b/yudao-ui-admin-vue3/src/App.vue index 08d6b99970..20b5730bfa 100644 --- a/yudao-ui-admin-vue3/src/App.vue +++ b/yudao-ui-admin-vue3/src/App.vue @@ -4,7 +4,7 @@ import { useAppStore } from '@/store/modules/app' import { ConfigGlobal } from '@/components/ConfigGlobal' import { isDark } from '@/utils/is' import { useDesign } from '@/hooks/web/useDesign' -import { useCache } from '@/hooks/web/useCache' +import Cookies from 'js-cookie' const { getPrefixCls } = useDesign() @@ -16,18 +16,19 @@ const currentSize = computed(() => appStore.getCurrentSize) const greyMode = computed(() => appStore.getGreyMode) -const { wsCache } = useCache() - // 根据浏览器当前主题设置系统主题色 const setDefaultTheme = () => { - if (wsCache.get('isDark')) { - appStore.setIsDark(wsCache.get('isDark')) + if (Cookies.get('isDark')) { + if (Cookies.get('isDark') === 'true') { + appStore.setIsDark(true) + } else { + appStore.setIsDark(false) + } return } const isDarkTheme = isDark() appStore.setIsDark(isDarkTheme) } - setDefaultTheme() diff --git a/yudao-ui-admin-vue3/src/config/axios/index.ts b/yudao-ui-admin-vue3/src/config/axios/index.ts index 064cb22689..60dad6aa06 100644 --- a/yudao-ui-admin-vue3/src/config/axios/index.ts +++ b/yudao-ui-admin-vue3/src/config/axios/index.ts @@ -96,6 +96,7 @@ service.interceptors.request.use( service.interceptors.response.use( async (response: AxiosResponse) => { const { data } = response + const config = response.config if (!data) { // 返回“[HTTP]请求没有返回值”; throw new Error() @@ -127,13 +128,13 @@ service.interceptors.response.use( try { const refreshTokenRes = await refreshToken() // 2.1 刷新成功,则回放队列的请求 + 当前请求 - setToken(refreshTokenRes.data) - ;(config as Recordable).headers.Authorization = 'Bearer ' + getAccessToken() + setToken(refreshTokenRes.data.data) + config.headers!.Authorization = 'Bearer ' + getAccessToken() requestList.forEach((cb: any) => { cb() }) requestList = [] - return service(response.config) + return service(config) } catch (e) { // 为什么需要 catch 异常呢?刷新失败时,请求因为 Promise.reject 触发异常。 // 2.2 刷新失败,只回放队列的请求 @@ -150,8 +151,8 @@ service.interceptors.response.use( // 添加到队列,等待刷新获取到新的令牌 return new Promise((resolve) => { requestList.push(() => { - ;(config as Recordable).headers.Authorization = 'Bearer ' + getAccessToken() // 让每个请求携带自定义token 请根据实际情况自行修改 - resolve(service(response.config)) + config.headers!.Authorization = 'Bearer ' + getAccessToken() // 让每个请求携带自定义token 请根据实际情况自行修改 + resolve(service(config)) }) }) } diff --git a/yudao-ui-admin-vue3/src/styles/var.css b/yudao-ui-admin-vue3/src/styles/var.css index 23d8b68248..d0badc16b8 100644 --- a/yudao-ui-admin-vue3/src/styles/var.css +++ b/yudao-ui-admin-vue3/src/styles/var.css @@ -65,3 +65,9 @@ --transition-time-02: 0.2s; } + +html, +body { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} diff --git a/yudao-ui-admin-vue3/src/utils/jsencrypt.ts b/yudao-ui-admin-vue3/src/utils/jsencrypt.ts index c752b2f10d..374d5f6461 100644 --- a/yudao-ui-admin-vue3/src/utils/jsencrypt.ts +++ b/yudao-ui-admin-vue3/src/utils/jsencrypt.ts @@ -1,4 +1,4 @@ -import { JSEncrypt } from 'jsencrypt/bin/jsencrypt.min' +import { JSEncrypt } from 'jsencrypt' // 密钥对生成 http://web.chacuo.net/netrsakeypair diff --git a/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue b/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue index 04a4eb8c8c..44c13ea398 100644 --- a/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue +++ b/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue @@ -13,14 +13,7 @@ import { } from 'element-plus' import { reactive, ref, unref, onMounted, computed, watch } from 'vue' import * as LoginApi from '@/api/login' -import { - setToken, - setTenantId, - getUsername, - getRememberMe, - getPassword, - getTenantName -} from '@/utils/auth' +import { setToken, setTenantId } from '@/utils/auth' import { usePermissionStore } from '@/store/modules/permission' import { useRouter } from 'vue-router' import { useI18n } from '@/hooks/web/useI18n' @@ -29,6 +22,8 @@ import { Icon } from '@/components/Icon' import { LoginStateEnum, useLoginState, useFormValid } from './useLogin' import type { RouteLocationNormalizedLoaded } from 'vue-router' import { Verify } from '@/components/Verifition' +import Cookies from 'js-cookie' +import { decrypt, encrypt } from '@/utils/jsencrypt' const { currentRoute, push } = useRouter() const permissionStore = usePermissionStore() @@ -72,7 +67,7 @@ const captchaType = ref('blockPuzzle') // 获取验证码 const getCode = async () => { // 情况一,未开启:则直接登录 - if (!loginData.captchaEnable) { + if (loginData.captchaEnable === 'false') { await handleLogin({}) return } @@ -88,15 +83,15 @@ const getTenantId = async () => { } // 记住我 const getCookie = () => { - const username = getUsername() - const password = getPassword() - const rememberMe = getRememberMe() - const tenantName = getTenantName() + const username = Cookies.get('username') + const password = Cookies.get('password') ? decrypt(Cookies.get('password')) : undefined + const rememberMe = Cookies.get('rememberMe') + const tenantName = Cookies.get('tenantName') loginData.loginForm = { ...loginData.loginForm, username: username ? username : loginData.loginForm.username, password: password ? password : loginData.loginForm.password, - rememberMe: rememberMe ? getRememberMe() : false, + rememberMe: rememberMe ? true : false, tenantName: tenantName ? tenantName : loginData.loginForm.tenantName } } @@ -114,6 +109,17 @@ const handleLogin = async (params) => { if (!res) { return } + if (loginData.loginForm.rememberMe) { + Cookies.set('username', loginData.loginForm.username, { expires: 30 }) + Cookies.set('password', encrypt(loginData.loginForm.password), { expires: 30 }) + Cookies.set('rememberMe', loginData.loginForm.rememberMe, { expires: 30 }) + Cookies.set('tenantName', loginData.loginForm.tenantName, { expires: 30 }) + } else { + Cookies.remove('username') + Cookies.remove('password') + Cookies.remove('rememberMe') + Cookies.remove('tenantName') + } setToken(res) if (!redirect.value) { redirect.value = '/' diff --git a/yudao-ui-admin-vue3/types/env.d.ts b/yudao-ui-admin-vue3/types/env.d.ts index b427136566..b8cff557a6 100644 --- a/yudao-ui-admin-vue3/types/env.d.ts +++ b/yudao-ui-admin-vue3/types/env.d.ts @@ -11,8 +11,8 @@ interface ImportMetaEnv { readonly VITE_APP_TITLE: string readonly VITE_PORT: number readonly VITE_OPEN: boolean - readonly VITE_APP_CAPTCHA_ENABLE: boolean - readonly VITE_APP_TENANT_ENABLE: boolean + readonly VITE_APP_CAPTCHA_ENABLE: string + readonly VITE_APP_TENANT_ENABLE: string readonly VITE_BASE_URL: string readonly VITE_UPLOAD_URL: string readonly VITE_API_BASEPATH: string From 04fb4c0365879949a0b71d75801af41fe400f0cd Mon Sep 17 00:00:00 2001 From: weikun <> Date: Fri, 28 Oct 2022 10:55:51 +0800 Subject: [PATCH 019/142] =?UTF-8?q?fix:=20=E8=B7=AF=E7=94=B1=E9=A1=B6?= =?UTF-8?q?=E7=BA=A7=E9=9D=9E=E7=9B=AE=E5=BD=95=E8=8F=9C=E5=8D=95=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin-vue3/src/utils/routerHelper.ts | 59 ++++++++++++------- yudao-ui-admin-vue3/types/router.d.ts | 1 + 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/yudao-ui-admin-vue3/src/utils/routerHelper.ts b/yudao-ui-admin-vue3/src/utils/routerHelper.ts index 73e6730376..79fd410d82 100644 --- a/yudao-ui-admin-vue3/src/utils/routerHelper.ts +++ b/yudao-ui-admin-vue3/src/utils/routerHelper.ts @@ -65,30 +65,49 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord redirect: route.redirect, meta: meta } - // 目录 - if (route.children) { + //处理顶级非目录路由 + if (!route.children && route.parentId == 0 && route.component) { data.component = Layout - data.redirect = getRedirect(route.path, route.children) - // 外链 - } else if (isUrl(route.path)) { - data = { - path: '/external-link', - component: Layout, - meta: { - name: route.name - }, - children: [data] - } as AppRouteRecordRaw - // 菜单 - } else { - // 对后端传component组件路径和不传做兼容(如果后端传component组件路径,那么path可以随便写,如果不传,component组件路径会根path保持一致) + data.meta = {} + data.name = toCamelCase(route.path, true) + 'Parent' + data.redirect = '' + const childrenData: AppRouteRecordRaw = { + path: '', + name: toCamelCase(route.path, true), + redirect: route.redirect, + meta: meta + } const index = route?.component ? modulesRoutesKeys.findIndex((ev) => ev.includes(route.component)) : modulesRoutesKeys.findIndex((ev) => ev.includes(route.path)) - data.component = modules[modulesRoutesKeys[index]] - } - if (route.children) { - data.children = generateRoute(route.children) + childrenData.component = modules[modulesRoutesKeys[index]] + data.children = [childrenData] + } else { + // 目录 + if (route.children) { + data.component = Layout + data.redirect = getRedirect(route.path, route.children) + // 外链 + } else if (isUrl(route.path)) { + data = { + path: '/external-link', + component: Layout, + meta: { + name: route.name + }, + children: [data] + } as AppRouteRecordRaw + // 菜单 + } else { + // 对后端传component组件路径和不传做兼容(如果后端传component组件路径,那么path可以随便写,如果不传,component组件路径会根path保持一致) + const index = route?.component + ? modulesRoutesKeys.findIndex((ev) => ev.includes(route.component)) + : modulesRoutesKeys.findIndex((ev) => ev.includes(route.path)) + data.component = modules[modulesRoutesKeys[index]] + } + if (route.children) { + data.children = generateRoute(route.children) + } } res.push(data) } diff --git a/yudao-ui-admin-vue3/types/router.d.ts b/yudao-ui-admin-vue3/types/router.d.ts index ba24ac5886..7cc1c2f3b4 100644 --- a/yudao-ui-admin-vue3/types/router.d.ts +++ b/yudao-ui-admin-vue3/types/router.d.ts @@ -74,5 +74,6 @@ declare global { children?: AppCustomRouteRecordRaw[] keepAlive?: boolean visible?: boolean + parentId?: number } } From 26c728b050e5e7dcc8032aba4b4313da75f69e44 Mon Sep 17 00:00:00 2001 From: SuperHao Date: Fri, 28 Oct 2022 09:04:41 +0000 Subject: [PATCH 020/142] =?UTF-8?q?bugfix:=20=E5=BD=93=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=A8=A1=E5=9E=8B=EF=BC=8C=E5=86=8D=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=97=B6=EF=BC=8C=E6=8F=90=E7=A4=BA"=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=AE=9A=E4=B9=89=E9=83=A8=E7=BD=B2=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=EF=BC=8C=E5=8E=9F=E5=9B=A0=EF=BC=9A=E4=BF=A1=E6=81=AF=E6=9C=AA?= =?UTF-8?q?=E5=8F=91=E7=94=9F=E5=8F=98=E5=8C=96"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/definition/BpmProcessDefinitionServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java index 35464ab6a8..e1cbde570a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java @@ -199,8 +199,8 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ // 校验 BPMN XML 信息 BpmnModel newModel = buildBpmnModel(createReqDTO.getBpmnBytes()); BpmnModel oldModel = getBpmnModel(oldProcessDefinition.getId()); - // TODO 貌似 flowable 不修改这个也不同。需要看看。 sourceSystemId 不同 - if (FlowableUtils.equals(oldModel, newModel)) { + // 对比字节变化 + if (!FlowableUtils.equals(oldModel, newModel)) { return false; } // 最终发现都一致,则返回 true From faea04546e1004494b2a4444ce1da80fe1391097 Mon Sep 17 00:00:00 2001 From: jueying Date: Mon, 31 Oct 2022 17:13:05 +0800 Subject: [PATCH 021/142] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E7=88=B6=E8=8F=9C=E5=8D=95=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=97=A0=E6=95=88=EF=BC=8C=E5=89=8D=E7=AB=AF=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=BC=BA=E5=B0=91=E5=AD=97=E6=AE=B5=EF=BC=8C=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/codegen/vue3/api/api.ts.vm | 14 +- .../resources/codegen/vue3/api/types.ts.vm | 18 +- .../resources/codegen/vue3/views/data.ts.vm | 170 ++++++------- .../resources/codegen/vue3/views/index.vue.vm | 236 +++++++++--------- .../src/views/infra/codegen/EditTable.vue | 8 +- .../infra/codegen/components/GenInfoForm.vue | 2 +- 6 files changed, 227 insertions(+), 221 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm index 69da81493a..7d13b5dec5 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm @@ -1,35 +1,35 @@ import { useAxios } from '@/hooks/web/useAxios' -import { ${simpleClassName}VO,${simpleClassName}PageReqVO,${simpleClassName}ExcelReqVO } from './types' +import { ${simpleClassName}VO, ${simpleClassName}PageReqVO, ${simpleClassName}ExcelReqVO } from './types' const request = useAxios() #set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") // 查询${table.classComment}列表 export const get${simpleClassName}PageApi = async (params: ${simpleClassName}PageReqVO) => { - return await request.get({ url: '${baseURL}/page', params }) + return await request.get({ url: '${baseURL}/page', params }) } // 查询${table.classComment}详情 export const get${simpleClassName}Api = async (id: number) => { - return await request.get({ url: '${baseURL}/get?id=' + id }) + return await request.get({ url: '${baseURL}/get?id=' + id }) } // 新增${table.classComment} export const create${simpleClassName}Api = async (data: ${simpleClassName}VO) => { - return await request.post({ url: '${baseURL}/create', data }) + return await request.post({ url: '${baseURL}/create', data }) } // 修改${table.classComment} export const update${simpleClassName}Api = async (data: ${simpleClassName}VO) => { - return await request.put({ url: '${baseURL}/update', data }) + return await request.put({ url: '${baseURL}/update', data }) } // 删除${table.classComment} export const delete${simpleClassName}Api = async (id: number) => { - return await request.delete({ url: '${baseURL}/delete?id=' + id }) + return await request.delete({ url: '${baseURL}/delete?id=' + id }) } // 导出${table.classComment} Excel export const export${simpleClassName}Api = async (params: ${simpleClassName}ExcelReqVO) => { - return await request.download({ url: '${baseURL}/export-excel', params }) + return await request.download({ url: '${baseURL}/export-excel', params }) } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/types.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/types.ts.vm index d5b5d937d5..54ab47e020 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/types.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/types.ts.vm @@ -2,9 +2,11 @@ export type ${simpleClassName}VO = { #foreach ($column in $columns) #if ($column.createOperation || $column.updateOperation) #if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer") - ${column.javaField}: number + ${column.javaField}: number +#elseif(${column.javaType.toLowerCase()} == "date") + ${column.javaField}: string #else - ${column.javaField}: ${column.javaType.toLowerCase()} + ${column.javaField}: ${column.javaType.toLowerCase()} #end #end #end @@ -14,9 +16,11 @@ export type ${simpleClassName}PageReqVO = { #foreach ($column in $columns) #if (${column.listOperation})##查询操作 #if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer") - ${column.javaField}: number + ${column.javaField}: number +#elseif(${column.javaType.toLowerCase()} == "date") + ${column.javaField}: string #else - ${column.javaField}: ${column.javaType.toLowerCase()} + ${column.javaField}: ${column.javaType.toLowerCase()} #end #end #end @@ -26,9 +30,11 @@ export type ${simpleClassName}ExcelReqVO = { #foreach ($column in $columns) #if (${column.listOperation})##查询操作 #if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer") - ${column.javaField}: number + ${column.javaField}: number +#elseif(${column.javaType.toLowerCase()} == "date") + ${column.javaField}: string #else - ${column.javaField}: ${column.javaType.toLowerCase()} + ${column.javaField}: ${column.javaType.toLowerCase()} #end #end #end diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/data.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/data.ts.vm index 965fe49ab2..fa64bc883d 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/data.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/data.ts.vm @@ -8,104 +8,104 @@ export const rules = reactive({ #foreach ($column in $columns) #if (($column.createOperation || $column.updateOperation) && !$column.nullable && !${column.primaryKey})## 创建或者更新操作 && 要求非空 && 非主键 #set($comment=$column.columnComment) - $column.javaField: [{ required: true, message: "${comment}不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end }], + $column.javaField: [{ required: true, message: '${comment}不能为空', trigger: #if($column.htmlType == "select")'change'#else'blur'#end }], #end #end }) // CrudSchema const crudSchemas = reactive([ #foreach($column in $columns) - #if ($column.listOperation || $column.listOperationResult || $column.createOperation || $column.updateOperation) - #set ($dictType = $column.dictType) - { - label: '${column.columnComment}', - field: '${column.javaField}', - #if ("" != $dictType)## 有数据字典 - dictType: DICT_TYPE.$dictType.toUpperCase(), - #end - #if($column.primaryKey) - type: 'index', - form: { - show: false - }, - detail: { - show: false + #if ($column.listOperation || $column.listOperationResult || $column.createOperation || $column.updateOperation) + #set ($dictType = $column.dictType) + { + label: '${column.columnComment}', + field: '${column.javaField}', + #if ("" != $dictType)## 有数据字典 + dictType: DICT_TYPE.$dictType.toUpperCase(), + #end + #if($column.primaryKey) + type: 'index', + form: { + show: false + }, + detail: { + show: false + } + #else + #if (!$column.createOperation && !$column.updateOperation) + form: { + show: false + }, + #elseif(!("" != $column.dictType)) + form: { + show: true, + #if ($column.htmlType == "datetime")## 时间框 + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'YYYY-MM-DD HH:mm:ss' } - #else - #if (!$column.createOperation && !$column.updateOperation) - form: { - false + #elseif($column.htmlType == "editor")## 文本编辑器 + component: 'Editor', + colProps: { + span: 24 }, - #elseif(!("" != $column.dictType)) - form: { - show: true, - #if ($column.htmlType == "datetime")## 时间框 - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'YYYY-MM-DD HH:mm:ss' - } - #elseif($column.htmlType == "editor")## 文本编辑器 - component: 'Editor', - colProps: { - span: 24 - }, - componentProps: { - valueHtml: '' - } - #elseif($column.htmlType == "textarea")## 文本框 - component: 'Input', - componentProps: { - type: 'textarea', - rows: 4 - }, - colProps: { - span: 24 - } - #end - }, - #end - #if ($column.listOperationResult) - search: { - #if($column.htmlType == "input") - show: true - #else - #if($column.htmlType == "datetime") - show: true, - component: 'DatePicker', - componentProps: { - type: 'datetimerange', - valueFormat: 'YYYY-MM-DD HH:mm:ss' - } - #elseif($column.htmlType == "select" || $column.htmlType == "radio") - #if ("" == $dictType)## 没有数据字典 - show: true, - component: 'Select', - componentProps: { - option: [{'','请选择字典生成'}] - } - #else - show: true - #end - #end - #end + componentProps: { + valueHtml: '' + } + #elseif($column.htmlType == "textarea")## 文本框 + component: 'Input', + componentProps: { + type: 'textarea', + rows: 4 + }, + colProps: { + span: 24 } - #end #end }, #end -#end - { - label: t('table.action'), - field: 'action', - width: '240px', - form: { - show: false - }, - detail: { - show: false - } + #if ($column.listOperationResult) + search: { + #if($column.htmlType == "input") + show: true + #else + #if($column.htmlType == "datetime") + show: true, + component: 'DatePicker', + componentProps: { + type: 'datetimerange', + valueFormat: 'YYYY-MM-DD HH:mm:ss' + } + #elseif($column.htmlType == "select" || $column.htmlType == "radio") + #if ("" == $dictType)## 没有数据字典 + show: true, + component: 'Select', + componentProps: { + option: [{'','请选择字典生成'}] + } + #else + show: true + #end + #end + #end } + #end + #end + }, + #end +#end + { + label: t('table.action'), + field: 'action', + width: '240px', + form: { + show: false + }, + detail: { + show: false + } + } ]) export const { allSchemas } = useCrudSchemas(crudSchemas) \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm index ca4adc1a61..7a050b8bbd 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm @@ -1,92 +1,92 @@