瀏覽代碼

修改为go mod

wangchuanjin 2 年之前
父節點
當前提交
d5161d8cc4
共有 21 個文件被更改,包括 1376 次插入63 次删除
  1. 4 0
      src/jfw/front/swordfish.go
  2. 1 1
      src/jfw/modules/app/src/app/front/bigMember.go
  3. 5 0
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/report_analysis.js
  4. 83 6
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/report_detail_month.js
  5. 二進制
      src/jfw/modules/app/src/web/staticres/jyapp/pdfjs/.DS_Store
  6. 二進制
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/.DS_Store
  7. 5 2
      src/jfw/modules/app/src/web/templates/big-member/page_report_analysis.html
  8. 28 10
      src/jfw/modules/app/src/web/templates/big-member/page_report_detail_month.html
  9. 501 0
      src/jfw/modules/app/src/web/templates/big-member/page_report_table.html
  10. 6 6
      src/jfw/modules/bigmember/src/config.json
  11. 5 1
      src/jfw/modules/bigmember/src/entity/marketAnalysis/customizad_distribution.go
  12. 71 13
      src/jfw/modules/bigmember/src/entity/marketAnalysis/customized_analysis.go
  13. 79 5
      src/web/staticres/big-member/js/report_detail_month.js
  14. 16 0
      src/web/staticres/common-module/collection/css/index.css
  15. 二進制
      src/web/staticres/common-module/collection/image/icon.png
  16. 11 4
      src/web/staticres/common-module/report-analysis/js/echarts_option.js
  17. 37 4
      src/web/staticres/common-module/report-analysis/js/report_analysis.js
  18. 4 1
      src/web/templates/big-member/wx/page_report_analysis.html
  19. 27 9
      src/web/templates/big-member/wx/page_report_detail_month.html
  20. 492 0
      src/web/templates/big-member/wx/page_report_table.html
  21. 1 1
      src/web/templates/pc/dataExport_sieve.html

+ 4 - 0
src/jfw/front/swordfish.go

