Jelajahi Sumber

Merge branch 'dev/v1.0.53_yf' of jianyu/web into feature/v1.0.53

yangfeng 1 tahun lalu
induk
melakukan
f1ffdfa690

+ 34 - 18
apps/bigmember_pc/src/assets/js/selector.js

@@ -1064,22 +1064,38 @@ export const wordsModeList = [
 // 热门省份
 export const hotProvinceMap = {
   '#': ['全国'],
-  'h-1': ['北京', '广东'],
-  'h-2': ['山东', '河南'],
-  'h-3': ['浙江', '江苏'],
-  'h-4': ['陕西', '上海', ],
-  'h-5': ['四川', '湖北', ],
-  'h-6': ['福建', '河北'],
-  'h-7': ['安徽', '湖南', ],
-  'h-8': ['辽宁', '江西', ],
-  'h-9': ['山西'],
-  'o-10': ['云南', '新疆',],
-  'o-11': ['重庆', '广西', ],
-  'o-12': ['吉林', '贵州'],
-  'o-13': ['天津', '甘肃', ],
-  'o-14': ['黑龙江','内蒙古'],
-  'o-15': [ '宁夏', '海南'],
-  'o-16': ['青海', '西藏'],
-  'o-17': ['香港', '澳门'],
-  'o-18': ['台湾']
+  'h-1': ['北京'],
+  'h-2': ['广东'],
+  'h-3': ['山东'],
+  'h-4': ['河南'],
+  'h-5': ['浙江'],
+  'h-6': ['江苏'],
+  'h-7': ['陕西'],
+  'h-8': ['上海' ],
+  'h-9': ['四川'],
+  'h-10': ['湖北'],
+  'h-11': ['福建'],
+  'h-12': ['河北'],
+  'h-13': ['安徽'],
+  'h-14': ['湖南'],
+  'h-15': ['辽宁'],
+  'h-16': ['江西'],
+  'h-17': ['山西'],
+  'o-18': ['云南'],
+  'o-19': ['新疆'],
+  'o-20': ['重庆'],
+  'o-21': ['广西'],
+  'o-22': ['吉林'],
+  'o-23': ['贵州'],
+  'o-24': ['天津'],
+  'o-25': ['甘肃'],
+  'o-26': ['黑龙江'],
+  'o-27': ['内蒙古'],
+  'o-28': ['宁夏'],
+  'o-29': ['海南'],
+  'o-30': ['青海'],
+  'o-31': ['西藏'],
+  'o-32': ['香港'],
+  'o-33': ['澳门'],
+  'o-34': ['台湾']
 }

+ 20 - 5
apps/bigmember_pc/src/components/filter-items/RegionCollapseSelector.vue

@@ -18,18 +18,19 @@
         class="index-item"
         :data-index="key"
         :ref="'index-item-' + key"
-        v-for="(item, key) in provinceListMap"
+        v-for="(item, key, index) in provinceListMap"
         :key="key"
       >
         <div
           class="j-button-item"
+          :data-index="index"
           v-for="(province, ii) in item"
           :class="{
             bgc: onlyProvince,
             expand: province.expanded && province.canExpanded,
             active: provinceButtonActive(province),
             country: province.name === '全国',
-            hidden: !moreStatus && key.indexOf('o-') > -1,
+            hidden: !moreStatus && (index + 1) > oneShowCount,
             [province.selectedState]: !showSelectedList
           }"
           :key="ii * 2"
@@ -142,7 +143,8 @@ export default {
       },
       selectedCity: {},
       selectedTagList: [],
