| | |
| | | <!-- 品牌 --> |
| | | <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> |
| | |
| | | import languageMixin from "@/mixin/language.js"; |
| | | |
| | | export default { |
| | | name:"SelSeries", |
| | | mixins: [languageMixin], |
| | | data() { |
| | | return { |
| | |
| | | showPopover: false |
| | | }; |
| | | }, |
| | | activated() { |
| | | // keepalive缓存的页面每次进入都会进行的生命周期 |
| | | console.log("keepalive缓存的页面每次进入都会进行的生命周期") |
| | | }, |
| | | mounted() { |
| | | let _this = this; |
| | | let userType = this.$store.state.instante.account.UserType; |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | // console.log(res); |
| | | let result = res.data; |
| | | if (result.Code != 0) { |
| | | myToast.clear(); |
| | |
| | | changeSelectAllList(val) { |
| | | let SeriesID = []; |
| | | if (val) { |
| | | this.m_SeriesList.forEach(node => { |
| | | this.m_VisibleSeriesList.forEach(node => { |
| | | node.isCheck = true; |
| | | SeriesID.push(node.ID); |
| | | }); |
| | | this.m_SelectSeriesID = SeriesID; |
| | | } else { |
| | | this.m_SeriesList.forEach(node => { |
| | | this.m_VisibleSeriesList.forEach(node => { |
| | | node.isCheck = false; |
| | | }); |
| | | this.m_SelectSeriesID = []; |
| | |
| | | }, |
| | | //跳转到泵详情界面 |
| | | toSelPumpList() { |
| | | let Toast = this.$toast; |
| | | if (this.m_SelectSeriesID.length == 0) { |
| | | let Toast = this.$toast; |
| | | if (this.m_selectIndex == 1) { |
| | | Toast.fail({ |
| | | duration: 1000, //为0时 不关闭toast框 |
| | |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | if (this.m_SelectSeriesID.length > 10) { |
| | | Toast.fail({ |
| | | duration: 1000, //为0时 不关闭toast框 |
| | | message: `${'选择的系列不能超过十个'}`, |
| | | forbidClick: true |
| | | }); |
| | | return |
| | | } |
| | | let groupPageData = { |
| | | //页面其他展示数据 |
| | |
| | | IsVisCorrect: this.m_prevPageData.DesignInfo.IsVisCorrect //是否修正粘度 默认false |
| | | } |
| | | }; |
| | | console.log(groupPageData,497) |
| | | //将筛选数据存储到vuex中 |
| | | this.$store.commit("instante/select/ByParas", { |
| | | //select 表示vuex的文件名 |
| | |
| | | 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 |
| | | //判断当前是否是全选 |
| | | // if(this.m_BrandValue.length != this.m_BrandColumns.length){ |
| | | // this.brandSelectAll = false |
| | | // }else { |
| | | // this.brandSelectAll = true |
| | | // } |
| | | |
| | | }) |
| | | // console.log(showSeriesList,568) |
| | | this.filterSeriesList( |
| | | showSeriesList, |
| | | this.m_pinlv |
| | | ); |
| | | }, |
| | | //公司筛选列表去重 |
| | | 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; |