diff --git a/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/DataVisualizationInfo.java b/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/DataVisualizationInfo.java index 145b54ea41..5e4f950d48 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/DataVisualizationInfo.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/dao/auto/entity/DataVisualizationInfo.java @@ -61,7 +61,7 @@ public class DataVisualizationInfo implements Serializable { /** * 移动端布局 */ - private String mobileLayout; + private Boolean mobileLayout; /** * 状态 0-未发布 1-已发布 @@ -195,11 +195,11 @@ public class DataVisualizationInfo implements Serializable { this.componentData = componentData; } - public String getMobileLayout() { + public Boolean getMobileLayout() { return mobileLayout; } - public void setMobileLayout(String mobileLayout) { + public void setMobileLayout(Boolean mobileLayout) { this.mobileLayout = mobileLayout; } diff --git a/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/mapper/CoreVisualiationExtMapper.java b/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/mapper/CoreVisualiationExtMapper.java index b2d212a9cd..c07ed6c492 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/mapper/CoreVisualiationExtMapper.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/mapper/CoreVisualiationExtMapper.java @@ -14,7 +14,7 @@ import java.util.Set; public interface CoreVisualiationExtMapper { @Select(""" - select id, name, pid, node_type from data_visualization_info + select id, name, pid, node_type, mobile_layout as extraFlag from data_visualization_info ${ew.customSqlSegment} """) List queryNodes(@Param("ew") QueryWrapper queryWrapper); diff --git a/core/core-backend/src/main/resources/db/desktop/V2.5__ddl.sql b/core/core-backend/src/main/resources/db/desktop/V2.5__ddl.sql index b9fb54c1f4..b9393e3c63 100644 --- a/core/core-backend/src/main/resources/db/desktop/V2.5__ddl.sql +++ b/core/core-backend/src/main/resources/db/desktop/V2.5__ddl.sql @@ -34,3 +34,5 @@ CREATE TABLE `visualization_outer_params_target_view_info` ( PRIMARY KEY (`target_id`) ) COMMENT='外部参数联动视图字段信息表'; +ALTER TABLE `data_visualization_info` + MODIFY COLUMN `mobile_layout` tinyint NULL DEFAULT 0 COMMENT '移动端布局0-关闭 1-开启'; \ No newline at end of file diff --git a/core/core-backend/src/main/resources/db/migration/V2.5__ddl.sql b/core/core-backend/src/main/resources/db/migration/V2.5__ddl.sql index b9fb54c1f4..1d59fb95e6 100644 --- a/core/core-backend/src/main/resources/db/migration/V2.5__ddl.sql +++ b/core/core-backend/src/main/resources/db/migration/V2.5__ddl.sql @@ -34,3 +34,7 @@ CREATE TABLE `visualization_outer_params_target_view_info` ( PRIMARY KEY (`target_id`) ) COMMENT='外部参数联动视图字段信息表'; + +ALTER TABLE `data_visualization_info` + MODIFY COLUMN `mobile_layout` tinyint NULL DEFAULT 0 COMMENT '移动端布局0-关闭 1-开启'; + diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index d50d88048d..840b8c9d37 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -61,7 +61,8 @@ export const dvMainStore = defineStore('dataVisualization', { status: null, selfWatermarkStatus: null, watermarkInfo: {}, - type: null + type: null, + mobileLayout: false }, // 图表信息 canvasViewInfo: {}, @@ -965,7 +966,8 @@ export const dvMainStore = defineStore('dataVisualization', { status: null, selfWatermarkStatus: null, watermarkInfo: {}, - type: null + type: null, + mobileLayout: false } }, setViewDataDetails(viewId, dataInfo) { @@ -1003,7 +1005,8 @@ export const dvMainStore = defineStore('dataVisualization', { type: dvType, status: 1, selfWatermarkStatus: true, - watermarkInfo: watermarkInfo + watermarkInfo: watermarkInfo, + mobileLayout: false } const canvasStyleDataNew = dvType === 'dashboard' @@ -1026,7 +1029,8 @@ export const dvMainStore = defineStore('dataVisualization', { status: null, selfWatermarkStatus: null, watermarkInfo: {}, - type: null + type: null, + mobileLayout: false } this.canvasStyleData = { ...deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK), backgroundColor: null } } diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts index 52ad68196b..1857783079 100644 --- a/core/core-frontend/src/utils/canvasUtils.ts +++ b/core/core-frontend/src/utils/canvasUtils.ts @@ -104,7 +104,8 @@ export function initCanvasDataPrepare(dvId, busiFlag, callBack) { updateName: canvasInfo.updateName, createTime: canvasInfo.createTime, updateTime: canvasInfo.updateTime, - watermarkInfo: watermarkInfo + watermarkInfo: watermarkInfo, + mobileLayout: canvasInfo.mobileLayout || false } const canvasDataResult = JSON.parse(canvasInfo.componentData) diff --git a/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue b/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue index 25be8e166d..4430a5a0d8 100644 --- a/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue +++ b/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue @@ -201,7 +201,7 @@ const save = () => {
开启移动端 - + diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/DataVisualizationVO.java b/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/DataVisualizationVO.java index 5ce00bf751..08a222ea66 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/DataVisualizationVO.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/visualization/vo/DataVisualizationVO.java @@ -64,7 +64,7 @@ public class DataVisualizationVO implements Serializable { /** * 移动端布局 */ - private String mobileLayout; + private Boolean mobileLayout; /** * 状态 0-未发布 1-已发布