Эх сурвалжийг харах

订阅推送接口传参、组件修改、微信企业画像

TANGSHIZHE 4 жил өмнө
parent
commit
a1baa27fb8
22 өөрчлөгдсөн 4113 нэмэгдсэн , 123 устгасан
  1. 3 1
      src/jfw/modules/app/src/web/staticres/jyapp/css/subscribe.css
  2. 2 2
      src/jfw/modules/app/src/web/templates/big-member/page_ent_portrait.html
  3. 7 7
      src/jfw/modules/app/src/web/templates/frontRouter/collection/sess/index.html
  4. 54 17
      src/jfw/modules/app/src/web/templates/weixin/historypush.html
  5. 156 0
      src/web/staticres/big-member/js/china.json
  6. 15 6
      src/web/staticres/common-module/collection/css/index.css
  7. 31 4
      src/web/staticres/common-module/collection/js/cate-mobile.js
  8. 824 0
      src/web/staticres/common-module/collection/js/chart_options.js
  9. 20 1
      src/web/staticres/common-module/collection/js/date-mobile.js
  10. 981 0
      src/web/staticres/common-module/collection/js/echarts_option.js
  11. 933 0
      src/web/staticres/common-module/collection/js/ent_portrait.js
  12. 86 12
      src/web/staticres/common-module/collection/js/index-wx.js
  13. 86 17
      src/web/staticres/common-module/collection/js/index.js
  14. 28 3
      src/web/staticres/common-module/collection/js/industry-mobile.js
  15. 27 2
      src/web/staticres/common-module/collection/js/keyword-mobile.js
  16. 29 5
      src/web/staticres/common-module/collection/js/notice-mobile.js
  17. 0 1
      src/web/staticres/common-module/collection/js/tags-mobile.js
  18. 701 0
      src/web/staticres/common-module/collection/js/utils.js
  19. 49 10
      src/web/staticres/vipsubscribe/js/historypush.js
  20. 13 14
      src/web/templates/frontRouter/wx/collection/sess/ent_portrait.html
  21. 8 8
      src/web/templates/frontRouter/wx/collection/sess/index.html
  22. 60 13
      src/web/templates/weixin/historypush.html

+ 3 - 1
src/jfw/modules/app/src/web/staticres/jyapp/css/subscribe.css

@@ -1706,7 +1706,9 @@ html, body {
   border-right: 1.5px solid rgba(0, 0, 0, 0.1);
 }
 .tab_right .report_book{
-  float: left;
+  position: absolute;
+  top: 2px;
+  left: -20px;
   margin-right: .08rem;
   display: flex;
   width: .32rem;

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

@@ -223,8 +223,8 @@
             </van-tab>
             <van-tab name="2" v-if="!singleTab">
                 <template #title>
-                    <span class="bidinfo">中标信息</span>
-                    <span class="bid_upgrade">升级</span>
+                    <span :class="{bidinfo:digshow==true}">中标信息</span>
+                    <span v-if="digshow" class="bid_upgrade">升级</span>
                 </template>
                 <van-dialog
                 v-model="digshow"

+ 7 - 7
src/jfw/modules/app/src/web/templates/frontRouter/collection/sess/index.html

@@ -14,12 +14,12 @@
 </head>
 <style>
   .list-mian{
-    height: 100%;
-    overflow: hidden;
+    /* height: 100%; */
+    overflow: auto;
   }
   .list-mian .van-list{
-    height: 100%;
-    overflow: auto;
+    height: auto;
+    overflow: hidden;
   }
 </style>
 <body>
@@ -36,7 +36,7 @@
               <div class="data_report">
                 <div class="collec_datareport" @click="dataReport">
                   <span class="data_download"></span>
-                  <span class="data text">数据导出</span>
+                  <span class="data_text">数据导出</span>
                 </div>
               </div>
             </div>
@@ -45,7 +45,7 @@
             <van-dropdown-item  title="个人标签"  ref="tagItem">
               <tags-component @confirm="confirm" @cancel="cancel" :taglist="tagList"></tags-component>
             </van-dropdown-item>
-            <van-dropdown-item title="收藏日期" ref="dateItem">
+            <van-dropdown-item :title="tagText.timeText" ref="dateItem">
               <date-component @confirm="confirm" @cancel="cancel"></date-component>
             </van-dropdown-item>
             <van-dropdown-item title="采购单位类型" ref="cateItem">
@@ -58,7 +58,7 @@
               <phone-component :data="params.winnerData" @confirm="confirm"></phone-component>
             </van-dropdown-item>
           </van-dropdown-menu>
-          <div class="list-mian">
+          <div class="list-mian" ref="jList">
             <van-list
               v-model="listState.loading"
               :finished="listState.finished"

+ 54 - 17
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -16,7 +16,7 @@
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/index.css />
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/icon/local.css />
     <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/css/index.css?v={{Msg "seo" "version"}}'/>
-
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/css/public.css?v={{Msg "seo" "version"}}'/>
     <style>
         .merge-dialog,
         .weui-dialog,
@@ -50,6 +50,15 @@
         .app-layout-header .switch-vip:before, .app-layout-header .only-vip:before {
             height: 18px;
         }
+        .app-layout-header .switch-vip:before, .app-layout-header .only-member::after {
+            content: '';
+            display: flex;
+            margin-left: 4px;
+            width: 12px;
+            height: 12px;
+            background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACSSURBVHgBzZO7CYAwFEWvQXCNWOoWDiFY27mUDmDjBo5gZ2vWEBElASGGFyGfwlOFGzgkeTdAJBIqXIaGZ9c5y3XZjrm+t/b1RuXph4SDhsyZo8QKs0gEHGGUJNmPCo4okSkpuknAEf2NvCUSNTVzlD4wROJ/ohSBPNUJOpHeP2+RWWJvkVnikKtxaCUOEb1+wg1trU+oaaKLhgAAAABJRU5ErkJggg==) no-repeat;
+            background-size: contain;
+        }
         .app-layout-header .switch-vip:before, .app-layout-header .switch {
             align-items: center;
             font-size: 12px;
@@ -66,7 +75,7 @@
         }
     </style>
 </head>
-<body class="p13" id="viperSuper">
+<body class="p13" id="viperSuper" style="background: #fff;">
 <!-- 加载数据-->
 <div class="loading_" id="loading">
     <p><span></span></p>
@@ -75,7 +84,7 @@
   <ul>
     <li>订阅</li>
     <li{{if or .T.isIosExam .T.isIosExamPhone}} style="visibility:hidden;"{{end}}>
-      <div class="switch" data-need-bind-phone id="app-historypush-vipSub-btn" style="display:none;">
+      <div class="switch only-member" data-need-bind-phone id="app-historypush-vipSub-btn" style="display:none;">
         <span></span>
       </div>
     </li>
@@ -91,8 +100,8 @@
   </ul>
 </div>
 {{include "/big-member/commonjs.html"}}
-<div class="app-layout-content-b">
-    <div class="app-content" style="background:#fff">
+<div class="app-layout-content-b j-container">
+    <div class="app-content j-header" style="background:#fff">
       {{if and (not .T.isIosExam) (not .T.isIosExamPhone)}}
   		<div class="header_header" style="height: 60px;display:none;transition: all 0.1s;">
   			<div class="only-personal" style="position: absolute;top: .35rem;left: 4%;background-image: url(/jyapp/vipsubscribe/image/entback.png?v=51430);background-size: 100%;background-repeat: no-repeat;border-radius: 8px;width: 92%;display: flex;align-items: center;justify-content: space-between;height: 44px;">
@@ -181,7 +190,7 @@
             </div>
         </div>
         <div class="color_top" style="display:none;"></div>
-        <div class="listcontent" onscroll="listScroll()">
+        <div class="listcontent j-main" onscroll="listScroll()">
             <div id="list"></div>
         </div>
 
@@ -512,7 +521,6 @@
       }
   });
   var firstTime
-  console.log(vm.time)
   if({{.T.selectTime}} == '') {
     firstTime = vm.time
   }else {
@@ -520,8 +528,11 @@
   }
   
   var userId = "";
