| | |
| | | <!-- 过滤菜单 --> |
| | | <van-dropdown-menu active-color="#528abe" style="flex: 1"> |
| | | <van-dropdown-item :title="$t('ebookPage.screen.TR')" ref="filterOne"> |
| | | <van-cell left :title="$t('ebookPage.motorFrequency.TR')"> |
| | | <van-cell v-if="false" left :title="$t('ebookPage.motorFrequency.TR')"> |
| | | <template #right-icon> |
| | | <span style="margin-right: 10px" |
| | | >{{ m_MotorFrequece ? "60" : "50" }}Hz</span |
| | |
| | | title-style="color:#528abe" |
| | | :title="item.Name" |
| | | :label="item.CatalogName" |
| | | v-for="(item, index) in m_dataList" |
| | | v-for="(item, index) in m_visibleDataList" |
| | | :key="index" |
| | | > |
| | | <template #icon> |
| | |
| | | }, |
| | | ], |
| | | m_dataList: [], //查询出来的列表 |
| | | m_visibleDataList:[],//用于展示的数据 |
| | | m_allBrandList:[],//品牌 |
| | | showSearchList: false, |
| | | m_isUL: false, //是否是UL |
| | | m_isFirePump: false, //是否是消防泵 |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | _this.m_historyKeyWords.push(_this.m_keyWord); |
| | | } |
| | | db.set("historyRecord", _this.m_historyKeyWords); |
| | | let brandList = [] |
| | | let seriesList = []; |
| | | result.Data.forEach((item) => { |
| | | let productItem = { |
| | |
| | | ThumbnailImage: item.ThumbnailImage, |
| | | Description: item.Description, |
| | | }; |
| | | let brandObj = { |
| | | name:item.CorpName, |
| | | isSelect:false |
| | | } |
| | | brandList.push(brandObj) |
| | | seriesList.push(productItem); |
| | | }); |
| | | _this.m_dataList = seriesList; |
| | | |
| | | _this.m_visibleDataList = _this.m_dataList |
| | | |
| | | _this.m_allBrandList = _this.uniqueCorpList(brandList) |
| | | //console.log(Object.entries(_this.m_ShowSeriesList), 80); |
| | | } |
| | | }) |
| | |
| | | Toast.clear(); |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | //根据电机功率的值筛选泵列表 |
| | | getFilterValue() { |
| | | this.$refs.filterOne.toggle(); |
| | | }, |
| | | //根据品牌筛选泵列表 |
| | | getFilterBrand() { |
| | | this.$refs.brandFilter.toggle(); |
| | | //console.log(val,777) |
| | | let showSeriesList = []; |
| | | let currentSelectBrand = []; |
| | | this.m_allBrandList.forEach((item) => { |
| | | if (item.isSelect) { |
| | | currentSelectBrand.push(item.name); |
| | | } |
| | | }); |
| | | if (currentSelectBrand.length == 0) { |
| | | this.m_visibleDataList= this.m_dataList |
| | | return; |
| | | } |
| | | currentSelectBrand.forEach((brand) => { |
| | | this.m_visibleDataList.forEach((series_item) => { |
| | | if (brand == series_item.CorpName) { |
| | | showSeriesList.push(series_item); |
| | | } |
| | | }); |
| | | }); |
| | | // console.log(showSeriesList,568) |
| | | |
| | | this.m_visibleDataList= showSeriesList |
| | | }, |
| | | //监听品牌选择 |
| | | onChangeBrandSelect(e, index) { |
| | | this.m_allBrandList[index].isSelect = !this.m_allBrandList[index].isSelect; |
| | | }, |
| | | //点击历史记录标签搜索 |
| | | changeTagSearch(name) { |
| | |
| | | let query = { ID: item.SeriesID }; |
| | | this.gotoPage("/EBook/SeriesDetailPump", query, null); |
| | | } |
| | | }, |
| | | //公司筛选列表去重 |
| | | uniqueCorpList(arr) { |
| | | let map = new Map(); |
| | | for (let item of arr) { |
| | | if (!map.has(item.name)) { |
| | | map.set(item.name, item); |
| | | } |
| | | } |
| | | return [...map.values()]; |
| | | }, |
| | | //返回上一页 |
| | | pageBack() { |
| | |
| | | right: 15px; |
| | | } |
| | | } |
| | | .brand-content { |
| | | height: 23vh; |
| | | padding: 0px 5px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: flex-start; |
| | | align-content: flex-start; |
| | | overflow: auto; |
| | | } |
| | | .brand-item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 120px; |
| | | height: 32px; |
| | | justify-content: center; |
| | | align-items: center; |
| | | background-color: #f1f2f3; |
| | | border-radius: 20px; |
| | | margin-top: 10px; |
| | | margin-right: 5px; |
| | | box-sizing: border-box; |
| | | span { |
| | | font-size: 12px; |
| | | } |
| | | } |
| | | .brand-item-active { |
| | | border: 1px solid #578ebe; |
| | | background-color: #ecf5ff; |
| | | span { |
| | | font-size: 12px; |
| | | color: #578ebe; |
| | | } |
| | | } |
| | | } |
| | | .kwy-style { |
| | | margin-right: 5px; |