tanghaolin
2022-08-30 88778310683dcb8befc0d0c6175f44a701e8b8d3
增加系列选择品牌筛选
已修改1个文件
54 ■■■■■ 文件已修改
src/views/Select/SelSeries.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;