洪海涛 4 жил өмнө
parent
commit
a0298a0ef1

+ 19 - 1
src/views/monthlyReport/childrenPage/editReport/components/PushAndBanck.vue

@@ -8,7 +8,7 @@
           {{ item.label }}
           <div v-if="isShow(item.copywriter)">%</div>
         </div>
-        <div v-if="index < subTitle.length - 1">{{ item.copywriter.search(/发布次数|全量回滚率/) > -1 ? ';' : ',' }}</div>
+        <div v-if="index < subTitle.length - 1">{{ item.copywriter.search(/发布次数|全量回滚率/) > -1 ? ';' : isComma(item.copywriter) }}</div>
       </div>
     </div>
   </div>
@@ -58,6 +58,24 @@ export default {
       }
       // console.log(label, num)
       return label === '全量回滚率' && num > 1
+    },
+    // 判断是否显示逗号
+    isComma(label) {
+      if (label.search(/裸奔上线次数/) > -1) {
+        if (this.isShowItem('全量回滚率')) {
+          return ','
+        } else {
+          return ''
+        }
+      }
+      if (label.search(/小流量回滚次数/) > -1) {
+        if (this.isShowItem('全量回滚率')) {
+          return ','
+        } else {
+          return ';'
+        }
+      }
+      return ','
     }
   }
 }