Browse Source

柴油月用量牧场涂图表展上

Shan9312 3 tháng trước cách đây
mục cha
commit
8e8d8faa2f
1 tập tin đã thay đổi với 12 bổ sung8 xóa
  1. 12 8
      src/views/report/queryCombustion/index.vue

+ 12 - 8
src/views/report/queryCombustion/index.vue

@@ -20,7 +20,7 @@
         <div id="chart1" style="width: 100%;height:400px;" />
       </el-col>
     </el-row>
-    <el-row v-if="isChart1"  style="position: relative;">
+    <!-- <el-row v-if="isChart1"  style="position: relative;">
        <p style="position: absolute;top:-12px;left:40%;color:rgb(130, 165, 252);background:rgb(230, 243, 255);border:1px solid rgb(130, 165, 252);padding:10px;border-radius:10px">
          柴油用量
        </p>
@@ -30,15 +30,15 @@
           </el-select>
         </div>
         <div id="chart5" style="width: 100%;height:400px;" />
-    </el-row>
-    <!-- <el-row v-if="isChart1"  style="position: relative;">
+    </el-row> -->
+    <el-row v-if="isChart1"  style="position: relative;">
        <p style="position: absolute;top:-12px;left:40%;color:rgb(130, 165, 252);background:rgb(230, 243, 255);border:1px solid rgb(130, 165, 252);padding:10px;border-radius:10px">
          柴油用量
        </p>
        <el-col :span="24">
          <div id="chart11" style="width: 100%;height:400px;" />
        </el-col>
-    </el-row> -->
+    </el-row>
     <!-- <el-row v-if="isChart1"  style="position: relative;">
        <el-col :span="24">
          <div id="chart12" style="width: 100%;height:400px;" />
@@ -275,14 +275,14 @@ export default {
       this.isChart1 = isChart1
       if(this.isChart1){
         this.getChart1()
-        // this.getChart11()
+        this.getChart11()
         // this.getChart12()
         // this.getChart2()
       }else{
         this.pastureName = [Cookies.get('pasturename')]
         // this.getChart4()
         this.getChart6()
-        this.getChart5()
+        // this.getChart5()
       }
     },
     // 各牧场燃动费用对比
@@ -343,7 +343,7 @@ export default {
           this.chart_data11.data2 = []
           this.chart_data11.xdata = []
         }
-        // this.roadChart11(this.chart_data11)
+        this.roadChart11(this.chart_data11)
       })
     },
     // 单头牛柴油用量
@@ -503,7 +503,7 @@ export default {
           data1:data1,
           xdata:xdata
         }
-        this.roadChart5(this.chart_data5)
+        // this.roadChart5(this.chart_data5)
       })
     },
     // 牧场每月用油量对比
@@ -704,6 +704,10 @@ export default {
         tooltip: { trigger: 'axis' },
         legend: {
           data: ['柴油用量', '去年同期'],
+           selected: {
+                '柴油用量': true,
+                '去年同期': false
+            },
           right: 40
         },
         color: ['#61A5E8', '#9933FF'],