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

fix:超级订阅订阅管理,订阅页面定制化分析图表显示

tangshizhe 2 жил өмнө
parent
commit
ad595cdae6

+ 18 - 13
src/components/custom-report/customReport.vue

@@ -67,11 +67,10 @@ export default {
   watch: {
   watch: {
     chartCustomData: {
     chartCustomData: {
       handler (newval) {
       handler (newval) {
-        let data
         const chartKeyArr = Object.keys(newval)
         const chartKeyArr = Object.keys(newval)
         chartKeyArr.forEach(item => {
         chartKeyArr.forEach(item => {
           if (item === 'customer_scale') {
           if (item === 'customer_scale') {
-            data = newval.customer_scale.map(item => {
+            const data = newval.customer_scale.map(item => {
               return {
               return {
                 ...item,
                 ...item,
                 name: item.buyclass,
                 name: item.buyclass,
@@ -79,11 +78,13 @@ export default {
                 amount: formatPrice(item.amount / 10000)
                 amount: formatPrice(item.amount / 10000)
               }
               }
             })
             })
-            if (typeof vComponentChart === 'function') {
-              vComponentChart('#chartTreeMap', data, {}, 've-treemap')
-            }
+            setTimeout(() => {
+              if (typeof vComponentChart === 'function') {
+                vComponentChart('#chartTreeMap', data, {}, 've-treemap')
+              }
+            }, 1000)
           } else if (item === 'winner_time_distribution') {
           } else if (item === 'winner_time_distribution') {
-            data = {
+            const data = {
               columns: ['采购规模分布', '采购总金额占比', '采购单位总数占比'],
               columns: ['采购规模分布', '采购总金额占比', '采购单位总数占比'],
               rows: []
               rows: []
             }
             }
@@ -110,12 +111,14 @@ export default {
             }
             }
             if (total) {
             if (total) {
               data.rows.reverse()
               data.rows.reverse()
-              if (typeof vComponentChart === 'function') {
-                vComponentChart('#chartLineChartBuyer', data, {}, 've-line')
-              }
+              setTimeout(() => {
+                if (typeof vComponentChart === 'function') {
+                  vComponentChart('#chartLineChartBuyer', data, {}, 've-line')
+                }
+              }, 1000)
             }
             }
           } else if (item === 'buyer_time_distribution') {
           } else if (item === 'buyer_time_distribution') {
-            data = {
+            const data = {
               columns: ['中标规模分布', '中标总金额占比', '中标单位总数占比'],
               columns: ['中标规模分布', '中标总金额占比', '中标单位总数占比'],
               rows: []
               rows: []
             }
             }
@@ -142,9 +145,11 @@ export default {
             }
             }
             if (total) {
             if (total) {
               data.rows.reverse()
               data.rows.reverse()
-              if (typeof vComponentChart === 'function') {
-                vComponentChart('#chartLineChart', data, {}, 've-line')
-              }
+              setTimeout(() => {
+                if (typeof vComponentChart === 'function') {
+                  vComponentChart('#chartLineChart', data, {}, 've-line')
+                }
+              }, 1000)
             }
             }
           }
           }
         })
         })

+ 7 - 3
src/views/analysisReport/MarketAnalysis.vue

@@ -379,12 +379,16 @@ export default {
           center: true
           center: true
         })
         })
       } else {
       } else {
-        console.log(this.info)
         if (this.info.isFree) {
         if (this.info.isFree) {
           this.advancedInfo.showDialog = true
           this.advancedInfo.showDialog = true
         } else {
         } else {
-          const routeUrl = this.$router.resolve({ path: '/set_subscribe/config?scroll=setkey' })
-          window.open(routeUrl.href)
+          if (this.info.memberStatus > 0) {
+            const routeUrl = this.$router.resolve({ path: '/set_subscribe/config?scroll=setkey' })
+            window.open(routeUrl.href)
+          } else if (this.info.vipStatus > 0) {
+            const routeUrl = this.$router.resolve({ path: '/big_subscribe?vt=v' })
+            window.open(routeUrl.href)
+          }
         }
         }
       }
       }
     }
     }

+ 1 - 1
vue.config.js

@@ -24,7 +24,7 @@ module.exports = {
     headers: {
     headers: {
       'Access-Control-Allow-Origin': '*'
       'Access-Control-Allow-Origin': '*'
     },
     },
-    proxy: getProxyOfDomain('https://webdev-webtest.jydev.jianyu360.com/') || getProxyOfIp('http://127.0.0.1')
+    proxy: getProxyOfDomain('https://jybx-webtest.jydev.jianyu360.com/') || getProxyOfIp('http://127.0.0.1')
   },
   },
   css: {
   css: {
     loaderOptions: {
     loaderOptions: {