hbchen 1 éve
szülő
commit
72217defd3
1 módosított fájl, 15 hozzáadás és 0 törlés
  1. 15 0
      src/views/dataEntry_manage/chartSetting.vue

+ 15 - 0
src/views/dataEntry_manage/chartSetting.vue

@@ -1599,7 +1599,22 @@ export default {
       if(this.chartInfo.ChartType==2){
         if(this.chartInfo.SeasonExtraConfig){
           this.SeasonExtraConfig = JSON.parse(this.chartInfo.SeasonExtraConfig)
+        }else{
+          // 返回空就是默认值
+          this.SeasonExtraConfig.XStartDate="01-01"
+          this.SeasonExtraConfig.XEndDate="12-31",
+          this.SeasonExtraConfig.JumpYear=0
         }
+
+        // 从DataList中取 ChartLegend
+        this.SeasonExtraConfig.ChartLegend=[]
+        const chartDataHandle = this.calendar_type === "农历"?
+                            this.tableData[0].DataList.filter((item, index) => index > 0):
+                            this.tableData[0].DataList
+
+        chartDataHandle.map(item =>{
+          this.SeasonExtraConfig.ChartLegend.push({Name:item.Years,Value:item.ChartLegend})
+        })
       }
     },