@@ -672,10 +672,14 @@ func pcVRT(sid, industry, content string, isPayUser bool) (po, bo, wo []map[stri
 			projectCode, _ := obj["projectcode"].(string)
 			if projectName != "" || projectCode != "" {
 				if projectName != "" && projectCode != "" {
+					projectName = strings.ReplaceAll(projectName, "\"", "###剑鱼###")
+					projectCode = strings.ReplaceAll(projectCode, "\"", "###剑鱼###")
 					queryStr = `{"$or":[{"TERM_projectname":"` + projectName + `"},{"TERM_projectcode":"` + projectCode + `"}]}`
 				} else if projectName != "" && projectCode == "" {
+					projectName = strings.ReplaceAll(projectName, "\"", "###剑鱼###")
 					queryStr = `{"TERM_projectname":"` + projectName + `"}`
 				} else if projectName == "" && projectCode != "" {
+					projectCode = strings.ReplaceAll(projectCode, "\"", "###剑鱼###")
 					queryStr = `{"TERM_projectcode":"` + projectCode + `"}`
 				}
 				projectOther = bidDataConvert(sid, commonQuery(queryStr))

+ 1 - 1
src/jfw/modules/app/src/app/front/bigMember.go

@@ -13,7 +13,7 @@ type NewBigMemberAction struct {
 	powerClear     xweb.Mapper `xweb:"/jyapp/bigMember/powerClear"` //大会员清除redis 服务id缓存
 }
 
-var freePageReg = regexp.MustCompile(`full|landingPage|pro_follow_detail|buy_commit|push_setting_detail|land_setting|push_settings|contrast|orderdetail_.*|write_infor|init|set_.*|ontrial_commit|bid_.*|free_.*|ent_portrait|bigvip_subreport_.*|report_detail_.*|analysis_(search|filter)|client_*|pro_follow_list|report_analysis`)
+var freePageReg = regexp.MustCompile(`full|landingPage|pro_follow_detail|buy_commit|push_setting_detail|land_setting|push_settings|contrast|orderdetail_.*|write_infor|init|set_.*|ontrial_commit|bid_.*|free_.*|ent_portrait|bigvip_subreport_.*|report_detail_.*|analysis_(search|filter)|client_*|pro_follow_list|report_analysis|report_table`)
 
 func init() {
 	jy.InitBigVipService(public.Mysql)

+ 5 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/report_analysis.js

@@ -315,6 +315,7 @@ var vm = new Vue({
         if (this.rid) {
           this.getReportResult()
         }
+        
       } else {
         this.$nextTick(this.calcOffsetTop)
         if (utils.isIos) {
@@ -326,6 +327,10 @@ var vm = new Vue({
     utils.iosBackRefresh()
   },
   methods: {
+    gotable () {
+      this.saveState()
+      window.location.href='/jyapp/big/page/report_table?source=analysis'+'&flag=3'+'&rid='+this.rid+'&header=客户类型分布详情'
+    },
     showLoading: function () {
       return this.$toast.loading({
         duration: 0,

+ 83 - 6
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/report_detail_month.js

@@ -5,6 +5,7 @@ var vNode = {
       monthReportExample: monthReportExample,
     },
     data: {
+        scrollTop:0,
         barChart: barChart,
         keywords:'',
         keyTip: '',
@@ -162,8 +163,57 @@ var vNode = {
         if (this.$refs['chartRegCount']) {
           this.$refs['chartRegCount'].echarts.resize()
         }
+        setTimeout(() => {
+            this.reStoreState()
+        
+        }, 500);
+        utils.iosBackRefresh()
     },
     methods: {
+      saveScrollTop: function () {
+        var wrapper = document.querySelector('.j-container .j-main')
+        if (wrapper.scrollTop) {
+          this.scrollTop = parseInt(wrapper.scrollTop)
+        }
+        var $data = {
+          scrollTop: this.scrollTop, 
+        }
+        sessionStorage.setItem('$data_month', JSON.stringify($data))
+      },
+      reStoreState: function () {
+        var $data = sessionStorage.getItem('$data_month')
+        if ($data) {
+          $data = JSON.parse($data)
+          this.scrollTop = $data.scrollTop
+        
+          setTimeout(function () {
+            // 恢复滚动高度
+            this.setScrollTop(this.scrollTop)
+          }.bind(this), 0)
+  
+          sessionStorage.removeItem('$data_month')
+        } 
+  
+      },
+      setScrollTop: function (scrollTop) {
+        this.$nextTick(function () {
+          var wrapper = document.querySelector('.j-container .j-main')
+          wrapper.scrollTop = scrollTop
+        })
+      },
+        goTable (type) {
+          this.saveScrollTop()
+          if(type =='curMonthCountTop'){ // 本月项目数量采购行业排行榜
+            window.location.href='/jyapp/big/page/report_table?source=curMonthCountTop&type='+utils.getParam("type")+'&start='+utils.getParam('start')+'&end='+utils.getParam('end')+'&header=本月项目数量采购行业排行榜'
+            
+          } else if (type == 'curMonthScaleTop'){ // 本月项目规模采购行业排行榜
+            window.location.href='/jyapp/big/page/report_table?source=curMonthScaleTop&type='+utils.getParam("type")+'&start='+utils.getParam('start')+'&end='+utils.getParam('end')+'&header=本月项目规模采购行业排行榜'
+
+          } else if (type == 'averageScaleTop'){ // 本月项目平均规模采购行业排行榜
+            window.location.href='/jyapp/big/page/report_table?source=averageScaleTop&type='+utils.getParam("type")+'&start='+utils.getParam('start')+'&end='+utils.getParam('end')+'&header=本月项目平均规模采购行业排行榜'
+          } 
+
+        },
         goCollect: function(source) {
           location.href = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + source
         },
@@ -398,24 +448,51 @@ var vNode = {
 
                         // 本月项目数量TOP10采购行业 7
                         if(res.data.project_buyerclass_count && res.data.project_buyerclass_count.length > 0) {
-                            that.curMonthCountTop.list = that.formatterWinData(res.data.project_buyerclass_count,'count')
-                            that.isShow.show_7 = true;
+                            // that.curMonthCountTop.list = that.formatterWinData(res.data.project_buyerclass_count,'count')
+                            
+                            var pro_count_list = res.data.project_buyerclass_count.filter(function (item, index) {
+                              return (item['buyerclass'] != '其它' && item['count']!=0)
+                             })
+                             if(pro_count_list && pro_count_list.length > 0){
+                              that.isShow.show_7 = true;
+                            } else {
+                              that.isShow.show_7 = false
+                            }
+                            that.curMonthCountTop.list = that.formatterWinData(pro_count_list,'count')
                         } else {
                             that.isShow.show_7 = false;
                         }
                         // 本月项目规模TOP10采购行业 8
                         if(res.data.project_buyerclass_bidamount && res.data.project_buyerclass_bidamount.length > 0) {
+                            // var data = res.data.project_buyerclass_bidamount;
+                            // that.curMonthScaleTop.list = that.formatterWinData(data,'scale')
                             var data = res.data.project_buyerclass_bidamount;
-                            that.curMonthScaleTop.list = that.formatterWinData(data,'scale')
-                            that.isShow.show_8 = true;
+                            var pro_bidamount_list = data.filter(function (item, index) {
+                              return (item['buyerclass'] != '其它' && item['bidamount']!=0) 
+                             })
+                             if (pro_bidamount_list && pro_bidamount_list.length >0 ) {
+                              that.isShow.show_8 = true;
+                             } else {
+                              that.isShow.show_8 = false
+                             }
+                            that.curMonthScaleTop.list = that.formatterWinData(pro_bidamount_list,'scale')
                         } else {
                             that.isShow.show_8 = false;
                         }
                         // 本月项目平均规模TOP10采购行业 9
                         if(res.data.project_buyerclass_average_bidamount && res.data.project_buyerclass_average_bidamount.length > 0) {
+                            // var d = res.data.project_buyerclass_average_bidamount;
+                            // that.averageScaleTop.list = that.formatterWinData(d,'average')
                             var d = res.data.project_buyerclass_average_bidamount;
-                            that.averageScaleTop.list = that.formatterWinData(d,'average')
-                            that.isShow.show_9 = true;
+                            var pro_average_list = d.filter(function (item, index) {
+                              return (item['buyerclass'] != '其它' && item['average']!=0)
+                             })
+                             if (pro_average_list && pro_average_list.length > 0) {
+                              that.isShow.show_9 = true;
+                             } else {
+                              that.isShow.show_9 = false
+                             }
+                            that.averageScaleTop.list = that.formatterWinData(pro_average_list,'average')
                         } else {
                             that.isShow.show_9 = false;
                         }

二進制
src/jfw/modules/app/src/web/staticres/jyapp/pdfjs/.DS_Store


二進制
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/.DS_Store


+ 5 - 2
src/jfw/modules/app/src/web/templates/big-member/page_report_analysis.html

@@ -294,7 +294,10 @@
                         </div>
                         <!-- 客户分布 -->
                         <div class="section bg-white pd-16 user-scatter" v-if="sections.userScatter.list.length">
-                            <div class="section-title">客户分布</div>
+                           <div class="clearfix">
+                            <div class="section-title fl_">客户分布</div>
+                            <div class="detail-btn" @click="gotable">查看详情<img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/icon.png?v={{Msg "seo" "version"}}" alt=""></div>
+                           </div>
                             <div class="section-content">
                                 <market-user-scatter :chart-data="sections.userScatter.list"></market-user-scatter>
                             </div>
@@ -560,7 +563,7 @@
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/report-analysis/js/components/marketSegment.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/report-analysis/js/components/lineChartScatter.js?v={{Msg "seo" "version"}}'></script>
 <!-- main.js -->
-<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/report-analysis/js/report_analysis.js?v={{Msg "seo" "version"}}12'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/report-analysis/js/report_analysis.js?v={{Msg "seo" "version"}}13'></script>
 
 </body>
 </html>

+ 28 - 10
src/jfw/modules/app/src/web/templates/big-member/page_report_detail_month.html

@@ -75,6 +75,12 @@
           color: #C0C4CC;
           line-height: 0.4rem;
       }
+      .warm_{
+        font-size: 0.24rem;
+        line-height: 0.36rem;
+        color: #9B9CA3;
+        margin-top: -0.1rem;
+      }
     </style>
 </head>
 <body>
@@ -196,8 +202,10 @@
             <div v-if="!getStatus" @click="goCollect('month_project_area_bidamount')" class="mark-words">全面分析各省市场容量,帮助拓展渠道和市场!<em class="mark-icon-right"></em></div>
         </div>
         <!-- 本月项目数量TOP10采购行业 7-->
-        <div class="chart rank" v-if="isShow.show_7 && getStatus">
-            <div class="chart_title">本月项目数量TOP10采购行业</div>
+        <div class="chart rank" v-if="isShow.show_7 && getStatus"> 
+            <!-- <div class="chart_title">本月项目数量TOP10采购行业</div> -->
+            <div class="chart_title">本月项目数量采购行业排行榜</div>
+            <div class="warm_">注:采购行业为“其它”不参与排名</div>
             <div class="progress-bar-container">
                 <div class="progress-bar-item" v-for="(item,index) in showCurMonthCountTop" :key="index">
                     <div class="item-label">
@@ -211,19 +219,23 @@
             </div>
             <div v-if="curMonthCountTop.list.length > 5 && !curMonthCountTop.showAll">
                 <div class="more">
-                    <span @click="curMonthCountTop.showAll = true">查看更多</span>
+                    <!-- <span @click="curMonthCountTop.showAll = true">查看更多</span> -->
+                    <span @click="goTable('curMonthCountTop')">查看全部</span>
                 </div>
             </div>
         </div>
         <div v-if="!getStatus" >
-          <p class="example-title">本月项目数量TOP10采购行业</p>
+          <!-- <p class="example-title">本月项目数量TOP10采购行业</p> -->
+          <p class="example-title">本月项目数量采购行业排行榜</p>
           <div class="vip_component" style="height:9.92rem;background:url('/common-module/collection/image/report/1.png') no-repeat;background-size:100% 100%">
             <month-report-example :status="bigStatus" :power="power" type="item_1" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/report/1-1.png'></month-report-example>
           </div>
         </div>
         <!-- 本月项目规模TOP10采购行业 8-->
         <div class="chart rank" v-if="isShow.show_8  && getStatus">
-            <div class="chart_title">本月项目规模TOP10采购行业</div>
+            <!-- <div class="chart_title">本月项目规模TOP10采购行业</div> -->
+            <div class="chart_title">本月项目规模采购行业排行榜</div>
+            <div class="warm_">注:采购行业为“其它”不参与排名</div>
             <div class="progress-bar-container">
                 <div class="progress-bar-item" v-for="(item,index) in showCurMonthScaleTop" :key="index">
                     <div class="item-label">
@@ -237,19 +249,23 @@
             </div>
             <div v-if="curMonthScaleTop.list.length > 5 && !curMonthScaleTop.showAll">
                 <div class="more">
-                    <span @click="curMonthScaleTop.showAll = true">查看更多</span>
+                    <!-- <span @click="curMonthScaleTop.showAll = true">查看更多</span> -->
+                    <span @click="goTable('curMonthScaleTop')">查看全部</span>
                 </div>
             </div>
         </div>
         <div v-if="!getStatus">
-          <p class="example-title">本月项目规模TOP10采购行业</p>
+          <!-- <p class="example-title">本月项目规模TOP10采购行业</p> -->
+          <p class="example-title">本月项目规模采购行业排行榜</p>
           <div class="vip_component" style="height:9.92rem;background:url('/common-module/collection/image/report/2.png') no-repeat;background-size:100% 100%">
             <month-report-example :status="bigStatus" :power="power" type="item_2" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/report/2-1.png'></month-report-example>
           </div>
         </div>
         <!-- 本月项目平均规模TOP10采购行业 9-->
         <div class="chart rank" v-if="isShow.show_9  && getStatus">
-            <div class="chart_title">本月项目平均规模TOP10采购行业</div>
+            <!-- <div class="chart_title">本月项目平均规模TOP10采购行业</div> -->
+            <div class="chart_title">本月项目平均规模采购行业排行榜</div>
+            <div class="warm_">注:采购行业为“其它”不参与排名</div>
             <div class="progress-bar-container">
                 <div class="progress-bar-item" v-for="(item,index) in showAverageScaleTop" :key="index">
                     <div class="item-label">
@@ -263,12 +279,14 @@
             </div>
             <div v-if="averageScaleTop.list.length > 5 && !averageScaleTop.showAll">
                 <div class="more">
-                    <span @click="averageScaleTop.showAll = true">查看更多</span>
+                    <!-- <span @click="averageScaleTop.showAll = true">查看更多</span> -->
+                    <span @click="goTable('averageScaleTop')">查看全部</span>
                 </div>
             </div>
         </div>
         <div v-if="!getStatus">
-          <p class="example-title">本月项目平均规模TOP10采购行业</p>
+          <!-- <p class="example-title">本月项目平均规模TOP10采购行业</p> -->
+          <p class="example-title">本月项目平均规模采购行业排行榜</p>
           <div class="vip_component" style="height:9.92rem;background:url('/common-module/collection/image/report/3.png') no-repeat;background-size:100% 100%">
             <month-report-example :status="bigStatus" :power="power" type="item_3" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/report/3-1.png'></month-report-example>
           </div>

+ 501 - 0
src/jfw/modules/app/src/web/templates/big-member/page_report_table.html

@@ -0,0 +1,501 @@
+<!DOCTYPE html>
+<html lang="zh-CN" style="font-size: 50px;">
+<head>
+    <title>本月项目数量采购行业排行榜</title>
+
+    <!--引入公共资源头部-->
+    {{include "/big-member/meta.html"}}
+
+    <!--S-当前页必定需要预加载的资源-->
+    <link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+    <link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+    <link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+    <!--E-当前页必定需要预加载的资源-->
+
+    <!--S-当前页面的css资源-->
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+    <!--E-当前页面的css资源-->
+    <style>
+      .j-container{
+        background-color: #fff;
+      }
+      .table_{
+        width: 7rem;
+        border: 0.02rem solid #E5E5E5;
+        margin: 0 auto;
+        /* margin-top: 0.32rem; */
+        margin-bottom: 0;
+
+      }
+      .ml-24{
+        margin-left: 0.24rem;
+
+      }
+      .fix_{
+        position: fixed;
+        left: 50%;
+        transform: translateX(-50%);
+        top: calc(21.2vw);
+        padding-top: 0.32rem;
+        background-color: #fff;  
+
+      }
+      .fix_analysis{
+        position: fixed;
+        top: calc(21.2vw);
+        padding-top: 0.32rem;
+        background-color: #fff;  
+
+      }
+      .fix_analysis .table_analysis{
+        margin-left: 0.24rem;
+        margin-top: 0.24rem;
+      }
+      .fix_analysis .sort_box{
+        margin-top: 0 !important;
+      }
+      .table_ th{
+        border: 0.02rem solid #E5E5E5;
+        height: 0.88rem;
+        background: #F5F6F7;
+       color: #9B9CA3;
+       font-size: 0.26rem;
+       line-height: 0.4rem;
+       display: table-cell;
+       vertical-align: middle;
+
+      }
+     
+      .table_ tr{
+        height: 0.88rem;
+      }
+      .table_ td{
+        border: 0.02rem solid #E5E5E5;
+        height: 0.88rem;
+       color: #171826;
+       font-size: 0.28rem;
+       line-height: 0.4rem;
+       text-align: center;
+       display: table-cell;
+       vertical-align: middle;
+       word-break: break-all;
+      
+      }
+      .table_analysis{
+        width: 7rem;
+        border: 0.02rem solid #E5E5E5;
+        margin-left: 0.24rem;
+        margin-top: 0.24rem;
+        margin-bottom: 0;
+
+      }
+      .table_analysis th{
+        border: 0.02rem solid #E5E5E5;
+        height: 0.88rem;
+        background: #F5F6F7;
+       color: #9B9CA3;
+       font-size: 0.26rem;
+       line-height: 0.4rem;
+       display: table-cell;
+       vertical-align: middle;
+
+      }
+      .table_analysis td{
+        border: 0.02rem solid #E5E5E5;
+        height: 0.88rem;
+       color: #171826;
+       font-size: 0.28rem;
+       line-height: 0.4rem;
+       text-align: center;
+       display: table-cell;
+       vertical-align: middle;
+       word-break: break-all;
+      
+      }
+      .table_analysis tr{
+        height: 0.88rem;
+      }
+      .sort{
+        width: 1.04rem;
+      }
+      .long{
+        width: 3.28rem;
+      }
+      .sort_{
+        width: 1.02rem;
+      }
+      .long_{
+        width: 2.4rem;
+      }
+      .middle{
+        width: 1.92rem;
+      }
+      .t_right{
+        text-align: right !important;
+        box-sizing: border-box;
+        padding:  0 0.2rem;
+      }
+      .otners{
+        font-size: 0.26rem;
+        line-height: 0.4rem;
+        color: #9B9CA3;
+        margin-left: 0.24rem;
+        margin-top: 0.32rem;
+        margin-bottom: 0.32rem;
+      }
+      .box{
+        padding-top: 1.19rem;
+       
+      }
+      .box_analysis{
+        padding-top: 1.59rem;
+      }
+      .others{
+        font-size: 0.26rem;
+        line-height: 0.4rem;
+        color: #9B9CA3;
+        margin-left: 0.24rem;
+        margin-top: 0.32rem;
+     
+      }
+      
+      .clearfix > .left{
+        float: left;
+        margin-left: 0.24rem;
+        color: #5F5E64;
+        font-size: 0.26rem;
+        line-height: 0.44rem;
+        margin-bottom: 0.32rem;
+
+      }
+      .clearfix > .right{
+        float: left;
+        margin-left: 0.24rem;
+        color: #5F5E64;
+        font-size: 0.26rem;
+        line-height: 0.44rem;
+        margin-left: 0.32rem;
+
+      }
+      .sort_box{
+        margin-top: 0.32rem;
+      }
+      .sort_box .tit{
+        color: #5F5E64;
+        font-size: 0.28rem;
+        line-height: 0.4rem;
+        float: left;
+        margin-left: 0.24rem;
+        margin-right: 0.16rem;
+      }
+      .sort_box .btn{
+        color: #5F5E64;
+        line-height: 0.4rem;
+        font-size: 0.28rem;
+        float: left;
+        margin-right: 0.32rem;
+
+      }
+      .active{
+        color: #2ABED1 !important;
+      }
+      
+    </style>
+</head>
+<body>
+<div class="j-container">
+    {{include "/big-member/header.html"}}
+    <div id="report_table" class="j-main" v-cloak>
+      <div v-if = "parm=='analysis'" class="box_analysis">
+        <div class="fix_analysis">
+          <div class="sort_box clearfix">
+            <div class="tit">排序:</div>
+            <div class="btn" v-for="(item,index) in tabs" :class="{'active': index==tab}" @click="sort_click(index)">${item}</div>
+          </div>
+          <table class="table_analysis">
+            <thead>
+              <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==3 ,'middle':index==2||index==1}" v-html="item"></th></tr>
+            </thead>
+          </table>
+        </div>
+        <!-- <div class="sort_box clearfix">
+          <div class="tit">排序:</div>
+          <div class="btn" v-for="(item,index) in tabs" :class="{'active': index==tab}" @click="sort_click(index)">${item}</div>
+        </div> -->
+        <table class="table_analysis">
+          <!-- <thead>
+            <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==3 ,'middle':index==2||index==1}" v-html="item"></th></tr>
+          </thead> -->
+           <tbody>
+            <tr v-for="(item,index) in data_list" >
+            <td class="sort_">${index + 1}</td>
+            <td class="middle">${item.buyclass}</td>
+            <td class="t_right middle">${item.total}</td>
+            <td class="t_right long_">${item.amount}</td>
+          </tr>
+           </tbody>
+        </table>
+        <div class="others" v-if="analysis_num&&analysis_price">客户类型为“其它”:</div>
+        <div class="clearfix" v-if="analysis_num&&analysis_price">
+          <div class="left">项目数量:${analysis_num}个</div>
+          <div class="right">项目金额:${analysis_price}万元</div>
+        </div>
+      </div>
+      <div class="box" v-else>
+        <div class="fix_">
+          <table class="table_ ">
+          <thead>
+            <tr><th v-for="(item,index) in head_list" :class="{'sort': index==0,'long': index==1 || index==2}" v-html="item"></th></tr>
+          </thead>
+        </table>
+        </div>
+        <table class="table_ ">
+          <!-- <thead>
+            <tr><th v-for="(item,index) in head_list" :class="{'sort': index==0,'long': index==1 || index==2}" v-html="item"></th></tr>
+          </thead> -->
+            <tbody>
+            <tr v-for="(item,index) in data_list" >
+            <td class="sort">${index + 1}</td>
+            <td class="long">${item.buyerclass}</td>
+            <td class="t_right long">${item.value}</td>
+            </tr>
+           </tbody>
+        </table>
+        <div class="otners" v-if="parm=='curMonthCountTop' && num">采购行业为“其它”的项目数量:${num}个</div>
+        <div class="otners" v-if="parm=='curMonthScaleTop' && num">采购行业为“其它”的项目金额:${num}万元</div>
+        <div class="otners" v-if="parm=='averageScaleTop' && num">采购行业为“其它”的项目平均金额:${num}万元</div>
+      </div>
+    </div>
+</div>
+
+<!--S-必定需要预加载的资源-->
+<link rel="preload" as="script" href=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js />
+<link rel="preload" as="script" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js />
+<link rel="preload" as="script" href=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js />
+<!--E-必定需要预加载的资源-->
+
+<!--S-当前页面的资源-->
+<script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js></script>
+{{include "/big-member/commonjs.html"}}
+<script>
+  var vNode_ = {
+    delimiters: ['${', '}'],
+    el: '#report_table',
+    components: {
+      
+    },
+    data: {
+      tab:0,
+      tabs:['项目数量由高到低','项目金额由高到低'],
+      head_list:['排名','采购行业','项目数量(个)'],
+      data_list:[],
+      parm:'',
+      num:'',
+      analysis_num:'',
+      analysis_price:'',
+      rid:''
+  
+    },
+    computed: {
+        
+    },
+    created () {
+      this.parm = utils.getParam('source')
+      this.rid=utils.getParam('rid')
+      if (this.parm=='curMonthCountTop'){ //数量排行
+        this.head_list=['排名','采购行业','项目数量(个)'];
+        document.title='本月项目数量采购行业排行榜'
+
+      }else if(this.parm=='curMonthScaleTop'){ //规模排行
+        this.head_list=['排名','采购行业','项目金额(万元)'];
+        document.title='本月项目规模采购行业排行榜'
+
+      }else if(this.parm=='averageScaleTop'){ //平均规模排行
+        this.head_list=['排名','采购行业','项目平均金额'+'<br>'+'(万元)'];
+        document.title='本月项目平均规模采购行业排行榜'
+
+      }else if(this.parm=='analysis'){ //定制化客户分布
+        this.head_list=['序号','客户类型','项目数量'+'<br>'+'(个)','项目金额'+'<br>'+'(万元)'];
+        document.title='客户类型分布详情'
+
+      }
+      if(this.parm=='analysis'){
+        this.analysis_data()
+
+      }else{
+        this.monthdata()
+      }
+        
+    },
+    mounted() {
+      
+    },
+    methods: {
+      sort_click (index) {
+        if (index == this.tab){
+          return
+        }
+        this.tab=index
+        if(this.tab==0){//数量排序
+          let data_=this.data_list.sort(function(a,b){return b.total-a.total});
+          this.data_list=data_
+
+        }else{ //金额排序
+          let data_=this.data_list.sort(function(a,b){return b.amount-a.amount});
+          this.data_list=data_
+
+        }
+
+      },
+      analysis_data (){
+        let this_=this
+       let res= JSON.parse(sessionStorage.getItem('getAnalysisResult_'))
+       if (res && res.error_code === 0 && res.data) {
+            let data_ = res.data.customer_scale
+            data_.forEach(ele => {
+              if(ele.amount){
+                ele.amount=(ele.amount / 10000).toFixed(2)
+              } 
+            });
+            data_.sort(function(a,b){return b.total-a.total});
+            let newarr = data_.filter(function (item, index) {
+              return !(item['amount'] ==0 && item['total'] ==0 )
+            })
+            this_.data_list=newarr
+            if(res.data.customer_scale_other){
+              this_.analysis_num=res.data.customer_scale_other.total
+              this_.analysis_price=(res.data.customer_scale_other.amount / 10000).toFixed(2)
+            }
+          } else {
+            // this.$toast('请求失败')
+          }
+      //   $.ajax({
+      //   type: 'POST',
+      //   url: '/bigmember/marketAnalysis/getAnalysisResult',
+      //   data: {
+      //     flag:3,
+      //     rid: this_.rid,
+      //   },
+      //   success: function (res) {
+      //     if (res && res.error_code === 0 && res.data) {
+      //       let data_ = res.data.customer_scale
+      //       data_.forEach(ele => {
+      //         if(ele.amount){
+      //           ele.amount=utils.formatMoney(ele.amount / 10000, undefined, true)
+      //         } 
+      //       });
+      //       data_.sort(function(a,b){return b.total-a.total});
+      //       let newarr = data_.filter(function (item, index) {
+      //         return !(item['amount'] ==0 && item['total'] ==0 )
+      //       })
+      //       this_.data_list=newarr
+      //       if(res.data.customer_scale_other){
+      //         this_.analysis_num=res.data.customer_scale_other.total
+      //         this_.analysis_price=utils.formatMoney(res.data.customer_scale_other.amount / 10000, undefined, true)
+      //       }
+      //     } else {
+      //       // this.$toast('请求失败')
+      //     }
+      //   }
+      // })
+      },
+      monthdata(){
+        var that = this
+            $.ajax({
+                type:'POST',
+                url:'/bigmember/report/detail',
+                data:{
+                    start: utils.getParam('start'),
+                    end: utils.getParam('end'),
+                    type: utils.getParam('type')
+                },
+                success:function(res) {
+                    // console.log(res)
+                    if(res.error_code == 0 && res.data) {
+                      console.log(that.parm)
+                       if(that.parm=='curMonthCountTop'){ //数量
+                        let others=[]
+                        let data_ =res.data.project_buyerclass_count
+                        // data_.push({buyerclass:'其它',count:12})
+                        data_.forEach(ele => {
+                          if(ele.count){
+                            ele.value=ele.count 
+                          }
+                          if(ele.buyerclass=='其它'){
+                            others.push(ele)
+                          }
+                        });
+
+                        let newarr = data_.filter(function (item, index) {
+                              return (item['buyerclass'] != '其它' && item['count']!=0)
+                        })
+                        that.data_list=newarr
+                        
+                        if(others.length!=0){
+                          that.num=others[0].count
+                        }
+                        
+                       }else if(that.parm=='curMonthScaleTop'){ //规模排行
+                        let data_ =res.data.project_buyerclass_bidamount
+                        let others=[]
+                        // data_.push({buyerclass:'其它',bidamount:12})
+                        data_.forEach(ele => {
+                          if(ele.bidamount){
+                            ele.value=ele.bidamount.toFixed(2) 
+                          }
+                          if(ele.buyerclass=='其它'){
+                            others.push(ele)
+                          }
+                        });
+                        let newarr = data_.filter(function (item, index) {
+                              return (item['buyerclass'] != '其它' && item['bidamount']!=0)
+                        })
+                        console.log(newarr)
+                        that.data_list=newarr
+                        if(others.length!=0){
+                          that.num=others[0].bidamount
+                        }
+                       }else if(that.parm=='averageScaleTop'){ //平均规模排行
+                        let data_ =res.data.project_buyerclass_average_bidamount
+                        let others=[]
+                        // data_.push({buyerclass:'其它',average:12})
+                        data_.forEach(ele => {
+                          if(ele.average){
+                            ele.value=ele.average.toFixed(2) 
+
+                          }
+                          if(ele.buyerclass=='其它'){
+                            others.push(ele)
+                          }
+                        });
+                        let newarr = data_.filter(function (item, index) { 
+                              return (item['buyerclass'] != '其它' && item['average']!=0)
+                        })
+                        that.data_list=newarr
+                        if(others.length!=0){
+                          that.num=others[0].average
+                        }
+                       }    
+
+                    }else{
+                        console.log("未获取到数据")
+                    }
+                },
+                error:function(err) {
+                    console.log(err)
+                }
+            })
+
+      }
+  
+    }
+}
+var vueComponent = new Vue(vNode_)
+
+</script>
+</body>
+</html>

File diff suppressed because it is too large
+ 6 - 6
src/jfw/modules/bigmember/src/config.json


+ 5 - 1
src/jfw/modules/bigmember/src/entity/marketAnalysis/customizad_distribution.go

@@ -5,6 +5,7 @@ import (
 	"fmt"
 	"jy/src/jfw/modules/bigmember/src/config"
 	"jy/src/jfw/modules/bigmember/src/util"
+	"log"
 	"math"
 	"strings"
 	"sync"
@@ -601,11 +602,13 @@ func (mae *MarketAnalysisEntity) BuyerWinnerAnalysis() map[string]interface{} {
 	//中标单位-项目数量 中标单位-项目金额
 	datas = append(datas, winner_procurement_scale, winner_count, winner_sortprice)
 	finalSql := fmt.Sprintf(mae.GetCommonQuerySqlWithAggs(), strings.Join(datas, ","))
-	//log.Printf("final PurchasingAnalysiseQuery sql: %s", finalSql)
+	log.Printf("final PurchasingAnalysiseQuery sql: %s", finalSql)
+	t := time.Now()
 	res, _ := util.GetAggs("projectset", "projectset", finalSql)
 	if res == nil || len(res) == 0 {
 		return nil
 	}
+	log.Println("采购单位-中标单位分析报告es查询耗时===", time.Since(t))
 	var thisBuyerWinnerRow BuyerWinnerRow
 	for name, object := range res {
 		bArr, err := object.MarshalJSON()
@@ -671,6 +674,7 @@ func (mae *MarketAnalysisEntity) BuyerWinnerAnalysis() map[string]interface{} {
 	go BuyerAnalysis(thisBuyerWinnerRow, &rMap, winnerName, &sy)
 	go WinningAnalysis(thisBuyerWinnerRow, &rMap, winnerName, &sy)
 	sy.Wait()
+	log.Println("采购单位-中标单位分析报告程序计算耗时===", time.Since(t))
 	rMaps := make(map[string]interface{})
 	rMap.Range(func(key, value interface{}) bool {
 		rMaps[qutil.InterfaceToStr(key)] = value

+ 71 - 13
src/jfw/modules/bigmember/src/entity/marketAnalysis/customized_analysis.go

@@ -15,7 +15,8 @@ const (
 	query_top10                = `,"sort": [{"sortprice": "desc"}],"from": 0,"size": 10`
 	aggs_area_amounttop3       = `"area_amount_top3":{"terms":{"field":"area","exclude":["全国"],"order":[{"area_amount":"desc"}],"size":3},"aggs":{"area_amount":{"sum":{"field":"sortprice"}},"winner_top":{"terms":{"field":"entidlist","exclude": ["-"],"order":[{"area_winner_amount":"desc"}],"size":3},"aggs":{"area_winner_amount":{"sum":{"field":"sortprice"}}}}}}`
 	aggs_area_counttop3        = `"area_count_top3":{"terms":{"field":"area","exclude":["全国"],"order":[{"area_count":"desc"}],"size":3},"aggs":{"area_count":{"filter":{}},"winner_top":{"terms":{"field":"entidlist","exclude": ["-"],"order":[{"area_winner_count":"desc"}],"size":3},"aggs":{"area_winner_count":{"filter":{}}}}}}`
-	aggs_buyerclass            = `"buyerclass_scale":{"terms":{"field":"buyerclass","exclude":["其它",""]},"aggs":{"buyerclass_amount":{"sum":{"field":"sortprice"}},"buyerclass_total":{"filter":{}}}}`
+	aggs_buyerclass            = `"buyerclass_scale":{"terms":{"field":"buyerclass","size":0,"exclude":["其它",""]},"aggs":{"buyerclass_amount":{"sum":{"field":"sortprice"}},"buyerclass_total":{"filter":{}}}}`
+	aggs_buyerclass_other      = `"buyerclass_scale_other":{"terms":{"field":"buyerclass","include":["其它",""]},"aggs":{"buyerclass_amount":{"sum":{"field":"sortprice"}},"buyerclass_total":{"filter":{}}}}`
 	aggs_buyerclass_counttop3  = `"buyerclass_count_top3":{"terms":{"field":"buyerclass","exclude":["其它",""],"order":[{"buyerclass_count":"desc"}],"size":3},"aggs":{"buyerclass_count":{"filter":{}},"bidcount_top":{"terms":{"field":"entidlist","exclude": ["-"],"order":[{"buyer_winner_count":"desc"}],"size":3},"aggs":{"buyer_winner_count":{"filter":{}}}}}}`
 	aggs_buyerclass_amounttop3 = `"buyerclass_amount_top3":{"terms":{"field":"buyerclass","exclude":["其它",""],"order":[{"buyerclass_amount":"desc"}],"size":3},"aggs":{"buyerclass_amount":{"sum":{"field":"sortprice"}},"winner_top":{"terms":{"field":"entidlist","exclude": ["-"],"order":[{"buyer_winner_amount":"desc"}],"size":3},"aggs":{"buyer_winner_amount":{"sum":{"field":"sortprice"}}}}}}`
 	sortprice_str              = `{"key":"<10万","from":0.0000000000001,"to":100000},{"key":"10万-50万","from":100000,"to":500000},{"key":"50万-100万","from":500000,"to":1000000},{"key":"100万-500万","from":1000000,"to":5000000},{"key":"500万-1000万","from":5000000,"to":10000000},{"key":"1000万-1亿","from":10000000,"to":100000000},{"key":"≥1亿","from":100000000}`
@@ -65,6 +66,18 @@ type AreaCTop struct {
 			} `json:"buyerclass_amount"`
 		}
 	} `json:"buyerclass_scale"`
+	BuyerclassScaleOther struct {
+		Buckets []struct {
+			Area       string `json:"key"`
+			AreaTotal  int64  `json:"doc_count"`
+			AreaAmount struct {
+				Value float64 `json:"value"`
+			} `json:"area_amount"`
+			BuyclassAmount struct {
+				Value float64 `json:"value"`
+			} `json:"buyerclass_amount"`
+		}
+	} `json:"buyerclass_scale_other"`
 	AreaAmountTop3 struct {
 		Buckets []struct {
 			Key        string `json:"key"`
@@ -167,7 +180,7 @@ type AreaCTop struct {
 	} `json:"buyerclass_count_top3"`
 }
 
-//企业id查企业名 传入数组
+// 企业id查企业名 传入数组
 func IDToName(ids []string) (iMap map[string]string) {
 	iMap = map[string]string{}
 	d := strings.Join(ids, `","`)
@@ -197,7 +210,7 @@ func (mae *MarketAnalysisEntity) AllData() (rMap map[string]interface{}, err err
 		aggs = append(aggs, aggs_area, aggs_area_amounttop3, aggs_area_counttop3)
 	}
 	if len(buyclass) != 1 {
-		aggs = append(aggs, aggs_buyerclass, aggs_buyerclass_amounttop3, aggs_buyerclass_counttop3)
+		aggs = append(aggs, aggs_buyerclass, aggs_buyerclass_other, aggs_buyerclass_amounttop3, aggs_buyerclass_counttop3)
 	}
 	finalSql := fmt.Sprintf(mae.GetCommonQuerySqlWithAggs(), strings.Join(aggs, ","))
 	res, _ := util2.GetAggs("projectset", "projectset", finalSql)
@@ -218,6 +231,10 @@ func (mae *MarketAnalysisEntity) AllData() (rMap map[string]interface{}, err err
 			if json.Unmarshal(bArr, &thisRow) != nil {
 				continue
 			}
+		} else if name == "buyerclass_scale_other" {
+			if json.Unmarshal(bArr, &thisRow.BuyerclassScaleOther) != nil {
+				continue
+			}
 		} else if name == "project_count_not0" {
 			if json.Unmarshal(bArr, &thisRow.CountNot0) != nil {
 				continue
@@ -254,7 +271,8 @@ func (mae *MarketAnalysisEntity) AllData() (rMap map[string]interface{}, err err
 	}
 	data := ProjectScale(thisRow)
 	area_data := AreaDistribute(thisRow)
-	customer_data := CustomerDistribute(thisRow)
+	customerData, customerOther := CustomerDistribute(thisRow)
+	//customerOther, customerData := CustomerDistributeDetails(thisRow, customerDetails)
 	var ids []string
 	for _, v := range thisRow.AreaAmountTop3.Buckets {
 		for _, va := range v.WinnerTop.Buckets {
@@ -279,7 +297,8 @@ func (mae *MarketAnalysisEntity) AllData() (rMap map[string]interface{}, err err
 	eid := IDToName(ids)
 	rMap["projectScale"] = data
 	rMap["area_infos"] = area_data
-	rMap["customer_scale"] = customer_data
+	rMap["customer_scale"] = customerData
+	rMap["customer_scale_other"] = customerOther //客户分布(其它)
 	rMap["scaleAreaAmountTop"] = AmountCompute(thisRow, "area", eid)
 	rMap["scaleBuyclassAmountTop"] = AmountCompute(thisRow, "buyclass", eid)
 	rMap["scaleAreaCountTop"] = CountCompute(thisRow, "area", eid)
@@ -287,7 +306,7 @@ func (mae *MarketAnalysisEntity) AllData() (rMap map[string]interface{}, err err
 	return
 }
 
-//项目规模分布
+// 项目规模分布
 func ProjectScale(thisRow AreaCTop) (data []interface{}) {
 	ammount := thisRow.Amount.Value
 	total := thisRow.CountNot0.Count
@@ -330,7 +349,7 @@ func InterToSliceString(obj interface{}) []string {
 	return sli
 }
 
-//top10
+// top10
 func (mae *MarketAnalysisEntity) ProjectTop10() (rMap map[string]interface{}, err error) {
 	finalSql := fmt.Sprintf(mae.GetCommonQuerySql(), query_top10)
 	hits := elastic.Get("projectset", "projectset", finalSql)
@@ -380,7 +399,7 @@ func (mae *MarketAnalysisEntity) ProjectTop10() (rMap map[string]interface{}, er
 	return
 }
 
-//地区分布
+// 地区分布
 func AreaDistribute(thisRow AreaCTop) (data []map[string]interface{}) {
 	for _, v := range thisRow.AreaDistribution.Buckets {
 		rM := map[string]interface{}{}
@@ -392,19 +411,58 @@ func AreaDistribute(thisRow AreaCTop) (data []map[string]interface{}) {
 	return
 }
 
-//客户分布
-func CustomerDistribute(thisRow AreaCTop) (data []map[string]interface{}) {
+// 客户分布
+func CustomerDistribute(thisRow AreaCTop) (data []map[string]interface{}, otherData map[string]interface{}) {
+	var (
+		total  int64
+		amount float64
+	)
 	for _, v := range thisRow.BuyerclassScale.Buckets {
+		if v.AreaTotal == 0 && v.BuyclassAmount.Value == 0 {
+			continue
+		}
 		rM := map[string]interface{}{}
 		rM["buyclass"] = v.Area
 		rM["total"] = v.AreaTotal
 		rM["amount"] = v.BuyclassAmount.Value
 		data = append(data, rM)
 	}
+	for _, v := range thisRow.BuyerclassScaleOther.Buckets {
+		total += v.AreaTotal
+		amount += v.BuyclassAmount.Value
+	}
+	if total != 0 || amount != 0 {
+		otherData = make(map[string]interface{})
+		otherData["buyclass"] = "其它"
+		otherData["total"] = total
+		otherData["amount"] = amount
+	}
+	return
+}
+
+// 客户分布详情
+func CustomerDistributeDetails(thisRow AreaCTop, d []map[string]interface{}) (data map[string]interface{}, customer_data []map[string]interface{}) {
+	var (
+		total  int64
+		amount float64
+	)
+	customer_data = d
+	if len(customer_data) > 10 {
+		customer_data = d[:10]
+	}
+	for _, v := range thisRow.BuyerclassScaleOther.Buckets {
+		total += v.AreaTotal
+		amount += v.BuyclassAmount.Value
+	}
+	if total != 0 || amount != 0 {
+		data["buyclass"] = "其他"
+		data["total"] = total
+		data["amount"] = amount
+	}
 	return
 }
 
-//top3金额计算
+// top3金额计算
 func AmountCompute(thisRow AreaCTop, types string, eid map[string]string) (rData []map[string]interface{}) {
 	if types == "area" {
 		area_infos := thisRow.AreaAmountTop3
@@ -472,7 +530,7 @@ func AmountCompute(thisRow AreaCTop, types string, eid map[string]string) (rData
 	return
 }
 
-//top3数量计算
+// top3数量计算
 func CountCompute(thisRow AreaCTop, types string, eid map[string]string) (rData []map[string]interface{}) {
 	if types == "area" {
 		area_infos := thisRow.AreaCountTop3
@@ -544,7 +602,7 @@ func CountCompute(thisRow AreaCTop, types string, eid map[string]string) (rData
 	return
 }
 
-//计算公式
+// 计算公式
 func Formula(current, total float64) (result float64) {
 	if total == 0 {
 		return 0

+ 79 - 5
src/web/staticres/big-member/js/report_detail_month.js

@@ -5,6 +5,7 @@ var vNode = {
       monthReportExample: monthReportExample,
     },
     data: {
+        scrollTop:0,
         barChart: barChart,
         keywords:'',
         keyTip: '',
@@ -162,8 +163,59 @@ var vNode = {
         if (this.$refs['chartRegCount']) {
           this.$refs['chartRegCount'].echarts.resize()
         }
+        setTimeout(() => {
+          this.reStoreState()
+      
+      }, 500);
+      utils.iosBackRefresh()
     },
     methods: {
+      saveScrollTop: function () {
+        var wrapper = document.querySelector('.j-container .j-main')
+        if (wrapper.scrollTop) {
+          this.scrollTop = parseInt(wrapper.scrollTop)
+        }
+        var $data = {
+          scrollTop: this.scrollTop, 
+        }
+        sessionStorage.setItem('$data_month', JSON.stringify($data))
+      },
+      reStoreState: function () {
+        var $data = sessionStorage.getItem('$data_month')
+        if ($data) {
+          $data = JSON.parse($data)
+          this.scrollTop = $data.scrollTop
+        
+          setTimeout(function () {
+            // 恢复滚动高度
+            this.setScrollTop(this.scrollTop)
+          }.bind(this), 0)
+  
+          sessionStorage.removeItem('$data_month')
+        } 
+  
+      },
+      setScrollTop: function (scrollTop) {
+        this.$nextTick(function () {
+          var wrapper = document.querySelector('.j-container .j-main')
+          wrapper.scrollTop = scrollTop
+        })
+      },
+      goTable (type) {
+        this.saveScrollTop()
+        if(type =='curMonthCountTop'){ // 本月项目数量采购行业排行榜
+          window.location.href='/big/wx/page/report_table?source=curMonthCountTop&type='+utils.getParam("type")+'&start='+utils.getParam('start')+'&end='+utils.getParam('end')+'&header=本月项目数量采购行业排行榜'
+          
+        } else if (type == 'curMonthScaleTop'){ // 本月项目规模采购行业排行榜
+          window.location.href='/big/wx/page/report_table?source=curMonthScaleTop&type='+utils.getParam("type")+'&start='+utils.getParam('start')+'&end='+utils.getParam('end')+'&header=本月项目规模采购行业排行榜'
+
+        } else if (type == 'averageScaleTop'){ // 本月项目平均规模采购行业排行榜
+          window.location.href='/big/wx/page/report_table?source=averageScaleTop&type='+utils.getParam("type")+'&start='+utils.getParam('start')+'&end='+utils.getParam('end')+'&header=本月项目平均规模采购行业排行榜'
+        } 
+
+      }, 
+
+    
         goCollect: function(source) {
           location.href = '/weixin/frontPage/bigmember/free/perfect_info?source=' + source
         },
@@ -398,24 +450,46 @@ var vNode = {
 
                         // 本月项目数量TOP10采购行业 7
                         if(res.data.project_buyerclass_count && res.data.project_buyerclass_count.length > 0) {
-                            that.curMonthCountTop.list = that.formatterWinData(res.data.project_buyerclass_count,'count')
+                            var pro_count_list = res.data.project_buyerclass_count.filter(function (item, index) {
+                            return (item['buyerclass'] != '其它' && item['count']!=0)
+                           })
+                           if(pro_count_list && pro_count_list.length > 0){
                             that.isShow.show_7 = true;
+                          } else {
+                            that.isShow.show_7 = false
+                          }
+                          that.curMonthCountTop.list = that.formatterWinData(pro_count_list,'count')
+                            
                         } else {
                             that.isShow.show_7 = false;
                         }
                         // 本月项目规模TOP10采购行业 8
                         if(res.data.project_buyerclass_bidamount && res.data.project_buyerclass_bidamount.length > 0) {
                             var data = res.data.project_buyerclass_bidamount;
-                            that.curMonthScaleTop.list = that.formatterWinData(data,'scale')
-                            that.isShow.show_8 = true;
+                            var pro_bidamount_list = data.filter(function (item, index) {
+                              return  (item['buyerclass'] != '其它' && item['bidamount']!=0) 
+                             })
+                             if (pro_bidamount_list && pro_bidamount_list.length >0 ) {
+                              that.isShow.show_8 = true;
+                             } else {
+                              that.isShow.show_8 = false
+                             }
+                            that.curMonthScaleTop.list = that.formatterWinData(pro_bidamount_list,'scale')
                         } else {
                             that.isShow.show_8 = false;
                         }
                         // 本月项目平均规模TOP10采购行业 9
                         if(res.data.project_buyerclass_average_bidamount && res.data.project_buyerclass_average_bidamount.length > 0) {
                             var d = res.data.project_buyerclass_average_bidamount;
-                            that.averageScaleTop.list = that.formatterWinData(d,'average')
-                            that.isShow.show_9 = true;
+                            var pro_average_list = d.filter(function (item, index) {
+                              return  (item['buyerclass'] != '其它' && item['average']!=0)
+                             })
+                             if (pro_average_list && pro_average_list.length > 0) {
+                              that.isShow.show_9 = true;
+                             } else {
+                              that.isShow.show_9 = false
+                             }
+                            that.averageScaleTop.list = that.formatterWinData(pro_average_list,'average')
                         } else {
                             that.isShow.show_9 = false;
                         }

+ 16 - 0
src/web/staticres/common-module/collection/css/index.css

@@ -1440,3 +1440,19 @@
   width: 100%;
   height: 100%;
 }
+.fl_{
+  float: left;
+}
+.detail-btn{
+  float: right;
+  font-size: 0.24rem;
+  line-height: 0.245rem;
+  color: #2ABED1;
+  margin-top: 0.13rem;
+}
+.detail-btn > img{
+  width: 0.24rem;
+  vertical-align: top;
+  margin-left: 0.08rem;
+
+}

二進制
src/web/staticres/common-module/collection/image/icon.png


+ 11 - 4
src/web/staticres/common-module/report-analysis/js/echarts_option.js

@@ -20,11 +20,18 @@ function completionMapName (name) {
   //   return name
   // }
 }
-
+function isWeiXinBrower () {
+  var ua = navigator.userAgent.toLowerCase();
+  if(ua.match(/MicroMessenger/i) == 'micromessenger') {
+    return true;
+  } else {
+    return false;
+  }
+}
 var mapSettings = {
     completionMapName: completionMapName,
     chartSettings:{
-        positionJsonLink: "/jyapp/big-member/js/china-n.json?v=908",
+        positionJsonLink: isWeiXinBrower() ? "/big-member/js/china-n.json?v=908" : "/jyapp/big-member/js/china-n.json?v=908",
         beforeRegisterMapOnce (map) {
             return map
         },
@@ -169,7 +176,7 @@ var mapSettings = {
 var mapSettings2 = {
     completionMapName: completionMapName,
     chartSettings:{
-        positionJsonLink: "/jyapp/big-member/js/china-n.json?v=908",
+        positionJsonLink: isWeiXinBrower() ? "/big-member/js/china-n.json?v=908" : "/jyapp/big-member/js/china-n.json?v=908",
         beforeRegisterMapOnce (map) {
             return map
         },
@@ -313,7 +320,7 @@ var mapSettings2 = {
 var mapSettings3 = {
     completionMapName: completionMapName,
     chartSettings:{
-        positionJsonLink: "/jyapp/big-member/js/china-n.json?v=908",
+        positionJsonLink: isWeiXinBrower() ? "/big-member/js/china-n.json?v=908" : "/jyapp/big-member/js/china-n.json?v=908",
         beforeRegisterMapOnce (map) {
             return map
         },

+ 37 - 4
src/web/staticres/common-module/report-analysis/js/report_analysis.js

@@ -311,6 +311,7 @@ var vm = new Vue({
       this.rid = decodeURIComponent(id)
       this.filtersPageShow = false
     }
+    
   },
   mounted: function () {
     setTimeout(() => {
@@ -330,6 +331,24 @@ var vm = new Vue({
     utils.iosBackRefresh()
   },
   methods: {
+    gotable () {
+      this.saveState()
+       if(this.isWeiXinBrower()){
+        window.location.href='/big/wx/page/report_table?source=analysis'+'&flag=3'+'&rid='+this.rid+'&header=客户类型分布详情'
+       } else {
+        window.location.href='/jyapp/big/page/report_table?source=analysis'+'&flag=3'+'&rid='+this.rid+'&header=客户类型分布详情'
+
+       }
+     
+    },
+    isWeiXinBrower() {
+      var ua = navigator.userAgent.toLowerCase();
+      if(ua.match(/MicroMessenger/i) == 'micromessenger') {
+        return true;
+      } else {
+        return false;
+      }
+  },
     showLoading: function () {
       return this.$toast.loading({
         duration: 0,
@@ -373,6 +392,7 @@ var vm = new Vue({
         }
         item.top = offsetTop
       })
+    
     },
     addEventListeners: function () {
       this.scrollToTop()
@@ -386,7 +406,7 @@ var vm = new Vue({
       setTimeout(function () {
         // 2s后绑定(尽可能保证top能够被计算完)
         $scrollDOM.on('scroll', this.checkAnchorItemActive)
-      }.bind(this), 2000)
+      }.bind(this), 2500)
 
       $('.scroll-to-top').on('click', function () {
         $scrollDOM.animate({ scrollTop: 0 })
@@ -399,10 +419,13 @@ var vm = new Vue({
       var i = 0
       if (scrollTop >= anchorTopList[1] && scrollTop < anchorTopList[2]) {
         i = 1
-      } else if (scrollTop > anchorTopList[2]) {
+        
+      } else if (scrollTop > anchorTopList[2] && scrollTop > anchorTopList[1] && scrollTop > anchorTopList[0]) { //逻辑上多余判断条件 ,为了处理高度还没有计算出起始的 anchorTopList[2]为0 tab回显错误问题
         i = 2
+      
       } else if (scrollTop < anchorTopList[1]) {
         i = 0
+
       }
       this.activeDimension = this.dimensionList[i].id
     },
@@ -817,8 +840,13 @@ var vm = new Vue({
         url: '/bigmember/marketAnalysis/getAnalysisResult',
         data: query,
         success: function (res) {
-          if (res && res.error_code === 0 && res.data) {
+          if (res && res.error_code === 0 && res.data) {  
+            if(flag==3){
+              sessionStorage.setItem('getAnalysisResult_',JSON.stringify(res))
+            }
             this.formatterData(flag, res.data)
+          
+            
           } else {
             this.$toast('请求失败')
           }
@@ -846,7 +874,12 @@ var vm = new Vue({
         // 地区规模分布
         this.sortAreaScatter(data.area_infos)
         // 客户分布
-        this.sortUserScatter(data.customer_scale)
+        if(data.customer_scale){
+          if(data.customer_scale.length!=0){
+            let data_=data.customer_scale.slice(0,10)
+            this.sortUserScatter(data_)
+          }
+        }
         // 地区分布及客户分布Top3
         this.sortAreaUserTop3(data)
       } else if (flag === 4) {

+ 4 - 1
src/web/templates/big-member/wx/page_report_analysis.html

@@ -302,7 +302,10 @@
                       </div>
                       <!-- 客户分布 -->
                       <div class="section bg-white pd-16 user-scatter" v-if="sections.userScatter.list.length">
-                          <div class="section-title">客户分布</div>
+                        <div class="clearfix">
+                          <div class="section-title fl_">客户分布</div>
+                          <div class="detail-btn" @click="gotable">查看详情<img src="{{Msg "seo" "cdn"}}/common-module/collection/image/icon.png?v={{Msg "seo" "version"}}" alt=""></div>
+                        </div>
                           <div class="section-content">
                               <market-user-scatter :chart-data="sections.userScatter.list"></market-user-scatter>
                           </div>

+ 27 - 9
src/web/templates/big-member/wx/page_report_detail_month.html

@@ -75,6 +75,12 @@
           color: #C0C4CC;
           line-height: 0.4rem;
       }
+      .warm_{
+        font-size: 0.24rem;
+        line-height: 0.36rem;
+        color: #9B9CA3;
+        margin-top: -0.1rem;
+      }
     </style>
 </head>
 <body>
@@ -196,7 +202,9 @@
         </div>
         <!-- 本月项目数量TOP10采购行业 7-->
         <div class="chart rank" v-if="isShow.show_7 && getStatus">
-            <div class="chart_title">本月项目数量TOP10采购行业</div>
+            <!-- <div class="chart_title">本月项目数量TOP10采购行业</div> -->
+            <div class="chart_title">本月项目数量采购行业排行榜</div>
+            <div class="warm_">注:采购行业为“其它”不参与排名</div>
             <div class="progress-bar-container">
                 <div class="progress-bar-item" v-for="(item,index) in showCurMonthCountTop" :key="index">
                     <div class="item-label">
@@ -210,19 +218,23 @@
             </div>
             <div v-if="curMonthCountTop.list.length > 5 && !curMonthCountTop.showAll">
                 <div class="more">
-                    <span @click="curMonthCountTop.showAll = true">查看更多</span>
+                    <!-- <span @click="curMonthCountTop.showAll = true">查看更多</span> -->
+                    <span @click="goTable('curMonthCountTop')">查看全部</span>
                 </div>
             </div>
         </div>
         <div v-if="!getStatus" >
-          <p class="example-title">本月项目数量TOP10采购行业</p>
+          <!-- <p class="example-title">本月项目数量TOP10采购行业</p> -->
+          <p class="example-title">本月项目数量采购行业排行榜</p>
           <div class="vip_component" style="height:9.92rem;background:url('/common-module/collection/image/report/1.png') no-repeat;background-size:100% 100%">
             <month-report-example :status="bigStatus" :power="power" type="item_1" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/report/1-1.png'></month-report-example>
           </div>
         </div>
         <!-- 本月项目规模TOP10采购行业 8-->
         <div class="chart rank" v-if="isShow.show_8  && getStatus">
-            <div class="chart_title">本月项目规模TOP10采购行业</div>
+            <!-- <div class="chart_title">本月项目规模TOP10采购行业</div> -->
+            <div class="chart_title">本月项目规模采购行业排行榜</div>
+            <div class="warm_">注:采购行业为“其它”不参与排名</div>
             <div class="progress-bar-container">
                 <div class="progress-bar-item" v-for="(item,index) in showCurMonthScaleTop" :key="index">
                     <div class="item-label">
@@ -236,19 +248,23 @@
             </div>
             <div v-if="curMonthScaleTop.list.length > 5 && !curMonthScaleTop.showAll">
                 <div class="more">
-                    <span @click="curMonthScaleTop.showAll = true">查看更多</span>
+                    <!-- <span @click="curMonthScaleTop.showAll = true">查看更多</span> -->
+                    <span @click="goTable('curMonthScaleTop')">查看全部</span>
                 </div>
             </div>
         </div>
         <div v-if="!getStatus">
-          <p class="example-title">本月项目规模TOP10采购行业</p>
+          <!-- <p class="example-title">本月项目规模TOP10采购行业</p> -->
+          <p class="example-title">本月项目规模采购行业排行榜</p>
           <div class="vip_component" style="height:9.92rem;background:url('/common-module/collection/image/report/2.png') no-repeat;background-size:100% 100%">
             <month-report-example :status="bigStatus" :power="power" type="item_2" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/report/2-1.png'></month-report-example>
           </div>
         </div>
         <!-- 本月项目平均规模TOP10采购行业 9-->
         <div class="chart rank" v-if="isShow.show_9  && getStatus">
-            <div class="chart_title">本月项目平均规模TOP10采购行业</div>
+            <!-- <div class="chart_title">本月项目平均规模TOP10采购行业</div> -->
+            <div class="chart_title">本月项目平均规模采购行业排行榜</div>
+            <div class="warm_">注:采购行业为“其它”不参与排名</div>
             <div class="progress-bar-container">
                 <div class="progress-bar-item" v-for="(item,index) in showAverageScaleTop" :key="index">
                     <div class="item-label">
@@ -262,12 +278,14 @@
             </div>
             <div v-if="averageScaleTop.list.length > 5 && !averageScaleTop.showAll">
                 <div class="more">
-                    <span @click="averageScaleTop.showAll = true">查看更多</span>
+                    <!-- <span @click="averageScaleTop.showAll = true">查看更多</span> -->
+                    <span @click="goTable('averageScaleTop')">查看全部</span>
                 </div>
             </div>
         </div>
         <div v-if="!getStatus">
-          <p class="example-title">本月项目平均规模TOP10采购行业</p>
+          <!-- <p class="example-title">本月项目平均规模TOP10采购行业</p> -->
+          <p class="example-title">本月项目平均规模采购行业排行榜</p>
           <div class="vip_component" style="height:9.92rem;background:url('/common-module/collection/image/report/3.png') no-repeat;background-size:100% 100%">
             <month-report-example :status="bigStatus" :power="power" type="item_3" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/report/3-1.png'></month-report-example>
           </div>

+ 492 - 0
src/web/templates/big-member/wx/page_report_table.html

@@ -0,0 +1,492 @@
+<!DOCTYPE html>
+<html lang="zh-CN" style="font-size: 50px;">
+<head>
+    <title>本月项目数量采购行业排行榜</title>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="format-detection" content="telephone=yes"/>
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <script src="/big-member/js/rem.js"></script>
+    <!--S-当前页面的css资源-->
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+    <!--E-当前页面的css资源-->
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/public.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/j-icons.css?v={{Msg "seo" "version"}}'>
+    <style>
+       .j-container{
+        background-color: #fff;
+      }
+      .table_{
+        width: 7rem;
+        border: 0.02rem solid #E5E5E5;
+        margin: 0 auto;
+        /* margin-top: 0.32rem; */
+        margin-bottom: 0;
+
+      }
+      .fix_{
+        position: fixed;
+        left: 50%;
+        transform: translateX(-50%);
+        top: 0;
+        padding-top: 0.32rem;
+        background-color: #fff;  
+      }
+      .fix_analysis{
+        position: fixed;
+        top: 0;
+        padding-top: 0.32rem;
+        background-color: #fff;  
+
+      }
+      .fix_analysis .table_analysis{
+        margin-left: 0.24rem;
+        margin-top: 0.24rem;
+      }
+      .fix_analysis .sort_box{
+        margin-top: 0 !important;
+      }
+      .table_ th{
+        border: 0.02rem solid #E5E5E5;
+        height: 0.88rem;
+        background: #F5F6F7;
+       color: #9B9CA3;
+       font-size: 0.26rem;
+       line-height: 0.4rem;
+       display: table-cell;
+       vertical-align: middle;
+
+      }
+     
+      .table_ tr{
+        height: 0.88rem;
+      }
+      .table_ td{
+        border: 0.02rem solid #E5E5E5;
+        height: 0.88rem;
+       color: #171826;
+       font-size: 0.28rem;
+       line-height: 0.4rem;
+       text-align: center;
+       display: table-cell;
+       vertical-align: middle;
+       word-break: break-all;
+      
+      }
+      .table_analysis{
+        width: 7rem;
+        border: 0.02rem solid #E5E5E5;
+        margin-left: 0.24rem;
+        margin-top: 0.24rem;
+        margin-bottom: 0;
+
+      }
+      .table_analysis th{
+        border: 0.02rem solid #E5E5E5;
+        height: 0.88rem;
+        background: #F5F6F7;
+       color: #9B9CA3;
+       font-size: 0.26rem;
+       line-height: 0.4rem;
+       display: table-cell;
+       vertical-align: middle;
+
+      }
+      .table_analysis td{
+        border: 0.02rem solid #E5E5E5;
+        height: 0.88rem;
+       color: #171826;
+       font-size: 0.28rem;
+       line-height: 0.4rem;
+       text-align: center;
+       display: table-cell;
+       vertical-align: middle;
+       word-break: break-all;
+      
+      }
+      .table_analysis tr{
+        height: 0.88rem;
+      }
+      .sort{
+        width: 1.04rem;
+      }
+      .long{
+        width: 3.28rem;
+      }
+      .sort_{
+        width: 1.02rem;
+      }
+      .long_{
+        width: 2.4rem;
+      }
+      .middle{
+        width: 1.92rem;
+      }
+      .t_right{
+        text-align: right !important;
+        box-sizing: border-box;
+        padding: 0 0.2rem;
+      }
+      .otners{
+        font-size: 0.26rem;
+        line-height: 0.4rem;
+        color: #9B9CA3;
+        margin-left: 0.24rem;
+        margin-top: 0.32rem;
+        margin-bottom: 0.32rem;
+      }
+      .ml-24{
+        margin-left: 0.24rem;
+
+      }
+      .box{
+        padding-top: 1.19rem;
+       
+      }
+      .box_analysis{
+        padding-top: 1.59rem;
+      }
+      .others{
+        font-size: 0.26rem;
+        line-height: 0.4rem;
+        color: #9B9CA3;
+        margin-left: 0.24rem;
+        margin-top: 0.32rem;
+     
+      }
+      
+      .clearfix > .left{
+        float: left;
+        margin-left: 0.24rem;
+        color: #5F5E64;
+        font-size: 0.26rem;
+        line-height: 0.44rem;
+        margin-bottom: 0.32rem;
+
+      }
+      .clearfix > .right{
+        float: left;
+        margin-left: 0.24rem;
+        color: #5F5E64;
+        font-size: 0.26rem;
+        line-height: 0.44rem;
+        margin-left: 0.32rem;
+
+      }
+      .sort_box{
+        margin-top: 0.32rem;
+      }
+      .sort_box .tit{
+        color: #5F5E64;
+        font-size: 0.28rem;
+        line-height: 0.4rem;
+        float: left;
+        margin-left: 0.24rem;
+        margin-right: 0.16rem;
+      }
+      .sort_box .btn{
+        color: #5F5E64;
+        line-height: 0.4rem;
+        font-size: 0.28rem;
+        float: left;
+        margin-right: 0.32rem;
+
+      }
+      .active{
+        color: #2ABED1 !important;
+      } 
+    </style>
+</head>
+<body>
+  <div class="j-container">
+    <div id="report_table" class="j-main" v-cloak>
+      <div v-if = "parm=='analysis'" class="box_analysis">
+        <div class="fix_analysis">
+          <div class="sort_box clearfix">
+            <div class="tit">排序:</div>
+            <div class="btn" v-for="(item,index) in tabs" :class="{'active': index==tab}"  @click="sort_click(index)">${item}</div>
+          </div>
+          <table class="table_analysis">
+            <thead>
+              <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==3 ,'middle':index==2||index==1}" v-html="item"></th></tr>
+            </thead>
+          </table>
+        </div>
+        <!-- <div class="sort_box clearfix">
+          <div class="tit">排序:</div>
+          <div class="btn" v-for="(item,index) in tabs" :class="{'active': index==tab}" @click="sort_click(index)">${item}</div>
+        </div> -->
+        <table class="table_analysis">
+          <!-- <thead>
+            <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==3 ,'middle':index==2||index==1}" v-html="item"></th></tr>
+          </thead> -->
+           <tbody>
+            <tr v-for="(item,index) in data_list" >
+            <td class="sort_">${index + 1}</td>
+            <td class="middle">${item.buyclass}</td>
+            <td class="t_right middle">${item.total}</td>
+            <td class="t_right long_">${item.amount}</td>
+          </tr>
+           </tbody>
+        </table>
+        <div class="others" v-if="analysis_num&&analysis_price">客户类型为“其它”:</div>
+        <div class="clearfix" v-if="analysis_num&&analysis_price">
+          <div class="left">项目数量:${analysis_num}个</div>
+          <div class="right">项目金额:${analysis_price}万元</div>
+        </div>
+      </div>
+      <div class="box" v-else>
+        <div class="fix_">
+          <table class="table_ ">
+          <thead>
+            <tr><th v-for="(item,index) in head_list" :class="{'sort': index==0,'long': index==1 || index==2}" v-html="item"></th></tr>
+          </thead>
+        </table>
+        </div>
+        <table class="table_ ">
+          <!-- <thead>
+            <tr><th v-for="(item,index) in head_list" :class="{'sort': index==0,'long': index==1 || index==2}" v-html="item"></th></tr>
+          </thead> -->
+            <tbody>
+            <tr v-for="(item,index) in data_list" >
+            <td class="sort">${index + 1}</td>
+            <td class="long">${item.buyerclass}</td>
+            <td class="t_right long">${item.value}</td>
+            </tr>
+           </tbody>
+        </table>
+        <div class="otners" v-if="parm=='curMonthCountTop' && num">采购行业为“其它”的项目数量:${num}个</div>
+        <div class="otners" v-if="parm=='curMonthScaleTop' && num">采购行业为“其它”的项目金额:${num}万元</div>
+        <div class="otners" v-if="parm=='averageScaleTop' && num">采购行业为“其它”的项目平均金额:${num}万元</div>
+      </div>
+    </div>
+</div>
+<script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js></script>
+<script src='{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}'></script>
+<script>
+  var vNode_ = {
+    delimiters: ['${', '}'],
+    el: '#report_table',
+    components: {
+      
+    },
+    data: {
+      tab:0,
+      tabs:['项目数量由高到低','项目金额由高到低'],
+      head_list:['排名','采购行业','项目数量(个)'],
+      data_list:[],
+      parm:'',
+      num:'',
+      analysis_num:'',
+      analysis_price:'',
+      rid:''
+  
+    },
+    computed: {
+        
+    },
+    created () {
+      this.parm = utils.getParam('source')
+      this.rid=utils.getParam('rid')
+      if (this.parm=='curMonthCountTop'){ //数量排行
+        this.head_list=['排名','采购行业','项目数量(个)'];
+        document.title='本月项目数量采购行业排行榜'
+
+      }else if(this.parm=='curMonthScaleTop'){ //规模排行
+        this.head_list=['排名','采购行业','项目金额(万元)'];
+        document.title='本月项目规模采购行业排行榜'
+
+      }else if(this.parm=='averageScaleTop'){ //平均规模排行
+        this.head_list=['排名','采购行业','项目平均金额'+'<br>'+'(万元)'];
+        document.title='本月项目平均规模采购行业排行榜'
+
+      }else if(this.parm=='analysis'){ //定制化客户分布
+        this.head_list=['序号','客户类型','项目数量'+'<br>'+'(个)','项目金额'+'<br>'+'(万元)'];
+        document.title='客户类型分布详情'
+
+      }
+      if(this.parm=='analysis'){
+        this.analysis_data()
+
+      }else{
+        this.monthdata()
+      }
+        
+    },
+    mounted() {
+      
+    },
+    methods: {
+      sort_click (index) {
+        if (index == this.tab){
+          return
+        }
+        this.tab=index
+        if(this.tab==0){//数量排序
+          let data_=this.data_list.sort(function(a,b){return b.total-a.total});
+          this.data_list=data_
+
+        }else{ //金额排序
+          let data_=this.data_list.sort(function(a,b){return b.amount-a.amount});
+          this.data_list=data_
+
+        }
+
+      },
+      analysis_data (){
+        let this_=this
+        let res= JSON.parse(sessionStorage.getItem('getAnalysisResult_'))
+        if (res && res.error_code === 0 && res.data) {
+            let data_ = res.data.customer_scale
+            data_.forEach(ele => {
+              if(ele.amount){
+                ele.amount=(ele.amount / 10000).toFixed(2)
+              } 
+            });
+            data_.sort(function(a,b){return b.total-a.total});
+            let newarr = data_.filter(function (item, index) {
+              return !(item['amount'] ==0 && item['total'] ==0 )
+            })
+            this_.data_list=newarr
+            if(res.data.customer_scale_other){
+              this_.analysis_num=res.data.customer_scale_other.total
+              this_.analysis_price=(res.data.customer_scale_other.amount / 10000).toFixed(2)
+            }
+          } else {
+            // this.$toast('请求失败')
+          }
+      
+      //   $.ajax({
+      //   type: 'POST',
+      //   url: '/bigmember/marketAnalysis/getAnalysisResult',
+      //   data: {
+      //     flag:3,
+      //     rid: this_.rid,
+      //   },
+      //   success: function (res) {
+      //     if (res && res.error_code === 0 && res.data) {
+      //       let data_ = res.data.customer_scale
+      //       data_.forEach(ele => {
+      //         if(ele.amount){
+      //           ele.amount=(ele.amount / 10000).toFixed(2)
+      //         } 
+      //       });
+      //       data_.sort(function(a,b){return b.total-a.total});
+      //       let newarr = data_.filter(function (item, index) {
+      //         return !(item['amount'] ==0 && item['total'] ==0 )
+      //       })
+      //       this_.data_list=newarr
+      //       if(res.data.customer_scale_other){
+      //         this_.analysis_num=res.data.customer_scale_other.total
+      //         this_.analysis_price=(res.data.customer_scale_other.amount / 10000).toFixed(2)
+      //       }
+      //     } else {
+      //       // this.$toast('请求失败')
+      //     }
+      //   }
+      // })
+      },
+      monthdata(){
+        var that = this
+            $.ajax({
+                type:'POST',
+                url:'/bigmember/report/detail',
+                data:{
+                    start: utils.getParam('start'),
+                    end: utils.getParam('end'),
+                    type: utils.getParam('type')
+                },
+                success:function(res) {
+                    // console.log(res)
+                    if(res.error_code == 0 && res.data) {
+                      console.log(that.parm)
+                       if(that.parm=='curMonthCountTop'){ //数量
+                        let others=[]
+                        let data_ =res.data.project_buyerclass_count
+                        // data_.push({buyerclass:'其它',count:12})
+                        data_.forEach(ele => {
+                          if(ele.count){
+                            ele.value=ele.count 
+                          }
+                          if(ele.buyerclass=='其它'){
+                            others.push(ele)
+                          }
+                        });
+
+                        let newarr = data_.filter(function (item, index) {
+                              return (item['buyerclass'] != '其它' && item['count']!=0)
+                        })
+                        that.data_list=newarr
+                        
+                        if(others.length!=0){
+                          that.num=others[0].count
+                        }
+                        
+                       }else if(that.parm=='curMonthScaleTop'){ //规模排行
+                        let data_ =res.data.project_buyerclass_bidamount
+                        let others=[]
+                        // data_.push({buyerclass:'其它',bidamount:12})
+                        data_.forEach(ele => {
+                          if(ele.bidamount){
+                            ele.value=ele.bidamount.toFixed(2) 
+                          }
+                          if(ele.buyerclass=='其它'){
+                            others.push(ele)
+                          }
+                        });
+                        let newarr = data_.filter(function (item, index) {
+                              return (item['buyerclass'] != '其它' && item['bidamount']!=0)
+                        })
+                        console.log(newarr)
+                        that.data_list=newarr
+                        if(others.length!=0){
+                          that.num=others[0].bidamount
+                        }
+                       }else if(that.parm=='averageScaleTop'){ //平均规模排行
+                        let data_ =res.data.project_buyerclass_average_bidamount
+                        let others=[]
+                        // data_.push({buyerclass:'其它',average:12})
+                        data_.forEach(ele => {
+                          if(ele.average){
+                            ele.value=ele.average.toFixed(2) 
+
+                          }
+                          if(ele.buyerclass=='其它'){
+                            others.push(ele)
+                          }
+                        });
+                        let newarr = data_.filter(function (item, index) { 
+                              return (item['buyerclass'] != '其它' && item['average']!=0)
+                        })
+                        that.data_list=newarr
+                        if(others.length!=0){
+                          that.num=others[0].average
+                        }
+                       }    
+
+                    }else{
+                        console.log("未获取到数据")
+                    }
+                },
+                error:function(err) {
+                    console.log(err)
+                }
+            })
+
+      }
+  
+    }
+}
+var vueComponent = new Vue(vNode_)
+</script>
+{{include "/common/baiducc.html"}}
+</body>
+</html>

+ 1 - 1
src/web/templates/pc/dataExport_sieve.html

@@ -1170,7 +1170,7 @@
             //     }
             //     adhtml += '<img src="' + ADTopList[i]["s_pic"] + '" alt="" ></a></div>'
             // }
-            adhtml += '<img src="' + ADTopList[0]["s_pic"] + '" alt="" style="height:auto;width:100%;"></a></div>'
+            adhtml += '<div onclick="adv_statistics(this)"><a dataHref="' + ADTopList[0]["s_link"] + '" target="_blank"><img src="' + ADTopList[0]["s_pic"] + '" alt="" style="height:auto;width:100%;"></a></div>'
             // if (ADTopList.length == 1) {
             //     $(".swiper-pagination").hide();
             // }

Some files were not shown because too many files changed in this diff