-  var selectCity = "";
-
+  var selectCity = vm.area; // 地区
+  var selectIndustry = vm.subscopeclass // 行业
+  var selectCate = vm.buyerclass // 采购单位
+  var selectKeyword = vm.key // 关键词
+  var selectNotice = vm.subtype // 公告类型
   //获取当前时间
   var date = (function () {
       var date = new Date();
@@ -621,6 +632,10 @@
             userId = sessionStorage.userId;
             firstTime = sessionStorage.getItem(userId + "_searchTime");
             selectCity = sessionStorage.getItem(userId + "_selectCity");
+            selectIndustry = sessionStorage.getItem(userId + "_selectIndustry");
+            selectCate = sessionStorage.getItem(userId + "_selectCate");
+            selectKeyword = sessionStorage.getItem(userId + "_selectKeyword");
+            selectNotice = sessionStorage.getItem(userId + "_selectNotice");
             $("#list>*").remove();
             firstPage = dataCache;
             if (dataCache.length == 0) {
@@ -641,10 +656,22 @@
             if (sessionStorage.getItem(userId + "_selectCity") != null && sessionStorage.getItem(userId + "_selectCity") != "") {
                 selectCity = sessionStorage.getItem(userId + "_selectCity");
             }
+            if (sessionStorage.getItem(userId + "_selectIndustry") != null && sessionStorage.getItem(userId + "_selectIndustry") != "") {
+                selectIndustry = sessionStorage.getItem(userId + "_selectIndustry");
+            }
+            if (sessionStorage.getItem(userId + "_selectCate") != null && sessionStorage.getItem(userId + "_selectCate") != "") {
+                selectCate = sessionStorage.getItem(userId + "_selectCate");
+            }
+            if (sessionStorage.getItem(userId + "_selectKeyword") != null && sessionStorage.getItem(userId + "_selectKeyword") != "") {
+                selectKeyword = sessionStorage.getItem(userId + "_selectKeyword");
+            }
+            if (sessionStorage.getItem(userId + "_selectNotice") != null && sessionStorage.getItem(userId + "_selectNotice") != "") {
+                selectNotice = sessionStorage.getItem(userId + "_selectNotice");
+            }
             $.ajax({
                 type: 'post',
                 url: '/jyapp/front/hasPushHistory?t=' + new Date().getTime(),
-                data: {"selectTime": firstTime, "pageNum": 1, "area": selectCity,},
+                data: {"selectTime": firstTime, "pageNum": 1, "area": selectCity, "subscopeclass": selectIndustry, "buyerclass": selectCate, "key": selectKeyword, "subtype": selectNotice},
                 async: false,
                 dataType: 'json',
                 success: function (data) {
@@ -783,6 +810,16 @@
             extend(0);
         }
       });
+    //   判断是否是大会员
+      $.ajax({
+        url: '/publicapply/bidcoll/power',
+        type: 'POST',
+        success: function(res) {
+          if(res.data.member) {
+            $(".switch").addClass("only-member");
+          }
+        }
+      })
   }
   // 是否有未读的周报月报
   function reportHtml(r){
@@ -857,7 +894,7 @@ window.listScroll = function() {
       $.ajax({
           type: 'post',
           url: '/jyapp/front/hasPushHistory?t=' + new Date().getTime(),
-          data: {"selectTime": firstTime, "pageNum": 1, "area": selectCity},
+          data: {"selectTime": firstTime, "pageNum": 1, "area": selectCity, "subscopeclass": selectIndustry, "buyerclass": selectCate, "key": selectKeyword, "subtype": selectNotice},
           async: false,
           dataType: 'json',
           success: function (data) {
@@ -900,7 +937,7 @@ window.listScroll = function() {
       $.ajax({
           type: 'post',
           url: '/jyapp/swordfish/historypush/paging',
-          data: {"pageNum": pageIndex, "selectTime": firstTime, "area": selectCity},
+          data: {"pageNum": pageIndex, "selectTime": firstTime, "area": selectCity, "subscopeclass": selectIndustry, "buyerclass": selectCate, "key": selectKeyword, "subtype": selectNotice},
           dataType: 'json',
           success: function (data) {
               //没有数据
@@ -1061,10 +1098,10 @@ function hasNoData() {
                       + '<div class="one">'
                       + '<span class="xh ' + visited + '">' + count + '.</span>'
                       + '</div>'
-                      + '<div class="two bt-parent" style="padding-left:' + paddingLeft + 'px;">'
+                      + '<div class="two bt-parent" style="display: flex;justify-content: space-between;padding-left:' + paddingLeft + 'px;">'
                       + '<a class="bt ' + visited + '" eid="' + obj["_id"] + '"  push_date="' + obj["ca_date"] + '" list_index="' + obj["ca_index"] + '" projectM="' + obj["ca_type"] + '">' + title + '</a>'
-                      + '<div class="collec_star" data-id="' + obj["_id"] + '">'
-                      + '<span class="shoucang" style="display:none"></span>'
+                      + '<div class="collec_star" collecnum="'+obj["collection"]+'" data-id="' + obj["_id"] + '">'
+                      + '<span class="shoucang"></span>'
                       + '<span class="weishoucang"></span>'
                       + '</div>'
                       + '</div>'
@@ -1211,7 +1248,7 @@ function hasNoData() {
       $(".listcontent").show();
       setTimeout(function () {
           $("#loading").hide();
-      }, 100)
+      }, 500)
   }
 
   function beforeJump(eid, h, sds, index, pd, vis) {
@@ -1565,7 +1602,7 @@ function hasNoData() {
             // var timestemp = Time.getTime();
             // firstTime = timestemp.toString();
             firstTime = time;
-            ajaxFun(firstTime, selectCity);
+            ajaxFun(firstTime, selectCity, selectIndustry, selectCate, selectKeyword, selectNotice);
         } else {
             firstTime = "";
             ajaxFun("", selectCity);

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 156 - 0
src/web/staticres/big-member/js/china.json


+ 15 - 6
src/web/staticres/common-module/collection/css/index.css

@@ -32,6 +32,7 @@
   position: relative;
 }
 .collection .van-dropdown-menu__bar{
+  overflow: auto;
   box-shadow: none;
 }
 .collection .van-dropdown-menu__bar.van-dropdown-menu__bar--opened{
@@ -156,10 +157,10 @@
 .collec_action .collec_tags .tag_active{
   margin-right: .08rem;
   padding: .02rem .16rem;
-  height: .36rem;
   font-size: .24rem;
   font-weight: 500;
   text-align: CENTER;
+  line-height: .36rem;
   color: #5f5e64;
   border-radius: .05rem;
   opacity: 1;
@@ -408,15 +409,16 @@
 /* 采购单位联系方式 */
 .icon-duihao{
   display: flex;
-  width: .48rem;
-  height: .48rem;
+  width: .36rem;
+  height: .36rem;
   background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAcCAYAAAAEN20fAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTI4MkNFMEU3NTlCMTFFNzgzMUFFMzA2NTJBNTJDQTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTI4MkNFMEY3NTlCMTFFNzgzMUFFMzA2NTJBNTJDQTAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo1MjgyQ0UwQzc1OUIxMUU3ODMxQUUzMDY1MkE1MkNBMCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1MjgyQ0UwRDc1OUIxMUU3ODMxQUUzMDY1MkE1MkNBMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps2Yfq0AAAIUSURBVHjaxJdZK0RhGMePIV/AkiRbIiG58gl8ALusoYgiLojImpQkLsgSubAUl4qyXomEklxYSpLdzZR1sv2feqbeTu8cZ2bOzPnXr87zznvO+Z93ed5nfBJX9hQT5Q9mwLSfySbmQQYItJhkggZglk3cggIzjPiCOZAFbCAH3FlMMEFrIpvjerBNFxYvm5gGeRzT9Yj9R4sXTUyCQo4PQLXYwRtG6B0ToITjJ5AJ3mVGPLWNfcA4KOX4G+SDK5nbVHAGUjxgYhSUC23NYN3RsA2BKLAGkg00MQwqhLZF0K81f5XgAwSwmSQDTNDHVQltJ6AM/GoZOQINHAeBDZDghpEBUCPEVpAOXv5b0QoP45JgZhPEu2iiTohpBIrAuZ6tZb+hjPM+KZjNxDlhoo8zpagu4QN1GSE9s/tvjkPYTKyO5/QK02vXMhtRnDWi8Iv7hDiU10yMxjO6QZOq7YLzxY+rRkhtYFeIw8AWiJb07QCtqrY3Pt6tzqZftb74a6wSM1Eqw+2S+ymLHrtyDsh0qcoDpHCeugjQAjod7JoFVyslR6IyLk04J0iRYJ9KO0l/GrFGd05GLVFiOlW1yUxcg1xhxxlu5JXXi02jzycvzid3a4X/dCjZnqKqeboUTxshDXKCUmsMTBlVPenRLy/ae6FtB9QaWcbp1SMoZlMPXInbjPyj44yoXukBq+DGyHLuT4ABAFb/aZSnxxGmAAAAAElFTkSuQmCC) no-repeat;
   background-size: contain;
 }
 
 /* 没有权限样式 */
-.useRoot{
+.collection .useRoot{
   height: 3.52rem;
+  flex: none;
   display: flex;
   flex-direction: column;
   justify-content: center;
@@ -427,7 +429,7 @@
   color: #171826;
   line-height: .52rem;
 }
-.useRoot .open_root{
+.collection .useRoot .open_root{
   font-size: .3rem;
   font-weight: 500;
   text-align: CENTER;
@@ -435,7 +437,7 @@
   line-height: .44rem;
 }
 
-.select-area-box {
+.collection .select-area-box {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
@@ -498,4 +500,11 @@
   line-height: 24px;
   background: #F5F6F7;
   color: #5F5E64;
+}
+
+.collection .van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
+  border-width: 0;
+}
+.van-cell::after{
+  border: 0;
 }

+ 31 - 4
src/web/staticres/common-module/collection/js/cate-mobile.js

@@ -55,7 +55,7 @@ var cateComponentTemplate = `<div class="j-container">
 <div class="j-footer">
   <div class="j-button-group">
     <button class="j-button-cancel" @click="resetAll">重置</button>
-    <button class="j-button-confirm" @click="onConfirm">确认</button>
+    <button class="j-button-confirm" :disabled="canClick" @click="onConfirm">确认</button>
   </div>
 </div>
 </div>
@@ -74,11 +74,13 @@ var cateComponent = {
           "企业": ['传媒','采矿业', '电信行业', '金融业', '建筑业', '能源化工', '农林牧渔','批发零售', '信息技术', '运输物流', '制造业', '住宿餐饮']  
         }
       ],
-      checkedAll: false
+      checkedAll: false,
+      canClick: true
     }
   },
   created () {
     this.getIndustryData()
+    this.getbBtnClick()
   },
   methods: {
     // 获取行业数据
@@ -123,22 +125,25 @@ var cateComponent = {
         })
         this.checkedAll = true
       }
+      this.getbBtnClick()
     },
     // 模块全选
     checkAll: function(data){
-      console.log(data)
       let selectBool = data[Object.keys(data)[1]]
       let dataArr = data[Object.keys(data)[0]]
-      console.log(selectBool, dataArr)
+      console.log(selectBool)
       if(selectBool) {
+        data[Object.keys(data)[1]] = false
         dataArr.forEach(function(item, index){
           item.type = false
         })
       }else{
+        data[Object.keys(data)[1]] = true
         dataArr.forEach(function(item, index){
           item.type = true
         })
       }
+      this.getbBtnClick()
     },
     // 模块单选
     toggleCheck: function (data, item) {
@@ -164,6 +169,7 @@ var cateComponent = {
         }
       })
       this.checkedAll = !industryAll
+      this.getbBtnClick()
     },
     // 选择的数量
     selectNum: function(item) {
@@ -175,6 +181,27 @@ var cateComponent = {
       })
       return numArr.length
     },
+    // 只要有一个选中,确认按钮可点击
+    getbBtnClick: function() {
+      let boolnum = -1
+      let boolArr = []
+      this.tablist.forEach(function(itemall, index){
+        itemall[Object.keys(itemall)[0]].forEach(function(data) {
+          let bool = true
+          if(data.type) {
+            bool = false + ''
+          }
+          boolArr.push(bool)
+        })
+      })
+      boolnum = boolArr.indexOf('false')
+      if (boolnum == -1) {
+        this.canClick = true
+      } else {
+        this.canClick = false
+      }
+    },
+    // 重置按钮
     resetAll:function() {
       let params = {
         name: 'cateItem',

+ 824 - 0
src/web/staticres/common-module/collection/js/chart_options.js

@@ -0,0 +1,824 @@
+function rectGroup(left, color){
+    return {
+        type: 'rect',
+        z: 90,
+        left: left + 50,
+        bottom: 24,
+        shape: {
+            width: 14,
+            height: 14
+        },
+        style: {
+            fill: color
+        }
+    }
+}
+// 配置项
+var chartOptions = {
+    // 热力图
+    hotChart: {
+        tooltip: {
+            backgroundColor:'#fff',
+            confine:true,
+            axisPointer: {        
+                type: 'shadow', 
+                shadowStyle:{
+                    color:'rgba(5,166,243,0.1)'
+                }
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[7,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            borderWidth:2,
+            borderColor: '#F5F6F7',
+            formatter: function(params){
+                return params;
+            }
+        },
+        axisPointer:{
+            lineStyle:{
+                color:'#f00',
+                shadowColor: '#f00'
+            }
+        },
+        animation: false,
+        grid: {
+            top:30,
+            right:50,
+            left:50,
+        },
+        xAxis: {
+            show: false,
+            type: 'category',
+            data: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
+            splitArea: {
+                show: true
+            }
+        },
+        yAxis: [{
+            name: '单位(元)',
+            nameTextStyle:{
+                fontSize: 10,
+                color: '#9B9CA3',
+                padding:[ 0, 0, 0, -30 ]
+            },
+            nameGap: 10,
+            type: 'category',
+            data: ['0', '1万', '10万','50万', '100万', '500万', '1000万', '5000万', '1亿', '10亿以上'].reverse(),
+            splitArea: {
+                show: false
+            },
+            axisTick: {
+                show: false,
+                lineStyle:{
+                    color: '#5F5E64'
+                }
+            },
+            axisLine: {
+                show: false
+            },
+            splitLine: {
+                show: false
+            },
+            axisLabel:{
+                fontSize:10,
+                margin:4
+            }
+        }, {
+            type: 'category',
+            data: ['1万', '10万','50万', '100万', '500万', '1000万', '5000万', '1亿', '10亿', ''].reverse(),
+            splitArea: {
+                show: false
+            },
+            axisTick: {
+                show: false,
+                lineStyle:{
+                    color: '#5F5E64'
+                }
+            },
+            axisLine: {
+                show: false
+            },
+            splitLine: {
+                show: false
+            },
+            axisLabel:{
+                fontSize:10,
+                margin:4
+            }
+        }],
+        graphic: [{
+                type: 'group',
+                bottom: 42,
+                children: [{
+                    type: 'text',
+                    z: 100,
+                    left: 50,
+                    top: 'middle',
+                    style: {
+                        fill: '#333',
+                        text: '类似项目数量(个)',
+                        font: '10px Microsoft YaHei'
+                    }
+                }]
+            },
+            {
+                type: 'rect',
+                z: 101,
+                left: 50,
+                bottom: 24,
+                shape: {
+                    width: 84,
+                    height: 14
+                },
+                style: {
+                    stroke: '#FB483D',
+                    fill: 'transparent',
+                    lineWidth: 0.5
+                }
+            },
+            rectGroup(0, '#F06326'),
+            rectGroup(14, '#F48A5D'),
+            rectGroup(28, '#FFB366'),
+            rectGroup(42, '#FFCF9F'),
+            rectGroup(56, '#FFE7CF'),
+            rectGroup(70, '#FFF4EB'),
+            {
+                type: 'group',
+                width: 84,
+                bottom: 10,
+                left:50,
+                children: [{
+                        type: 'text',
+                        z: 100,
+                        left: 'left',
+                        top: 'middle',
+                        style: {
+                            fill: '#333',
+                            // text: '100',
+                            font: '10px Microsoft YaHei'
+                        }
+                    },
+                    {
+                        type: 'text',
+                        z: 100,
+                        left: 'right',
+                        top: 'middle',
+                        style: {
+                            fill: '#333',
+                            text: '0',
+                            font: '10px Microsoft YaHei'
+                        }
+                    }
+                ]
+            },
+            {
+                type: 'group',
+                bottom: 24,
+                right: 50,
+                children: [{
+                        type: 'circle',
+                        z: 100,
+                        top: 'middle',
+                        style: {
+                            fill: '#2ABED1'
+                        },
+                        shape: {
+                            cx: 0,
+                            cy: 0,
+                            r: 4
+                        }
+                    },
+                    {
+                        type: 'text',
+                        z: 100,
+                        top: 'middle',
+                        style: {
+                            fill: '#333',
+                            text: '当前项目预算所在区间',
+                            font: '11px Microsoft YaHei',
+                            x: 12
+                        }
+                    }
+                ]
+            }
+        ],
+        visualMap: [{
+            show:false,
+            type: 'piecewise',
+            splitNumber: 5,
+            showLabel: false,
+            itemWidth: 16,
+            itemHeight: 12,
+            itemGap: 0,
+            inverse: true,
+            min: 0,
+            dimension:3,
+            seriesIndex: [0],
+            orient: 'horizontal',
+            left: '5%',
+            bottom: '5%',
+            inRange:{                             //定义 在选中范围中 的视觉元素
+                color: ['#FFE7CF', '#FFCF9F','#FFB366','#F48A5D', '#F06326'],
+            },
+            outOfRange:{
+                color: ['#FFF4EB'],
+            },
+        }],
+        legend: {
+            show: false,
+            data: [{
+                name: '当前项目预算',
+                icon: 'circle',
+            }],
+            orient: 'horizontal',
+            seriesIndex: [1],
+            right: '30%',
+            bottom: '5%',
+            itemWidth: 15,
+            itemHeight: 15,
+            itemGap: 30,
+        },
+        series: [{
+            name: '类似项目数量',
+            type: 'heatmap',
+            label: {
+                show: false
+            },
+            itemStyle: {
+                normal:{
+                    color:'#fff',
+                    borderWidth: 1,
+                    borderColor: '#fff'
+                },
+                emphasis:{
+                    borderWidth: 1,
+                    borderColor: '#f75441'
+                }
+            },
+            zlevel: 2,
+            tooltip: {
+                confine:true,
+                formatter: function(params){
+                    return params;
+                }
+            }
+            
+        }, {
+            name: '当前项目预算所在区间',
+            type: 'effectScatter',
+            showEffectOn: 'render',
+            rippleEffect: {
+                brushType: 'stroke',
+                color: '#2CB7CA',
+            },
+            emphasis:{
+                itemStyle:{
+                    color: '#2ABED1',
+                }
+            },
+            effectType:'ripple',
+            coordinateSystem: 'cartesian2d',
+            hoverAnimation: true,
+            itemStyle: {
+                color: '#2ABED1',
+                shadowBlur: 8,
+                shadowColor: '#2ABED1'
+            },
+            zlevel: 3,
+            symbol: 'circle',
+            symbolSize: 8,
+            // data:[],
+            tooltip: {
+                confine:true,
+                formatter: function(params){
+                    return params;
+                }
+            }
+        }]
+    },
+    // 柱状图
+    barChart:{
+        color:['#05A6F3'],
+        grid:{
+            left:12,
+            right:12,
+            bottom:50
+        },
+        yAxis:{
+            axisLabel:{
+                fontSize:10,
+                margin:4
+            },
+            splitLine: {
+                lineStyle:{
+                    type: 'dashed',  // y轴背景虚线
+                    width: 0.5
+                }
+            },
+            nameGap:20,
+            nameTextStyle:{
+                fontSize: 10,
+                align:'left',
+                padding:[0,0,0,-20],
+            }
+        },
+        xAxis:{
+            min:0,
+            axisLabel:{
+                showMinLabel: true,
+                showMaxLabel: true,
+                textStyle: {
+                    color: '#626262',
+                    fontSize: 10,
+                    padding:[15,4,0,0]
+                },
+                formatter:function(val, index) {
+                    if(val == '0-2' || val == '0-2天') {
+                        val = '0天'
+                    } else if (val == '58-60' || val == '58-60天') {
+                        val = '60天  '
+                    } else {
+                        val = ''
+                    }
+                    return val;
+                },
+                
+            },
+            axisTick: {
+                interval: 0
+            },
+            nameGap:20,
+            nameLocation: 'end',
+            nameTextStyle:{
+                fontSize: 10,
+                align: 'right',
+                padding:[80,20,0,0],
+                color: '#9B9CA3'
+            }
+        },
+        series: [
+            {
+                type:'bar',
+                name:'类似项目标书编制周期',
+                barWidth: 10,
+                barMaxWidth: 10,
+                itemStyle:{
+                    color: '#05A6F3'
+                }
+            }
+        ],
+        graphic: [
+            {
+                type: 'group',
+                bottom: 10,
+                left: 32,
+                children: [{
+                        type: 'circle',
+                        z: 100,
+                        top: 'middle',
+                        style: {
+                            fill: '#FB483D'
+                        },
+                        shape: {
+                            cx: 0,
+                            cy: 0,
+                            r: 4
+                        }
+                    },
+                    {
+                        type: 'text',
+                        z: 100,
+                        top: 'middle',
+                        style: {
+                            fill: '#333',
+                            text: '当前项目标书编制周期',
+                            font: '11px Microsoft YaHei',
+                            x: 8
+                        }
+                    }
+                ]
+            },
+            {
+                type: 'group',
+                bottom: 10,
+                right: 20,
+                children: [{
+                        type: 'circle',
+                        z: 100,
+                        top: 'middle',
+                        style: {
+                            fill: '#3399FF'
+                        },
+                        shape: {
+                            cx: 0,
+                            cy: 0,
+                            r: 4
+                        }
+                    },
+                    {
+                        type: 'text',
+                        z: 100,
+                        top: 'middle',
+                        style: {
+                            fill: '#333',
+                            text: '类似项目标书编制周期',
+                            font: '11px Microsoft YaHei',
+                            x: 8
+                        }
+                    }
+                ]
+            }
+        ],
+        legend:{
+            show: false,
+        },
+        tooltip:{
+            backgroundColor:'#fff',
+            confine:true,
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[7,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            borderWidth:2,
+            borderColor: '#F5F6F7',
+            formatter: function(params){
+                // console.log(params)
+                var tip = '';
+                for (var i = 0; i < params.length; i++) {
+                    params[i].value == undefined ? params[i].value = 0 : params[i].value;
+                    tip 
+                    if( params[i].seriesName === '项目数量') {
+                        tip = tip +  '编制周期:' + params[i].name + '<br/>' + params[i].seriesName + ':' + params[i].value + '个' + '<br/>';
+                    }
+                }
+                return tip;
+            }
+        }
+    },
+    // 饼图
+    pieChart:{
+        color:['#05A6F3','#0BD991', '#8E6DF2', '#5B6E96', '#F06326','#FF8040',  '#FF9F40', '#FFCF9F','#67E5B9', '#67C7F5', '#CEC2F2','#C3CAD9'].reverse(),
+        grid:{
+            left: 12,
+            right: 12
+        },
+        legend:{
+            left:'center',
+            bottom: 10,
+            icon: 'circle',
+            itemWidth:8,
+            itemHeight:8,
+            textStyle:{
+                fontSize: 11
+            },
+            // formatter: function (name) { 
+            //     var len = name.length
+            //     switch (len) {
+            //         case 2:
+            //             return name + '\v\v\v\v\v\v\v'
+            //             break;
+            //         case 3:
+            //             return name + '\v\v\v\v'
+            //             break;
+            //         default:
+            //             return  name
+            //             break;
+            //     }
+            // }
+        },
+        series:{
+            label:{
+                show: true,
+                position: 'inside',
+                fontSize: 11,
+                rotate: true,
+                formatter: function(params){
+                    if(params.percent < 10) {
+                        return ''
+                    } else {
+                        return params.percent + '%'
+                    }
+                }
+            },
+            labelLine: {
+                show:false
+            },
+            itemStyle:{
+                borderWidth:2,
+                borderColor:'#fff'
+            },
+            center: ['50%', '50%'],
+            bottom: 40,
+            avoidLabelOverlap: true,
+            // minShowLabelAngle: 20,
+            radius:[2, '80%'],
+            minAngle: 20,
+        },
+        tooltip:{
+            backgroundColor:'#fff',
+            confine:true,
+            axisPointer: {        
+                type: 'shadow', 
+                shadowStyle:{
+                    color:'rgba(5,166,243,0.1)'
+                }
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[7,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            borderWidth:2,
+            borderColor: '#F5F6F7',
+            formatter:function(params){
+                return params;
+            }
+        }
+    },
+    // 折线图
+    lineChart:{
+        color:['#05A6F3','#0BD991','#FF9F40'],
+        xAxis:{
+            axisLabel:{
+                textStyle: {
+                    color: '#626262',
+                    fontSize: 10,
+                },
+                interval: 0
+            },
+        },
+        grid:{
+            top: 30,
+            left:12,
+            right:12
+        },
+        yAxis:{
+            splitLine: {
+                lineStyle:{
+                    type: 'dashed',
+                    width: 0.5
+                }
+            },
+            nameGap: 15,
+            nameTextStyle:{
+                fontSize: 10,
+                align: 'left',
+                color: '#9B9CA3',
+                padding: [0,0,0,-30]
+            },
+            axisLabel: {
+                margin:2,
+                fontSize:10,
+                color: '#5F5E64',
+                interval: 'auto',
+                formatter: function(value, index){
+                    return value.toString().replace(/,/,'');
+                }
+            }
+        },
+        legend:{
+            orient: 'horizontal',
+            icon:'circle',
+            bottom: 20,
+            itemWidth: 8,
+            itemHeight: 8,
+            textStyle: {
+                color: '#5F5E64',
+                fontSize: 11
+            }
+        },
+        series:{
+            showSymbol:false,
+            smooth: false,
+            symbol:'circle',
+            symbolSize: 3,
+            itemStyle:{
+                borderColor: "#fff",
+                borderWidth: 1
+            }
+        },
+        tooltip:{
+            backgroundColor:'#fff',
+            confine:true,
+            axisPointer: {        
+                type: 'line', 
+                lineStyle:{
+                    width:2,
+                    color:'#2ABED1'
+                },
+                z: 3
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[7,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            borderWidth:2,
+            borderColor: '#F5F6F7'
+        },
+        lineStyle:{
+            width: 0.5
+        }
+        
+    },
+    // 柱状折线图(双Y轴)
+    barLineChart:{
+        chartExtend:{
+            grid:{
+                top:30,
+                left: 10,
+                right: 10
+            },
+            xAxis: {
+                axisLabel:{
+                    textStyle: {
+                        color: '#626262',
+                        fontSize: 10,
+                    }
+                },
+                nameLocation: 'start',
+                nameTextStyle:{
+                    fontSize: 10,
+                    align: 'left',
+                    padding:[55,0,0,30],
+                    color: '#9B9CA3'
+                }
+            },
+            yAxis(item) {
+                item[0].splitLine = {
+                    lineStyle:{
+                        type: 'dashed',
+                        width: 0.5
+                    }
+                }
+                item[1].splitLine = {
+                    show:false,
+                    lineStyle:{
+                        type: 'dashed',
+                        width: 0.5
+                    }
+                },
+                item[1].axisLabel = {
+                    show: true,
+                    margin: 2,
+                    fontSize: 10,
+                    color: '#5F5E64',
+                    formatter: function(value, index){
+                        return value.toString().replace(/,/,'');
+                    }
+                },
+                item[0].axisLabel = {
+                    margin: 2,
+                    fontSize: 10,
+                    color: '#5F5E64',
+                    formatter: function(value, index){
+                        return value.toString().replace(/,/,'');
+                    }
+                }
+                return item;
+            },
+            tooltip: {
+                confine:true,
+                backgroundColor:'#fff',
+                axisPointer: {
+                    type: 'shadow',
+                    shadowStyle:{
+                        color:'rgba(5,166,243,0.1)'
+                    }
+                },
+                textStyle:{
+                    color:'#171826',
+                    fontSize:12
+                },
+                padding:[7,12],
+                extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+                borderWidth:2,
+                borderColor: '#F5F6F7'
+            },
+            legend: {
+                show: true,
+                orient: 'horizontal',
+                icon:'circle',
+                bottom:20,
+                align:'left',
+                itemWidth: 8,
+                itemHeight: 8,
+                itemGap:20,
+                textStyle:{
+                    fontSize:11
+                },
+                formatter: function (name) {
+                    if(name == '企业数量') {
+                        name = name + '(个)'
+                    }
+                    return name;
+                }
+            },
+            series: {
+                smooth:false
+            },
+            color:['#05A6F3', '#FF9F40']
+        },
+    },
+    deformPieChart:{
+        dataset: {
+            source: []
+        },
+        legend: {
+            bottom: 10,
+            align: 'left', 
+            orient: 'horizontal', 
+            icon: "circle",
+            itemWidth:8,
+            itemHeight: 8,
+            itemGap:15,
+            textStyle: {
+                color: '#909399',
+                fontSize: 10,
+                rich: {
+                    x: {
+                        width: 48,
+                        color: '#909399',
+                        fontSize: 10,
+                    }
+                },
+            },
+        },
+        calculable: false,
+        tooltip:{
+            backgroundColor:'#fff',
+            confine:true,
+            axisPointer: {        
+                type: 'shadow', 
+                shadowStyle:{
+                    color:'rgba(5,166,243,0.1)'
+                }
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[7,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            borderWidth:2,
+            borderColor: '#F5F6F7',
+            formatter:function(params){
+                return params;
+            }
+        },
+        series: {
+            name: '半径模式',
+            type: 'pie',
+            bottom:20,
+            avoidLabelOverlap: true,
+            stillShowZeroSum: false,
+            radius:[2, '85%'],
+            clockWise: false,
+            startAngle: 60,
+            center: ['50%', '50%'],
+            roseType: 'area',
+            encode: {
+                x:0,
+                y:1,
+                itemName: '行业',
+                value: "类似项目规模", 
+            },
+            labelLine: {
+                show:false
+            },
+            itemStyle: {
+                normal: {
+                    color: function(params) {
+                        var colorList = ['#05A6F3','#0BD991', '#8E6DF2', '#5B6E96', '#F06326','#FF8040',  '#FF9F40', '#FFCF9F','#67E5B9', '#67C7F5', '#CEC2F2','#C3CAD9'];
+                        return colorList[params.dataIndex]
+                    },
+                    borderWidth:1,
+                    borderColor:'#fff',
+                    label: {
+                        position: 'inside',
+                        rotate: true,
+                        textStyle: {
+                            fontSize: 11
+                        },
+                        formatter: function(params){
+                            // console.log(params)
+                            if(params.percent < 10) {
+                                return ''
+                            } else {
+                                return params.percent + '%'
+                            }
+                        }
+                    },
+                },
+            },
+        }
+    }
+}

+ 20 - 1
src/web/staticres/common-module/collection/js/date-mobile.js

@@ -4,7 +4,7 @@ var dateComponentTemplate = `<div class="j-container">
     <div class="area-card-item" :class="{active:item.selected==true}" v-for="(item, index) in timeSelectList" :key="index" @click="selectFixedDate(item)">{{item.name}}</div>
     </div>
     <div class="timePicker" @click="dateShowEvent" :class="{clickactive:dateStyle==true}">
-    <van-field v-model="dateTimePickerState.startPlaceHolder" placeholder="开始时间"></van-field>
+    <van-field @focus="getStratFocus" v-model="dateTimePickerState.startPlaceHolder" placeholder="开始时间"></van-field>
     <div class="line"></div>
     <van-field @focus="getEndFocus" v-model="dateTimePickerState.endPlaceHolder" placeholder="结束时间"></van-field>
     </div>
@@ -275,6 +275,10 @@ var dateComponent = {
     // 结束时间获取焦点
     getEndFocus: function(){
       this.datePicker.endshow = true
+      document.activeElement.blur()
+    },
+    getStratFocus: function() {
+      document.activeElement.blur()
     },
     resetAll:function() {
       let params = {
@@ -294,12 +298,27 @@ var dateComponent = {
       }else{
         this.datePicker.endshow = false
       }
+      this.sortTime(this.dateTimePickerState.start, this.dateTimePickerState.end)
     },
     // 选择结束时间弹窗确认按钮
     onendConfirm: function(){
       this.dateTimePickerState.end = new Date(this.$refs.getendValues.value)
       this.dateTimePickerState.endPlaceHolder = this.$refs.getendValues.value.pattern('yyyy年MM月dd日')
       this.datePicker.endshow = false
+      this.sortTime(this.dateTimePickerState.start, this.dateTimePickerState.end)
+    },
+    // 时间大小判断
+    sortTime: function(start, end) {
+      if(start != '' && end != '') {
+        start = new Date(start).getTime()
+        end = new Date(end).getTime()
+        if (start > end) {
+          this.dateTimePickerState.start = new Date(end)
+          this.dateTimePickerState.startPlaceHolder = new Date(end).pattern('yyyy年MM月dd日')
+          this.dateTimePickerState.end = new Date(start)
+          this.dateTimePickerState.endPlaceHolder = new Date(start).pattern('yyyy年MM月dd日')
+        }
+      }
     },
     // 选择时间弹窗关闭按钮
     pickerClose: function() {

+ 981 - 0
src/web/staticres/common-module/collection/js/echarts_option.js

@@ -0,0 +1,981 @@
+// 中国地图配置项
+var mapSettings = {
+    chartSettings:{
+        positionJsonLink: "/big-member/js/china.json",
+        beforeRegisterMapOnce (map) {
+            return map
+        },
+        beforeRegisterMap (map) {
+            return map
+        },
+        label:{
+            show:true,
+            fontSize:9
+        },
+        selectedMode:false, // 去掉省份小圆点
+        itemStyle:{
+            normal:{
+                borderColor:'#F06326',
+                areaColor: '#FFFFFF'
+            }
+        },
+        // zoom:0.95, // 缩放比例
+    },
+    chartExtend: {
+        tooltip: {
+            confine: true,
+            backgroundColor:'#fff',
+            axisPointer: {            // 坐标轴指示器,坐标轴触发有效
+                type: 'shadow',        // 默认为直线,可选为:'line' | 'shadow'
+                shadowStyle:{
+                    color:'rgba(5,166,243,0.1)'
+                },
+                z: 3
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[8,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            formatter:function(params,ticket, callback){
+                if(params.data == null){
+                    return params.name+':0'
+                }else{
+                    return params.name+':'+ params.value
+                }
+            }
+        },
+        grid:{
+            height: '280px',
+            containLabel: true
+        },
+        legend:{ // 隐藏图标上方小方块及文字
+            selectedMode: false,
+            textStyle:{
+                color:'transparent'
+            },
+            itemWidth:0,
+            itemHeight:0,
+        },
+        silent:false, // 禁用鼠标点击、滑过事件
+        series: {
+            showLegendSymbol:false,
+            selectedMode:false,
+        },
+        graphic:[
+            {
+                type:'group',
+                bottom: 54,
+                children:[
+                {
+                    type: 'text',
+                    z: 100,
+                    left: 'left',
+                    top: 'middle',
+                    style: {
+                        fill: '#333',
+                        text:'市场分布数量',
+                        font: '10px Microsoft YaHei'
+                    }
+                }]
+            },
+            {
+                type: 'rect',
+                z: 101,
+                left: 0,
+                bottom: 34,
+                shape: {
+                    width: 84,
+                    height: 14
+                },
+                style: {
+                    stroke: '#FB483D',
+                    fill: 'transparent',
+                    lineWidth: 0.5
+                }
+            },
+            rectGroup(0,'#F06326'),
+            rectGroup(14,'#F48A5D'),
+            rectGroup(28,'#FFB366'),
+            rectGroup(42,'#FFCF9F'),
+            rectGroup(56,'#FFE7CF'),
+            rectGroup(70,'#FFF4EB'),
+            {
+                type:'group',
+                width: 84,
+                bottom: 20,
+                children:[
+                {
+                    type: 'text',
+                    z: 100,
+                    left: 'left',
+                    top: 'middle',
+                    style: {
+                        fill: '#333',
+                        text:'100',
+                        font: '10px Microsoft YaHei'
+                    }
+                },
+                {
+                    type: 'text',
+                    z: 100,
+                    left: 'right',
+                    top: 'middle',
+                    style: {
+                        fill: '#333',
+                        text:'0',
+                        font: '10px Microsoft YaHei'
+                    }
+                }]
+            }
+        ],
+        visualMap: {
+            show:false,
+            inRange:{                             //定义 在选中范围中 的视觉元素
+                color: ['#FFF4EB','#FFE7CF', '#FFCF9F','#FFB366','#F48A5D', '#F06326'],
+            },
+            outOfRange:{
+                color: ['#F06326'],
+            },
+        },
+    },
+    chart: null
+}
+// 月报本月项目规模分布
+var mapSettings2 = {
+    chartSettings:{
+        positionJsonLink: "/big-member/js/china.json",
+        beforeRegisterMapOnce (map) {
+            return map
+        },
+        beforeRegisterMap (map) {
+            return map
+        },
+        label:{
+            show:true,
+            fontSize:9
+        },
+        selectedMode:false,
+        itemStyle:{
+            normal:{
+                borderColor:'#F06326',
+                areaColor: '#FFFFFF'
+            }
+        },
+    },
+    chartExtend: {
+        tooltip: {
+            confine: true,
+            backgroundColor:'#fff',
+            axisPointer: {
+                type: 'shadow', 
+                shadowStyle:{
+                    color:'rgba(5,166,243,0.1)'
+                },
+                z: 3
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[8,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            formatter:function(params,ticket, callback){
+                if(params.data == null){
+                    return params.name + ':0'
+                }else{
+                    return params.name + ':'+ params.value
+                }
+            }
+        },
+        grid:{
+            height: '280px',
+            containLabel: true
+        },
+        legend:{
+            selectedMode: false,
+            textStyle:{
+                color:'transparent'
+            },
+            itemWidth:0,
+            itemHeight:0,
+        },
+        silent:false,
+        series: {
+            showLegendSymbol:false,
+            selectedMode:false,
+        },
+        graphic:[
+            {
+                type:'group',
+                bottom: 54,
+                children:[
+                {
+                    type: 'text',
+                    z: 100,
+                    left: 'left',
+                    top: 'middle',
+                    style: {
+                        fill: '#333',
+                        text:'单位:万元',
+                        font: '10px Microsoft YaHei'
+                    }
+                }]
+            },
+            {
+                type: 'rect',
+                z: 101,
+                left: 0,
+                bottom: 34,
+                shape: {
+                    width: 84,
+                    height: 14
+                },
+                style: {
+                    stroke: '#FB483D',
+                    fill: 'transparent',
+                    lineWidth: 0.5
+                }
+            },
+            rectGroup(0,'#F06326'),
+            rectGroup(14,'#F48A5D'),
+            rectGroup(28,'#FFB366'),
+            rectGroup(42,'#FFCF9F'),
+            rectGroup(56,'#FFE7CF'),
+            rectGroup(70,'#FFF4EB'),
+            {
+                type:'group',
+                width: 84,
+                bottom: 20,
+                children:[
+                {
+                    type: 'text',
+                    z: 100,
+                    left: 'left',
+                    top: 'middle',
+                    style: {
+                        fill: '#333',
+                        text:'100',
+                        font: '10px Microsoft YaHei'
+                    }
+                },
+                {
+                    type: 'text',
+                    z: 100,
+                    left: 'right',
+                    top: 'middle',
+                    style: {
+                        fill: '#333',
+                        text:'0',
+                        font: '10px Microsoft YaHei'
+                    }
+                }]
+            }
+        ],
+        visualMap: {
+            show:false,
+            inRange:{
+                color: ['#FFF4EB','#FFE7CF', '#FFCF9F','#FFB366','#F48A5D', '#F06326'],
+            },
+            outOfRange:{
+                color: ['#F06326'],
+            },
+        },
+    },
+    chart: null
+}
+// 月报本月中标企业注册地分布
+var mapSettings3 = {
+    chartSettings:{
+        positionJsonLink: "/big-member/js/china.json",
+        beforeRegisterMapOnce (map) {
+            return map
+        },
+        beforeRegisterMap (map) {
+            return map
+        },
+        label:{
+            show:true,
+            fontSize:9
+        },
+        selectedMode:false,
+        itemStyle:{
+            normal:{
+                borderColor:'#F06326',
+                areaColor: '#FFFFFF'
+            }
+        },
+    },
+    chartExtend: {
+        tooltip: {
+            confine: true,
+            backgroundColor:'#fff',
+            axisPointer: {
+                type: 'shadow', 
+                shadowStyle:{
+                    color:'rgba(5,166,243,0.1)'
+                },
+                z: 3
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[8,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            formatter:function(params,ticket, callback){
+                if(params.data == null){
+                    return params.name + ':0'
+                }else{
+                    return params.name + ':'+ params.value
+                }
+            }
+        },
+        grid:{
+            height: '280px',
+            containLabel: true
+        },
+        legend:{
+            selectedMode: false,
+            textStyle:{
+                color:'transparent'
+            },
+            itemWidth:0,
+            itemHeight:0,
+        },
+        silent:false,
+        series: {
+            showLegendSymbol:false,
+            selectedMode:false,
+        },
+        graphic:[
+            {
+                type:'group',
+                bottom: 54,
+                children:[
+                {
+                    type: 'text',
+                    z: 100,
+                    left: 'left',
+                    top: 'middle',
+                    style: {
+                        fill: '#333',
+                        text:'单位:个',
+                        font: '10px Microsoft YaHei'
+                    }
+                }]
+            },
+            {
+                type: 'rect',
+                z: 101,
+                left: 0,
+                bottom: 34,
+                shape: {
+                    width: 84,
+                    height: 14
+                },
+                style: {
+                    stroke: '#FB483D',
+                    fill: 'transparent',
+                    lineWidth: 0.5
+                }
+            },
+            rectGroup(0,'#F06326'),
+            rectGroup(14,'#F48A5D'),
+            rectGroup(28,'#FFB366'),
+            rectGroup(42,'#FFCF9F'),
+            rectGroup(56,'#FFE7CF'),
+            rectGroup(70,'#FFF4EB'),
+            {
+                type:'group',
+                width: 84,
+                bottom: 20,
+                children:[
+                {
+                    type: 'text',
+                    z: 100,
+                    left: 'left',
+                    top: 'middle',
+                    style: {
+                        fill: '#333',
+                        text:'100',
+                        font: '10px Microsoft YaHei'
+                    }
+                },
+                {
+                    type: 'text',
+                    z: 100,
+                    left: 'right',
+                    top: 'middle',
+                    style: {
+                        fill: '#333',
+                        text:'0',
+                        font: '10px Microsoft YaHei'
+                    }
+                }]
+            }
+        ],
+        visualMap: {
+            show:false,
+            inRange:{
+                color: ['#FFF4EB','#FFE7CF', '#FFCF9F','#FFB366','#F48A5D', '#F06326'],
+            },
+            outOfRange:{
+                color: ['#F06326'],
+            },
+        },
+    },
+    chart: null
+}
+// 中国地图例graphic配置函数
+function rectGroup(left,color) { 
+    return {
+        type: 'rect',
+        z: 100,
+        left: left,
+        bottom: 34,
+        shape: {
+            width: 14,
+            height: 14
+        },
+        style: {
+            fill: color
+        }
+    }
+}
+//  投标决策分析页面:预算分布、中标金额、折扣率分布三个图表配置项(只配置相同部分,不同部分在页面里单独配置)
+var barChart = {
+    chartSettings: {},
+    chartExtend:{
+        grid:{
+            left:4,
+            x:0,
+            y:20,
+            x2:0,
+            bottom:20
+        },
+        xAxis:{
+            axisLabel:{
+                interval: 0, // 强制显示x轴所有刻度
+                fontSize: 10
+            }
+        },
+        yAxis(item){
+            item[0].splitLine = {
+                lineStyle:{
+                    type: 'dashed',  // y轴背景虚线
+                    width: 0.5
+                }
+            }
+            item[0].axisLabel = {
+                margin:2,
+                fontSize: 10
+            }
+            item[1].splitLine = {
+                show:false
+            }
+            item[1].axisLabel = {
+                show:false,
+                fontSize: 10
+            }
+            return item;
+        },
+        tooltip: {
+            trigger: 'axis',
+            confine: true,
+            backgroundColor:'#fff',
+            axisPointer: {
+                type: 'shadow',
+                shadowStyle: {},
+                z: 3
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[7,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08);transform: translate3d(0,0,0)',
+            formatter:function(params){
+                //移除重复的数据
+                for (var i = 0; i < params.length; i++) {
+                    for (var j = params.length - 1; j > i; j--) {
+                        if (params[j].data == params[i].data) {
+                            params.splice(j, 1);
+                            break;
+                        }
+                    }
+                }
+                var tip = '';
+                for (var i = 0; i < params.length; i++) {
+                    if( i == 0) {
+                        tip = params[i].value == 0 ? '' : tip + params[i].seriesName + ':' + params[i].value + '个' + '<br/>';
+                    }else if(i == 1){
+                        if (params[i].value != 0 || params[i].value != '0.00') {
+                            if (params[i].seriesName === '平均折扣率') {
+                                tip = tip + params[i].seriesName + ':' + params[i].value + '%' + '<br/>';
+                            } else {
+                                tip = tip + params[i].seriesName + ':' + params[i].value + '万元' + '<br/>';
+                            }
+                        } else {
+                            tip = tip
+                        }
+                        
+                    }
+                }
+                return tip;
+            }
+        },
+        legend: {
+            show:false,
+            orient: 'horizontal',
+            icon:'circle',
+            bottom:20,
+            align:'left',
+            itemWidth: 8,
+            itemHeight: 8,
+            itemGap:20,
+            textStyle:{
+                fontSize:11,
+                rich:{
+                    a:{
+                        fontSize:16,
+                        verticalAlign:'top',
+                        align:'center',
+                        padding:[0,15,28,0]
+                    },
+                    b:{
+                        fontSize:14,
+                        align:'center',
+                        padding:[0,15,0,0],
+                        lineHeight:25
+                    }
+                }
+            },
+            formatter: function (name) {
+                var wnYuan = ['金额', '项目金额', '项目规划', '项目总预算', '项目总规模']
+                var ge = ['数量', '项目数量']
+                if (wnYuan.indexOf(name) !== -1) {
+                    name += '(万元)'
+                } else if (ge.indexOf(name) !== -1) {
+                    name += '(个)'
+                }
+                return name;
+            },
+        },
+        series: {
+            barWidth: 20,
+            smooth:false,
+            symbol:'none',
+            lineStyle: {
+                width: 0,
+                color: 'rgba(0, 0, 0, 0)' // 线的颜色是透明的
+            },
+        },
+        
+    },
+}
+
+// 平均折扣率配置
+var multiBarChart = {
+    chartSettings: {
+        showLine: ['平均折扣率'],
+    },
+    chartExtend:{
+        grid:{
+            x:12,
+            y:20,
+            x2:12,
+        },
+        yAxis: {
+            splitLine: {
+                show: true,
+                lineStyle: {
+                    type: 'dashed',  // y轴背景虚线
+                    width: 0.5
+                }
+            },
+            axisLabel:{
+                fontSize:10
+            },
+        },
+        xAxis: {
+            axisLabel:{
+                fontSize:10
+            }
+        },
+        tooltip: {
+            trigger: 'axis',
+            confine: true,
+            backgroundColor:'#fff',
+            axisPointer: {
+                type: 'shadow',
+                shadowStyle:{
+                    color:'rgba(5,166,243,0.1)'
+                }
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding: [8,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            formatter: function(params){
+                var tip = '';
+                for (var i = 0; i < params.length; i++) {
+                    if( i< 4) {
+                        tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '<br/>';
+                    }else {
+                        tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '%' + '<br/>';
+                    }
+                }
+                tip += '<div style="padding-top:2px;text-align:center;color:#9B9CA3;">' + ' - ' + params[0].name.substring(0,params[0].name.lastIndexOf('年')) + ' - ' + '</div>'
+                return tip;
+            },
+        },
+        legend: {
+            orient: 'horizontal',
+            bottom:20,
+            icon:'circle',
+            itemWidth: 8,
+            itemHeight: 8,
+            padding:[0,6],
+            data:['日期', '0~5%', '5~10%','10~30%','30~100%','平均折扣率'],
+            textStyle:{
+                fontSize:11
+            }
+        },
+        series: {
+            smooth:false,
+        },
+        color:['#05A6F3','#0BD991','#FF9F40','#8E6DF2','#F1D090']
+    },
+}
+
+var mBarChart = {
+    dataEmpty: true,
+    chartSettings: {},
+    chartExtend:{
+        grid:{
+            x:14,
+            y:20,
+            x2:14
+        },
+        tooltip: {
+            trigger: 'axis',
+            confine: true,
+            backgroundColor:'#fff',
+            axisPointer: {
+                type: 'shadow',
+                shadowStyle:{
+                    color:'rgba(5,166,243,0.1)'
+                }
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[8,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            z: 3
+        },
+        legend: {
+            orient: 'horizontal',
+            icon:'circle',
+            bottom:10,
+            left: 'center',
+            itemWidth: 8,
+            itemHeight: 8,
+            itemGap:10,
+            textStyle:{
+                fontSize:11
+            }
+        },
+        yAxis: {
+            splitLine: {
+                show: true,
+                lineStyle: {
+                    type: 'dashed',
+                    width: 0.5,
+                    color:'rgba(0, 0, 0, 0.08)'
+                }
+            },
+            axisLabel:{
+                fontSize:10
+            },
+        },
+        xAxis: {
+            axisLabel:{
+                fontSize:10
+            }
+        },
+        series: {
+            barWidth: 20,
+            type:'bar'
+        },
+        color:['#9C72F4','#6B78E8','#05A6F3','#2ABED1','#0BD991','#C0C4CC','#B8D4F9','#444A7A','#F1D090','#B8D4F9','#C09BFC','#104EA3','#21CED2','#FFB901','#7BBFE5','#82E9D6','#62B8FF','#7E56EE','#B3E3E7','#8591FF','#96C3D8','#3774E8','#CDCEFE','#6BBEF4','#6E55B4','#2B82FE','#FF9A01','#01C290','#BAE1A8','#EB97D8']
+    },
+}
+
+
+// 月报 (本月项目规模)
+var barChart2 = {
+    chartExtend:{
+        grid:{
+            left:4,
+            x:0,
+            y:20,
+            x2:12,
+        },
+        xAxis: {
+            axisLabel:{
+                fontSize:10
+            }
+        },
+        yAxis(item){
+            var maxCountList = vNode.data.curMonthScaleData.rows.map(v =>{
+                return v['项目规模']
+            })
+            var maxPriceList = vNode.data.curMonthScaleData.rows.map(v =>{
+                return v['环比增长率(%)-右纵轴']
+            })
+            var maxCount = Math.ceil(Math.max.apply(null,maxCountList)).toString();
+            var maxPrice = Math.ceil(Math.max.apply(null,maxPriceList)).toString();
+            var minRight = Math.ceil(Math.min.apply(null,maxPriceList)).toString();
+            maxCount = Math.ceil(maxCount / (Math.pow(10,maxCount.length -1))) * Math.pow(10,maxCount.length -1);
+            maxPrice = Math.ceil(maxPrice / (Math.pow(10,maxPrice.length -1))) * Math.pow(10,maxPrice.length -1);
+            if(minRight.indexOf('-') > -1) {
+                minRight = '-'  + Math.ceil(minRight.replace('-','') / (Math.pow(10,minRight.replace('-','').length -1))) * Math.pow(10,minRight.replace('-','').length -1)
+            } else {
+                minRight = 0;
+            }
+            item[0].min = 0;
+            item[1].min = minRight;
+            item[0].max = maxCount;
+            item[0].interval = Math.ceil(maxCount / 5);
+            item[1].max = maxPrice;
+            item[1].interval = Math.ceil((maxPrice - minRight) / 5);
+            item[0].splitLine = {
+                lineStyle:{
+                    type: 'dashed',
+                    width: 0.5
+                }
+            }
+            item[1].splitLine = {
+                show:false,
+                lineStyle:{
+                    type: 'dashed',
+                    width: 0.5
+                }
+            },
+            item[1].axisLabel = {
+                show: true,
+                fontSize: 10
+            },
+            item[0].axisLabel = {
+                margin:2,
+                fontSize: 10,
+                formatter: function(value, index){
+                    return value.toString().replace(/,/,'');
+                }
+            }
+            return item;
+        },
+        tooltip: {
+            trigger: 'axis',
+            confine: true,
+            backgroundColor:'#fff',
+            axisPointer: {        
+                type: 'shadow', 
+                shadowStyle:{
+                    color:'rgba(5,166,243,0.1)'
+                }
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[7,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            formatter:function(params){
+                return formatterTip(params)
+            }
+        },
+        legend: {
+            show: true,
+            orient: 'horizontal',
+            icon:'circle',
+            bottom:20,
+            align:'left',
+            itemWidth: 8,
+            itemHeight: 8,
+            itemGap:20,
+            textStyle:{
+                fontSize:11,
+                rich:{
+                    a:{
+                        fontSize:16,
+                        verticalAlign:'top',
+                        align:'center',
+                        padding:[0,15,28,0]
+                    },
+                    b:{
+                        fontSize:14,
+                        align:'center',
+                        padding:[0,15,0,0],
+                        lineHeight:25
+                    }
+                }
+            },
+            formatter: function (name) {
+                if(name == '项目规模') {
+                    name = name + '(万元)'
+                }
+                return name;
+            },
+            data:["项目规模","环比增长率(%)-右纵轴"],
+        },
+        series: {
+            barWidth: 20,
+            smooth:false,
+        },
+        color:['#05A6F3', '#FF9F40']
+    },
+}
+// 月报 (本月中标企业中标项目数量分布)
+var barChart3 = {
+    chartExtend:{
+        grid:{
+            x:8,
+            y:20,
+            x2:12,
+        },
+        xAxis: {
+            axisLabel: {
+                fontSize: 10,
+                formatter: function (val) {
+                    return val + '个';
+                }
+            }
+        },
+        yAxis(item){
+            var maxCountList = vNode.data.curWinEntCountData.rows.map(v =>{
+                return v['企业数量']
+            })
+            var maxPriceList = vNode.data.curWinEntCountData.rows.map(v =>{
+                return v['累计占比(%)-右纵轴']
+            })
+            var maxCount = Math.ceil(Math.max.apply(null,maxCountList)).toString();
+            var maxPrice = Math.ceil(Math.max.apply(null,maxPriceList)).toString();
+            maxCount = Math.ceil(maxCount / (Math.pow(10,maxCount.length -1))) * Math.pow(10,maxCount.length -1);
+            maxPrice = Math.ceil(maxPrice / (Math.pow(10,maxPrice.length -1))) * Math.pow(10,maxPrice.length -1);
+            item[0].min = 0;
+            item[1].min = 0;
+            item[0].max = maxCount;
+            item[0].interval = Math.ceil(maxCount / 5);
+            item[1].max = maxPrice;
+            item[1].interval = Math.ceil((maxPrice - 0) / 5);
+            item[0].splitLine = {
+                lineStyle:{
+                    type: 'dashed',
+                    width: 0.5
+                }
+            }
+            item[1].splitLine = {
+                show:false,
+                lineStyle:{
+                    type: 'dashed',
+                    width: 0.5
+                }
+            },
+            item[1].axisLabel = {
+                show: true,
+                fontSize: 10
+            },
+            item[0].axisLabel = {
+                margin:2,
+                fontSize: 10,
+                formatter: function(value, index){
+                    return value.toString().replace(/,/,'');
+                }
+            }
+            return item;
+        },
+        tooltip: {
+            trigger: 'axis',
+            confine: true,
+            backgroundColor:'#fff',
+            axisPointer: {
+                type: 'shadow',
+                shadowStyle:{
+                    color:'rgba(5,166,243,0.1)'
+                }
+            },
+            textStyle:{
+                color:'#171826',
+                fontSize:12
+            },
+            padding:[7,12],
+            extraCssText:'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
+            formatter:function(params){
+                return formatterTip(params)
+            }
+        },
+        legend: {
+            show: true,
+            orient: 'horizontal',
+            icon:'circle',
+            bottom:20,
+            align:'left',
+            itemWidth: 8,
+            itemHeight: 8,
+            itemGap:20,
+            textStyle:{
+                fontSize:11,
+                rich:{
+                    a:{
+                        fontSize:16,
+                        verticalAlign:'top',
+                        align:'center',
+                        padding:[0,15,28,0]
+                    },
+                    b:{
+                        fontSize:14,
+                        align:'center',
+                        padding:[0,15,0,0],
+                        lineHeight:25
+                    }
+                }
+            },
+            formatter: function (name) {
+                if(name == '企业数量') {
+                    name = name + '(个)'
+                }
+                return name;
+            },
+            data:["企业数量","累计占比(%)-右纵轴"],
+        },
+        series: {
+            barWidth: 20,
+            smooth:false
+        },
+        color:['#05A6F3', '#FF9F40']
+    },
+}
+// 修改tooltip展示效果函数
+function formatterTip(params) {
+    var tip = '';
+    for (var i = 0; i < params.length; i++) {//这里是自己定义样式, params[i].marker 表示是否显示左边的那个小圆圈
+        params[i].value == undefined ? params[i].value = 0 : params[i].value;
+        params[i].marker = '<span style="display:inline-block;margin-right:5px;border-radius:8px;width:8px;height:8px;background-color:' +  params[i].color + '"></span>';
+        if( params[i].seriesName === '项目数量' || params[i].seriesName === '企业数量') {
+            tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '个' + '<br/>';
+        }else if(params[i].seriesName === '环比增长率(%)-右纵轴' || params[i].seriesName === '累计占比(%)-右纵轴'){
+            tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '%' + '<br/>';
+        } else {
+            tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '万元' + '<br/>';
+        }
+    }
+    tip += '<div style="padding-top:2px;text-align:center;color:#9B9CA3;">' + ' - ' + params[0].name + ' - ' + '</div>'
+    return tip;
+}

+ 933 - 0
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -0,0 +1,933 @@
+var vNode = {
+    delimiters: ['${', '}'],
+    el: '#ent-portrait',
+    data () {
+        // 修改柱状条颜色为渐变色
+        this.colorGreen = [new echarts.graphic.LinearGradient(
+            0, 0, 0, 1,
+            [
+                {offset: 1, color: '#2ABED1'},
+                {offset: 0.5, color: '#2ABED1'},
+                {offset: 0, color: '#8DE0EB'}
+            ], false
+        ), '#FF9F40']
+
+        return {
+            sessKey: '$data-ent_portrait',
+            conf: {
+                // 权限查询是否完成
+                powerLoaded: false,
+                // 是否只显示完整的企业画像
+                showPortraitAll: true,
+                // 是否显示,企业全景分析
+                _4: false,
+                // 是否显示中标企业动态
+                _13: false
+            },
+            powerInfo: {},
+            tabActiveName: '1',
+            // 企业信息
+            entInfo: {
+                name: '',
+                follow: 0,
+                followSearchFinish: false,
+                entExist: true
+            },
+            // tab1中的企业基础信息
+            entBaseInfo: {
+                type: null,
+                status: null,
+                creditNo: '',
+                capital: '',
+                employeeNo: '',
+                address: '',
+                scope: '',
+                operStart: -1,
+                operEnd: -1,
+                establish: '',
+                showEntChange: false,
+                org_code: '',
+                company_code: '',
+                legal: '',
+                phone: '',
+                taxCode: ''
+            },
+            // tab2中的项目动态
+            topProject: {
+                list: [],
+                count: '',
+                pageSign: '',
+                showGetNextButton: true
+            },
+            entPortraitInfo: {},
+            stickyTop: 80,
+            singleTab: true,
+            // 年度项目统计设置
+            annualSetting:{
+                showLine: ['项目金额'],
+                axisSite: { right: ['项目金额'] }
+            },
+            // 地图配置项
+            mapSettings: mapSettings,
+            // 年度项目统计数据
+            annualData: {
+                columns: ["日期","项目数量","项目金额"],
+                rows: []
+            },
+            // 地图数据
+            mapChartData: {
+                columns: ['name', 'value'],
+                rows: []
+            },
+            // 月度中标金额
+            monthZbData: {
+                columns: [],
+                rows: []
+            },
+            // 平均折扣率
+            rateData: {
+                columns: [],
+                rows: []
+            },
+            pieChartSettings: {
+                roseType: 'radius'
+            },
+            importantCustomers: [],
+            scrollTop: 0,
+            getEntPortraitInfoTimes: 0,
+            initEchartsOptions: {
+                renderer: 'svg'
+            },
+            gotTab2: false, // 是否已经获取到tab2的数据了
+            svip: false, // 判断是否是超级订阅的企业画像
+            digshow: false, // 判断是否是超级订阅会员
+            overlayShow: true // 弹窗遮罩是否显示
+        }
+    },
+    created: function () {
+        // svip是超级订阅企业查询, 如果是超级订阅不能查看企业情报历史记录
+        var svip = utils.getParam('svip')
+        if (svip) {
+            this.svip = true
+        }
+        // 企业名称恢复
+        var eId = utils.getParam('eId')
+        if (eId) {
+          eId = decodeURIComponent(eId)
+        }
+        this.entInfo.id = eId
+        this.entInfo.name = ''
+        this.restore = this.reStoreState()
+        if (!this.restore) {
+            this.getPowerInfo()
+            // 获取企业基本信息
+            this.getEntBaseInfo()
+        }
+    },
+    mounted: function () {
+        var _this = this
+        // 动态调整sticky距离顶部的高度
+        this.getStickyTop()
+        if (this.scrollTop) {
+            setTimeout(function () {
+                $('#ent-portrait').scrollTop(_this.scrollTop)
+            }, 0)
+        }
+
+        window.addEventListener('resize', function() {
+            _this.getStickyTop()
+        })
+    },
+    watch: {
+        tabActiveName: function (newVal, oldVal) {
+            var _this = this
+            if (newVal == '2') {
+                this.$nextTick(function () {
+                    if (_this.gotTab2) {
+                        // 初始化图表
+                        if (_this.entPortraitInfo && _this.conf.showPortraitAll && !_this.singleTab) {
+                            _this.initChartsData();
+                        }
+                    } else {
+                        if (_this.conf._4) {
+                            // 获取企业画像信息-4
+                            _this.getEntPortrait(function () {
+                                _this.initChartsData()
+                            })
+                            _this.gotTab2 = true
+                            console.log('获取企业全景分析...')
+                        }
+                        // 获取企业中标动态-13
+                        if (_this.conf._13) {
+                            _this.getProjectNews()
+                            _this.gotTab2 = true
+                            console.log('获取企业中标动态...')
+                        }
+                    }
+                });
+            }
+        },
+    },
+    methods: {
+        showToast: function (message) {
+            this.$toast({
+                duration: 1500,
+                forbidClick: true,
+                message: message,
+            })
+        },
+        showLoading: function() {
+            var loading = this.$toast.loading({
+                duration: 0,
+                forbidClick: true,
+                message: '',
+            })
+            return loading
+        },
+        // 超级订阅提示弹窗取消按钮事件
+        beforeClose: function (e, done) {
+            console.log(e)
+            if (e === 'cancel') {
+                this.tabActiveName = '1'
+                done(false)
+                this.digshow = true
+                this.overlayShow = true
+            } else if (e === 'confirm') {
+                // 去开通
+                location.href = "/front/vipsubscribe/introducePage"
+            }
+            this.overlayShow = true
+        },
+        // 获取画像信息
+        getEntPortrait: function (callback) {
+            var _this = this
+            var data = {
+                entId: _this.entInfo.id
+            }
+            let urls = ''
+            if (_this.svip) {
+                urls = '/bigmember/portrait/subVipPortrait/winner'
+
+            } else {
+                urls = '/bigmember/portrait/winner/getData'
+            }
+            _this.getEntPortraitInfoTimes++
+            $.ajax({
+                type: 'POST',
+                url: urls,
+                data: data,
+                success: function (res) {
+                    if (res.error_code == 0) {
+                        _this.loading.clear()
+                        if (res.data && Object.keys(res.data).length !== 0) {
+                            _this.singleTab = false
+                            // 将数据保存到data中
+                            for (var key in res.data) {
+                                _this.entPortraitInfo[key] = res.data[key]
+                            }
+
+                            if (res.data.timeRange && res.data.timeRange.start) {
+                                _this.entPortraitInfo.timeRangeStart = res.data.timeRange.start
+                            }
+                            if (res.data.timeRange && res.data.timeRange.end) {
+                                _this.entPortraitInfo.timeRangeEnd = res.data.timeRange.end
+                            }
+
+                            callback && callback()
+                        } else {
+                            if (_this.getEntPortraitInfoTimes < 5) {
+                                _this.getEntPortrait()
+                            }
+                        }
+                    }
+                },
+                error: function (error) {
+                    _this.$toast('请求失败')
+                }
+            })
+        },
+        // 获取项目动态
+        getProjectNews: function () {
+            var _this = this
+            var data = {
+                entId: _this.entInfo.id,
+                count: _this.topProject.count,
+                pageSign: _this.topProject.pageSign
+            }
+
+            if (data.pageSign) {
+                this.loading = this.showLoading()
+            }
+
+            $.ajax({
+                type: 'POST',
+                url: '/bigmember/portrait/winner/getNewMsg',
+                data: data,
+                success: function (res) {
+                    if (res.error_code == 0) {
+                        _this.loading.clear()
+                        _this.topProject.count = res.data.count
+                        if (res.data.list && $.isArray(res.data.list)) {
+                            if (!_this.topProject.pageSign) {
+                                _this.singleTab = false
+                            }
+
+                            // 修改当前pageSign值
+                            if (!_this.topProject.pageSign) {
+                                _this.topProject.list = []
+                                _this.topProject.pageSign = 'more'
+                                if(res.data.count <= 3) {
+                                    _this.topProject.showGetNextButton = false
+                                }
+                            } else if (_this.topProject.pageSign === 'more') {
+                                _this.topProject.pageSign = 'max'
+                                if(res.data.count <= 23) {
+                                    _this.topProject.showGetNextButton = false
+                                }
+                            } else if (_this.topProject.pageSign === 'max') {
+                                _this.topProject.showGetNextButton = false
+                            }
+
+                            _this.topProject.list = _this.topProject.list.concat(res.data.list)
+                        }
+                    } else {
+                        _this.$toast(res.error_msg)
+                    }
+                },
+                error: function (error) {
+                    _this.$toast('请求失败')
+                }
+            })
+        },
+        // 查询企业基础信息
+        getEntBaseInfo: function () {
+            var _this = this
+            let urls = ''
+            if (_this.svip) {
+                urls = '/bigmember/portrait/subVipPortrait/entDetail'
+            } else {
+                urls = '/bigmember/portrait/ent/detail'
+            }
+            $.ajax({
+                type: 'POST',
+                url: urls,
+                data: {
+                    entId: _this.entInfo.id
+                },
+                success: function (res) {
+                    if (res.error_code == 0) {
+                        _this.loading.clear()
+                        if (res.data && Object.keys(res.data).length !== 0) {
+                            _this.entInfo.name = res.data.entName
+                            for (var key in res.data) {
+                                _this.entBaseInfo[key] = res.data[key]
+                            }
+                        }
+                    } else {
+                        // 不显示提示信息
+                        // _this.$toast(res.error_msg)
+                    }
+                },
+                error: function (error) {
+                    console.log(error)
+                }
+            })
+        },
+        // 查询企业是否存在和企业关注状态
+        getEntFollowState: function () {
+            var _this = this
+            _this.entInfo.followSearchFinish = false
+            $.ajax({
+                type: 'POST',
+                url: '/bigmember/follow/ent/followCheck',
+                data: {
+                  entId: _this.entInfo.id
+                },
+                success: function (res) {
+                    if (res.error_code == 0) {
+                        _this.entInfo.followSearchFinish = true
+                        if (res.data) {
+                            _this.entInfo.follow = !!res.data.followed
+                            _this.entInfo.entExist = !!res.data.isShow
+                        } else {
+                            _this.entInfo.entExist = false
+                        }
+                    } else {
+                        _this.$toast(res.error_msg)
+                    }
+                },
+                error: function (error) {
+                    console.log(error)
+                }
+            })
+        },
+        changeFollowState: function () {
+            var _this = this
+            if (this.entInfo.follow) {
+                this.$dialog.confirm({
+                    title: '提示信息',
+                    message: '取消对“' + _this.entInfo.name + '”的关注?',
+                    confirmButtonColor: '#2cb7ca'
+                }).then(function () {
+                    _this.changeFollowStateRequest()
+                })
+                .catch(function () {
+                    console.log('取消操作')
+                })
+            } else {
+                this.changeFollowStateRequest()
+            }
+        },
+        // 获取权限信息
+        getPowerInfo: function () {
+            var _this = this
+            this.loading = this.showLoading()
+            $.ajax({
+                type: 'GET',
+                url: '/bigmember/use/isAdd',
+                success: function (res) {
+                    if (res.error_code == 0) {
+                        _this.conf.powerLoaded = true
+                        if (res.data) {
+                            _this.powerInfo = res.data
+                        }
+                        if (res.data && $.isArray(res.data.power)) {
+                            // 显示完整企业画像(不完整的企业画像只有中标动态)
+                            // _this.conf.showPortraitAll = true
+                            // 根据power判断权限,企业画像包含权限(4,12,13)
+                            var power = res.data.power
+                            if (power.indexOf(4) != -1 || _this.svip || res.data.viper) {
+                                // 获取企业画像信息-4
+                                _this.conf._4 = true
+                            }
+                            if (power.indexOf(13) != -1) {
+                                // 获取企业中标动态-13
+                                _this.conf._13 = true
+                            }
+                            if (_this.conf._4 || _this.conf._13) {
+                                _this.singleTab = false
+                            } else {
+                                // 如果不是超级订阅会员,点击中标信息显示提示弹窗
+                                if (!res.data.viper) {
+                                    _this.digshow = true
+                                } else {
+                                    _this.digshow = false
+                                }
+                            }
+                        }
+                        // 如果不是大会员。判断是否是超级订阅会员,不是显示弹窗
+                        if (res.data.memberStatus <= 0) {
+                            if (!res.data.viper) {
+                                _this.digshow = true
+                            } else {
+                                _this.digshow = false
+                            }
+                        } else {
+                            _this.digshow = false
+                        }
+                        if (_this.svip || res.data.viper) {
+                            _this.entInfo.followSearchFinish = true
+                            _this.entInfo.entExist = false
+                        }
+                        if(res.data.memberStatus > 0&&(power.indexOf(4) != -1||power.indexOf(12) != -1||power.indexOf(13) != -1)) {
+                            _this.entInfo.followSearchFinish = false
+                            _this.entInfo.entExist = true
+                            _this.getEntFollowState()
+                        }
+                    } else {
+                        _this.$toast(res.error_msg)
+                    }
+                },
+                complete: function () {
+                    if (_this.loading) {
+                        _this.loading.clear()
+                    }
+                },
+                error: function (error) {
+                    console.log(error)
+                }
+            })
+        },
+        // 修改企业关注状态
+        changeFollowStateRequest: function () {
+            var _this = this
+            var loading = this.showLoading()
+            var urls = {
+                addFollow: '/bigmember/follow/ent/addFollow',
+                delFollow: '/bigmember/follow/ent/delFollow'
+            }
+            var url = !!this.entInfo.follow ? urls.delFollow : urls.addFollow
+            $.ajax({
+                type: 'POST',
+                url: url,
+                data: {
+                  entId: _this.entInfo.id
+                },
+                success: function (res) {
+                    if (res.error_code == 0) {
+                        // 清除上个页面缓存
+                     sessionStorage.removeItem('$data-ent_follow')
+                        loading.clear()
+                        if (res.data && res.data == 'success') {
+                            _this.entInfo.follow = !_this.entInfo.follow
+                        }
+
+                        if (!_this.entInfo.follow) {
+                            history.back()
+                        }
+                    } else {
+                        _this.showToast(res.error_msg)
+                    }
+                },
+                error: function (error) {
+                    console.log(error)
+                }
+            })
+        },
+        // 初始化图标数据
+        initChartsData: function () {
+            var dataSet = this.entPortraitInfo
+            // 初始化 年度项目统计数据
+            this.arrangeAnnualData(dataSet.yearData)
+            // 初始化 月度统计数据
+            this.arrangeMonthZbData(dataSet.monthData)
+            // 初始化 地图数据
+            this.arrangeMapData(dataSet.areaData)
+            // 初始化 平局折扣率数据
+            this.arrangeRateData(dataSet.rate)
+            // 初始化 饼图 客户类型分布
+            this.initPieChartData(dataSet.top10)
+            // 初始化 重要客户数据
+            this.arrangeImportantData(dataSet.topShow)
+        },
+        getStickyTop: function () {
+            this.stickyTop = $('.jy-app-header').height() - 1
+        },
+        goToEntHistory: function () {
+            // if (this.powerInfo.isSubCount) {
+            //     return this.showToast('子账号无法使用企业情报监控')
+            // }
+
+            this.savePageState()
+            var info = {
+                anchor: '企业情报监控'
+            }
+            sessionStorage.setItem('landinfo',JSON.stringify(info))
+            location.href = './ent_portrait_change?eId=' + encodeURIComponent(this.entInfo.id)
+        },
+        // 修改年度项目统计里点击浮窗显示效果
+        formatter: function (params) {
+            //移除重复的数据
+            for (var i = 0; i < params.length; i++) {
+                for (var j = params.length - 1; j > i; j--) {
+                    if (params[j].data == params[i].data) {
+                        params.splice(j, 1);
+                        break;
+                    }
+                }
+            }
+            var tip = '';
+            for (var i = 0; i < params.length; i++) {
+                // 因柱状图颜色为渐变色,此处获取到的柱状图颜色,css不能识别,需单独设置小圆点的颜色
+                params[0].marker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#2ABED1"></span>'
+                if( i=== 0) {
+                    tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '个' + '<br/>';
+                }else if(i == 1){
+                    tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '万元' + '<br/>';
+                }
+            }
+            tip += '<div style="padding-top:2px;text-align:center;color:#9B9CA3;">' + ' - ' + params[0].name + ' - ' + '</div>'
+            return tip;
+        },
+        // 1. 年度项目统计图表单独配置
+        annualConfig: function (options) {
+            var that = this;
+            options.grid.bottom = 60
+            options.tooltip.axisPointer.shadowStyle.color = 'rgba(42, 190, 209,0.1)' // 修改点击柱条后背景颜色
+            options.legend.show = true // 显示底部数量、金额、圆点
+            options.yAxis[1].axisLabel.show = true; // 显示右侧y轴刻度
+            options.yAxis[1].axisLabel.formatter = function(value, index) {
+                return value.toString().replace(/,/, '')
+            }  // 去掉右轴逗号分割
+            options.series[1].lineStyle.width = 2 // 折线
+            options.series[1].lineStyle.color = '#FF9F40'
+            // 以下代码为:处理左侧y轴与右侧y轴刻度保持在同一X轴水平线上
+            var maxCountList = this.annualData.rows.map(function(v){
+                return v['项目数量']
+            })
+            var maxPriceList = this.annualData.rows.map(function(v){
+                return v['项目金额']
+            })
+
+            var maxCount = Math.ceil(Math.max.apply(null,maxCountList)).toString();// 取出数量中最大值
+            var maxPrice = Math.ceil(Math.max.apply(null,maxPriceList)).toString();// 取出金额中最大值
+            // var minPrice = Math.min.apply(null,maxPriceList);// 去除金额最小值
+            maxPrice = Math.ceil(maxPrice / (Math.pow(10,maxPrice.length -1))) * Math.pow(10,maxPrice.length -1)
+            maxCount = Math.ceil(maxCount / (Math.pow(10,maxCount.length -1))) * Math.pow(10,maxCount.length -1)
+            var item = options.yAxis
+            item[0].min = 0;
+            item[1].min = 0;
+            item[0].max = maxCount;
+            item[0].interval = Math.ceil(maxCount / 5);
+            item[1].max = maxPrice;
+            item[1].interval = Math.ceil((maxPrice - 0) / 5);
+
+            // 处理点击浮窗显示效果
+            options.tooltip.formatter = function(params) {
+                return that.formatter(params)
+            }
+            options.legend.formatter = function (name) {
+                var wnYuan = ['金额', '项目金额']
+                var ge = ['数量', '项目数量']
+                if (wnYuan.indexOf(name) !== -1) {
+                    name += '(万元)-右轴'
+                } else if (ge.indexOf(name) !== -1) {
+                    name += '(个)'
+                }
+                return name;
+            }
+            return options
+        },
+        // 2. 月度中标金额(折线图)
+        lineChartConfig: function (options) {
+            options.yAxis[0].name = '中标金额(万元)';
+            options.legend.itemGap = 20;
+            options.tooltip.formatter = function(params) {
+                var tip = '';
+                for (var i = 0; i < params.length; i++) {
+                    params[i].marker = '<span style="display:inline-block;margin-right:5px;border-radius:8px;width:8px;height:8px;background-color:' + params[i].color + ';"></span>'
+                    if(params[i].value[1] !== undefined && params[i].value[1] !== null && !isNaN(params[i].value[1])) {
+                        tip = tip + params[i].marker + params[i].seriesName + params[i].name + '中标金额:' + params[i].value[1].toString().replace(/,/,'') + '万元' +'<br/>';
+                    }
+                }
+                tip += '<div style="padding-top:2px;text-align:center;color:#9B9CA3;">' + ' - ' + params[0].name + ' - ' + '</div>'
+                return tip;
+            }
+            return options;
+        },
+        // 3. 地图配置项
+        mapConfig: function (options) {
+            var _this = this
+            var arr = this.mapChartData.rows
+            // 最大值、最小值
+            var maxNum = Math.max.apply(Math, arr.map(function(o) {return o.value}))
+            var minNum = Math.min.apply(Math, arr.map(function(o) {return o.value}))
+
+            options.visualMap.min = minNum;
+            options.visualMap.max = maxNum < 100 ? 100 : maxNum;
+
+            // 设置最大值
+            options.graphic[options.graphic.length - 1].children[0].style.text = maxNum > 100 ? maxNum : 100
+            options.graphic[options.graphic.length - 1].children[1].style.text = 1;
+            options.visualMap.min = 1;
+            options.visualMap.max = maxNum < 100 ? 100 : maxNum;
+            options.graphic[0].children[0].style.text = '项目数量(个)'
+            options.tooltip.formatter = function (params) {
+                var index = params.dataIndex
+                var item = _this.mapChartData.rows[index]
+                var string = ''
+                if (item) {
+                    if (item.value && item.amount) {
+                        string = item.name + '<br/>项目数量:' + item.value + '个<br/>中标金额:' + item.amount + '万元'
+                    } else if (item.value) {
+                        string = item.name + '<br/>项目数量:' + item.value + '个'
+                    } else if (item.amount) {
+                        string = item.name + '<br/>中标金额:' + item.amount + '万元'
+                    }
+                }
+                return string
+            }
+            return options
+        },
+        // 4. 客户平均折扣率配置
+        rateConfig: function (options) {
+            options.color = ['#FB483D', '#05A6F3', '#0BD991', '#FF9F40','#8E6DF2','#C0C4CC'];
+            options.xAxis[0].axisLabel.margin = 12
+            options.yAxis[0].axisLabel.formatter = '{value}%'
+            options.grid = {
+                top: 20,
+                right: 16,
+                bottom: 70,
+                left: 10
+            }
+            options.legend.textStyle.padding = [0, 18, 0,0];
+            options.legend.left = 16;
+            options.legend.bottom = 10;
+            options.tooltip.formatter = function(params) {
+                var tip = '';
+                for (var i = 0; i < params.length; i++) {
+                    params[i].marker = '<span style="display:inline-block;margin-right:5px;border-radius:8px;width:8px;height:8px;background-color:' + params[i].color + ';"></span>'
+                    if(params[i].value[1] === undefined || params[i].value[1] == null) {
+                        tip = tip + params[i].marker + params[i].seriesName + ':--<br/>';
+                    } else {
+                        tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value[1] + '%<br/>';
+                    }
+                }
+                tip += '<div style="padding-top:2px;text-align:center;color:#9B9CA3;">' + ' - ' + params[0].name + ' - ' + '</div>'
+                return tip;
+            }
+            return options;
+        },
+        // 整理年度项目统计数据
+        arrangeAnnualData: function (data) {
+            if (!data) return
+
+            var rows = [];
+            var count = 0;
+            for (var key in data) {
+                var item = data[key]
+                // 统计数据总数是否为0
+                count += item.Count
+                count += item.Money
+                rows.push({
+                    '日期': parseInt(key),
+                    '项目数量': item.Count,
+                    '项目金额': Math.round(item.Money / 10000)
+                })
+            }
+
+            // rows = utils.bSort(rows, '日期').reverse()
+            rows = utils.bSort(rows, '日期')
+
+            // 数据总量为0,不赋值
+            if (count != 0) {
+                this.annualData.rows = rows;
+            }
+        },
+        // 整理月度项目统计数据
+        arrangeMonthZbData: function (data) {
+            if (!data) return
+            var rows = []
+            var columns = ['月份']
+            var count = 0
+
+            // 1. 先将月份提取出来, 并排序
+            var yearArr = []
+            for (var key in data) {
+                yearArr.push(parseInt(key))
+            }
+            yearArr.sort(function (a, b) { return a - b })
+
+            // 2. 循环12个月份,并进行处理
+            yearArr.forEach(function (item) {
+                columns.push(item + '年')
+            })
+            for (var i = 1; i <= 12; i++) {
+                var columnsItem = {}
+                columns.forEach(function (item) {
+                    var value = ''
+                    if (item == '月份') {
+                        value = i + '月'
+                    } else if (/年/g.test(item)) {
+                        if (data[item.slice(0, -1)]) {
+                            value = data[item.slice(0, -1)][i]
+                            value = (value / 10000).fixed(2)
+                            count += parseInt(value)
+                        }
+                    }
+                    columnsItem[item] = value
+                })
+                rows.push(columnsItem)
+            }
+
+            // 数据总量为0,不赋值
+            if (count != 0) {
+                this.monthZbData.columns = columns;
+                this.monthZbData.rows = rows;
+            }
+        },
+        // 整理主要市场分布(中国地图)数据
+        arrangeMapData: function(data) {
+            if (!data) return
+
+            var mapRows = []
+            var count = 0
+            if (data && $.isArray(data)) {
+                data.forEach(function (n) {
+                    count += n.projectCount
+
+                    mapRows.push({
+                        name: n.areaName,
+                        value: n.projectCount,
+                        amount: (n.bidamountCount / 10000).fixed(2)
+                    })
+                })
+            }
+
+            // 数据总量为0,不赋值
+            if (count != 0) {
+                this.mapChartData.rows = mapRows;
+            }
+        },
+        // 整理平均折扣率数据
+        arrangeRateData: function (data) {
+            if (!data) return
+            var rows = []
+            var columns = ['日期', '全部客户']
+            var count = 0
+
+            for (var c in data) {
+                if (c !== '全部客户') {
+                    columns.push(c)
+                }
+            }
+            // 获取年份数组
+            var yearArr = []
+            for (var key in data['全部客户']) {
+                yearArr.push(key)
+            }
+            yearArr.sort(function (a, b) { return a - b })
+
+            yearArr.forEach(function (item) {
+                var rowsItem = {
+                    '日期': item + '年'
+                }
+                for (var k in data) {
+                    count += (data[k][item] * 100)
+                    rowsItem[k] = data[k][item] == null  ? null : (data[k][item] * 100).fixed(2)
+                }
+                rows.push(rowsItem)
+            })
+
+            // 数据总量为0,不赋值
+            if (count != 0) {
+                this.rateData.columns = columns;
+                this.rateData.rows = rows;
+            }
+        },
+        // 初始化饼图
+        initPieChartData: function (d) {
+            if (!d) return
+            var that = this
+            var arr = []
+            var data = JSON.parse(JSON.stringify(d))
+            // 降序排列
+            data.sort(function (a, b) {
+                return b.bidamount_share - a.bidamount_share
+            })
+            data.forEach(function (item){
+              arr.push(item.buyerClass,item.bidamount_share,item.bidamount_count,item.project_count,item.rate_avg)
+            })
+            var normal =['行业','中标金额占比','中标金额','项目数量','平均折扣率'];
+            var newArr = that.arrTrans(5,arr);
+            newArr.unshift(normal)
+            chartOptions.deformPieChart.dataset.source = newArr;
+            chartOptions.deformPieChart.tooltip.formatter = function(params){
+                var tip = '';
+                var data = params.data;
+                params.marker = '<span style="display:inline-block;margin-right:5px;border-radius:8px;width:8px;height:8px;background-color:' + params.color +'"></span>';
+                var percent = '<span style="padding-left:13px;">中标金额占比:' + (data[1]*100).fixed(2) + '%</span></br>';
+                var scale = '<span style="padding-left:13px;">中标金额:' + utils.moneyUnit(data[2].fixed(2)) + '</span></br>';
+                var count = '<span style="padding-left:13px;">项目数量:' + data[3] + '个</span></br>';
+                var rate = (typeof data[4] === 'number' && !isNaN(data[4])) ? '<span style="padding-left:13px;">平均折扣率:' + (data[4]*100).fixed(2) + '%</span></br>' : '';
+                tip = params.marker + params.name +'<br/>' + percent + scale + count + rate
+                return tip;
+            }
+            chartOptions.deformPieChart.legend.formatter = null
+            that.$nextTick(function(){
+                var ref = that.$refs.pieChart;
+                var pieChart = echarts.init(ref, null, that.initEchartsOptions);
+                pieChart.setOption(chartOptions.deformPieChart);
+                pieChart.resize();
+            })
+        },
+        arrTrans: function(num, arr) { // 一维数组转换为二维数组
+            var iconsArr = [];
+            arr.forEach(function(item, index) {
+                var page = Math.floor(index / num); // 计算该元素为第几个素组内
+                if (!iconsArr[page]) { // 判断是否存在
+                    iconsArr[page] = [];
+                }
+                iconsArr[page].push(item);
+            });
+            return iconsArr;
+        },
+        // 整理重要客户数据
+        arrangeImportantData: function (data) {
+            if (!data) return
+            var arr = []
+            if ($.isArray(data)) {
+                data.forEach(function (list) {
+                    var i1 = {
+                        title: list.buyerclass,
+                        list: []
+                    }
+                    if (list.topData && $.isArray(list.topData)) {
+                        list.topData.forEach(function (item) {
+                            i1.list.push({
+                                name: item.BuyerName,
+                                money: item.CountMoney,
+                                count: item.CountProject,
+                                rate: item.AvgRate ? (item.AvgRate*100).fixed(2) : item.AvgRate,
+                                time: new Date(item.lastTime * 1000).pattern('yyyy/MM/dd'),
+                                percent: item.CountMoney / list.topData[0].CountMoney*100 + '%'
+                            })
+                        })
+                    }
+
+                    if (!list.buyerclass || ($.isArray(list.topData) && list.topData.length === 0)) {
+                        // console.log('此数据为空')
+                    } else {
+                        arr.push(i1)
+                    }
+                })
+            }
+            this.importantCustomers = arr
+        },
+        // 去公告详情页
+        toProjectDetail: function (item) {
+            // this.savePageState()
+            // if (item.id) {
+            //     var href = '/jyapp/article/content/' + item.id + '.html'
+            //     location.href = href
+            // }
+        },
+        // 去中标单位画像
+        toUnitPortrayal: function (item) {
+            this.savePageState()
+            if (item.name) {
+                location.href = 'unit_portrayal?entName=' + item.name
+            }
+        },
+        savePageState: function () {
+            this.scrollTop = $('#ent-portrait').scrollTop()
+            var data = {
+                conf: this.conf,
+                tabActiveName: this.tabActiveName,
+                entInfo: this.entInfo,
+                entBaseInfo: this.entBaseInfo,
+                topProject: this.topProject,
+                entPortraitInfo: this.entPortraitInfo,
+                powerInfo: this.powerInfo,
+                singleTab: this.singleTab,
+                scrollTop: this.scrollTop,
+                gotTab2: this.gotTab2
+            }
+            sessionStorage.setItem(this.sessKey, JSON.stringify(data))
+        },
+        reStoreState: function () {
+            var $data = sessionStorage.getItem(this.sessKey)
+            if ($data) {
+                $data = JSON.parse($data)
+                // 如果恢复的企业名称和当前url企业名称不同,则清除缓存,重新请求
+                if (this.entInfo.id !== $data.entInfo.id) {
+                    sessionStorage.removeItem(this.sessKey)
+                    return false
+                }
+                this.tabActiveName = $data.tabActiveName
+                Object.assign(this.conf, $data.conf || {})
+                Object.assign(this.entInfo, $data.entInfo || {})
+                Object.assign(this.entBaseInfo, $data.entBaseInfo || {})
+                Object.assign(this.topProject, $data.topProject || {})
+                Object.assign(this.entPortraitInfo, $data.entPortraitInfo || {})
+                Object.assign(this.powerInfo, $data.powerInfo || {})
+                this.singleTab = $data.singleTab
+                this.scrollTop = $data.scrollTop
+                this.gotTab2 = $data.gotTab2
+                sessionStorage.removeItem(this.sessKey)
+            }
+            return !!$data
+        }
+    }
+}
+var vueComponent = new Vue(vNode)

+ 86 - 12
src/web/staticres/common-module/collection/js/index-wx.js

@@ -8,6 +8,7 @@ var vNode = {
     phoneComponent: phoneComponent
   },
   data: {
+    sessStorageKey: '$data-collection',
     listState: {
       value: '',
       loading: false,
@@ -18,6 +19,9 @@ var vNode = {
       total: 0,
       list: []
     },
+    listInfo: {
+      scrollTop: 0
+    },
     // 筛选参数
     limitlist: {
       pageNum: 1,
@@ -52,6 +56,9 @@ var vNode = {
       startDate: '',
       endDate: ''
     },
+    tagText: {
+      timeText: '收藏时间'
+    },
     limitshow: false, // 筛选框显示
     condition: true, // 列表星星显示
     personTagactive:0, //个人标签选择按钮下标
@@ -66,6 +73,21 @@ var vNode = {
   mounted() {
   },
   methods: {
+    recover: function () {
+      var excludeKey = ['sessStorageKey']
+      var $data = sessionStorage.getItem(this.sessStorageKey)
+      if ($data) {
+          $data = JSON.parse($data)
+          for (var key in $data) {
+              if (excludeKey.indexOf(key) !== -1) {
+                  continue
+              }
+              this.$data[key] = $data[key]
+          }
+          sessionStorage.removeItem(this.sessStorageKey)
+      }
+      return !!$data
+  },
     // 判断是否是有筛选条件
     getUserRoot: function() {
       let _this = this
@@ -84,14 +106,22 @@ var vNode = {
     },
     // 列表跳转
     linkRouter: function(id) {
-      location.href = '/front/wx_dataExport/submitOrder?id=' + id + '&source=d&dataspec='
-      debugger
+      var scrollTop = $(this.$refs.jList).scrollTop()
+      // 如果滚动高度为0,或者entList长度为0,则不缓存数据(即返回刷新)
+      if (scrollTop == 0 || this.listState.list.length === 0) {
+          // do something
+      } else {
+          this.listInfo.scrollTop = $(this.$refs.jList).scrollTop()
+          sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
+      }
+      // location.href = '/front/wx_dataExport/submitOrder?id=' + id + '&source=d&dataspec='
+      location.href = '/article/content/' + id + '.html'
     },
     // 筛选按钮
     screenBtn() {
-      this.limitshow = true
+      this.limitshow = !this.limitshow
       setTimeout(()=>{
-        this.$refs.tagItem.toggle()
+        this.setToggle()
       })
     },
     getContainer: function() {
@@ -157,7 +187,8 @@ var vNode = {
       })
     },
     // 取消收藏
-    collecClick: function(id) {
+    collecClick: function(e,id) {
+      e.stopPropagation()
       let _this = this
       let params = {
         baction: 'R',
@@ -190,22 +221,55 @@ var vNode = {
     },
     // 确定按钮事件
     confirm: function(data) {
+      console.log(data)
       if(data.name == 'dateItem'){
+        const timeRange = {
+          start: (data.data.start / 1000).toFixed(0),
+          end: (data.data.end / 1000).toFixed(0)
+        }
+        if (timeRange.start == 0 && timeRange.end == 0) {
+          this.limitlist.selectTime = ''
+          this.tagText.timeText = '不限'
+        } else if(timeRange.start == 0 && timeRange.end != 0) {
+          this.limitlist.selectTime = '_' + timeRange.end
+        } else if(timeRange.start != 0 && timeRange.end == 0) {
+          this.limitlist.selectTime = timeRange.start + '_'
+        } else {
+          this.limitlist.selectTime = timeRange.start + '_' + timeRange.end
+        }
+        switch (data.data.exact) {
+          case 'all': {
+            this.tagText.timeText = '不限'
+            break
+          }
+          case 'lately7': {
+            this.tagText.timeText = '最近7天'
+            break
+          }
+          case 'lately30': {
+            this.tagText.timeText = '最近30天'
+            break
+          }
+          case 'lastYear': {
+            this.tagText.timeText = '去年'
+            break
+          }
+          case 'exact': {
+            this.tagText.timeText = new Date(timeRange.start*1000).pattern('yyyy.MM.dd') + '~' + new Date(timeRange.end*1000).pattern('yyyy.MM.dd')
+            break
+          }
+        }
         this.limitlist.selectTime = (data.data.start / 1000).toFixed(0) + '_' + (data.data.end / 1000).toFixed(0)
-        this.$refs.dateItem.toggle()
       } else if (data.name == 'cateItem') {
         this.limitlist.buyerclass = data.data.join(',')
-        this.$refs.cateItem.toggle()
       } else if (data.name == 'tagsItem') {
         this.limitlist.label = data.data
-        this.$refs.tagItem.toggle()
       } else if (data.name == 'buyerItem') {
         this.limitlist.buyerPhone = parseInt(data.data)
-        this.$refs.buyerItem.toggle(false)
       } else if (data.name == 'winnerItem') {
         this.limitlist.winnerPhone = parseInt(data.data)
-        this.$refs.winnerItem.toggle(false)
       }
+      this.setToggle()
       this.reLoadList()
     },
     // 取消按钮事件
@@ -217,6 +281,14 @@ var vNode = {
       this.listState.list = []
       this.getList()
     },
+    // 关闭菜单
+    setToggle: function() {
+      this.$refs.dateItem.toggle(false)
+      this.$refs.cateItem.toggle(false)
+      this.$refs.tagItem.toggle(false)
+      this.$refs.buyerItem.toggle(false)
+      this.$refs.winnerItem.toggle(false)
+    },
 
     // 中标企业联系方式
     getWinnerPhone: function(value) {
@@ -236,11 +308,13 @@ var vNode = {
         type: "POST",
         success: function(res){
           console.log(res)
-          if(res.error_code == 0) {
+          if(res.error_code == 0 && res.data) {
             res.data.forEach(function(item, index){
               item.type = false
             })
             _this.tagList = res.data
+          } else {
+            _this.tagList = []
           }
         },
         error: function(err){
@@ -263,7 +337,7 @@ var vNode = {
         success: function(res) {
           console.log(res)
           if(res.error_code == 0 && res.data) {
-            location.href = '/front/dataExport/toCreateOrderPage?id=' + res.data._id
+            location.href = '/front/wx_dataExport/submitOrder?id=' + res.data._id + '&source=d&dataspec='
           }
         }
       })

+ 86 - 17
src/web/staticres/common-module/collection/js/index.js

@@ -8,6 +8,7 @@ var vNode = {
     phoneComponent: phoneComponent
   },
   data: {
+    sessStorageKey: '$data-collection',
     listState: {
       value: '',
       loading: false,
@@ -18,6 +19,9 @@ var vNode = {
       total: 0,
       list: []
     },
+    listInfo: {
+      scrollTop: 0
+    },
     // 筛选参数
     limitlist: {
       pageNum: 1,
@@ -52,6 +56,10 @@ var vNode = {
       startDate: '',
       endDate: ''
     },
+    // 标签文案
+    tagText: {
+      timeText: '收藏时间'
+    },
     limitshow: false, // 筛选框显示
     condition: true, // 列表星星显示
     personTagactive:0, //个人标签选择按钮下标
@@ -59,13 +67,33 @@ var vNode = {
   },
   computed: {},
   created () {
-    this.getUserRoot()
-    this.getList()
-    this.getTagsList()
+    var recover = this.recover()
+    if (!recover) {
+      this.getUserRoot()
+      this.getList()
+      this.getTagsList()
+    }
   },
   mounted() {
+    console.log(this.listInfo.scrollTop, $(this.$refs.jList))
+    $(this.$refs.jList).scrollTop(this.listInfo.scrollTop)
   },
   methods: {
+    recover: function () {
+      var excludeKey = ['sessStorageKey']
+      var $data = sessionStorage.getItem(this.sessStorageKey)
+      if ($data) {
+          $data = JSON.parse($data)
+          for (var key in $data) {
+              if (excludeKey.indexOf(key) !== -1) {
+                  continue
+              }
+              this.$data[key] = $data[key]
+          }
+          sessionStorage.removeItem(this.sessStorageKey)
+      }
+      return !!$data
+  },
     // 判断是否是有筛选条件
     getUserRoot: function() {
       let _this = this
@@ -84,13 +112,21 @@ var vNode = {
     },
     // 列表跳转
     linkRouter: function(id) {
+      var scrollTop = $(this.$refs.jList).scrollTop()
+      // 如果滚动高度为0,或者entList长度为0,则不缓存数据(即返回刷新)
+      if (scrollTop == 0 || this.listState.list.length === 0) {
+          // do something
+      } else {
+          this.listInfo.scrollTop = $(this.$refs.jList).scrollTop()
+          sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
+      }
       location.href = '/jyapp/article/content/' + id + '.html'
     },
     // 筛选按钮
     screenBtn() {
-      this.limitshow = true
+      this.limitshow = !this.limitshow
       setTimeout(()=>{
-        this.$refs.tagItem.toggle()
+        this.setToggle()
       })
     },
     getContainer: function() {
@@ -191,29 +227,52 @@ var vNode = {
     // 确定按钮事件
     confirm: function(data) {
       if(data.name == 'dateItem'){
-        if ((data.data.start / 1000).toFixed(0) == 0 && (data.data.end / 1000).toFixed(0) == 0) {
+        const timeRange = {
+          start: (data.data.start / 1000).toFixed(0),
+          end: (data.data.end / 1000).toFixed(0)
+        }
+        if (timeRange.start == 0 && timeRange.end == 0) {
           this.limitlist.selectTime = ''
-        } else if((data.data.start / 1000).toFixed(0) == 0 && (data.data.end / 1000).toFixed(0) != 0) {
-          this.limitlist.selectTime = '_' + (data.data.end / 1000).toFixed(0)
-        } else if((data.data.start / 1000).toFixed(0) != 0 && (data.data.end / 1000).toFixed(0) == 0) {
-          this.limitlist.selectTime = (data.data.start / 1000).toFixed(0) + '_'
+          this.timeText = '不限'
+        } else if(timeRange.start == 0 && timeRange.end != 0) {
+          this.limitlist.selectTime = '_' + timeRange.end
+        } else if(timeRange.start != 0 && timeRange.end == 0) {
+          this.limitlist.selectTime = timeRange.start + '_'
         } else {
-          this.limitlist.selectTime = (data.data.start / 1000).toFixed(0) + '_' + (data.data.end / 1000).toFixed(0)
+          this.limitlist.selectTime = timeRange.start + '_' + timeRange.end
+        }
+        switch (data.data.exact) {
+          case 'all': {
+            this.timeText = '不限'
+            break
+          }
+          case 'lately7': {
+            this.timeText = '最近7天'
+            break
+          }
+          case 'lately30': {
+            this.timeText = '最近30天'
+            break
+          }
+          case 'lastYear': {
+            this.timeText = '去年'
+            break
+          }
+          case 'exact': {
+            this.timeText = new Date(timeRange.start*1000).pattern('yyyy.MM.dd') + '~' + new Date(timeRange.end*1000).pattern('yyyy.MM.dd')
+            break
+          }
         }
-        this.$refs.dateItem.toggle()
       } else if (data.name == 'cateItem') {
         this.limitlist.buyerclass = data.data.join(',')
-        this.$refs.cateItem.toggle()
       } else if (data.name == 'tagsItem') {
         this.limitlist.label = data.data
-        this.$refs.tagItem.toggle()
       } else if (data.name == 'buyerItem') {
         this.limitlist.buyerPhone = parseInt(data.data)
-        this.$refs.buyerItem.toggle(false)
       } else if (data.name == 'winnerItem') {
         this.limitlist.winnerPhone = parseInt(data.data)
-        this.$refs.winnerItem.toggle(false)
       }
+      this.setToggle()
       this.reLoadList()
     },
     // 取消按钮事件
@@ -225,6 +284,14 @@ var vNode = {
       this.listState.list = []
       this.getList()
     },
+    // 关闭菜单
+    setToggle: function() {
+      this.$refs.dateItem.toggle(false)
+      this.$refs.cateItem.toggle(false)
+      this.$refs.tagItem.toggle(false)
+      this.$refs.buyerItem.toggle(false)
+      this.$refs.winnerItem.toggle(false)
+    },
 
     // 中标企业联系方式
     getWinnerPhone: function(value) {
@@ -244,11 +311,13 @@ var vNode = {
         type: "POST",
         success: function(res){
           console.log(res)
-          if(res.error_code == 0) {
+          if(res.error_code == 0 && res.data) {
             res.data.forEach(function(item, index){
               item.type = false
             })
             _this.tagList = res.data
+          } else {
+            _this.tagList = []
           }
         },
         error: function(err){

+ 28 - 3
src/web/staticres/common-module/collection/js/industry-mobile.js

@@ -54,7 +54,7 @@ var industryComponentTemplate = `<div class="j-container">
 <div class="j-footer">
   <div class="j-button-group">
     <button class="j-button-cancel" @click="resetAll">重置</button>
-    <button class="j-button-confirm" @click="onConfirm">确认</button>
+    <button class="j-button-confirm" :disabled="canClick"  @click="onConfirm">确认</button>
   </div>
 </div>
 </div>
@@ -66,11 +66,13 @@ var industryComponent = {
   data:function () {
     return {
       tablist: [],
-      checkedAll: false
+      checkedAll: false,
+      canClick: true
     }
   },
   created () {
     this.getIndustryData()
+    this.getbBtnClick()
   },
   methods: {
     // 获取行业数据
@@ -236,6 +238,7 @@ var industryComponent = {
         })
         this.checkedAll = true
       }
+      this.getbBtnClick()
     },
     // 模块全选
     checkAll: function(data){
@@ -252,6 +255,7 @@ var industryComponent = {
           item.type = true
         })
       }
+      this.getbBtnClick()
     },
     // 模块单选
     toggleCheck: function (data, item) {
@@ -261,7 +265,6 @@ var industryComponent = {
         data.type = true
         this.selectNum(item)
       }
-
       // 模块全部选中,全选自动勾选
       const allselect = item[Object.keys(item)[0]].some(function(sum, index){
         if(sum.type == false){
@@ -277,6 +280,7 @@ var industryComponent = {
         }
       })
       this.checkedAll = !industryAll
+      this.getbBtnClick()
     },
     // 选择的数量
     selectNum: function(item) {
@@ -288,6 +292,27 @@ var industryComponent = {
       })
       return numArr.length
     },
+    // 只要有一个选中,确认按钮可点击
+    getbBtnClick: function() {
+      let boolnum = -1
+      let boolArr = []
+      this.tablist.forEach(function(itemall, index){
+        itemall[Object.keys(itemall)[0]].forEach(function(data) {
+          let bool = true
+          if(data.type) {
+            console.log(data)
+            bool = false+''
+          }
+          boolArr.push(bool)
+        })
+      })
+      boolnum = boolArr.indexOf('false')
+      if (boolnum == -1) {
+        this.canClick = true
+      } else {
+        this.canClick = false
+      }
+    },
     resetAll:function() {
       let params = {
         name: 'industryItem',

+ 27 - 2
src/web/staticres/common-module/collection/js/keyword-mobile.js

@@ -54,7 +54,7 @@ var keywordComponentTemplate = `<div class="j-container">
 <div class="j-footer">
   <div class="j-button-group">
     <button class="j-button-cancel" @click="resetAll">重置</button>
-    <button class="j-button-confirm" @click="onConfirm">确认</button>
+    <button class="j-button-confirm" :disabled="canClick" @click="onConfirm">确认</button>
   </div>
 </div>
 </div>
@@ -67,11 +67,13 @@ var keywordComponent = {
     return {
       initlist: [],
       tablist: [],
-      checkedAll: false
+      checkedAll: false,
+      canClick: true
     }
   },
   created () {
     this.getIndustryData()
+    this.getbBtnClick()
   },
   methods: {
     // 获取行业数据
@@ -129,6 +131,7 @@ var keywordComponent = {
         })
         this.checkedAll = true
       }
+      this.getbBtnClick()
     },
     // 模块全选
     checkAll: function(data){
@@ -145,6 +148,7 @@ var keywordComponent = {
           item.type = true
         })
       }
+      this.getbBtnClick()
     },
     // 模块单选
     toggleCheck: function (data, item) {
@@ -170,6 +174,7 @@ var keywordComponent = {
         }
       })
       this.checkedAll = !industryAll
+      this.getbBtnClick()
     },
     // 选择的数量
     selectNum: function(item) {
@@ -181,6 +186,26 @@ var keywordComponent = {
       })
       return numArr.length
     },
+    getbBtnClick: function() {
+      let boolnum = -1
+      let boolArr = []
+      this.tablist.forEach(function(itemall, index){
+        itemall[Object.keys(itemall)[0]].forEach(function(data) {
+          let bool = true
+          if(data.type) {
+            console.log(data)
+            bool = false+''
+          }
+          boolArr.push(bool)
+        })
+      })
+      boolnum = boolArr.indexOf('false')
+      if (boolnum == -1) {
+        this.canClick = true
+      } else {
+        this.canClick = false
+      }
+    },
     resetAll:function() {
       let params = {
         name: 'keywordItem',

+ 29 - 5
src/web/staticres/common-module/collection/js/notice-mobile.js

@@ -55,7 +55,7 @@ var noticeComponentTemplate = `<div class="j-container">
 <div class="j-footer">
   <div class="j-button-group">
     <button class="j-button-cancel" @click="resetAll">重置</button>
-    <button class="j-button-confirm" @click="onConfirm">确认</button>
+    <button class="j-button-confirm" :disabled="canClick" @click="onConfirm">确认</button>
   </div>
 </div>
 </div>
@@ -67,12 +67,13 @@ var noticeComponent = {
   data:function () {
     return {
       tablist: [],
-      checkedAll: false
+      checkedAll: false,
+      canClick: true
     }
   },
   created () {
     this.getIndustryData()
-    this.setStates()
+    this.getbBtnClick()
   },
   methods: {
     // 获取行业数据
@@ -138,8 +139,7 @@ var noticeComponent = {
       _this.tablist = maxarr
     },
     // 回显数据
-    setStates: function() {
-      let arr1 = ['拟建','预告','合同','中标']
+    setStates: function(arr1) {
       this.tablist.forEach(function(item) {
         console.log(item)
         item[Object.keys(item)[0]].forEach(function(sum) {
@@ -182,6 +182,7 @@ var noticeComponent = {
         })
         this.checkedAll = true
       }
+      this.getbBtnClick()
     },
     // 模块全选
     checkAll: function(data){
@@ -198,6 +199,7 @@ var noticeComponent = {
           item.type = true
         })
       }
+      this.getbBtnClick()
     },
     // 模块单选
     toggleCheck: function (data, item) {
@@ -224,6 +226,7 @@ var noticeComponent = {
         }
       })
       this.checkedAll = !industryAll
+      this.getbBtnClick()
     },
     // 选择的数量
     selectNum: function(item) {
@@ -235,6 +238,27 @@ var noticeComponent = {
       })
       return numArr.length
     },
+    // 只要有一个选中,确认按钮可点击
+    getbBtnClick: function() {
+      let boolnum = -1
+      let boolArr = []
+      this.tablist.forEach(function(itemall, index){
+        itemall[Object.keys(itemall)[0]].forEach(function(data) {
+          let bool = true
+          if(data.type) {
+            console.log(data)
+            bool = false+''
+          }
+          boolArr.push(bool)
+        })
+      })
+      boolnum = boolArr.indexOf('false')
+      if (boolnum == -1) {
+        this.canClick = true
+      } else {
+        this.canClick = false
+      }
+    },
     resetAll:function() {
       let params = {
         name: 'noticeItem',

+ 0 - 1
src/web/staticres/common-module/collection/js/tags-mobile.js

@@ -21,7 +21,6 @@ var tagsComponent = {
     }
   },
   created () {
-    this.getTagsList() 
   },
   methods: {
     // 个人标签方法

+ 701 - 0
src/web/staticres/common-module/collection/js/utils.js

@@ -0,0 +1,701 @@
+/**
+ * utils.js v0.0.1
+ * 各类js工具函数
+ */
+
+/*
+   * 时间格式化函数(将时间格式化为,2019年08月12日,2019-08-12,2019/08/12的形式)
+   *
+   *
+   *   pattern参数(想要什么格式的数据就传入什么格式的数据)
+   *     · 'yyyy-MM-dd'  ---> 输出如2019-09-20
+   *     · 'yyyy-MM-dd hh:mm'  --->  输出如2019-09-20 08:20
+   *     · 'yyyy-MM-dd HH:mm:ss'  --->  输出如2019-09-20 18:20:23
+   *     · 'yyyy/MM/dd'  --->  输出如2019/09/20
+   *     · 'yyyy年MM月dd日'  --->  输出如2019年09月20日
+   *     · 'yyyy年MM月dd日 hh时mm分'  --->  输出如2019年09月20日 08时20分
+   *     · 'yyyy年MM月dd日 hh时mm分ss秒'  --->  输出如2019年09月20日 08时20分23秒
+   *     · 'yyyy年MM月dd日 hh时mm分ss秒 EE'  --->  输出如2019年09月20日 08时20分23秒 周二
+   *     · 'yyyy年MM月dd日 hh时mm分ss秒 EEE'  --->  输出如2019年09月20日 08时20分23秒 星期二
+   *
+   *  参考: https://www.cnblogs.com/mr-wuxiansheng/p/6296646.html
+   */
+Date.prototype.pattern = function (fmt) {
+    if (!fmt) return ''
+    var o = {
+        'y+': this.getFullYear(),
+        'M+': this.getMonth() + 1, // 月份
+        'd+': this.getDate(), // 日
+        // 12小时制
+        'h+': this.getHours() % 12 == 0 ? 12 : this.getHours() % 12, // 小时
+        // 24小时制
+        'H+': this.getHours(), // 小时
+        'm+': this.getMinutes(), // 分
+        's+': this.getSeconds(), // 秒
+        'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
+        'S': this.getMilliseconds(), // 毫秒
+        'E+': this.getDay(), // 周
+    };
+    var week = {
+        '0': '日',
+        '1': '一',
+        '2': '二',
+        '3': '三',
+        '4': '四',
+        '5': '五',
+        '6': '六'
+    };
+    if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
+    }
+    if (/(E+)/.test(fmt)) {
+        fmt = fmt.replace(RegExp.$1, ((RegExp.$1.length > 1) ? (RegExp.$1.length > 2 ? '星期' : '周') : '') + week[
+            this.getDay() + '']);
+    }
+    for (var k in o) {
+        if (new RegExp('(' + k + ')').test(fmt)) {
+            fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k])
+                .length)));
+        }
+    }
+    return fmt;
+}
+/*  挂载到Number原型上,格式化小数用tofixed会造成位数不够补零的情况(处理不让自动补零)
+    栗子: 不是number类型的需要转一下
+        Number('').fixed()
+        Number('213412DDD').fixed()
+        1234.152354.fixed()
+        1234.152354.fixed(2)
+        1234.152354.fixed(10)
+*/
+Number.prototype.fixed = function(len){
+    len = isNaN(len)?  0 : len
+    var num = Math.pow(10,len)
+    return Math.round(this*num) / num
+}
+
+var utils = {
+    // utils版本号
+    version: '0.0.1',
+    isWeiXinBrowser: navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1,
+    isAndroid: navigator.userAgent.toLowerCase().indexOf('android') !== -1,
+    isIos: /iphone|ipod|ipad|ios/.test(navigator.userAgent.toLowerCase()),
+    // 传入你要获取的参数的名字
+    getParam: function (name) {
+        var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
+        var r = window.location.search.substr(1).match(reg); //获取url中'?'符后的字符串并正则匹配
+
+        var context = '';
+        if (r != null) context = r[2];
+        // 释放变量
+        reg = null;
+        r = null;
+        return context == null || context == '' || context == 'undefined' ? '' : context;
+    },
+    // 取[m, n]随机数
+    getRandomNumber: function (min, max) {
+        return Math.floor(Math.random() * (max - min + 1) + min);
+    },
+    // 获取唯一的uuid
+    // https://www.kancloud.cn/ifeng/js100/622666
+    getRandomUuid: function () {
+        var s = [];
+        var hexDigits = "0123456789abcdef";
+        for (var i = 0; i < 36; i++) {
+            s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
+        }
+        s[14] = "4";  // bits 12-15 of the time_hi_and_version field to 0010
+        s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);  // bits 6-7 of the clock_seq_hi_and_reserved to 01
+        s[8] = s[13] = s[18] = s[23] = "-";
+
+        var uuid = s.join("");
+        return uuid;
+    },
+    // 获取随机字符串
+    // 不传参数则获取长度不固定的字符串
+    getRandomString: function (len) {
+        var randomString = '';
+        if (len) {
+            /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
+            var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
+            var maxPos = $chars.length;
+            for (i = 0; i < len; i++) {
+                randomString += $chars.charAt(Math.floor(Math.random() * maxPos));
+            }
+        } else {
+            // Math.random()  生成随机数字, eg: 0.123456
+            // .toString(36)  转化成36进制 : "0.4fzyo82mvyr"
+            // .substring(2)  去掉前面两位 : "yo82mvyr"
+            // .slice(-8)  截取最后八位 : "yo82mvyr"
+            randomString = Math.random().toString(36).substring(2)
+        }
+        return randomString;
+    },
+    // FROM: https://www.jianshu.com/p/90ed8b728975
+    // 比较两个对象是否相等
+    // 返回true为相等,返回false为不相等
+    deepCompare: function (x, y) {
+        var i, l, leftChain, rightChain;
+        function compare2Objects(x, y) {
+            var p;
+            // remember that NaN === NaN returns false
+            // and isNaN(undefined) returns true
+            if (isNaN(x) && isNaN(y) && typeof x === 'number' && typeof y === 'number') {
+                return true;
+            }
+
+            // Compare primitives and functions.
+            // Check if both arguments link to the same object.
+            // Especially useful on the step where we compare prototypes
+            if (x === y) {
+                return true;
+            }
+
+            // Works in case when functions are created in constructor.
+            // Comparing dates is a common scenario. Another built-ins?
+            // We can even handle functions passed across iframes
+            if ((typeof x === 'function' && typeof y === 'function') ||
+                (x instanceof Date && y instanceof Date) ||
+                (x instanceof RegExp && y instanceof RegExp) ||
+                (x instanceof String && y instanceof String) ||
+                (x instanceof Number && y instanceof Number)) {
+                return x.toString() === y.toString();
+            }
+
+            // At last checking prototypes as good as we can
+            if (!(x instanceof Object && y instanceof Object)) {
+                return false;
+            }
+
+            if (x.isPrototypeOf(y) || y.isPrototypeOf(x)) {
+                return false;
+            }
+
+            if (x.constructor !== y.constructor) {
+                return false;
+            }
+
+            if (x.prototype !== y.prototype) {
+                return false;
+            }
+
+            // Check for infinitive linking loops
+            if (leftChain.indexOf(x) > -1 || rightChain.indexOf(y) > -1) {
+                return false;
+            }
+
+            // Quick checking of one object being a subset of another.
+            // todo: cache the structure of arguments[0] for performance
+            for (p in y) {
+                if (y.hasOwnProperty(p) !== x.hasOwnProperty(p)) {
+                    return false;
+                } else if (typeof y[p] !== typeof x[p]) {
+                    return false;
+                }
+            }
+
+            for (p in x) {
+                if (y.hasOwnProperty(p) !== x.hasOwnProperty(p)) {
+                    return false;
+                } else if (typeof y[p] !== typeof x[p]) {
+                    return false;
+                }
+
+                switch (typeof (x[p])) {
+                    case 'object':
+                    case 'function':
+
+                        leftChain.push(x);
+                        rightChain.push(y);
+
+                        if (!compare2Objects(x[p], y[p])) {
+                            return false;
+                        }
+
+                        leftChain.pop();
+                        rightChain.pop();
+                        break;
+
+                    default:
+                        if (x[p] !== y[p]) {
+                            return false;
+                        }
+                        break;
+                }
+            }
+
+            return true;
+        }
+
+        if (arguments.length < 1) {
+            return true; //Die silently? Don't know how to handle such case, please help...
+            // throw "Need two or more arguments to compare";
+        }
+
+        for (i = 1, l = arguments.length; i < l; i++) {
+
+            leftChain = []; //Todo: this can be cached
+            rightChain = [];
+
+            if (!compare2Objects(arguments[0], arguments[i])) {
+                return false;
+            }
+        }
+
+        return true;
+    },
+    // 判断变量是否是数组
+    isArray: function (o){
+        return Object.prototype.toString.call(o) == '[object Array]';
+    },
+    // 数组对象根据某一个值进行从小到大冒泡排序
+    // arr 数组
+    // value 字符串
+    bSort: function (arr, value) {
+        var len = arr.length;
+        for (var i = 0; i < len - 1; i++) {
+            for (var j = 0; j < len - 1 - i; j++) {
+                // 相邻元素两两对比,元素交换,大的元素交换到后面
+                if (arr[j][value] > arr[j + 1][value]) {
+                    var temp = arr[j];
+                    arr[j] = arr[j + 1];
+                    arr[j + 1] = temp;
+                }
+            }
+        }
+        return arr;
+    },
+    // 数组去重
+    unique: function (arr) {
+        if (!this.isArray(arr)) {
+            console.log('type error!')
+            return
+        }
+        var array = [];
+        for (var i = 0; i < arr.length; i++) {
+            if (array .indexOf(arr[i]) === -1) {
+                array .push(arr[i])
+            }
+        }
+        return array
+    },
+    // 数组乱序
+    shuffle: function (arr) {
+        var targetArr = JSON.parse(JSON.stringify(arr || []))
+        var hitArr = []
+        var len = targetArr.length
+        for (var i = 0; i < len; i++) {
+            // 获取随机下标
+            var index = Math.floor(Math.random() * targetArr.length)
+            hitArr.push(targetArr[index])
+            targetArr.splice(index, 1)
+        }
+        return hitArr.concat(targetArr)
+    },
+    // 解决ios返回不刷新页面的问题
+    iosBackRefresh: function () {
+        var isPageHide = false;
+        window.addEventListener('pageshow', function () {
+            if (isPageHide) {
+                location.reload();
+            }
+        });
+        window.addEventListener('pagehide', function () {
+            isPageHide = true;
+        });
+    },
+    // ios返回调用函数
+    iosBackInvoke: function (callback) {
+        var isPageHide = false;
+        window.addEventListener('pageshow', function () {
+            if (isPageHide) {
+                callback && callback();
+            }
+        });
+        window.addEventListener('pagehide', function () {
+            isPageHide = true;
+        });
+    },
+    /**
+     * 格式化金钱的函数
+     * @param {number} s 金额必传
+     * @param {int:0-100} n 保留小数的位数(int:0-100)
+     */
+    formatMoney: function (s, n) {
+        if (n === undefined) {
+            n = -1
+        } else {
+            n = n > 0 && n <= 20 ? n : 2;
+        }
+        var intS = parseInt(s)
+        var point = '.'
+        var left;
+        var right;
+        s = parseFloat((s + '').replace(/[^\d\.-]/g, ''))
+        // 没传n,默认(如果为整数,则不保留小数。如果为浮点数,则保留两位小数)
+        if (n === -1) {
+            if (s === intS) {
+                n = 0
+                right = ''
+                point = ''
+            } else {
+                n = 2
+                s = s.toFixed(n);
+                right = s.split('.')[1];
+            }
+            s = s + ''
+            left = s.split('.')[0].split('').reverse();
+        } else {
+            s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(n) + '';
+            left = s.split('.')[0].split('').reverse();
+            right = s.split('.')[1];
+        }
+
+        t = '';
+        for (i = 0; i < left.length; i++) {
+            t += left[i] + ((i + 1) % 3 == 0 && (i + 1) != left.length ? ',' : '');
+        }
+
+        var money = t.split('').reverse().join('') + point + right;
+        return money;
+    },
+    // 金额大写,链接:https://juejin.im/post/5a2a7a5051882535cd4abfce
+    // upDigit(1682) result:"人民币壹仟陆佰捌拾贰元整"
+    // upDigit(-1693) result:"欠壹仟陆佰玖拾叁元整"
+    upPrice: function (n) {
+        var fraction = ['角', '分', '厘']
+        var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']
+        var unit = [
+            ['元', '万', '亿'],
+            ['', '拾', '佰', '仟']
+        ]
+        // var head = n < 0 ? '欠人民币' : '人民币'
+        var head = ''
+        n = Math.abs(n)
+        var s = ''
+        for (var i = 0; i < fraction.length; i++) {
+            s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '')
+        }
+        s = s || '整'
+        n = Math.floor(n)
+        for (var i = 0; i < unit[0].length && n > 0; i++) {
+            var p = ''
+            for (var j = 0; j < unit[1].length && n > 0; j++) {
+                p = digit[n % 10] + unit[1][j] + p
+                n = Math.floor(n / 10)
+            }
+            s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s
+            // s = p + unit[0][i] + s;
+        }
+        return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
+    },
+    // 手机号中间4位加*
+    addConfusionForTel: function (tel) {
+        var reg = /^(\d{3})\d{4}(\d{4})$/
+        return tel.replace(reg, '$1****$2')
+    },
+    // 手机号加空格
+    addSpaceForTel: function (tel) {
+        var regMap = {
+            isConfuse: /^(\d{3})\*{4}(\d{4})$/,
+            addSpace: /^(\d{3})(\d{4})(\d{4})$/
+        }
+        var confusion = regMap.isConfuse.test(tel)
+        if (confusion) {
+            return tel.replace(regMap.isConfuse, '$1 **** $2')
+        } else {
+            return tel.replace(regMap.addSpace, '$1 $2 $3')
+        }
+    },
+    /**
+     * 时间戳转换 多少秒、多少分、多少小时前、多少天前  超出10天显示年月日
+     * @param {Date} originTime 要转换的时间对象(或者时间戳)
+     */
+    dateFromNow: function (originTime) {
+        if (!originTime) return
+        // 原始时间 - 传入的时间戳
+        var originTimeStamp = +new Date(originTime)
+        // 当前时间戳
+        var nowTimeStamp = +new Date()
+        // 时间戳相差多少
+        var diffTimeStamp = nowTimeStamp - originTimeStamp
+
+        var postfix = diffTimeStamp > 0 ? '前' : '后'
+        // 求绝对值 ms(毫秒)
+        var diffTimeStampAbsMs = Math.abs(diffTimeStamp)
+        var diffTimeStampAbsS = Math.round(diffTimeStampAbsMs / 1000)
+
+        // 10天的秒数
+        var days11 = 11 * 24 * 60 * 60
+        // var dataMap = {
+        //     zh: ['年', '个月', '星期', '天', '小时', '分钟', '秒'],
+        //     number: [365*24*60*60, 30*24*60*60, 7*24*60*60, 24*60*60, 60*60, 60, 1]
+        // }
+        var dataMap = {
+            zh: ['天', '小时', '分钟', '秒'],
+            number: [24 * 60 * 60, 60 * 60, 60, 1]
+        }
+
+        var timeString = ''
+        if (diffTimeStampAbsS > days11) {
+            // 大于10天,则使用正常日期显示
+            var originDate = new Date(originTimeStamp)
+            var nowDate = new Date()
+            // 是否同年
+            var sameYear = originDate.getFullYear() === nowDate.getFullYear()
+            // 如果是当年,则不显示年
+            var patternString = sameYear ? 'MM-dd' : 'yyyy-MM-dd'
+            timeString = originDate.pattern(patternString)
+        } else {
+            for (var i = 0; i < 7; i++) {
+                var inm = Math.floor(diffTimeStampAbsS / dataMap.number[i])
+                if (inm != 0) {
+                    timeString = inm + dataMap.zh[i] + postfix
+                    break
+                }
+            }
+        }
+        return timeString
+    },
+    /**
+     * 输入框获取焦点,隐藏底部固定按钮方法
+     * @param {Array} inputs 传入输入框的DOM对象
+     * @param {Object} footer 按键弹起要隐藏的footer的 DOM对象
+     */
+    inputFocusHideFooter: function (inputs, footer) {
+        var isShowBtn = function (f) {
+            if (f) {
+                footer.style.display = ''
+            } else {
+                footer.style.display = 'none'
+            }
+        }
+
+        // ios监听输入框的软键盘弹起和收起事件
+        if (this.isIos) {
+            inputs.forEach(function (item) {
+                item.addEventListener('focus', function () {
+                    console.log('IOS 键盘弹出')
+                    // IOS 键盘弹起后操作
+                    isShowBtn(false)
+                }, false)
+
+                // IOS 键盘收起:IOS 点击输入框以外区域或点击收起按钮,输入框都会失去焦点,键盘会收起,
+                item.addEventListener('blur', function () {
+                    console.log('IOS 键盘收起')
+                    // IOS 键盘收起后操作
+                    isShowBtn(true)
+                })
+            })
+        }
+
+        // Android 键盘收起:Android 键盘弹起或收起页面高度会发生变化,以此为依据获知键盘收起
+        if (this.isAndroid) {
+            var clientHeight = document.documentElement.clientHeight || document.body.clientHeight
+            window.addEventListener('resize', function () {
+                var nowClientHeight = document.documentElement.clientHeight || document.body.clientHeight
+                if (clientHeight > nowClientHeight) {
+                    // 键盘弹出的事件处理
+                    console.log('Android 键盘弹出')
+                    isShowBtn(false)
+                } else {
+                    console.log('Android 键盘收起')
+                    // 键盘收起的事件处理
+                    isShowBtn(true)
+                }
+            }, false)
+        }
+    },
+    /**
+     * 通用关键字高亮替换
+     * @param {String} value 要高亮的字符串
+     * @param {String|Array} oldChar 要被替换的字符串(或数组)
+     * @param {String|Array} newChar 要替换成的字符串(或数组)
+     *
+     * 比如:要将 - `剑鱼标讯工具函数` 字符串中的 `工具` 高亮
+     * 则此时 value -> `剑鱼标讯工具函数`
+     *        oldChar -> `工具`
+     *        newChar -> `<span class="highlight-text">工具</span>`
+     *
+     * 批量高亮-----
+     * 比如:要将 - `剑鱼标讯工具函数` 字符串中的 `工具` `剑鱼` 高亮
+     * 则此时 value -> `剑鱼标讯工具函数批量高亮`
+     *        oldChar -> ['工具', '剑鱼']
+     *        newChar -> ['<span class="highlight-text">', '</span>']
+     *
+     *   注意:此时newChar为一个长度为2的数组,数组中为高亮标签的起始标签和结束标签
+     *
+     */
+    replaceKeyword: function (value, oldChar, newChar) {
+        var _this = this
+        if (!oldChar || !newChar) return value
+        // oldChar的字符串数组,用来循环替换
+        var oldCharArr = []
+
+        if (this.isArray(oldChar)) {
+            oldCharArr = oldChar.concat()
+        } else {
+            oldCharArr.push(oldChar)
+        }
+
+        // 数组去重
+        oldCharArr = this.unique(oldCharArr)
+
+        try {
+            oldCharArr.forEach(function (item) {
+                // 去空格之后为空字符串,则直接跳过当前替换
+                if (item.replace(/\s+/g, '')) {
+                    var oc = item
+                    oc = oc.replace(/\$/g, '\\$')
+                        .replace(/\(/g, '\\(')
+                        .replace(/\)/g, '\\)')
+                        .replace(/\*/g, '\\*')
+                        .replace(/\+/g, '\\+')
+                        .replace(/\./g, '\\.')
+                        .replace(/\[/g, '\\[')
+                        .replace(/\]/g, '\\]')
+                        .replace(/\?/g, '\\?')
+                        .replace(/\\/g, '\\')
+                        .replace(/\//g, '\\/')
+                        .replace(/\^/g, '\\^')
+                        .replace(/\{/g, '\\{')
+                        .replace(/\}/g, '\\}')
+                        .replace(/\|/g, '\\|')
+
+                    if (_this.isArray(newChar)) {
+                        // 批量高亮
+                        var tempV = value
+                        value = value.replace(new RegExp('(' + oc + ')', 'gmi'), newChar[0] + oc + newChar[1])
+                        if (value === tempV && oc.indexOf('+') !== -1) {
+                          var splitReg = oc.split('\\+')
+                          splitReg.map(function (v) {
+                            value = value.replace(new RegExp('('+v+')', 'gmi'), newChar[0] + v + newChar[1])
+                          })
+                        }
+                    } else {
+                        // 普通单个高亮
+                        value = value.replace(new RegExp('(' + oc + ')', 'gmi'), newChar)
+                    }
+                }
+            })
+        } catch (e) {
+            console.log(e)
+            return value
+        }
+        return value
+    },
+    /**
+     * 批量删除sessionStorage中的数据
+     * @param {RegExp} reg 传入一个要匹配的正则表达式
+     */
+    clearBatchSessionStorage: function (reg) {
+        if (sessionStorage) {
+            var sessKeys = Object.keys(sessionStorage)
+            sessKeys.forEach(function (item) {
+                if (reg.test(item)) {
+                    sessionStorage.removeItem(item)
+                }
+            })
+        }
+    },
+    /**
+     * 获取图片原始宽高
+     * @param {Image/Object} img
+     * @param {Function} callback
+     */
+    getImgNaturalDimensions: function (img, callback) {
+        var naturalSize = {}
+        if (img.naturalWidth && img.naturalHeight) { // 现代浏览器
+            naturalSize.with = img.naturalWidth
+            naturalSize.height = img.naturalHeight
+        } else { // IE6/7/8
+            var image = new Image()
+            image.src = img.src
+            image.onload = function() {
+                naturalSize.with = image.width
+                naturalSize.height = image.height
+                callback && callback(naturalSize)
+            }
+        }
+        return naturalSize
+    },
+    moneyUnit: function (num, type, lv) {
+        if (num === '' || num == null || num == undefined || isNaN(num)) return ''
+        var levelArr = ['元', '万元', '亿元', '万亿元']
+        if (type === void 0) {
+            type = 'string';
+        }
+
+        if (lv === void 0) {
+            lv = 0;
+        }
+
+        if (num === 0) {
+            if (type === 'string') {
+                return '0';
+            }
+
+            if (type === 'lv') {
+                return levelArr[lv];
+            }
+
+            if (type === 'number') {
+                return 0;
+            }
+
+            if (type === 'index') {
+                return lv;
+            }
+        }
+
+        var result = num / Math.pow(10000, lv);
+
+        if (result > 10000 && lv < 2) {
+            return this.moneyUnit(num, type, lv + 1)
+        } else {
+            if (type === 'string') {
+                return String(Math.floor(result * 100) / 100).replace('.00', '') + levelArr[lv];
+            }
+
+            if (type === 'lv') {
+                return levelArr[lv];
+            }
+
+            if (type === 'index') {
+                return lv;
+            }
+
+            if (type === 'number') {
+                return String(Math.floor(result * 100) / 100).replace('.00', '');
+            }
+        }
+    },
+    /**
+     * 防抖
+     * @param {Function} func 函数
+     * @param {Number} delay 延时间隔 默认 200ms
+     * @param {Boolean} immediate 是否首次执行
+     */
+    debounce: function (func, delay, immediate){
+        var timer = null;
+        delay = delay || 200
+        return function() {
+            var context = this;
+            var args = arguments;
+            if(timer) clearTimeout(timer);
+            if(immediate){
+                var doNow = !timer;
+                timer = setTimeout(function(){
+                    timer = null;
+                },delay);
+                if(doNow){
+                    func.apply(context,args);
+                }
+            }else{
+                timer = setTimeout(function(){
+                    func.apply(context,args);
+                },delay);
+            }
+        }
+    }
+}

+ 49 - 10
src/web/staticres/vipsubscribe/js/historypush.js

@@ -14,6 +14,7 @@ var vm = new Vue({
     return {
       // 时间参数
       time:'',
+      timeText: '时间',
       // 地区参数
       area: '',
       // 行业参数
@@ -48,33 +49,71 @@ var vm = new Vue({
       })
     },
     confirm: function(data){
-      this.setToggle()
+      console.log(data)
       if(data.name === 'dateItem'){
-        if ((data.data.start / 1000).toFixed(0) == 0 && (data.data.end / 1000).toFixed(0) == 0) {
+        const timeRange = {
+          start: (data.data.start / 1000).toFixed(0),
+          end: (data.data.end / 1000).toFixed(0)
+        }
+        if (timeRange.start == 0 && timeRange.end == 0) {
           this.time = ''
-        } else if((data.data.start / 1000).toFixed(0) == 0 && (data.data.end / 1000).toFixed(0) != 0) {
-          this.time = '_' + (data.data.end / 1000).toFixed(0)
-        } else if((data.data.start / 1000).toFixed(0) != 0 && (data.data.end / 1000).toFixed(0) == 0) {
-          this.time = (data.data.start / 1000).toFixed(0) + '_'
+          this.timeText = '不限'
+        } else if(timeRange.start == 0 && timeRange.end != 0) {
+          this.time = '_' + timeRange.end
+        } else if(timeRange.start != 0 && timeRange.end == 0) {
+          this.time = timeRange.start + '_'
         } else {
-          this.time = (data.data.start / 1000).toFixed(0) + '_' + (data.data.end / 1000).toFixed(0)
+          this.time = timeRange.start + '_' + timeRange.end
+        }
+        switch (data.data.exact) {
+          case 'all': {
+            this.timeText = '不限'
+            break
+          }
+          case 'lately7': {
+            this.timeText = '最近7天'
+            break
+          }
+          case 'lately30': {
+            this.timeText = '最近30天'
+            break
+          }
+          case 'lastYear': {
+            this.timeText = '去年'
+            break
+          }
+          case 'exact': {
+            this.timeText = new Date(timeRange.start*1000).pattern('yyyy.MM.dd') + '~' + new Date(timeRange.end*1000).pattern('yyyy.MM.dd')
+            break
+          }
         }
-        FTAGData(this.time)
+        this.setToggle()
+        setTimeout(() => {
+          FTAGData(this.time)
+        }, 500)
         return
       } else if(data.name === 'areaItem'){
+        $('.areaText').html(data.t)
         this.area = data.data.join('、')
       } else if(data.name === 'industryItem'){
+        $('.industryText').html(data.t)
         this.subscopeclass = data.data.join(',')
       } else if(data.name === 'cateItem'){
+        $('.cateText').html(data.t)
         this.buyerclass = data.data.join(',')
       } else if(data.name === 'keywordItem'){
-        this.$refs.keywordItem.toggle()
+        $('.keywordText').html(data.t)
+        this.key = data.data.join(',')
       } else if(data.name === 'noticeItem'){
+        $('.noticeText').html(data.t)
         this.subtype = data.data.join(',')
       } else if(data.name === 'rootItem'){
         tointroducepage()
       }
-      this.getAjaXParams()
+      this.setToggle()
+      setTimeout(()=>{
+        this.getAjaXParams()
+      }, 500)
     },
     cancel: function(data){
       console.log(data)

+ 13 - 14
src/web/templates/big-member/wx/page_ent_portrait.html → src/web/templates/frontRouter/wx/collection/sess/ent_portrait.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="zh-CN" style="font-size: 50px;">
+<html lang="zh-CN" font-size="50px">
 <head>
     <!--S-meta-->
     <meta charset="UTF-8">
@@ -12,6 +12,7 @@
         <meta http-equiv="X-UA-Compatible" content="ie=edge">
         <title>企业画像</title>
         <script src="/big-member/js/rem.js"></script>
+        <script src="/big-member/js/utils.js"></script>
         <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/reset-css@4.0.1/reset.min.css />
         <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/index.css />
         <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/icon/local.css />
@@ -41,7 +42,7 @@
     .vip_openDialog{
         padding: 0.56rem 0 0.64rem;
         height: 7.4rem;
-        background: url('{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/image/openVip.png') no-repeat;
+        background: url('{{Msg "seo" "cdn"}}/jyapp/big-member/image/openVip.png') no-repeat;
         background-size: contain;
         top: 53%;
     }
@@ -111,8 +112,7 @@
 </style>
 <body>
 <div class="j-container">
-    {{include "/big-member/header.html"}}
-    <div id="ent-portrait" class="j-main" v-cloak>
+    <div id="ent-portrait" class="j-main">
         <div class="j-header ent-header">
             <span class="j-icon icon-company"></span>
             <span class="ent-title">${ entInfo.name }</span>
@@ -222,15 +222,15 @@
                         </div>
                     </div>
                 </div>
-                <div class="bg-white tab-card ent-change-history" @click="goToEntHistory" v-if="!svip">
+                <!-- <div class="bg-white tab-card ent-change-history" @click="goToEntHistory" v-if="!svip">
                     <div class="ent-change-l">企业情报历史记录</div>
                     <div class="j-icon icon-back base-icon"></div>
-                </div>
+                </div> -->
             </van-tab>
             <van-tab name="2" v-if="!singleTab">
                 <template #title>
-                    <span class="bidinfo">中标信息</span>
-                    <span class="bid_upgrade">升级</span>
+                    <span :class="{bidinfo:digshow==true}">中标信息</span>
+                    <span v-if="digshow" class="bid_upgrade">升级</span>
                 </template>
                 <van-dialog
                 v-model="digshow"
@@ -443,12 +443,11 @@
 <script src=//cdn.jsdelivr.net/npm/echarts@4.8.0/dist/echarts.min.js></script>
 <script src=//cdn.jsdelivr.net/npm/v-charts@1.19.0/lib/index.min.js></script>
 <script src=//cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js></script>
-<script src='{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}'></script>
-
-<!-- <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/antiRes/js/mainHook.js?v={{Msg "seo" "version"}}'></script> -->
-<script src='{{Msg "seo" "cdn"}}/big-member/js/echarts_option.js?v={{Msg "seo" "version"}}'></script>
-<script src='{{Msg "seo" "cdn"}}/big-member/js/chart_options.js?v={{Msg "seo" "version"}}'></script>
-<script src='{{Msg "seo" "cdn"}}/big-member/js/ent_portrait.js?v={{Msg "seo" "version"}}'></script>
+{{include "/big-member/commonjs.html"}}
+<script src='{{Msg "seo" "cdn"}}/antiRes/js/mainHook.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/collection/js/echarts_option.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/collection/js/chart_options.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/collection/js/ent_portrait.js?v={{Msg "seo" "version"}}'></script>
 {{include "/common/baiducc.html"}}
 </body>
 </html>

+ 8 - 8
src/web/templates/frontRouter/wx/collection/sess/index.html

@@ -22,12 +22,12 @@
 </head>
 <style>
   .list-mian{
-    height: 100%;
-    overflow: hidden;
+    /* height: 100%; */
+    overflow: auto;
   }
   .list-mian .van-list{
-    height: 100%;
-    overflow: auto;
+    height: auto;
+    overflow: hidden;
   }
 </style>
 <body>
@@ -42,7 +42,7 @@
               <div class="data_report">
                 <div class="collec_datareport" @click="dataReport">
                   <span class="data_download"></span>
-                  <span class="data text">数据导出</span>
+                  <span class="data_text">数据导出</span>
                 </div>
               </div>
             </div>
@@ -51,7 +51,7 @@
             <van-dropdown-item  title="个人标签"  ref="tagItem">
               <tags-component @confirm="confirm" @cancel="cancel" :taglist="tagList"></tags-component>
             </van-dropdown-item>
-            <van-dropdown-item title="收藏日期" ref="dateItem">
+            <van-dropdown-item :title="tagText.timeText" ref="dateItem">
               <date-component @confirm="confirm" @cancel="cancel"></date-component>
             </van-dropdown-item>
             <van-dropdown-item title="采购单位类型" ref="cateItem">
@@ -64,7 +64,7 @@
               <phone-component :data="params.winnerData" @confirm="confirm"></phone-component>
             </van-dropdown-item>
           </van-dropdown-menu>
-          <div class="list-mian">
+          <div class="list-mian" ref="jList">
             <van-list
               v-model="listState.loading"
               :finished="listState.finished"
@@ -76,7 +76,7 @@
                   <div class="collec_title ellipsis-2">
                     ${item.title}
                   </div>
-                  <div class="collec_star" @click="collecClick(item._id)">
+                  <div class="collec_star" @click="collecClick(event,item._id)">
                     <span class="shoucang" v-if="condition"></span>
                     <!-- <span class="weishoucang" v-if="!condition"></span> -->
                   </div>

+ 60 - 13
src/web/templates/weixin/historypush.html

@@ -250,6 +250,15 @@
             margin-right: 5px;
             background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMPSURBVHgB7VZNSBtBFH4zs/5FoYgVe66n/iT3ek+PxTRaKMRCFcG74FHxKngtlWJKa6DQ+lN6bO720oux6knPDdZDwbTG3ZnXedNEkt3ZNRu86QcLw9t5733vZ94MwA2uOxi0gZ/vJ3pP3OoEMpU2RhC2Bzp6Xt95sVaBmHCgDZy4f2eAsTSr82eQ/uWeDenVHMQEh5ig6Mm5X84YpHbfPBmCmIhN4Ljq9cEVIjaB5PSHMgMs++UkS05/KUNMNBGg9LaSRi5w2S+TMijzg2ybEjbg4hTs5Z/lADD3X4hlD9ViamrzKGjk+ZBw5DwiDjcbwrKU53O2LBgd4S4hsFpwrPBg8mPBBGM2vB1P150TaKPD+ELAkN7HhPvK77yuI0Tn0r6x1Yxm52Z3rr7PHEOuMEVt7DdImxiHU5CYkgCP9XnvjRodxgnC7H5+LKd3bYNgJU9BHyIEyorkE6BYmwNYsRnWirMoacViTSwiggAZkJAJ63LOdGBQy4BSnVs6tTRYeltzoQpKusXGen9fGR1OdDjzzakOI4gVT55/pvVFYNQojnBHNfORKCMK5UpyanOL1tTRx9XffYNdt05pDB/ks/MK+EiYLjUqlYac18kHMnvwbvyRkrAQZmTA6c6SM2pIrkvUGNVlGdRttnz/5adioyxQon7WXYJW4Kkymt6pGW+hfNKrBmwHCFB0yCCUxHH1jzmCyemN0sPJ9aySao7KYpuOjdClPbLNCGtz761m9W3HR+2GsCJAfHXRLfoHVZQeB9y6N7m+4pdbr2OlYJsLsBqiVCtQGcFE5kd+rEJvAaXOCxTdQEdi7cQ7s+p5us/txCwY7EocNtY3DKbu+moWjqChAlEPkkGnZ6dlAsYQY4e2f3o6FeljTJXoo7X0pOkZOso2FYaqFEYu9EVESppfyi+Penpx7s5YJ2pEU4cS0LOgpPsgAP30WthdffpN38mnF0YQ79JdASFHkWxBCCJHvG6yjdbHsx3US3Rcw/5Hv4jC+iAGBMedqP+RBG6L7kWG7ZNgOoB+nrj0pXSD641//dtfBfsCmIsAAAAASUVORK5CYII=);
         }
+        ._header .wx_header .wx_header_left .only-member::after {
+            content: '';
+            display: flex;
+            margin-left: 4px;
+            width: 12px;
+            height: 12px;
+            background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACSSURBVHgBzZO7CYAwFEWvQXCNWOoWDiFY27mUDmDjBo5gZ2vWEBElASGGFyGfwlOFGzgkeTdAJBIqXIaGZ9c5y3XZjrm+t/b1RuXph4SDhsyZo8QKs0gEHGGUJNmPCo4okSkpuknAEf2NvCUSNTVzlD4wROJ/ohSBPNUJOpHeP2+RWWJvkVnikKtxaCUOEb1+wg1trU+oaaKLhgAAAABJRU5ErkJggg==) no-repeat;
+            background-size: contain;
+        }
         ._header .wx_header .wx_header_right {
             line-height: 56px;
         }
@@ -519,7 +528,7 @@
 <div class="_header collection" id="select-meau">
     <div class="wx_header">
         <div class="wx_header_left">
-            <div class="switch" data-need-bind-phone style="display:none;margin-left: 0;">
+            <div class="switch only-member" data-need-bind-phone style="display:none;margin-left: 0;">
                 <span></span>
             </div>
         </div>
@@ -571,12 +580,12 @@
             </div>
         </div> -->
         <van-dropdown-menu style="width: auto;overflow-x: auto;">
-            <van-dropdown-item title="时间"  ref="dateItem">
+            <van-dropdown-item :title="timeText"  ref="dateItem">
                 <date-component @cancel="cancel" @confirm="confirm" />
             </van-dropdown-item>
             <van-dropdown-item ref="areaItem">
                 <template #title>
-                    <span v-if="screenShow">地区</span>
+                    <span v-if="screenShow" class="areaText">地区</span>
                     <span v-if="!screenShow" class="rootstyletitle">
                         <span>地区</span>
                         <span class="root_open">开通</span>
@@ -587,7 +596,7 @@
             </van-dropdown-item>
             <van-dropdown-item ref="industryItem">
                 <template #title>
-                    <span v-if="screenShow">行业</span>
+                    <span v-if="screenShow" class="industryText">行业</span>
                     <span v-if="!screenShow" class="rootstyletitle">
                         <span>行业</span>
                         <span class="root_open">开通</span>
@@ -598,7 +607,7 @@
             </van-dropdown-item>
             <van-dropdown-item  ref="cateItem">
                 <template #title>
-                    <span v-if="screenShow">采购单位</span>
+                    <span v-if="screenShow" class="cateText">采购单位</span>
                     <span v-if="!screenShow" class="rootstyletitle">
                         <span>采购单位</span>
                         <span class="root_open">开通</span>
@@ -609,7 +618,7 @@
             </van-dropdown-item>
             <van-dropdown-item title="关键词" ref="keywordItem">
                 <template #title>
-                    <span v-if="screenShow">关键词</span>
+                    <span v-if="screenShow" class="keywordText">关键词</span>
                     <span v-if="!screenShow" class="rootstyletitle">
                         <span>关键词</span>
                         <span class="root_open">开通</span>
@@ -620,7 +629,7 @@
             </van-dropdown-item>
             <van-dropdown-item title="公告类型" ref="noticeItem">
                 <template #title>
-                    <span v-if="screenShow">公告类型</span>
+                    <span v-if="screenShow" class="noticeText">公告类型</span>
                     <span v-if="!screenShow" class="rootstyletitle">
                         <span>公告类型</span>
                         <span class="root_open">开通</span>
@@ -913,12 +922,18 @@
       var isOnTail = 0;//是否试用
       var isExpire = 0;//即将到期的时间
       var userId = "";
-      var selectCity = "";
       //
-      var firstTime = {{.T.stime}};
+      var firstTime = {{.T.stime}}; // 时间
       if (firstTime != "") {
           firstTime = firstTime + "000";
+      } else {
+          firstTime = vm.time
       }
+      var selectCity = vm.area; // 地区
+      var selectIndustry = vm.subscopeclass // 行业
+      var selectCate = vm.buyerclass // 采购单位
+      var selectKeyword = vm.key // 关键词
+      var selectNotice = vm.subtype // 公告类型
       //获取当前时间
       var date = (function () {
           var date = new Date();
@@ -930,6 +945,17 @@
           return year + '-' + month + '-' + day;
       })();
 
+      //   判断是否是大会员
+      $.ajax({
+        url: '/publicapply/bidcoll/power',
+        type: 'POST',
+        success: function(res) {
+          if(res.data.member) {
+            $(".switch").addClass("only-member");
+          }
+        }
+      })
+
       //初始化数据
       function initpage() {
           if (sessionStorage && sessionStorage.historypushScrollTop && sessionStorage.historypushDataCache) {
@@ -945,6 +971,10 @@
               userId = sessionStorage.userId;
               firstTime = sessionStorage.getItem(userId + "_searchTime");
               selectCity = sessionStorage.getItem(userId + "_selectCity");
+              selectIndustry = sessionStorage.getItem(userId + "_selectIndustry");
+              selectCate = sessionStorage.getItem(userId + "_selectCate");
+              selectKeyword = sessionStorage.getItem(userId + "_selectKeyword");
+              selectNotice = sessionStorage.getItem(userId + "_selectNotice");
               if (sessionStorage.keys) {
                 words = JSON.parse(sessionStorage.keys);
               }
@@ -974,10 +1004,22 @@
               if (sessionStorage.getItem(userId + "_selectCity") != null && sessionStorage.getItem(userId + "_selectCity") != "") {
                   selectCity = sessionStorage.getItem(userId + "_selectCity");
               }
+              if (sessionStorage.getItem(userId + "_selectIndustry") != null && sessionStorage.getItem(userId + "_selectIndustry") != "") {
+                  selectIndustry = sessionStorage.getItem(userId + "_selectIndustry");
+              }
+              if (sessionStorage.getItem(userId + "_selectCate") != null && sessionStorage.getItem(userId + "_selectCate") != "") {
+                  selectCate = sessionStorage.getItem(userId + "_selectCate");
+              }
+              if (sessionStorage.getItem(userId + "_selectKeyword") != null && sessionStorage.getItem(userId + "_selectKeyword") != "") {
+                  selectKeyword = sessionStorage.getItem(userId + "_selectKeyword");
+              }
+              if (sessionStorage.getItem(userId + "_selectNotice") != null && sessionStorage.getItem(userId + "_selectNotice") != "") {
+                  selectNotice = sessionStorage.getItem(userId + "_selectNotice");
+              }
               $.ajax({
                 type: 'post',
                 url: '/front/hasPushHistory?t=' + new Date().getTime(),
-                data: {"selectTime": firstTime, "pageNum": 1, "area": selectCity},
+                data: {"selectTime": firstTime, "pageNum": 1, "area": selectCity, "subscopeclass": selectIndustry, "buyerclass": selectCate, "key": selectKeyword, "subtype": selectNotice},
                 async: false,
                 dataType: 'json',
                 success: function (data) {
@@ -1037,7 +1079,7 @@
                       $.ajax({
                           type: 'post',
                           url: '/swordfish/historypush/paging',
-                          data: {"pageNum": pageIndex, "selectTime": firstTime, "area": selectCity},
+                          data: {"pageNum": pageIndex, "selectTime": firstTime, "area": selectCity, "subscopeclass": selectIndustry, "buyerclass": selectCate, "key": selectKeyword, "subtype": selectNotice},
                           dataType: 'json',
                           success: function (data) {
                               //没有数据
@@ -1326,8 +1368,12 @@
                           + '<div class="one">'
                           + '<span class="xh ' + visited + '">' + count + '.</span>'
                           + '</div>'
-                          + '<div class="two bt-parent" style="padding-left:' + paddingLeft + 'px;">'
+                          + '<div class="two bt-parent" style="display: flex;justify-content: space-between;padding-left:' + paddingLeft + 'px;">'
                           + '<a class="bt ' + visited + '" eid="' + obj["_id"] + '" href="javascript:void(0);"  push_date="' + obj["ca_date"] + '" list_index="' + obj["ca_index"] + '" projectM="' + obj["ca_type"] + '">' + title + '</a>'
+                          + '<div class="collec_star" collecnum="'+obj["collection"]+'" data-id="' + obj["_id"] + '">'
+                          + '<span class="shoucang"></span>'
+                          + '<span class="weishoucang"></span>'
+                          + '</div>'
                           + '</div>'
                           + '</div>'
                           + '<div style="clear:both;">'
@@ -1460,6 +1506,7 @@
       //
       function appendList(content) {
           content.children(".tslist").on("click", function (event) {
+              event.stopPropagation() // 阻止冒泡
               var isv = $(this).find("a.bt").hasClass("visited");//是否为已读
               setVisitedIndex($(this), "");
               var sds = $(this).attr("words");
@@ -1578,7 +1625,7 @@
                         $.ajax({
                             type: 'post',
                             url: '/swordfish/historypush/paging',
-                            data: {"pageNum": pageIndex, "selectTime": time, "area": area},
+                            data: {"pageNum": pageIndex, "selectTime": time, "area": area, "subscopeclass": subscopeclass, "buyerclass": buyerclass, "key": key, "subtype": subtype},
                             dataType: 'json',
                             success: function (data) {
                                 //没有数据

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно