瀏覽代碼

feat:调整画像及投标决策分析优化版本新增需求

yangfeng 3 年之前
父節點
當前提交
c5bb7ef61f

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/analysis_result.css

@@ -358,7 +358,7 @@
     display: flex;
     align-items: center;
     justify-content: space-between;
-    padding: 5px 6px 8px;
+    padding: 5px 8px 8px;
     color: #5F5E64;
     font-size: .2rem;
     line-height: .36rem;

+ 38 - 26
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -161,6 +161,7 @@ var vNode = {
     if (storageId && storageId !== eId) {
       sessionStorage.removeItem('winner_high_set')
       sessionStorage.removeItem('winner_high_eid')
+      sessionStorage.removeItem('is-click-set')
     }
   },
   mounted: function () {
@@ -177,35 +178,45 @@ var vNode = {
       _this.getStickyTop()
     })
   },
+  beforeUpdate: function(){
+    // console.log($('.win-analyse').length)
+    var storageClick = JSON.parse(sessionStorage.getItem('is-click-set'))
+    if ($('.win-analyse').length && $('.win-analyse').length > 0 && storageClick) {
+      this.$nextTick(function(){
+        document.querySelector('.win-analyse').scrollIntoView()
+        // sessionStorage.removeItem('is-click-set')
+      })
+    }
+  },
   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('获取企业中标动态...')
-                    }
+      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('获取企业中标动态...')
+                }
+            }
+        });
+      }
+    }
   },
   computed: {
     // 3个权限有1个就为true(取反为3个权限1个都没有)
@@ -1163,6 +1174,7 @@ var vNode = {
       var url = this.getProjectNewsUrl()
       var reqSign = url.indexOf('subVipPortrait') === -1 ? 'bigmember' : 'svip'
       if (this.conf._4) {
+        sessionStorage.setItem('is-click-set', 1)
         location.href = './free_high_set?header=中标信息高级分析设置&eid=' + utils.getParam('eId') + '&reqSign=' + reqSign
       } else {
         this.$dialog.confirm({

+ 11 - 13
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js

@@ -174,6 +174,15 @@ var vNode = {
           newVal.setOption(chartOptions.deformPieChart);
           newVal.resize()
         }
+      },
+      chartLoading: function (params) {
+        var storageClick = sessionStorage.getItem('is-click-set')
+        if (!params && storageClick) {
+          this.$nextTick(function(){
+            document.querySelector('.win-analyse').scrollIntoView()
+            sessionStorage.removeItem('is-click-set')
+          })
+        }
       }
     },
     created () {
@@ -191,7 +200,7 @@ var vNode = {
         
         this.getNewMsg(); // 中标动态
         this.getChartData(); // 企业画像
-        // this.init();
+        // this.init()
     },
     beforeDestroy() {
       window.removeEventListener("resize", this.init,20);
@@ -1318,19 +1327,8 @@ var vNode = {
             return maxIndex
         },
         goHighSet: function() {
+          sessionStorage.setItem('is-click-set', 1)
           location.href = './free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // if (!this.getStatus) {
-          //   location.href = './free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // } else {
-          //   this.$dialog.confirm({
-          //     className:'promatch',
-          //     title: '您暂无使用权限',
-          //     message: '您未购买此服务,如需使用请联系您的销售人员或客服升级套餐,谢谢!',
-          //     showCancelButton: false,
-          //     confirmButtonColor: '#2cb7ca',
-          //     confirmButtonText: '我知道了'
-          //   }).then(function () {})
-          // }
         }
     }
 }

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

@@ -222,7 +222,7 @@
             <hispro-component type="winner" :id="entInfo.id"></hispro-component>
           </div>
           <!-- 高级分析 -->
-          <div class="win-analyse">
+          <div class="win-analyse" ref="setRef">
             <span class="win-bid-title">中标分析</span>
             <div class="high-link" @click="goHighSet">
               <span>高级分析设置</span>

+ 1 - 1
src/jfw/modules/app/src/web/templates/big-member/page_free_high_set.html

@@ -69,7 +69,7 @@
           </div>
           <div class="data-container">
             <van-cell title="项目搜索范围" is-link :value="conf.scope" @click="popClick('scope')"></van-cell>
-            <van-cell title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
+            <van-cell class="area-class" title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
             <van-cell title="行业" is-link :value="conf.industry" @click="popClick('industry')"></van-cell>
           </div>
           <div class="years-container">

+ 10 - 12
src/web/staticres/big-member/js/unit_portrayal.js

@@ -171,6 +171,15 @@ var vNode = {
           newVal.setOption(chartOptions.deformPieChart);
           newVal.resize()
         }
+      },
+      chartLoading: function (params) {
+        var storageClick = sessionStorage.getItem('is-click-set')
+        if (!params && storageClick) {
+          this.$nextTick(function(){
+            document.querySelector('.win-analyse').scrollIntoView()
+            sessionStorage.removeItem('is-click-set')
+          })
+        }
       }
     },
     created () {
@@ -1299,19 +1308,8 @@ var vNode = {
             return maxIndex
         },
         goHighSet: function() {
+          sessionStorage.setItem('is-click-set', 1)
           location.href = '/big/wx/page/free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // if (!this.getStatus) {
-          //   location.href = '/big/wx/page/free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // } else {
-          //   this.$dialog.confirm({
-          //     className:'promatch',
-          //     title: '您暂无使用权限',
-          //     message: '您未购买此服务,如需使用请联系您的销售人员或客服升级套餐,谢谢!',
-          //     showCancelButton: false,
-          //     confirmButtonColor: '#2cb7ca',
-          //     confirmButtonText: '我知道了'
-          //   }).then(function () {})
-          // }
         }
     }
 }

