From 88778310683dcb8befc0d0c6175f44a701e8b8d3 Mon Sep 17 00:00:00 2001
From: tanghaolin <1723298894@qq.com>
Date: 星期二, 30 八月 2022 17:39:11 +0800
Subject: [PATCH] 增加系列选择品牌筛选

---
 src/views/Select/SelSeries.vue |   54 +++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 35 insertions(+), 19 deletions(-)

diff --git a/src/views/Select/SelSeries.vue b/src/views/Select/SelSeries.vue
index ea10884..ce64797 100644
--- a/src/views/Select/SelSeries.vue
+++ b/src/views/Select/SelSeries.vue
@@ -144,10 +144,10 @@
       <!-- 鍝佺墝 -->
     <van-action-sheet v-model:show="m_ShowBrandPicker" title="鍝佺墝閫夋嫨">
       <div class="brand-content">
-        <div class="brand-item" @click="onChangeBrandSelectAll" :class="brandSelectAll?'brand-item-active':''">
+        <!-- <div class="brand-item" @click="onChangeBrandSelectAll" :class="brandSelectAll?'brand-item-active':''">
           <span>鍏ㄩ儴</span>
-        </div>
-        <div class="brand-item" @click="onChangeBrandSelect(brand_item)" :class="brand_item.isSelect?'brand-item-active':''" v-for="(brand_item,brand_index) in m_allBrandList" :key="brand_index">
+        </div> -->
+        <div class="brand-item" @click="onChangeBrandSelect(brand_item,brand_index)" :class="brand_item.isSelect?'brand-item-active':''" v-for="(brand_item,brand_index) in m_allBrandList" :key="brand_index">
           <span>{{brand_item.name}}</span>
         </div>
       </div>
@@ -553,23 +553,35 @@
       this.m_BrandValue = currentBrandSelectArr
     },
     //鐩戝惉鍝佺墝閫夋嫨
-    onChangeBrandSelect(e){
-       console.log(e,965)
-      let showSeriesList = [];
-      this.m_allBrandList.forEach(item=>{
-        if(item.name == e.name){
-          item.isSelect = !item.isSelect
-        }
-        if(item.IsSelect){
-          this.m_SeriesList.forEach(series_item=>{
-            if(item.name = series_item.CorpName){
+    onChangeBrandSelect(e,index){
+       this.m_allBrandList[index].isSelect = !this.m_allBrandList[index].isSelect
+       let showSeriesList = [];
+      let currentSelectBrand = []
+          this.m_allBrandList.forEach(item=>{
+            if(item.isSelect){
+              currentSelectBrand.push(item.name)
+            }
+          })
+          if(currentSelectBrand.length == 0){
+           this.filterSeriesList(
+              this.m_SeriesList,
+              this.m_pinlv
+            );
+            return
+          }
+          currentSelectBrand.forEach(brand=>{
+           this.m_SeriesList.forEach(series_item=>{
+            if(brand == series_item.CorpName){
               showSeriesList.push(series_item)
             }
           })
-        }
-      })
-
-      this.m_VisibleSeriesList = showSeriesList
+        })
+      console.log(showSeriesList,568)
+         this.filterSeriesList(
+              showSeriesList,
+              this.m_pinlv
+            );
+      // this.m_VisibleSeriesList = showSeriesList
       //鍒ゆ柇褰撳墠鏄惁鏄叏閫�
       // if(this.m_BrandValue.length != this.m_BrandColumns.length){
       //   this.brandSelectAll = false
@@ -579,7 +591,7 @@
       
     },
     //鍏徃绛涢�夊垪琛ㄥ幓閲�
-    uniqueCorpList (arr) {
+  uniqueCorpList (arr) {
     let map = new Map();
     for (let item of arr) {
         if (!map.has(item.name)) {
@@ -625,6 +637,9 @@
     .van-cell__value {
       text-align: left;
       font-size: 13px;
+    }
+    .van-cell__label{
+      width:180px;
     }
     .van-collapse-item__content {
       padding: 0px 16px;
@@ -678,12 +693,13 @@
     }
   }
     .brand-content {
-      height: 50vh;
+      height: 40vh;
       padding: 0px 5px;
       display: flex;
       flex-wrap: wrap;
       justify-content: flex-start;
       align-content: flex-start;
+      overflow: auto;
     }
     .brand-item {
       display: flex;

--
Gitblit v1.9.3