This commit is contained in:
shizhong 2022-09-01 09:49:09 +08:00
commit 44e2a710fc
14 changed files with 67 additions and 23 deletions

View File

@ -27,7 +27,7 @@
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
<properties>
<revision>1.6.3-snapshot</revision>
<revision>1.6.4-snapshot</revision>
<!-- Maven 相关 -->
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>

View File

@ -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');

View File

@ -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

View File

@ -14,7 +14,7 @@
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
<properties>
<revision>1.6.3-snapshot</revision>
<revision>1.6.4-snapshot</revision>
<!-- 统一依赖管理 -->
<spring.boot.version>2.6.10</spring.boot.version>
<!-- Web 相关 -->
@ -65,6 +65,7 @@
<yunpian-java-sdk.version>1.2.7</yunpian-java-sdk.version>
<justauth.version>1.4.0</justauth.version>
<jimureport.version>1.5.2</jimureport.version>
<xercesImpl.version>2.12.0</xercesImpl.version>
</properties>
<dependencyManagement>
@ -565,6 +566,11 @@
<artifactId>jimureport-spring-boot-starter</artifactId>
<version>${jimureport.version}</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>${xercesImpl.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

View File

@ -154,12 +154,12 @@ public class CodegenServiceImpl implements CodegenService {
// 构建 CodegenColumnDO 数组只同步新增的字段
List<CodegenColumnDO> codegenColumns = codegenColumnMapper.selectListByTableId(tableId);
Set<String> codegenColumnNames = CollectionUtils.convertSet(codegenColumns, CodegenColumnDO::getColumnName);
// 移除已经存在的字段
tableFields.removeIf(column -> codegenColumnNames.contains(column.getColumnName()));
// 计算需要删除的字段
Set<String> tableFieldNames = CollectionUtils.convertSet(tableFields, TableField::getName);
Set<Long> 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);
}

View File

@ -96,7 +96,7 @@
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
#foreach($column in $columns)
#if ($column.createOperation || $column.updateOperation)

View File

@ -68,6 +68,11 @@
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-spring-boot-starter</artifactId>
</dependency>
<!-- 单独依赖升级版本解决低版本validator失败问题 -->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -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_NAMEARTIFACT_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);

View File

@ -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;
}

View File

@ -1,6 +1,6 @@
{
"name": "yudao-ui-admin",
"version": "1.6.3-snapshot",
"version": "1.6.4-snapshot",
"description": "芋道管理系统",
"author": "芋道",
"license": "MIT",

View File

@ -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 {

View File

@ -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

View File

@ -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
}

View File

@ -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)
})
}
},