Browse Source

feat: 新增跑马灯组件配置

新增跑马灯组件配置
hong.yang 1 year ago
parent
commit
077619d9da

+ 5 - 0
DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/constant/PageDesignConstant.java

@@ -136,6 +136,11 @@ public interface PageDesignConstant {
              * 主题切换器
              */
             String THEME_SWITCHER = "themeSwitcher";
+
+            /**
+             * 跑马灯
+             */
+            String MARQUEE = "marquee";
         }
     }
 

+ 112 - 0
DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/chart/components/ScreenMarqueeChart.java

@@ -0,0 +1,112 @@
+package com.gccloud.dataroom.core.module.chart.components;
+
+import com.gccloud.dataroom.core.constant.PageDesignConstant;
+import com.gccloud.dataroom.core.module.chart.bean.Chart;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Map;
+
+/**
+ * @author hongyang
+ * @version 1.0
+ * @date 2023/8/24 17:03
+ */
+@Data
+public class ScreenMarqueeChart extends Chart{
+
+
+    @ApiModelProperty(notes = "类型")
+    private String type = PageDesignConstant.BigScreen.Type.MARQUEE;
+
+    @ApiModelProperty(notes = "个性化")
+    private Customize customize = new Customize();
+
+    // title: '跑马灯占位符',
+    //    fontSize: 40,
+    //    fontWeight: 700,
+    //    icon: {
+    //      name: '',
+    //      position: 'left',
+    //      color: '#fff'
+    //    },
+    //    // 文字颜色类型: 纯色、渐变
+    //    textColorType: 'pure',
+    //    // 文字颜色
+    //    textColor: '#fff',
+    //    // 文字渐变开始颜色
+    //    textGradientColor0: '#fff',
+    //    // 文字渐变结束颜色
+    //    textGradientColor1: '#fff',
+    //    // 文字渐变方向
+    //    textGradientDirection: 'to right',
+    //    // 滚动方向
+    //    direction: 'right',
+    //    // 滚动间隔
+    //    dur: '8',
+    //    // 背景色类型:纯色、渐变、透明
+    //    backgroundColorType: 'transparent',
+    //    // 背景色
+    //    backgroundColor: '#fff',
+    //    // 背景渐变色开始颜色
+    //    bgGradientColor0: '#fff',
+    //    // 背景渐变色结束颜色
+    //    bgGradientColor1: '#fff',
+    //    // 背景色渐变方向
+    //    bgGradientDirection: 'to right'
+
+    @Data
+    public static class Customize {
+
+        @ApiModelProperty(notes = "标题")
+        private String title;
+
+        @ApiModelProperty(notes = "字体大小")
+        private Integer fontSize = 20;
+
+        @ApiModelProperty(notes = "字体权重")
+        private Integer fontWeight = 700;
+
+        @ApiModelProperty(notes = "图标")
+        private Map<String, String> icon;
+
+        @ApiModelProperty(notes = "文字颜色类型: 纯色、渐变")
+        private String textColorType;
+
+        @ApiModelProperty(notes = "文字颜色")
+        private String textColor;
+
+        @ApiModelProperty(notes = "文字渐变开始颜色")
+        private String textGradientColor0;
+
+        @ApiModelProperty(notes = "文字渐变结束颜色")
+        private String textGradientColor1;
+
+        @ApiModelProperty(notes = "文字渐变方向")
+        private String textGradientDirection;
+
+        @ApiModelProperty(notes = "滚动方向")
+        private String direction;
+
+        @ApiModelProperty(notes = "滚动间隔")
+        private String dur;
+
+        @ApiModelProperty(notes = "背景色类型:纯色、渐变、透明")
+        private String backgroundColorType;
+
+        @ApiModelProperty(notes = "背景色")
+        private String backgroundColor;
+
+        @ApiModelProperty(notes = "背景渐变色开始颜色")
+        private String bgGradientColor0;
+
+        @ApiModelProperty(notes = "背景渐变色结束颜色")
+        private String bgGradientColor1;
+
+        @ApiModelProperty(notes = "背景色渐变方向")
+        private String bgGradientDirection;
+
+
+    }
+
+}