yusheng пре 4 месеци
родитељ
комит
9a8d273b86
1 измењених фајлова са 15 додато и 15 уклоњено
  1. 15 15
      src/views/home/index.vue

+ 15 - 15
src/views/home/index.vue

@@ -160,7 +160,7 @@
 
                 <span
                   :class="['tab_item', active2 === '3' ? 'active' : '']"
-                  @click="switchAreaBar('3', 'active2', 'usageTrend')"
+                  @click="switchAreaBar('4', 'active2', 'usageTrend')"
                   >煤</span
                 >
               </div>
@@ -236,8 +236,8 @@
                 >
 
                 <span
-                  :class="['tab_item', active3 === '3' ? 'active' : '']"
-                  @click="switchAreaBar('3', 'active3', 'costTrend')"
+                  :class="['tab_item', active3 === '4' ? 'active' : '']"
+                  @click="switchAreaBar('4', 'active3', 'costTrend')"
                   >煤</span
                 >
               </div>
@@ -276,8 +276,8 @@
                 >
 
                 <span
-                  :class="['tab_item', active === '3' ? 'active' : '']"
-                  @click="switchAreaBar('3', 'active', 'regionBarChart')"
+                  :class="['tab_item', active === '4' ? 'active' : '']"
+                  @click="switchAreaBar('4', 'active', 'regionBarChart')"
                   >煤</span
                 >
               </div>
@@ -314,8 +314,8 @@
                 >
 
                 <span
-                  :class="['tab_item', active1 === '3' ? 'active' : '']"
-                  @click="switchAreaBar('3', 'active1', 'regionCostBarChart')"
+                  :class="['tab_item', active1 === '4' ? 'active' : '']"
+                  @click="switchAreaBar('4', 'active1', 'regionCostBarChart')"
                   >煤</span
                 >
               </div>
@@ -647,13 +647,13 @@
             },
             {
               icon: require('@/assets/home/leftitem.png'),
-              value: res.gasUsage,
+              value: res.coalUsage,
               unit: 'm³',
               label: '用煤量'
             },
             {
               icon: require('@/assets/home/leftitem.png'),
-              value: res.gasCost,
+              value: res.coalCost,
               unit: '元',
               label: '用煤费用'
             }
@@ -1192,7 +1192,7 @@
             '#009e7d',
             '#008b6b'
           ];
-          const gasColors = [
+          const coalColors = [
             '#ff9f43',
             '#ff8c42',
             '#ff7b38',
@@ -1289,12 +1289,12 @@
                   shadowBlur: 10,
                   shadowColor: 'rgba(255, 159, 67, 0.3)'
                 },
-                data: res.gasCompare?.map((item, index) => {
+                data: res.coalCompare?.map((item, index) => {
                   return {
                     value: item.usageValue,
                     name: item.regionName,
                     itemStyle: {
-                      color: gasColors[index % gasColors.length]
+                      color: coalColors[index % coalColors.length]
                     }
                   };
                 })
@@ -1322,7 +1322,7 @@
             },
             {
               label: '今日用煤量(T)',
-              value: res.todayGasUsage,
+              value: res.todaycoalUsage,
               chartOption: {}
             },
             {
@@ -1355,7 +1355,7 @@
             }
           ];
 
-          ['electricityTrend', 'waterTrend', 'gasTrend', 'costTrend'].forEach(
+          ['electricityTrend', 'waterTrend', 'coalTrend', 'costTrend'].forEach(
             (item, index) => {
               const theme = colorThemes[index];
               this.$set(this.todayList[index], 'chartOption', {
@@ -1586,7 +1586,7 @@
               label: '用水预警(件)',
               value: res.warningStat?.waterWarningCount
             },
-            { label: '用煤预警(件)', value: res.warningStat?.gasWarningCount }
+            { label: '用煤预警(件)', value: res.warningStat?.coalWarningCount }
           ];
           console.log(res, 'this.warningStats');
           let dataArr = [];