Ver código fonte

问题修改

sunzehao 3 meses atrás
pai
commit
60d41259ce
1 arquivos alterados com 23 adições e 13 exclusões
  1. 23 13
      src/views/economicsOperation/nxfHomePage/index.vue

+ 23 - 13
src/views/economicsOperation/nxfHomePage/index.vue

@@ -125,23 +125,16 @@
                     text: "周",
                 }, ],
                 rightTableData: [
-                    {
-                        name: '风能利用率年排名',
-                        data: dataJson.data.fnlyl
-                    },
-                    {
-                        name: '设备可利用率年排名',
-                        data: dataJson.data.sbklyl
-                    },
+                    
                 ],
                 ForecastPower: [],
                 fnlyl: dataJson.data.fnlyl,
-                zbtqdb: dataJson.data.zbtqdb,
+                zbtqdb: null,
                 sbklyl: {},
                 lgxzkh: {},
-                planData: dataJson.data.planData,
+                planData: null,
                 planBtnName: "全部",
-                Powertrend: dataJson.data.Powertrend,
+                Powertrend: null,
                 PowertrendYAxises: [{
                         name: "限电量",
                         min: 0,
@@ -157,7 +150,7 @@
                         position: "right",
                     },
                 ],
-                Powerloss: dataJson.data.Powerloss,
+                Powerloss: null,
                 PowerlossYAxises: [{
                         name: "损失电量",
                         min: 0,
@@ -173,7 +166,7 @@
                         position: "right",
                     },
                 ],
-                Powersend: dataJson.data.Powersend,
+                Powersend: null,
             }
         },
         mounted() {
@@ -203,6 +196,8 @@
                         }
                         that.zbtqdb = res.data.zbtqdb
                     }
+                }).catch(e => {
+                    that.zbtqdb = dataJson.data.zbtqdb
                 })
                 homeright({
                     periodType: this.activeIndex === 0 ? "year" : this.activeIndex === 1 ? "month" : "week"
@@ -222,6 +217,16 @@
                             // },
                         ]
                     }
+                }).catch(e => {
+                    that.rightTableData = [{
+                            name: '风能利用率年排名',
+                            data: dataJson.data.fnlyl
+                        },
+                        {
+                            name: '设备可利用率年排名',
+                            data: dataJson.data.sbklyl
+                        },
+                    ]
                 })
                 homemiddle().then(res =>{
                     if (res.data) {
@@ -230,6 +235,11 @@
                         that.Powersend = res.data.Powersend
                         that.Powerloss = res.data.Powerloss
                     }
+                }).catch(e => {
+                    that.planData = dataJson.data.planData
+                    that.Powertrend = dataJson.data.Powertrend
+                    that.Powersend = dataJson.data.Powersend
+                    that.Powerloss = dataJson.data.Powerloss
                 })
             },
         }