| | |
| | | <!-- 品牌 --> |
| | | <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> |
| | |
| | | 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 |
| | |
| | | |
| | | }, |
| | | //公司筛选列表去重 |
| | | uniqueCorpList (arr) { |
| | | uniqueCorpList (arr) { |
| | | let map = new Map(); |
| | | for (let item of arr) { |
| | | if (!map.has(item.name)) { |
| | |
| | | .van-cell__value { |
| | | text-align: left; |
| | | font-size: 13px; |
| | | } |
| | | .van-cell__label{ |
| | | width:180px; |
| | | } |
| | | .van-collapse-item__content { |
| | | padding: 0px 16px; |
| | |
| | | } |
| | | } |
| | | .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; |