+ 19 - 0
src/web/staticres/common-module/big-member/js/high_set.js

@@ -83,6 +83,14 @@ var highSet = new Vue({
         this.conf.start = this.conf.end
         this.conf.end = newVal
       }
+    },
+    'conf.area': function (newVal) {
+      console.log(newVal)
+      if (newVal == '全国') {
+        $('.area-class .van-cell__value span').html('全部')
+      } else {
+        $('.area-class .van-cell__value span').html(newVal)
+      }
     }
   },
   computed: {
@@ -143,6 +151,11 @@ var highSet = new Vue({
     var header = decodeURIComponent(utils.getParam('header'))
     this.setHeaderTitle(header)
     this.getFilterApi()
+    if (this.conf.area == '全国') {
+      $('.area-class .van-cell__value span').html('全部')
+    } else {
+      $('.area-class .van-cell__value span').html(this.conf.area)
+    }
   },
   methods: {
     // 设置title
@@ -325,6 +338,11 @@ var highSet = new Vue({
       }
       this.$refs.projectAreaSelector.arrangeListMap(map)
       this.$refs.projectAreaSelector.setState(this.selectAreaList)
+      $('.area-card-item').each(function(){
+        if($(this).html() == '全国') {
+          $(this).html('全部')
+        }
+      })
     },
     // 过滤行业数据
     initProjectIndustrySelector: function (data) {
@@ -464,6 +482,7 @@ var highSet = new Vue({
       this.conf.end = new Date().getFullYear()
       this.conf.match = 0
       this.filterInitData.area = []
+      this.selectAreaList = ['全国']
       this.selectIndustryList = []
       this.selectScopeList = ['purchasing']
     }

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

@@ -158,6 +158,7 @@ var vNode = {
     if (storageId && storageId !== eId) {
       sessionStorage.removeItem('winner_high_set')
       sessionStorage.removeItem('winner_high_eid')
+      sessionStorage.removeItem('is-click-set')
     }
 
   },
@@ -175,6 +176,16 @@ var vNode = {
       _this.getStickyTop()
     })
   },
+  beforeUpdate: function(){
+    // console.log($('.win-analyse').length)
+    var storageClick = JSON.parse(sessionStorage.getItem('is-click-set'))
+    if ($('.win-analyse').length && $('.win-analyse').length > 0 && storageClick) {
+      this.$nextTick(function(){
+        document.querySelector('.win-analyse').scrollIntoView()
+        // sessionStorage.removeItem('is-click-set')
+      })
+    }
+  },
   watch: {
     tabActiveName: function (newVal, oldVal) {
       var _this = this
@@ -1146,6 +1157,7 @@ var vNode = {
       var url = this.getProjectNewsUrl()
       var reqSign = url.indexOf('subVipPortrait') === -1 ? 'bigmember' : 'svip'
       if (this.conf._4) {
+        sessionStorage.setItem('is-click-set', 1)
         location.href = '/big/wx/page/free_high_set?header=中标信息高级分析设置&eid=' + utils.getParam('eId') + '&reqSign=' + reqSign
       } else {
         this.$dialog.confirm({

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

@@ -69,7 +69,7 @@
           </div>
           <div class="data-container">
             <van-cell title="项目搜索范围" is-link :value="conf.scope" @click="popClick('scope')"></van-cell>
-            <van-cell title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
+            <van-cell class="area-class" title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
             <van-cell title="行业" is-link :value="conf.industry" @click="popClick('industry')"></van-cell>
           </div>
           <div class="years-container">