浏览代码

最高出价回显时的显示隐藏控制

liubei@c-top.com.cn 3 年之前
父节点
当前提交
f8b1d529c1

+ 14 - 8
src/views/modules/advertiser/modules/ProjectModal.vue

@@ -423,14 +423,20 @@
           var params = { ...record }
           params.bidType = record.bidType == null || record.bidType == '' ? [] : JSON.parse(record.bidType)
           // this.maxBidShow = params.bidType.findIndex((item) => item == 2)
-          params.bidType.findIndex(item => {
-            if (item == 2) {
-              this.maxBidShow = true;
-            } else {
-              this.maxBidShow = false;
-
-            }
-          })
+          let odx =  params.bidType.indexOf(2)
+          if (odx > -1) {
+            this.maxBidShow = true;
+          }else{
+            this.maxBidShow = false;
+          }
+          // params.bidType.findIndex(item => {
+          //   if (item == 2) {
+          //     this.maxBidShow = true;
+          //   } else {
+          //     this.maxBidShow = false;
+
+          //   }
+          // })
 
           let newArray = [];
           newArray = record.ocpxActionType == null || record.ocpxActionType == '' ? [] : JSON.parse(record.ocpxActionType)

+ 14 - 8
src/views/modules/advertiser/modules/projectListModal.vue

@@ -416,14 +416,20 @@
         if (record.mediaId == '2' || record.mediaId == '4') {
           var params = { ...record }
           params.bidType = record.bidType == null || record.bidType == '' ? [] : JSON.parse(record.bidType)
-          params.bidType.findIndex(item => {
-            if (item == 2) {
-              this.maxBidShow = true;
-            } else {
-              this.maxBidShow = false;
-
-            }
-          })
+          let odx =  params.bidType.indexOf(2)
+          if (odx > -1) {
+            this.maxBidShow = true;
+          }else{
+            this.maxBidShow = false;
+          }
+          // params.bidType.findIndex(item => {
+          //   if (item == 2) {
+          //     this.maxBidShow = true;
+          //   } else {
+          //     this.maxBidShow = false;
+
+          //   }
+          // })
           // params.ocpxActionType =
           //   record.ocpxActionType == null || record.ocpxActionType == '' ? [] : JSON.parse(record.ocpxActionType)
           let newArray = [];