Browse Source

feat:月报周报行业筛选条件增加显示逻辑

yangfeng 1 year ago
parent
commit
721e1347d9

+ 6 - 0
src/views/reportData/components/ProjectDetailsList.vue

@@ -23,6 +23,7 @@
           :showOptions="subscribeBuyerClass"
           :showOptions="subscribeBuyerClass"
           ref="buyerClass" />
           ref="buyerClass" />
         <IndustryCascader
         <IndustryCascader
+          v-if="showIndustry"
           class="filter-item"
           class="filter-item"
           :showOptions="industryOptions"
           :showOptions="industryOptions"
           @change="onFilterChange"
           @change="onFilterChange"
@@ -194,6 +195,11 @@ export default {
       default () {
       default () {
         return {}
         return {}
       }
       }
+    },
+    // 行业筛选项是否显示 (默认显示,没有数据时取默认数据源,只有当是运营商专属服务且没有行业标签数据时才需要隐藏)
+    showIndustry: {
+      type: Boolean,
+      default: true
     }
     }
   },
   },
   data () {
   data () {

+ 6 - 1
src/views/reportData/pageMonth.vue

@@ -192,6 +192,7 @@
               :subscribeAreaMap="projectDetailFilters.subscribeAreaMap"
               :subscribeAreaMap="projectDetailFilters.subscribeAreaMap"
               :subscribeBuyerClass="projectDetailFilters.subscribeBuyerClass"
               :subscribeBuyerClass="projectDetailFilters.subscribeBuyerClass"
               :industryOptions="projectDetailFilters.industryMap"
               :industryOptions="projectDetailFilters.industryMap"
+              :showIndustry="showIndustry"
             />
             />
           </el-tab-pane>
           </el-tab-pane>
         </el-tabs>
         </el-tabs>
@@ -419,7 +420,8 @@ export default {
         unit: '个',
         unit: '个',
         data: []
         data: []
       },
       },
-      from: ''
+      from: '',
+      showIndustry: true
     }
     }
   },
   },
   computed: {
   computed: {
@@ -554,7 +556,10 @@ export default {
               this.projectDetailFilters.subscribeBuyerClass = []
               this.projectDetailFilters.subscribeBuyerClass = []
             }
             }
             if (res.data && res.data.industry) {
             if (res.data && res.data.industry) {
+              this.showIndustry = this.ISP && Object.keys(res.data.industry).length < 0
               this.projectDetailFilters.industryMap = res.data.industry
               this.projectDetailFilters.industryMap = res.data.industry
+            } else {
+              this.showIndustry = !this.ISP
             }
             }
             this.isFinish = true
             this.isFinish = true
             this.initChartData(res.data)
             this.initChartData(res.data)

+ 8 - 1
src/views/reportData/pageWeek.vue

@@ -104,6 +104,7 @@
             :subscribeAreaMap="projectDetailFilters.subscribeAreaMap"
             :subscribeAreaMap="projectDetailFilters.subscribeAreaMap"
             :subscribeBuyerClass="projectDetailFilters.subscribeBuyerClass"
             :subscribeBuyerClass="projectDetailFilters.subscribeBuyerClass"
             :industryOptions="projectDetailFilters.industryMap"
             :industryOptions="projectDetailFilters.industryMap"
+            :showIndustry="showIndustry"
           />
           />
         </el-tab-pane>
         </el-tab-pane>
       </el-tabs>
       </el-tabs>
@@ -224,7 +225,8 @@ export default {
         subscribeBuyerClass: [],
         subscribeBuyerClass: [],
         industryMap: {}
         industryMap: {}
       },
       },
-      from: ''
+      from: '',
+      showIndustry: true
     }
     }
   },
   },
   watch: {
   watch: {
@@ -366,7 +368,12 @@ export default {
             this.projectDetailFilters.subscribeBuyerClass = []
             this.projectDetailFilters.subscribeBuyerClass = []
           }
           }
           if (res.data && res.data.industry) {
           if (res.data && res.data.industry) {
+            if (this.ISP) {
+              this.showIndustry = Object.keys(res.data.industry).length > 0
+            }
             this.projectDetailFilters.industryMap = res.data.industry
             this.projectDetailFilters.industryMap = res.data.industry
+          } else {
+            this.showIndustry = !this.ISP
           }
           }
           // 本周新增招标项目数量
           // 本周新增招标项目数量
           if (res.data.zhao_matchitem && res.data.zhao_matchitem.length > 0) {
           if (res.data.zhao_matchitem && res.data.zhao_matchitem.length > 0) {