diff --git a/core/core-backend/src/main/java/io/dataease/MybatisPlusGenerator.java b/core/core-backend/src/main/java/io/dataease/MybatisPlusGenerator.java index 0f1a1971a2..f58c552a29 100644 --- a/core/core-backend/src/main/java/io/dataease/MybatisPlusGenerator.java +++ b/core/core-backend/src/main/java/io/dataease/MybatisPlusGenerator.java @@ -14,7 +14,7 @@ public class MybatisPlusGenerator { * 第一 我嫌麻烦 * 第二 后面配置会放到nacos读起来更麻烦了 */ - private static final String url = "jdbc:mysql://localhost:3306/dataease?autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false"; + private static final String url = "jdbc:mysql://localhost:3306/dataease4?autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false"; private static final String username = "root"; private static final String password = "123456"; @@ -25,7 +25,7 @@ public class MybatisPlusGenerator { /** * 这是要生成代码的表名称 */ - private static final String TABLE_NAME = "visualization_outer_params_target_view_info"; + private static final String TABLE_NAME = "visualization_outer_params_info"; /** * 下面两个配置基本上不用动 diff --git a/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/VisualizationOuterParams.java b/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/VisualizationOuterParams.java index 79f61e6c1e..92e0ad5cb5 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/VisualizationOuterParams.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/VisualizationOuterParams.java @@ -1,5 +1,6 @@ package io.dataease.visualization.dao.auto.entity; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; @@ -9,7 +10,7 @@ import java.io.Serializable; *

* * @author fit2cloud - * @since 2024-03-08 + * @since 2024-09-09 */ @TableName("visualization_outer_params") public class VisualizationOuterParams implements Serializable { @@ -19,6 +20,7 @@ public class VisualizationOuterParams implements Serializable { /** * 主键 */ + @TableId("params_id") private String paramsId; /** diff --git a/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/VisualizationOuterParamsInfo.java b/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/VisualizationOuterParamsInfo.java index f6ea29e0d9..15dd9b50d2 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/VisualizationOuterParamsInfo.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/VisualizationOuterParamsInfo.java @@ -1,5 +1,6 @@ package io.dataease.visualization.dao.auto.entity; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; @@ -9,7 +10,7 @@ import java.io.Serializable; *

* * @author fit2cloud - * @since 2024-03-08 + * @since 2024-09-09 */ @TableName("visualization_outer_params_info") public class VisualizationOuterParamsInfo implements Serializable { @@ -19,6 +20,7 @@ public class VisualizationOuterParamsInfo implements Serializable { /** * 主键 */ + @TableId("params_info_id") private String paramsInfoId; /** @@ -46,6 +48,16 @@ public class VisualizationOuterParamsInfo implements Serializable { */ private String copyId; + /** + * 是否必填 + */ + private Boolean required; + + /** + * 默认值 JSON格式 + */ + private String defaultValue; + public String getParamsInfoId() { return paramsInfoId; } @@ -94,6 +106,22 @@ public class VisualizationOuterParamsInfo implements Serializable { this.copyId = copyId; } + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + @Override public String toString() { return "VisualizationOuterParamsInfo{" + @@ -103,6 +131,8 @@ public class VisualizationOuterParamsInfo implements Serializable { ", checked = " + checked + ", copyFrom = " + copyFrom + ", copyId = " + copyId + + ", required = " + required + + ", defaultValue = " + defaultValue + "}"; } } diff --git a/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/mapper/VisualizationOuterParamsInfoMapper.java b/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/mapper/VisualizationOuterParamsInfoMapper.java index 5553c7325b..68aeeb0b44 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/mapper/VisualizationOuterParamsInfoMapper.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/mapper/VisualizationOuterParamsInfoMapper.java @@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper; *

* * @author fit2cloud - * @since 2024-03-08 + * @since 2024-09-09 */ @Mapper public interface VisualizationOuterParamsInfoMapper extends BaseMapper { diff --git a/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/mapper/VisualizationOuterParamsMapper.java b/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/mapper/VisualizationOuterParamsMapper.java index 1b87b7e077..f635f21cb8 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/mapper/VisualizationOuterParamsMapper.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/mapper/VisualizationOuterParamsMapper.java @@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper; *

* * @author fit2cloud - * @since 2024-03-08 + * @since 2024-09-09 */ @Mapper public interface VisualizationOuterParamsMapper extends BaseMapper { diff --git a/core/core-backend/src/main/resources/mybatis/ExtVisualizationOuterParamsMapper.xml b/core/core-backend/src/main/resources/mybatis/ExtVisualizationOuterParamsMapper.xml index c44e8f90f2..3f07de6333 100644 --- a/core/core-backend/src/main/resources/mybatis/ExtVisualizationOuterParamsMapper.xml +++ b/core/core-backend/src/main/resources/mybatis/ExtVisualizationOuterParamsMapper.xml @@ -16,6 +16,8 @@ + + diff --git a/core/core-frontend/src/components/visualization/OuterParamsSet.vue b/core/core-frontend/src/components/visualization/OuterParamsSet.vue index 4cb5af941e..733ca6a4fd 100644 --- a/core/core-frontend/src/components/visualization/OuterParamsSet.vue +++ b/core/core-frontend/src/components/visualization/OuterParamsSet.vue @@ -4,14 +4,14 @@ :append-to-body="true" title="外部参数设置" v-model="state.outerParamsSetVisible" - width="70vw" + width="80vw" top="10vh" trigger="click" > - + 参数列表 @@ -68,7 +68,7 @@ - + 选择参数关联组件 @@ -246,6 +246,11 @@ + + + 参数配置 + + @@ -320,6 +325,8 @@ const state = reactive({ defaultOuterParamsInfo: { paramName: '', checked: true, + required: false, + defaultValue: {}, targetViewInfoList: [] }, defaultTargetViewInfo: { @@ -972,4 +979,8 @@ defineExpose({ .expand-custom-outer { margin-right: 4px; } + +.params-attach-setting { + border-left: 1px solid #e6e6e6; +} diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/VisualizationOuterParamsInfoVO.java b/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/VisualizationOuterParamsInfoVO.java index d09c85be29..89324ae21e 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/VisualizationOuterParamsInfoVO.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/VisualizationOuterParamsInfoVO.java @@ -36,6 +36,18 @@ public class VisualizationOuterParamsInfoVO implements Serializable { */ private Boolean checked; + + /** + * 是否必填 + */ + private Boolean required; + + /** + * 默认值 JSON格式 + */ + private String defaultValue; + + /** * 复制来源 */ diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/VisualizationOuterParamsVO.java b/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/VisualizationOuterParamsVO.java index f2fa1b7f5a..f22348b605 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/VisualizationOuterParamsVO.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/VisualizationOuterParamsVO.java @@ -46,6 +46,17 @@ public class VisualizationOuterParamsVO implements Serializable { */ private String copyId; + /** + * 是否必填 + */ + private Boolean required; + + /** + * 默认值 JSON格式 + */ + private String defaultValue; + + public String getParamsId() { return paramsId; } @@ -97,12 +108,14 @@ public class VisualizationOuterParamsVO implements Serializable { @Override public String toString() { return "VisualizationOuterParams{" + - "paramsId = " + paramsId + - ", visualizationId = " + visualizationId + - ", checked = " + checked + - ", remark = " + remark + - ", copyFrom = " + copyFrom + - ", copyId = " + copyId + - "}"; + "paramsId = " + paramsId + + ", visualizationId = " + visualizationId + + ", checked = " + checked + + ", required = " + required + + ", defaultValue = " + defaultValue + + ", remark = " + remark + + ", copyFrom = " + copyFrom + + ", copyId = " + copyId + + "}"; } }