-      moreStatus: false
+      moreStatus: false,
+      oneShowCount: 0
     }
   },
   computed: {
@@ -160,7 +162,22 @@ export default {
     this.initIndexBarAndAreaMap()
     this.setState(this.value)
   },
+  mounted() {
+    this.calcShowCount()
+    window.addEventListener('resize', this.calcShowCount)
+  },
+  beforeDestroy() {
+    window.removeEventListener('resize', this.calcShowCount)
+  },
   methods: {
+    // 计算一行展示多少个
+    calcShowCount() {
+      // 72 为padding-right距离
+      const containerWidth = document.querySelector('.select-list').clientWidth - 72 - 50 // 容器的宽度
+      const itemWidth = 50
+      this.oneShowCount = Math.floor(containerWidth / itemWidth)
+      console.log(this.oneShowCount, '一行展示多少个')
+    },
     toggleMoreStatus() {
       this.moreStatus = !this.moreStatus
       for (const key in this.provinceListMap) {
@@ -191,7 +208,6 @@ export default {
       if (Object.keys(provinceMap).length !== 0) {
         this.provinceListMapExp = provinceMap
       }
-      console.log(pMap, 'pMap')
       for (const key in pMap) {
         const areaArr = []
         indexList.push(key)
@@ -242,7 +258,6 @@ export default {
       for (const k in provinceListMap) {
         this.$set(this.provinceListMap, k, provinceListMap[k])
       }
-      console.log(this.provinceListMap, 'this.provinceListMap');
       this.getAllItem().selectedState = 'checked'
     },
     // 循环chinaMapJSON,找到对应省下面对应的市

+ 1 - 1
apps/bigmember_pc/src/views/collection/model/modules/data-collect-tag.js

@@ -301,7 +301,7 @@ export function dataCollectTagModel (params) {
               name: name
             })
           }
-          // getUserTags()
+          getUserTags()
         } else {
           toastFn('标签已经存在,无需添加', 1000)
         }

+ 11 - 11
apps/bigmember_pc/src/views/search/ent/constant/search-filters.js

@@ -106,6 +106,17 @@ function createSearchEntBaseSchema(conf = {}) {
 function createSearchEntMoreSchema() {
   // 更多筛选
   const SearchEntMoreSchema = [
+    {
+      key: 'establish',
+      label: '成立时间',
+      defaultVal: '',
+      _name: 'type',
+      _type: 'component',
+      expand: {
+        component: EstablishTimeSelector,
+        hooks: {}
+      }
+    },
     {
       key: 'area',
       label: '注册地',
@@ -167,17 +178,6 @@ function createSearchEntMoreSchema() {
         hooks: {}
       }
     },
-    {
-      key: 'establish',
-      label: '成立时间',
-      defaultVal: '',
-      _name: 'type',
-      _type: 'component',
-      expand: {
-        component: EstablishTimeSelector,
-        hooks: {}
-      }
-    },
     {
       key: 'biddingArea',
       label: '中标区域',

+ 3 - 0
apps/bigmember_pc/src/views/search/purchase/constant/search-filters.js

@@ -8,6 +8,7 @@ const SearchPurchaseBaseSchema = [
     label: '所在地:',
     defaultVal: [],
     _name: 'type',
+    labelHeight: '24px',
     _type: 'component',
     expand: {
       component: RegionCollapseSelector,
@@ -22,6 +23,7 @@ const SearchPurchaseBaseSchema = [
     label: '采购单位类型:',
     defaultVal: [],
     _name: 'type',
+    labelHeight: '24px',
     _type: 'component',
     expand: {
       component: BuyerTypeSelector,
@@ -37,6 +39,7 @@ const SearchPurchaseBaseSchema = [
     label: '联系方式:',
     defaultVal: [],
     _name: 'type',
+    labelHeight: '20px',
     _type: 'component',
     expand: {
       component: CheckboxGroupSelector,

+ 3 - 0
apps/bigmember_pc/src/views/search/purchase/index.vue

@@ -453,6 +453,9 @@ function onSelectEnt(data) {
         line-height: 24px;
       }
     }
+    .search-schema-filter-container.use-style-col .search-schema-filter-item + .search-schema-filter-item{
+      margin-top: 10px;
+    }
   }
 }
 </style>

+ 2 - 1
apps/bigmember_pc/src/views/search/supply/constant/search-filters.js

@@ -40,7 +40,7 @@ const SearchSupplyBaseSchema = [
     label: '选择区域:',
     defaultVal: [],
     _name: 'regionMap',
-    labelHeight: '32px',
+    labelHeight: '28px',
     _type: 'component',
     expand: {
       component: RegionCollapseSelector,
@@ -53,6 +53,7 @@ const SearchSupplyBaseSchema = [
     label: '发布时间:',
     defaultVal: {},
     _name: 'time',
+    labelHeight: '24px',
     _type: 'component',
     expand: {
       component: TimeSelector,

+ 3 - 0
apps/bigmember_pc/src/views/search/supply/index.vue

@@ -221,6 +221,9 @@ function goWorkSpaceCustom() {
         line-height: 24px;
       }
     }
+    .search-schema-filter-container.use-style-col .search-schema-filter-item + .search-schema-filter-item{
+      margin-top: 12px;
+    }
   }
 }
 </style>