Bläddra i källkod

feat: 组件模拟数据获取优化,兼容旧地图组件

组件模拟数据获取优化,兼容旧地图组件
hong.yang 1 år sedan
förälder
incheckning
69f1c09415

+ 14 - 1
DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/chart/controller/ChartDataController.java

@@ -89,7 +89,20 @@ public class ChartDataController {
                 if (chart instanceof ScreenFlyMapChart) {
                     ScreenFlyMapChart screenFlyMapChart = (ScreenFlyMapChart) chart;
                     ScreenFlyMapChart.Customize customize = screenFlyMapChart.getCustomize();
-                    type += "-" + customize.getLevel();
+                    // 兼容旧版地图等级
+                    switch (customize.getLevel()) {
+                        case "0":
+                            type += "-world";
+                            break;
+                        case "1":
+                            type += "-country";
+                            break;
+                        case "2":
+                            type += "-province";
+                            break;
+                        default:
+                            type += "-" + customize.getLevel();
+                    }
                 }
                 chartDataVO = ChartMockData.getMockData(type);
             }