Bläddra i källkod

预测指标季节性图农历图逻辑回退

hbchen 9 månader sedan
förälder
incheckning
dd07d81a74
1 ändrade filer med 41 tillägg och 0 borttagningar
  1. 41 0
      src/views/dataEntry_manage/mixins/chartPublic.js

+ 41 - 0
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -984,11 +984,52 @@ export const chartSetMixin = {
       }
 
       let colors = chartTheme&&chartTheme.colorsOptions.reverse()||seasonOptions.colors;
+      // 季节性 农历成图老逻辑,需要截取 指标成图还在用,后面需要统一或者拆分
+      let rangeSelector =
+      this.calendar_type === '农历' && this.isPredictorChart
+        ? {
+            enabled: true,
+            selected: 0,
+            inputStyle: {
+              display: 'none',
+            },
+            labelStyle: {
+              display: 'none',
+            },
+            buttonTheme: {
+              style: {
+                display: 'none',
+              },
+            },
+            buttons: [
+              {
+                type: 'month',
+                count: 12,
+                text: '12月',
+              },
+              {
+                type: 'month',
+                count: 15,
+                text: '15月',
+              },
+              {
+                type: 'all',
+                text: '全部',
+                type: 'all',
+              },
+            ],
+          }
+        : {
+            enabled: false,
+          };
+
+
       this.options = {
         colors: colors.slice(-chartDataHandle.length),
         series: seasonData,
         yAxis: seasonYdata,
         xAxis,
+        rangeSelector,
         tooltip
       };
       if(this.currentLang=='en') this.changeOptions()