Hwt hace 3 años
padre
commit
94f5a71562

+ 10 - 5
smart/src/views/accessRecord/setpPage/details.vue

@@ -5,9 +5,10 @@
         <el-carousel
           :interval="5000"
           height="400px"
-          :arrow="this.vehiclePicture.length == 1 ?   never : always"
+          :arrow='this.arrowPicture'
         >
           <!-- :arrow="this.vehiclePicture.length != 1 ? always : never" -->
+          <!-- :arrow="this.vehiclePicture.length == 1 ?   never : always" -->
           <el-carousel-item
             v-for="item in vehiclePicture"
             :key="item"
@@ -90,11 +91,12 @@ export default {
         //   label: '服务到期长抬进出'
         // }
       ],
-      vehiclePicture: []
+      vehiclePicture: [],
+      arrowPicture: 'never'
     }
   },
   created () {
-    console.log(this.params);
+    this.vehiclePicture = [];
     this.cols[0].label = this.params.parkName;
     this.cols[1].label = this.params.row.plateNo;
     this.cols[2].label = this.params.row.plateNo;
@@ -122,9 +124,12 @@ export default {
                     : this.params.row.passType == 8 ? '远程放行'
                       : '相机缓慢放行';
 
-    debugger
     this.vehiclePicture.push(this.params.row.imgInfo);
-    console.log('555', this.vehiclePicture.length)
+    if (this.vehiclePicture.length == 1) {
+      this.arrowPicture = 'never'
+    } else {
+      this.arrowPicture = 'always'
+    }
 
   }
 }

+ 8 - 1
smart/src/views/onSiteVehicles/setpPage/details.vue

@@ -5,7 +5,7 @@
         <el-carousel
           :interval="5000"
           height="400px"
-          :arrow="this.vehiclePicture.length == 1 ?   never : always"
+          :arrow="this.arrowPicture"
         >
           <el-carousel-item
             v-for="item in vehiclePicture"
@@ -188,6 +188,7 @@ export default {
       licensePlate: '',
       vehicleType: '',
       vehiclePicture: [],
+      arrowPicture: 'never'
     }
   },
   methods: {
@@ -231,6 +232,7 @@ export default {
   },
   created () {
     debugger
+    this.vehiclePicture = [];
     console.log(this.params.row);
     this.cols[0].label = this.params.row.parkName;
     this.cols[1].label = this.params.row.plateNo;
@@ -248,6 +250,11 @@ export default {
     this.licensePlate = this.params.row.plateNo;
     this.vehicleType = this.params.row.carStyle == 0 ? '小轿车' : this.params.row.carStyle == 1 ? '大型车' : this.params.row.carStyle == 2 ? '货车' : this.params.row.carStyle == 3 ? '摩托车' : '其他';
     this.vehiclePicture.push(this.params.row.imgName)
+    if (this.vehiclePicture.length == 1) {
+      this.arrowPicture = 'never'
+    } else {
+      this.arrowPicture = 'always'
+    }
 
   }
 }