瀏覽代碼

Merge branch 'dev' of http://192.168.3.207:10080/jianyu/page_bigmember_pc into dev

zhangyuhan 4 年之前
父節點
當前提交
efb72c4479
共有 2 個文件被更改,包括 9 次插入9 次删除
  1. 1 1
      src/views/portrayal/EntPortrayal.vue
  2. 8 8
      src/views/portrayal/components/EntChart.vue

+ 1 - 1
src/views/portrayal/EntPortrayal.vue

@@ -64,7 +64,7 @@ export default {
         classActive: 'icon_heart_gray',
         text: '关注'
       },
-      eId: this.$route.path.split('/').slice(-1)[0],
+      eId: this.$route.params.eId,
       entName: ''
     }
   },

+ 8 - 8
src/views/portrayal/components/EntChart.vue

@@ -43,7 +43,7 @@ import MapChart from '@/components/chart/MapChart'
 import PieChart from '@/components/chart/PieChart'
 import ProgressChart from '@/components/chart/ProgressChart'
 import { getEntChart } from '@/api/modules/'
-import { getParam, bSort, moneyUnit } from '@/utils/'
+import { bSort, moneyUnit } from '@/utils/'
 export default {
   name: 'ent-chart',
   props: ['active'],
@@ -159,7 +159,7 @@ export default {
     async getChartData () {
       this.getEntPortraitInfoTimes++
       const res = await getEntChart({
-        entId: decodeURIComponent(getParam('eId'))
+        entId: decodeURIComponent(this.$route.params.eId)
       })
       if (res.error_code === 0) {
         if (res.data && Object.keys(res.data).length !== 0) {
@@ -204,7 +204,7 @@ export default {
     /* *********** 画像数据处理 ********** */
     // 整理年度项目统计数据
     arrangeAnnualData (data) {
-      if (!data) return
+      if (!data || Object.keys(data).length === 0) return
       let rows = []
       let count = 0
       for (var key in data) {
@@ -231,7 +231,7 @@ export default {
     },
     // 整理月度中标金额数据
     arrangeMonthZbData (data) {
-      if (!data) return
+      if (!data || Object.keys(data).length === 0) return
       const rows = []
       const columns = ['月份']
       let count = 0
@@ -272,7 +272,7 @@ export default {
     },
     // 整理主要市场分布(中国地图)数据
     arrangeMapData (data) {
-      if (!data) return
+      if (!data || data.length === 0) return
       const mapRows = []
       let count = 0
       if (data && $.isArray(data)) {
@@ -294,7 +294,7 @@ export default {
     },
     // 整理平均折扣率数据
     arrangeRateData (data) {
-      if (!data) return
+      if (!data || Object.keys(data).length === 0) return
       const rows = []
       const columns = ['日期', '全部客户']
       let count = 0
@@ -328,7 +328,7 @@ export default {
     },
     // 整理客户类型分布数据
     initPieChartData (res) {
-      if (!res) return
+      if (!res || res.length === 0) return
       const arr = []
       const data = JSON.parse(JSON.stringify(res))
       // 降序排列
@@ -359,7 +359,7 @@ export default {
     },
     // 整理重要客户数据
     arrangeImportantData (data) {
-      if (!data) return
+      if (!data || data.length === 0) return
       const arr = []
       if ($.isArray(data)) {
         data.forEach((list) => {