Kaynağa Gözat

fix-解决视频Bug

LAPTOP-U5GOA5HA\zz 1 yıl önce
ebeveyn
işleme
6de73a6238

+ 8 - 5
src/views/cardIot/components/Video.vue

@@ -43,8 +43,9 @@
         </a-spin>
       </div>
     </div>
-
-    <div class="video-img-null" v-if="!videoSrc || !gwcUrl">
+    <!-- <span>{{ videoSrc }}</span>
+    <span>{{ gwcUrl }}</span> -->
+    <div class="video-img-null" v-if="!videoSrc &&!gwcUrl">
       <img src="../../../assets/images/video-null2.png" alt="" />
       暂无资源
     </div>
@@ -103,7 +104,7 @@ export default {
       ],
       carId: 2,
       vehicleId: '',
-      gwcUrl: '',
+      gwcUrl: null,
       carInfo1: {},
       spinning: false,
     }
@@ -115,8 +116,10 @@ export default {
   watch: {
     videoid: {
       handler(val) {
+       if(val){
         this.vehicleId = val
         this.FunVdieoList()
+       }
       },
       immediate: true,
       deep: true,
@@ -134,14 +137,13 @@ export default {
   methods: {
     FunVdieoList() {
       // g公务车情况
-      if (this.carInfo1.categoryId == 2) {
+      if (this.carInfo1.categoryId ===2) {
         const data = {
           vehicleId: this.carInfo1.id,
         }
         this.spinning = true
         getCmobd(data)
           .then((response) => {
-            console.log('-------公务车', response)
             this.gwcUrl = response.data
             setInterval(() => {
               this.spinning = false
@@ -235,6 +237,7 @@ export default {
 .video-img-null {
   width: 200px;
   height: 200px;
+  margin-left:-260px;
   text-align: center;
   img {
     width: 200px;

+ 12 - 4
src/views/vehicle/components/FuelRanking.vue

@@ -3,10 +3,10 @@
     <div>
       <div class="fuel"></div>
       <div class="list">
-        <div style="text-align: right; color: #8abfdc; font-size: 14px; margin: 10px 20px 10px 0">
-          <span @click="changeType('CURRENT_YEAR')">年份</span>
-          <span style="margin: 0 15px" @click="changeType('CURRENT_MONTH')">月份</span>
-          <span @click="changeType('CURRENT_WEEK')">每周</span>
+        <div style="text-align: right; color: #8abfdc; font-size: 14px; margin: 10px 20px 10px 0;cursor:pointer;">
+          <span @click="changeType('CURRENT_YEAR')" :class="addClass('CURRENT_YEAR')">年份</span>
+          <span style="margin: 0 15px" @click="changeType('CURRENT_MONTH')" :class="addClass('CURRENT_MONTH')">月份</span>
+          <span @click="changeType('CURRENT_WEEK')" :class="addClass('CURRENT_WEEK')">每周</span>
         </div>
         <!-- 表格 -->
         <div>
@@ -51,6 +51,10 @@ export default {
       this.type = val
       this.funFuelConsumptionRankings()
     },
+    addClass(ev){
+      return ev==this.type ? "active"
+        : "";
+    },
     funFuelConsumptionRankings() {
       getFuelConsumptionRanking({ type: this.type }).then((res) => {
         this.listStatistics = res.data
@@ -147,4 +151,8 @@ export default {
     //   }
   }
 }
+.active{
+  color:#fff ;
+  
+}
 </style>

+ 10 - 3
src/views/vehicle/components/FuelRegistration.vue

@@ -4,9 +4,9 @@
       <div class="fuel"></div>
       <div class="list">
         <div style="text-align: right; color: #8abfdc; font-size: 14px; margin: 10px 20px 10px 0">
-          <span @click="changeType('CURRENT_YEAR')">年份</span>
-          <span style="margin: 0 15px" @click="changeType('CURRENT_MONTH')">月份</span>
-          <span  @click="changeType('CURRENT_WEEK')">每周</span>
+          <span @click="changeType('CURRENT_YEAR')" :class="addClass('CURRENT_YEAR')">年份</span>
+          <span style="margin: 0 15px" @click="changeType('CURRENT_MONTH')" :class="addClass('CURRENT_MONTH')">月份</span>
+          <span  @click="changeType('CURRENT_WEEK')" :class="addClass('CURRENT_WEEK')">每周</span>
         </div>
         <!-- 表格 -->
         <div>
@@ -33,6 +33,10 @@ export default {
       this.type=val
       this.funFuelConsumptionRanking()
     },
+    addClass(ev){
+      return ev==this.type ? "active"
+        : "";
+    },
     funFuelConsumptionRanking(){
       getFuelConsumptionStatistics({type:this.type}).then(res=>{
         this.listStatistics=res.data
@@ -74,4 +78,7 @@ export default {
     }
   }
 }
+.active{
+  color:#fff;
+}
 </style>

+ 16 - 16
src/views/vehicle/components/unit3D.vue

@@ -272,22 +272,22 @@ export default {
         //   //   }
         // },
         //移动上去提示的文本内容
-        tooltip: {
-          formatter: (params) => {
-            if (params.seriesName !== 'mouseoutSeries' && params.seriesName !== 'pie2d') {
-              let bfb = (
-                (option.series[params.seriesIndex].pieData.endRatio -
-                  option.series[params.seriesIndex].pieData.startRatio) *
-                100
-              ).toFixed(2)
-              return (
-                `${params.seriesName}<br/>` +
-                `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${params.color};"></span>` +
-                `${bfb}`
-              )
-            }
-          },
-        },
+        // tooltip: {
+        //   formatter: (params) => {
+        //     if (params.seriesName !== 'mouseoutSeries' && params.seriesName !== 'pie2d') {
+        //       let bfb = (
+        //         (option.series[params.seriesIndex].pieData.endRatio -
+        //           option.series[params.seriesIndex].pieData.startRatio) *
+        //         100
+        //       ).toFixed(2)
+        //       return (
+        //         `${params.seriesName}<br/>` +
+        //         `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${params.color};"></span>` +
+        //         `${bfb}`
+        //       )
+        //     }
+        //   },
+        // },
         //这个可以变形
         xAxis3D: {
           min: -1,

+ 1 - 1
src/views/vehicle/index.vue

@@ -97,7 +97,7 @@ export default {
       fierList: [
       ],
       carsList2:[],
-      text:'油卡分配',
+      text:'消防车辆分配',
       allocationList:[],
       carTypeLists:[],
       yCardList:[],