diff --git a/pom.xml b/pom.xml index 6e9735f4c..63aa70ecb 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ https://github.com/YunaiV/ruoyi-vue-pro - 1.6.3-snapshot + 1.6.4-snapshot 1.8 ${java.version} diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql index 683206e6f..6a25c70d4 100644 --- a/sql/mysql/ruoyi-vue-pro.sql +++ b/sql/mysql/ruoyi-vue-pro.sql @@ -2657,8 +2657,3 @@ INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, COMMIT; SET FOREIGN_KEY_CHECKS = 1; - - --- 积木报表菜单 -INSERT INTO `system_menu` VALUES (1281, '可视化报表', '', 1, 12, 0, '/visualization', 'chart', NULL, 0, b'1', b'1', '1', '2022-07-10 20:22:15', '1', '2022-07-10 20:33:30', b'0'); -INSERT INTO `system_menu` VALUES (1282, '积木报表', '', 2, 1, 1281, 'jm-report', '#', 'visualization/jm/index', 0, b'1', b'1', '1', '2022-07-10 20:26:36', '1', '2022-07-10 20:33:26', b'0'); \ No newline at end of file diff --git a/sql/optional/mall/mall.sql b/sql/optional/mall/mall.sql index 9493c3bcf..9a090c9e4 100644 --- a/sql/optional/mall/mall.sql +++ b/sql/optional/mall/mall.sql @@ -253,7 +253,7 @@ create table product_sku collate utf8mb4_general_ci; ----Market-Banner管理SQL +-- Market-Banner管理SQL drop table if exists market_banner; CREATE TABLE `market_banner` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Banner编号', @@ -273,7 +273,7 @@ CREATE TABLE `market_banner` ( ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='Banner管理'; -- 菜单 SQL INSERT INTO `system_menu`(`id`,`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) -VALUES (2002, 'Banner管理', '', 2, 1, 2000, 'brand', '', 'mall/market/banner/index', 0); +VALUES (2026, 'Banner管理', '', 2, 1, 2000, 'brand', '', 'mall/market/banner/index', 0); -- 按钮父菜单ID SELECT @parentId := LAST_INSERT_ID(); -- 按钮 SQL diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 1fa2b1d4c..44d7bdf68 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -14,7 +14,7 @@ https://github.com/YunaiV/ruoyi-vue-pro - 1.6.3-snapshot + 1.6.4-snapshot 2.6.10 @@ -65,6 +65,7 @@ 1.2.7 1.4.0 1.5.2 + 2.12.0 @@ -565,6 +566,11 @@ jimureport-spring-boot-starter ${jimureport.version} + + xerces + xercesImpl + ${xercesImpl.version} + diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java index 333dbefa6..b2c1998c8 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java @@ -154,12 +154,12 @@ public class CodegenServiceImpl implements CodegenService { // 构建 CodegenColumnDO 数组,只同步新增的字段 List codegenColumns = codegenColumnMapper.selectListByTableId(tableId); Set codegenColumnNames = CollectionUtils.convertSet(codegenColumns, CodegenColumnDO::getColumnName); - // 移除已经存在的字段 - tableFields.removeIf(column -> codegenColumnNames.contains(column.getColumnName())); // 计算需要删除的字段 Set tableFieldNames = CollectionUtils.convertSet(tableFields, TableField::getName); Set deleteColumnIds = codegenColumns.stream().filter(column -> !tableFieldNames.contains(column.getColumnName())) .map(CodegenColumnDO::getId).collect(Collectors.toSet()); + // 移除已经存在的字段 + tableFields.removeIf(column -> codegenColumnNames.contains(column.getColumnName())); if (CollUtil.isEmpty(tableFields) && CollUtil.isEmpty(deleteColumnIds)) { throw exception(CODEGEN_SYNC_NONE_CHANGE); } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm index 95f7d66a2..c84a510ac 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm @@ -96,7 +96,7 @@ @pagination="getList"/> - + #foreach($column in $columns) #if ($column.createOperation || $column.updateOperation) diff --git a/yudao-module-visualization/yudao-module-visualization-biz/pom.xml b/yudao-module-visualization/yudao-module-visualization-biz/pom.xml index d2fc37162..a2e4818de 100644 --- a/yudao-module-visualization/yudao-module-visualization-biz/pom.xml +++ b/yudao-module-visualization/yudao-module-visualization-biz/pom.xml @@ -68,6 +68,11 @@ org.jeecgframework.jimureport jimureport-spring-boot-starter + + + xerces + xercesImpl + diff --git a/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java b/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java index e3b8c11c8..5a8da1b20 100644 --- a/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java +++ b/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java @@ -50,7 +50,12 @@ public class ProjectReactor { String projectBaseDirNew = projectBaseDir + "-new"; // 一键改名后,“新”项目所在的目录 log.info("[main][检测新项目目录 ({})是否存在]", projectBaseDirNew); if (FileUtil.exist(projectBaseDirNew)) { - log.info("[main][新项目目录检测 ({})已存在,请更改新的目录,程序退出]", projectBaseDirNew); + log.error("[main][新项目目录检测 ({})已存在,请更改新的目录!程序退出]", projectBaseDirNew); + return; + } + // 如果新目录中存在 PACKAGE_NAME,ARTIFACT_ID 等关键字,路径会被替换,导致生成的文件不在预期目录 + if (StrUtil.containsAny(projectBaseDirNew, PACKAGE_NAME, ARTIFACT_ID, StrUtil.upperFirst(ARTIFACT_ID))) { + log.error("[main][新项目目录检测 ({}) 存在冲突名称「{}」或者「{}」,请更改新的目录!程序退出]", projectBaseDirNew, PACKAGE_NAME, ARTIFACT_ID); return; } log.info("[main][完成新项目目录检测,新项目路径地址 ({})]", projectBaseDirNew); diff --git a/yudao-ui-admin-uniapp/pages/login.vue b/yudao-ui-admin-uniapp/pages/login.vue index 021e0530b..24bbdfd05 100644 --- a/yudao-ui-admin-uniapp/pages/login.vue +++ b/yudao-ui-admin-uniapp/pages/login.vue @@ -67,8 +67,8 @@ getCode() { getCodeImg().then(res => { res = res.data; - this.captchaEnable = res.enable; - if (this.captchaEnable) { + this.captchaEnabled = res.enable; + if (this.captchaEnabled) { this.codeUrl = "data:image/gif;base64," + res.img; this.loginForm.uuid = res.uuid; } diff --git a/yudao-ui-admin/package.json b/yudao-ui-admin/package.json index 17d02d676..8313c7f33 100644 --- a/yudao-ui-admin/package.json +++ b/yudao-ui-admin/package.json @@ -1,6 +1,6 @@ { "name": "yudao-ui-admin", - "version": "1.6.3-snapshot", + "version": "1.6.4-snapshot", "description": "芋道管理系统", "author": "芋道", "license": "MIT", diff --git a/yudao-ui-admin/src/assets/styles/ruoyi.scss b/yudao-ui-admin/src/assets/styles/ruoyi.scss index 4c2bde64d..0eae565df 100644 --- a/yudao-ui-admin/src/assets/styles/ruoyi.scss +++ b/yudao-ui-admin/src/assets/styles/ruoyi.scss @@ -71,6 +71,16 @@ padding: 10px 20px 0; } +.el-dialog{ + display: flex; + flex-direction: column; + max-width: calc(100% - 30px); + max-height: calc(100% - 70px); + .el-dialog__body { + overflow: auto; + } +} + .el-table { .el-table__header-wrapper, .el-table__fixed-header-wrapper { th { diff --git a/yudao-ui-admin/src/main.js b/yudao-ui-admin/src/main.js index 680b14585..01504a75e 100644 --- a/yudao-ui-admin/src/main.js +++ b/yudao-ui-admin/src/main.js @@ -70,6 +70,10 @@ console.log(request) Vue.prototype.$axios = request import '@/styles/index.scss' +// 默认点击背景不关闭弹窗 +import ElementUI from 'element-ui' +ElementUI.Dialog.props.closeOnClickModal.default = false + /** * If you don't want to use mock-server * you want to use MockJs for mock api diff --git a/yudao-ui-admin/src/utils/formGenerator.js b/yudao-ui-admin/src/utils/formGenerator.js index 248e0b23e..d7417d9b1 100644 --- a/yudao-ui-admin/src/utils/formGenerator.js +++ b/yudao-ui-admin/src/utils/formGenerator.js @@ -1,13 +1,32 @@ /** * 将服务端返回的 fields 字符串数组,解析成 JSON 数组 + * 如果指定了 variables 参数可对表单进行初始化 * * @param fields JSON 字符串数组 + * @param variables Object 表单初始值 * @returns {*[]} JSON 数组 */ -export function decodeFields(fields) { - const drawingList = [] - fields.forEach(item => { - drawingList.push(JSON.parse(item)) +export function decodeFields(fields, variables) { + const drawingList = (fields || []).map(json => { + const item = JSON.parse(json) + + if (typeof variables === 'undefined' ) return item + + const setDefault = (item, variables) => { + if (typeof variables[item.__vModel__] !== 'undefined') { + item.__config__.defaultValue = variables[item.__vModel__] + } + if (item.__config__.children && item.__config__.children.length) { + item.__config__.children.forEach(child => { + setDefault(child, variables) + }) + } + } + + setDefault(item, variables) + + return item }) + return drawingList } diff --git a/yudao-ui-admin/src/views/infra/build/index.vue b/yudao-ui-admin/src/views/infra/build/index.vue index f3995396a..977192efa 100644 --- a/yudao-ui-admin/src/views/infra/build/index.vue +++ b/yudao-ui-admin/src/views/infra/build/index.vue @@ -133,7 +133,7 @@ import { inputComponents, selectComponents, layoutComponents, formConf } from '@/components/generator/config' import { - exportDefault, beautifierConf, isNumberStr, titleCase, deepClone, isObjectObject + exportDefault, beautifierConf, isNumberStr, titleCase, deepClone } from '@/utils/index' import { makeUpHtml, vueTemplate, vueScript, cssStyle @@ -272,7 +272,7 @@ export default { arr.reduce((pre, item, i) => { if (arr.length === i + 1) { pre[item] = data - } else if (!isObjectObject(pre[item])) { + } else if (pre[item]===undefined) { pre[item] = {} } return pre[item] @@ -300,7 +300,7 @@ export default { url }).then(resp => { this.setLoading(component, false) - this.setRespData(component, resp.data) + this.setRespData(component, resp) }) } },