浏览代码

feat:运营商专属服务周报月报调整(BI)

yangfeng 1 年之前
父节点
当前提交
170b3c7699

+ 6 - 0
src/components/article-item/ProjectItem.vue

@@ -13,6 +13,7 @@
         <div class="project-item-bd-row-left tag-list">
           <span
             v-for="(tag, index) in tagList"
+            v-show="tag.value"
             :key="index"
             class="tag">
             {{ tag.value }}
@@ -156,6 +157,11 @@ export default {
           // }
         ]
       }
+    },
+    // 是否是运营商专属
+    isp: {
+      type: Boolean,
+      default: false
     }
   },
   computed: {

+ 10 - 1
src/components/report-data/CompanyDetail.vue

@@ -122,13 +122,22 @@ export default {
           // follow_ent: [],
         }
       }
+    },
+    isp: {
+      type: Boolean,
+      default: false
     }
   },
   methods: {
     dateFormatter,
     toProjectDetail (id) {
       if (id) {
-        window.open(`/swordfish/page_big_pc/pro_follow_detail?sid=${id}`)
+        if (this.isp) {
+        // 运营商专属服务 跳转数据清洗后的项目详情页(BI开发)
+          window.open(`/succbi/yyssjdz/app/sjdz.app/project_detail.spg?E_project_id=${id}`)
+        } else {
+          window.open(`/swordfish/page_big_pc/pro_follow_detail?sid=${id}`)
+        }
       }
     },
     toOtherPage (id, type) {

+ 10 - 1
src/components/report-data/ProjectTopTable.vue

@@ -276,6 +276,10 @@ export default {
       default () {
         return []
       }
+    },
+    isp: {
+      type: Boolean,
+      default: false
     }
   },
   data () {
@@ -336,7 +340,12 @@ export default {
     },
     toProjectDetail (id) {
       if (id) {
-        window.open(`/swordfish/page_big_pc/pro_follow_detail?sid=${id}`)
+        if (this.isp) {
+          // 运营商专属服务 跳转数据清洗后的项目详情页(BI开发)
+          window.open(`/succbi/yyssjdz/app/sjdz.app/project_detail.spg?E_project_id=${id}`)
+        } else {
+          window.open(`/swordfish/page_big_pc/pro_follow_detail?sid=${id}`)
+        }
       }
     },
     formatWinnerList (winners, ids) {

+ 12 - 1
src/components/report-data/SelectMonth.vue

@@ -41,6 +41,15 @@ export default {
           judgeTime: ''
         }
       }
+    },
+    from: {
+      type: String,
+      default: ''
+    },
+    // 是否是运营商专属
+    isp: {
+      type: Boolean,
+      default: false
     }
   },
   data () {
@@ -64,7 +73,9 @@ export default {
   methods: {
     changeActive (time) {},
     getFirst () {
-      getReportStartTime().then((res) => {
+      getReportStartTime({
+        from: this.from
+      }).then((res) => {
         if (res.data) {
           if (res.data.month_firsttime !== 0) {
             this.month_starttime = res.data.month_firsttime

+ 7 - 0
src/components/selector-cascader/IndustryCascader.vue

@@ -105,6 +105,11 @@ export default {
             value: key,
             children
           })
+        } else {
+          arr.push({
+            label: key,
+            value: key
+          })
         }
       }
       return arr
@@ -134,6 +139,8 @@ export default {
           const parentKey = this.getParentNameFromChildrenName(item)
           if (parentKey) {
             valueArr.push([parentKey, item])
+          } else {
+            valueArr.push([item])
           }
         })
         this.value = valueArr

+ 67 - 16
src/views/reportData/components/ProjectDetailsList.vue

@@ -5,6 +5,7 @@
         <SubscribeClassListCascader
           class="filter-item"
           :options="subscribeClassList"
+          :placeholder="subPlaceholder"
           v-model="filters.subscribe"
           @change="onFilterChange"
           ref="subscribeKey" />
@@ -15,6 +16,7 @@
           :showAreaMap="subscribeAreaMap"
           ref="areaCity" />
         <BuyerClassCascader
+          v-if="!isp"
           class="filter-item"
           v-model="filters.buyerClass"
           @change="onFilterChange"
@@ -22,6 +24,7 @@
           ref="buyerClass" />
         <IndustryCascader
           class="filter-item"
+          :showOptions="industryOptions"
           @change="onFilterChange"
           v-model="filters.industry"
           ref="industry" />
@@ -73,6 +76,7 @@
           :bidAmount="project.bidAmount"
           :tagList="project.tagList"
           :winners="project.winners"
+          :isp="isp"
           @clickTitle="toProjectDetail(project)"
           :key="project.id">
           <template #bd-row-right>
@@ -174,6 +178,22 @@ export default {
       default () {
         return {}
       }
+    },
+    // 是否是运营商专属
+    isp: {
+      type: Boolean,
+      default: false
+    },
+    from: {
+      type: String,
+      default: ''
+    },
+    // 运营商专属的行业筛选标签
+    industryOptions: {
+      type: Object,
+      default () {
+        return {}
+      }
     }
   },
   data () {
@@ -222,6 +242,9 @@ export default {
       const { total } = this.listState
       const { listShowMaxCount } = this.conf
       return total > listShowMaxCount ? listShowMaxCount : total
+    },
+    subPlaceholder () {
+      return this.isp ? '业务条线' : '订阅关键词组'
     }
   },
   watch: {
@@ -296,6 +319,7 @@ export default {
         pageSize: this.listState.pageSize,
         start: this.start,
         end: this.end,
+        from: this.from,
         ...filters
       }
       try {
@@ -305,21 +329,43 @@ export default {
         if (code === 0 && data && Array.isArray(data.list)) {
           this.listState.list = data.list.map(item => {
             // 整理标签
-            item.tagList = [
-              {
-                value: item.area === '其它' ? '' : item.area
-              },
-              {
-                value: item?.bidStatus === '其它' ? '' : item?.bidStatus
-              },
-              {
-                value: item?.buyerClass === '其它' ? '' : item?.buyerClass
-              },
-              {
-                // 有中标金额取中标金额,没有取预算,预算没有置空
-                value: formatMoney(item?.bidAmount || item?.budget, { level: 1 })
-              }
-            ].filter(v => v.value)
+            if (this.isp) {
+              item.tagList = [
+                {
+                  value: item.area === '其它' ? '' : item.area
+                },
+                {
+                  value: item?.bidStatus === '其它' ? '' : item?.bidStatus
+                },
+                {
+                  value: item?.item?.length > 10 ? item?.item.substring(0, 10) + '...' : item?.item
+                },
+                {
+                  value: item?.subscopeclass?.length > 10 ? item?.subscopeclass.substring(0, 10) + '...' : item?.subscopeclass
+                },
+                {
+                  // 有中标金额取中标金额,没有取预算,预算没有置空
+                  value: formatMoney(item?.bidAmount || item?.budget, { level: 1 })
+                }
+              ]
+            } else {
+              item.tagList = [
+                {
+                  value: item.area === '其它' ? '' : item.area
+                },
+                {
+                  value: item?.bidStatus === '其它' ? '' : item?.bidStatus
+                },
+                {
+                  value: item?.buyerClass === '其它' ? '' : item?.buyerClass
+                },
+                {
+                  // 有中标金额取中标金额,没有取预算,预算没有置空
+                  value: formatMoney(item?.bidAmount || item?.budget, { level: 1 })
+                }
+              ]
+            }
+            item.tagList.filter(v => v.value)
             // 整理中标企业
             if (Array.isArray(item.winner)) {
               const winners = item.winner.map((w, index) => {
@@ -350,7 +396,12 @@ export default {
     },
     toProjectDetail (item) {
       if (item.id) {
-        window.open(`/swordfish/page_big_pc/pro_follow_detail?sid=${item.id}`)
+        if (this.isp) {
+        // 运营商专属服务 跳转数据清洗后的项目详情页(BI开发)
+          window.open(`/succbi/yyssjdz/app/sjdz.app/project_detail.spg?E_project_id=${item.id}`)
+        } else {
+          window.open(`/swordfish/page_big_pc/pro_follow_detail?sid=${item.id}`)
+        }
       }
     }
   }

+ 32 - 9
src/views/reportData/pageMonth.vue

@@ -3,7 +3,7 @@
     <div class="page_week_main">
       <!-- 选择月报时间 -->
       <div class="week_time" v-if="!nonereport">
-        <SelectMonth :queryDate="getQueryTime" @noReport="noReport" :getTypeTime="{judgeTime: 'month'}" @selectYm="selectYear"></SelectMonth>
+        <SelectMonth :queryDate="getQueryTime" :from="from" :isp="ISP" @noReport="noReport" :getTypeTime="{judgeTime: 'month'}" @selectYm="selectYear"></SelectMonth>
       </div>
       <bmEmpty functype="month" tip="本月结束后,将为您推送月报,敬请期待~" v-if="nonereport"></bmEmpty>
       <Empty tip="暂无数据" v-if="nodata && !nonereport"></Empty>
@@ -15,15 +15,16 @@
               <div class="data_r_title">数据报告-月报</div>
               <div class="data_r_week">({{dateFormatter(start * 1000, 'MM月dd日')}}-{{dateFormatter(end * 1000, 'MM月dd日')}})</div>
             </div>
-            <div class="data_keys">
+            <div class="data_keys" v-if="!ISP">
               <span class="keys_label">订阅关键词组:</span>
               <span class="list_key">{{keywordsGroup}}</span>
             </div>
             <div class="data_line"></div>
             <div class="data_item">
-              <p class="item_handle">数据来源:基于您当前订阅条件所关联的招标项目数据;</p>
+              <p class="item_handle">数据来源:<span v-if="ISP">基于您订阅的项目;</span><span v-else>基于您当前订阅条件所关联的招标项目数据;</span></p>
               <p class="item_handle">项目预算/项目规模:少量预算金额、中标金额未公开或为空的项目,在计算项目总预算、总规模时不参与统计;</p>
-              <p class="item_handle">项目重复统计:一个招标项目可能同属于多个关键词组,故各关键词组的数据统计之和可能大于整体市场的统计。</p>
+              <p class="item_handle"  v-if="ISP">项目重复统计:一个招标项目可能同属于多个业务条线,故各业务条线的数据统计之和可能大于整体市场的统计。</p>
+              <p class="item_handle"  v-else>项目重复统计:一个招标项目可能同属于多个关键词组,故各关键词组的数据统计之和可能大于整体市场的统计。</p>
             </div>
           </div>
         </div>
@@ -173,7 +174,7 @@
               </div>
               <!-- 本月项目规模排行榜 15 -->
               <div class="chart" v-if="curScaleTop.show">
-                <ProjectTopTable v-if="useNewVersionReport" title="本月项目规模排行榜TOP30" type="bidamount" :data="curScaleTop.data"></ProjectTopTable>
+                <ProjectTopTable v-if="useNewVersionReport" title="本月项目规模排行榜TOP30" type="bidamount" :isp="ISP" :data="curScaleTop.data"></ProjectTopTable>
                 <ProjectTop v-else title="本月项目规模排行榜" type="bidamount" :data="curScaleTop.data"></ProjectTop>
               </div>
             </div>
@@ -184,10 +185,13 @@
               :end="end - 0"
               :key="detailListKey"
               reportType="month"
+              :isp="ISP"
+              :from="from"
               :initFilters="projectDetailFilters.initFilters"
               :subscribeClassList="projectDetailFilters.keywordsGroupList"
               :subscribeAreaMap="projectDetailFilters.subscribeAreaMap"
               :subscribeBuyerClass="projectDetailFilters.subscribeBuyerClass"
+              :industryOptions="projectDetailFilters.industryMap"
             />
           </el-tab-pane>
         </el-tabs>
@@ -399,7 +403,8 @@ export default {
         initFilters: {},
         keywordsGroupList: [],
         subscribeAreaMap: {},
-        subscribeBuyerClass: []
+        subscribeBuyerClass: [],
+        industryMap: {}
       },
       scrollTopInfo: {
         stickyTop: 0,
@@ -413,7 +418,8 @@ export default {
         typeName: '项目数量',
         unit: '个',
         data: []
-      }
+      },
+      from: ''
     }
   },
   computed: {
@@ -433,6 +439,10 @@ export default {
         return paramsData
       }
       return false
+    },
+    // 运营商专属
+    ISP () {
+      return this.$route.query?.from === 'yyszsyy'
     }
   },
   watch: {
@@ -442,6 +452,10 @@ export default {
       })
     }
   },
+  created () {
+    // from=yyszsyy 运营商专属服务携带参数
+    this.from = this.$route.query.from || ''
+  },
   mounted () {
     this.getFirst()
     this.calcStickyTop()
@@ -485,7 +499,7 @@ export default {
     getReportList (time) {
       const setyear = time.slice(0, 4)
       const that = this
-      getReportIndex({ ym: setyear }).then((res) => {
+      getReportIndex({ ym: setyear, from: this.from }).then((res) => {
         if (res.data && res.data.list && res.data.list.length !== 0) {
           let resultStatus = false
           res.data.list.forEach(function (item, index) {
@@ -515,7 +529,7 @@ export default {
     },
     // 月报详情
     getDetail (start, end) {
-      getReportDetail({ start: start, end: end }).then(res => {
+      getReportDetail({ start: start, end: end, from: this.from }).then(res => {
         if (res.error_code === 0) {
           if (res.data) {
             if (res.data) {
@@ -539,6 +553,9 @@ export default {
             } else {
               this.projectDetailFilters.subscribeBuyerClass = []
             }
+            if (res.data && res.data.industry) {
+              this.projectDetailFilters.industryMap = res.data.industry
+            }
             this.isFinish = true
             this.initChartData(res.data)
           }
@@ -1028,8 +1045,14 @@ export default {
       const filters = {}
       if (type === '本月项目数量采购行业排行榜' || type === '本月项目规模采购行业排行榜') {
         filters.buyerClass = [e.name]
+        if (this.ISP) {
+          filters.industry = [e.name]
+        }
       } else {
         filters.buyerClass = [e]
+        if (this.ISP) {
+          filters.industry = [e]
+        }
       }
       this.toProjectDetail(filters)
     },

+ 27 - 10
src/views/reportData/pageWeek.vue

@@ -3,7 +3,7 @@
     <div class="page_week_main">
       <!-- 选择周报时间 -->
       <div class="week_time">
-        <SelectMonth v-if="!nonereport" ref="selectMonth" @noReport="noReport" :queryDate="getQueryTime" @selectYm="getSelectTime"></SelectMonth>
+        <SelectMonth v-if="!nonereport" ref="selectMonth" :from="from" :isp="ISP" @noReport="noReport" :queryDate="getQueryTime" @selectYm="getSelectTime"></SelectMonth>
         <div class="select_report">
           <div class="week_report" v-for="(item, index) in weekList" :key="index" @click="selectWeek(index, item)" :class="{weekActive:index==isWeekIndex}">
             <div class="week_report_main">
@@ -35,15 +35,16 @@
             <div class="data_r_title">数据报告-周报</div>
             <div class="data_r_week">({{dateFormatter(start * 1000, 'MM月dd日')}}-{{dateFormatter(end * 1000, 'MM月dd日')}})</div>
           </div>
-          <div class="data_keys">
+          <div class="data_keys"  v-if="!ISP">
             <span class="keys_label">订阅关键词组:</span>
             <span class="list_key">{{keywordsGroup}}</span>
           </div>
           <div class="data_line"></div>
           <div class="data_item">
-            <p class="item_handle">数据来源:基于您当前订阅条件所关联的招投标公告数据;</p>
+            <p class="item_handle">数据来源:<span v-if="ISP">基于您订阅的项目;</span><span v-else>基于您当前订阅条件所关联的招投标公告数据;</span></p>
             <p class="item_handle">项目预算/项目规模:少量预算金额、中标金额未公开或为空的项目,在计算项目总预算、总规模时不参与统计;</p>
-            <p class="item_handle">项目重复统计:一个招标项目可能同属于多个关键词组,故各关键词组的数据统计之和可能大于整体市场的统计。</p>
+            <p class="item_handle"  v-if="ISP">项目重复统计:一个招标项目可能同属于多个业务条线,故各业务条线的数据统计之和可能大于整体市场的统计。</p>
+            <p class="item_handle"  v-else>项目重复统计:一个招标项目可能同属于多个关键词组,故各关键词组的数据统计之和可能大于整体市场的统计。</p>
           </div>
         </div>
       </div>
@@ -72,13 +73,13 @@
             </div>
             <!-- 项目金额排行榜/本周项目规模排行榜TOP30(同一个东西,名字在p350改了,老报告展示老名字,新报告展示新名字) -->
             <template v-if="projectAmount.show">
-              <ProjectTopTable v-if="useNewVersionReport" title="本周项目规模排行榜TOP30" :data="projectAmount.list" type='amount'></ProjectTopTable>
+              <ProjectTopTable v-if="useNewVersionReport" title="本周项目规模排行榜TOP30" :isp="ISP" :data="projectAmount.list" type='amount'></ProjectTopTable>
               <ProjectTop v-else title="项目金额排行榜" :data="projectAmount.list" type='amount'></ProjectTop>
             </template>
 
             <!-- 下周开标提醒 -->
             <div v-if="priority.nextweek_bidopen.length > 0">
-              <CompanyDetail :linkable="useNewVersionReport" title="下周开标提醒" :datas="priority" type="bidopen"></CompanyDetail>
+              <CompanyDetail :linkable="useNewVersionReport" title="下周开标提醒" :isp="ISP" :datas="priority" type="bidopen"></CompanyDetail>
             </div>
             <!-- 重点关注项目 -->
             <div v-if="priority.follow_project.length > 0">
@@ -97,9 +98,12 @@
             :start="start - 0"
             :end="end - 0"
             reportType="week"
+            :isp="ISP"
+            :from="from"
             :subscribeClassList="projectDetailFilters.keywordsGroupList"
             :subscribeAreaMap="projectDetailFilters.subscribeAreaMap"
             :subscribeBuyerClass="projectDetailFilters.subscribeBuyerClass"
+            :industryOptions="projectDetailFilters.industryMap"
           />
         </el-tab-pane>
       </el-tabs>
@@ -217,8 +221,10 @@ export default {
       projectDetailFilters: {
         keywordsGroupList: [],
         subscribeAreaMap: {},
-        subscribeBuyerClass: []
-      }
+        subscribeBuyerClass: [],
+        industryMap: {}
+      },
+      from: ''
     }
   },
   watch: {
@@ -228,6 +234,10 @@ export default {
       })
     }
   },
+  created () {
+    // from=yyszsyy 运营商专属服务携带参数
+    this.from = this.$route.query.from || ''
+  },
   mounted () {
     const nowtime = dateFormatter(new Date(), 'yyyyMM')
     let time = nowtime
@@ -257,6 +267,10 @@ export default {
         return paramsData
       }
       return false
+    },
+    // 运营商专属
+    ISP () {
+      return this.$route.query?.from === 'yyszsyy'
     }
   },
   methods: {
@@ -267,7 +281,7 @@ export default {
     },
     // 周报列表
     getReportList (time) {
-      getReportIndex({ ym: time }).then((res) => {
+      getReportIndex({ ym: time, from: this.from }).then((res) => {
         if (res.data && res.data.list && res.data.list.length !== 0) {
           res.data.list.forEach(function (item, i) {
             if (item.pushtime) {
@@ -328,7 +342,7 @@ export default {
     },
     // 周报详情
     getDetail (start, end) {
-      getReportDetail({ start: start, end: end }).then(res => {
+      getReportDetail({ start: start, end: end, from: this.from }).then(res => {
         if (res.error_code === 0) {
           if (res.data) {
             this.useNewVersionReport = res.data.isNewData
@@ -351,6 +365,9 @@ export default {
           } else {
             this.projectDetailFilters.subscribeBuyerClass = []
           }
+          if (res.data && res.data.industry) {
+            this.projectDetailFilters.industryMap = res.data.industry
+          }
           // 本周新增招标项目数量
           if (res.data.zhao_matchitem && res.data.zhao_matchitem.length > 0) {
             this.newDrawCount.show = true