Bläddra i källkod

Merge branch 'dev' into feature-yf

yangfeng 4 år sedan
förälder
incheckning
14a141813f

+ 0 - 1
src/components/common/Empty.vue

@@ -4,7 +4,6 @@
       <el-image :src="require('@/assets/images/empty.png')"></el-image>
       <div class="empty-main">
         <slot name="default">{{ tip }}</slot>
-        <slot name="poten_button"></slot>
       </div>
     </div>
   </div>

+ 16 - 18
src/components/forecast/ForLayout.vue

@@ -49,6 +49,11 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapState({
+      bidnum: state => state.forcast.bidForeCastNum
+    })
+  },
   components: {
     [Icon.name]: name,
     SearchInput
@@ -59,22 +64,10 @@ export default {
       type: 0 // 0没有搜索过,1搜索过
     }
   },
-  computed: {
-    ...mapState({
-      forcast: state => state.forcast.list
-    })
-  },
-  created () {
-    this.bidforecast()
-  },
-  watch: {
-    $route: 'bidforecast'
-  },
   methods: {
     getRecovery (data) {
       console.log(data, 'x')
       this.type = 1
-      console.log(!data.data)
       if (this.searchConfig.type === 'follow') {
         getFollowAssociationList({ entName: data.text }).then(res => {
           if (res && res.error_msg === '' && res.data) {
@@ -97,9 +90,17 @@ export default {
             this.$store.commit('forcast/setType', this.type)
             if (data.events === 'select') {
               // 联想跳转
-              const result = [data.data]
-              this.$store.commit('forcast/setHistoryList', result)
-              this.$router.push(`/ai_add/${data.data.s_id}/${data.data.sourceinfoid}`)
+              if (this.bidnum !== 0) {
+                const result = [data.data]
+                this.$store.commit('forcast/setHistoryList', result)
+                this.$router.push({
+                  path: '/ai_add',
+                  query: {
+                    pid: data.data.s_id,
+                    sid: data.data.sourceinfoid
+                  }
+                })
+              }
             } else {
               // 点击搜索按钮\键盘Enter事件
               this.$store.commit('forcast/setList', res.data)
@@ -131,9 +132,6 @@ export default {
           }
         })
       }
-    },
-    bidforecast () {
-      this.type = 0
     }
   }
 }

+ 19 - 4
src/components/forecast/ForLimit.vue

@@ -91,10 +91,14 @@ export default {
   watch: {
     baseInfo (newVal, oldVal) {
       if (newVal) {
-        // if (newVal.area && newVal.area !== '') {
-        //   const p = this.getAreaInfo(newVal.area)
-        //   this.backArea = p
-        // }
+        if (newVal.area) {
+          // const p = this.getAreaInfo(newVal.area)
+          // this.backArea = p
+          for (const item in newVal.area) {
+            newVal.area[item] = this.trimSpace(newVal.area[item])
+          }
+          console.log(newVal.area)
+        }
         if (newVal.buyerContent && newVal.buyerContent.length !== 0) {
           // this.content = newVal.buyerContent
           this.content = this.getBuyContent(newVal.buyerContent)
@@ -138,6 +142,17 @@ export default {
         return { [info.province]: [info.city] }
       }
     },
+    // 去除数组的空字符串
+    trimSpace (array) {
+      console.log(array)
+      for (var i = 0; i < array.length; i++) {
+        if (array[i] === '' || array[i] == null || typeof (array[i]) === 'undefined') {
+          array.splice(i, 1)
+          i = i - 1
+        }
+      }
+      return array
+    },
     // 输入采购内容
     setPurContent (e) {
       this.content.push(this.unitContent)

+ 42 - 31
src/components/forecast/ForeCast.vue

@@ -19,7 +19,7 @@
     </ul>
     <!-- 中标企业预测>预测结果>预测项目列表-->
     <ul class="listData_ul" v-if="type=='bidforResult'">
-      <li class="list_li_result list_li" v-for="(item, index) in listState.list.slice((listState.pageNum - 1)* listState.pageSize, listState.pageNum * listState.pageSize)" :key="index" @click="goEntPor(item.entId)">
+      <li class="list_li_result list_li" v-for="(item, index) in listState.list.slice(0, 5)" :key="index" @click="goEntPor(item.entId)">
         <div class="list_li_left">
           <div class="result_chart">
             <el-progress type="circle" :show-text="true"  :color="activeColor(index)" :width="44" :stroke-width="4" :percentage="item.weight"></el-progress>
@@ -63,7 +63,7 @@
     </ul>
     <!-- 企业情报 -->
     <ul class="listData_ul" v-if="type=='entintel'">
-      <li class="list_li" v-for="(item, index) in listState.list.slice((listState.pageNum - 1) * listState.pageSize, listState.pageNum * listState.pageSize)" :key="index" @click="goViewEnt(item.s_entId)">
+      <li class="list_li" v-for="(item, index) in getMyData" :key="index" @click="goViewEnt(item.s_entId)">
         <div class="list_name">{{item.s_entname}}</div>
         <div class="list_unit">
           <div class="pur_unit">
@@ -151,11 +151,13 @@
         </div>
       </li>
     </ul>
-    <Empty v-if="showEmpty&&potenCode!==2" :tip="tips"></Empty>
+    <Empty v-if="showEmpty&&potenCode!==2" :tip="getTipText"></Empty>
     <Empty v-else-if="showEmpty&&potenCode==2">
-      <div class="poten_tip" name="default">暂未设置订阅关键词,无法进行预测</div>
-      <div class="setKeyWords" name="poten_button">
-        <button class="setBtn" @click="setKey()">立即设置关键词</button>
+      <div name="default">
+        <div class="poten_tip">暂未设置订阅关键词,无法进行预测</div>
+        <div class="setKeyWords">
+          <button class="setBtn" @click="setKey()">立即设置关键词</button>
+        </div>
       </div>
     </Empty>
     <div class="el-pagination-container" v-if="listState.list.length > 10">
@@ -175,12 +177,13 @@
 
 <script>
 import { Pagination, Progress } from 'element-ui'
+import { mapState } from 'vuex'
 // import { getPushList } from '@/api/modules/'
 import Empty from '@/components/common/Empty.vue'
 import { moneyUnit, dateFormatter } from '@/utils'
 import { setFollowEnt, setCancelEnt } from '@/api/modules'
 export default {
-  props: ['type', 'title', 'mydata', 'myDataObj', 'resData', 'myPolicydata', 'potenObj', 'potenResult', 'entSearch'],
+  props: ['type', 'tipText', 'title', 'mydata', 'myDataObj', 'resData', 'myPolicydata', 'potenObj', 'potenResult', 'entSearch'],
   name: 'listData',
   components: {
     [Pagination.name]: Pagination,
@@ -203,6 +206,7 @@ export default {
     }
   },
   created () {
+    // 我关注的企业
     // 中标企业预测
     if (this.type === 'bidfor') {
       this.initData(this.mydata, this.type)
@@ -219,10 +223,6 @@ export default {
     if (this.type === 'potensimilar') {
       this.potenSimiData(this.potenResult)
     }
-    // 我关注的企业
-    if (this.type === 'entintel') {
-      this.entInitData(this.myDataObj)
-    }
     // 企业搜索
     if (this.type === 'entintelRes') {
       this.entSearchData(this.entSearch)
@@ -238,9 +238,6 @@ export default {
     resData (newVal, oldVal) {
       this.resInitData(newVal)
     },
-    myDataObj (newVal, oldVal) {
-      this.entInitData(newVal)
-    },
     potenObj (newVal, oldVal) {
       this.potenInitData(newVal)
     },
@@ -255,9 +252,21 @@ export default {
     // }
   },
   computed: {
+    ...mapState({
+      bidnum: state => state.forcast.bidForeCastNum
+    }),
     showEmpty () {
+      if (this.type === 'entintel') {
+        return !this.getMyData.length
+      }
       return !this.listState.list.length
     },
+    getTipText () {
+      return this.tipText !== '' && this.tipText ? this.tipText : this.tips
+    },
+    getMyData () {
+      return this.myDataObj.list.slice((this.listState.pageNum - 1) * this.listState.pageSize, this.listState.pageNum * this.listState.pageSize)
+    },
     activeColor () {
       return function (item) {
         const val = Number(item)
@@ -317,17 +326,6 @@ export default {
         this.listState.total = 0
       }
     },
-    entInitData (obj) {
-      if (obj && obj.list.length !== 0) {
-        console.log(obj.total)
-        this.listState.list = obj.list
-        this.listState.total = obj.total
-      } else {
-        this.listState.list = []
-        this.listState.total = 0
-        this.tips = '您还没有关注企业'
-      }
-    },
     potenInitData (obj) {
       console.log(obj)
       if (obj.list && obj.list.length !== 0) {
@@ -336,11 +334,12 @@ export default {
       } else {
         this.listState.list = []
         this.listState.total = 0
-        if (obj.code === 1) {
+        console.log(obj.code)
+        if (obj.code === 2) {
+          this.potenCode = 2
+        } else {
           this.potenCode = 1
           this.tips = '暂未预测出潜在项目'
-        } else {
-          this.potenCode = 2
         }
       }
     },
@@ -398,9 +397,18 @@ export default {
       }
     },
     goBidForcast (data) {
-      const result = [data]
-      this.$store.commit('forcast/setHistoryList', result)
-      this.$router.push(`/ai_add/${data.s_id}/${data.sourceinfoid}`)
+      // 有中标预测次数才能点击
+      if (this.bidnum !== 0) {
+        const result = [data]
+        this.$store.commit('forcast/setHistoryList', result)
+        this.$router.push({
+          path: '/ai_add',
+          query: {
+            pid: data.s_id,
+            sid: data.sourceinfoid
+          }
+        })
+      }
     },
     goForcast (data) {
       const result = [data]
@@ -743,6 +751,9 @@ export default {
       }
     }
   }
+  .poten_tip{
+    text-align: center;
+  }
   .setKeyWords{
     display: flex;
     justify-content: center;

+ 5 - 0
src/router/router.js

@@ -20,4 +20,9 @@ const router = new Router({
   }
 })
 
+const originalPush = Router.prototype.push
+Router.prototype.push = function push (location) {
+  return originalPush.call(this, location).catch(err => err)
+}
+
 export default router

+ 1 - 1
src/router/routers.js

@@ -35,7 +35,7 @@ export default [
   },
   // 中标企业预测-预测
   {
-    path: '/ai_add/:ptid/:sourceinfoid',
+    path: '/ai_add',
     name: 'ai_add',
     component: () => import('@/views/bid-forecast/BidForecastLimit.vue')
   },

+ 9 - 3
src/store/forcast.js

@@ -3,16 +3,18 @@ export default {
   namespaced: true,
   state: () => ({
     // 中标企业预测
-    list: defaultLocalPageData('bigmember-BID_DATA-login-clear', []),
+    list: [],
     historyList: defaultLocalPageData('bigmember-BID_DATA-login-clear', []),
     // 投标决策分析
-    policyList: defaultLocalPageData('bigmember-POLICY_DATA-login-clear', []),
+    policyList: [],
     historyPolicyList: defaultLocalPageData('bigmember-POLICY_DATA-login-clear', []),
     // 企业情报-搜索
     entList: [],
     // 企业情报-我关注的项目
     entObject: {},
-    type: 0
+    type: 0,
+    // 中标预测次数
+    bidForeCastNum: 0
   }),
   mutations: {
     // 中标企业预测
@@ -41,6 +43,10 @@ export default {
     // 企业情报-我关注的项目
     setEntFollowList (state, obj) {
       state.entObject = obj
+    },
+    // 中标预测次数
+    setBidNum (state, num) {
+      state.bidForeCastNum = num
     }
   },
   actions: {},

+ 123 - 11
src/views/bid-forecast/BidForecast.vue

@@ -1,13 +1,18 @@
 <template>
-  <div class="bid-forcast">
+  <div class="bid-forcast"
+  v-loading="loading"
+  :element-loading-text="pronametip"
+  element-loading-spinner="el-icon-loading"
+  element-loading-background="rgba(0, 0, 0, 0.8)"
+  >
     <forLayOut :placeholder="{ text: '输入需要预测的项目名称'}" :searchConfig="{ type: 'bidfor'}">
       <span class="icon_ai" slot="icon"></span>
       <span class="bidfor_text" slot="proname">中标企业预测</span>
       <img class="bidfor_img" src="@/assets/images/item_7.png" alt="" slot="bidImg">
       <template v-slot:main>
-        <ForeCast type="bidfor" :title="type==1?'近似项目':'预测历史'" slot="main" :mydata="forcast"></ForeCast>
+        <ForeCast type="bidfor" :title="type==1?'近似项目':'预测历史'" slot="main" :mydata="getList"></ForeCast>
       </template>
-      <div class="bid_fre" slot="bidfre">- 您的中标预测次数剩余:{{num}} 次 -</div>
+      <div class="bid_fre" slot="bidfre">您的中标预测次数剩余:{{num}}次<br/>{{numTips}}</div>
     </forLayOut>
   </div>
 </template>
@@ -15,35 +20,137 @@
 <script>
 import forLayOut from '@/components/forecast/ForLayout.vue'
 import ForeCast from '@/components/forecast/ForeCast.vue'
-import { getBidAiused } from '@/api/modules'
+import { getBidAiused, getForWData, getForWStatus } from '@/api/modules'
 import { mapState } from 'vuex'
+import { Loading, Message } from 'element-ui'
 export default {
   name: 'bid-forcast',
   components: {
     ForeCast,
-    forLayOut
+    forLayOut,
+    [Loading.name]: Loading,
+    [Message.name]: Message
   },
   computed: {
     ...mapState({
-      forcast: state => state.forcast.list,
+      forcastHistoryList: state => state.forcast.historyList,
+      forcastList: state => state.forcast.list,
       type: state => state.forcast.type
-    })
+    }),
+    getList () {
+      return this.type === 1 ? this.forcastList : this.forcastHistoryList
+    }
   },
   data () {
     return {
-      num: 0
+      loading: false,
+      num: '',
+      numTips: '您可以下载剑鱼标讯APP,在大会员产品中进行充值',
+      pronametip: '',
+      readyTime: null,
+      timer: ''
     }
   },
+  mounted () {
+    this.$store.commit('forcast/setType', 0)
+  },
   created () {
     this.getBidNum()
+    this.getProForWData()
   },
   methods: {
     getBidNum () {
       getBidAiused().then(res => {
         if (res.error_code === 0) {
-          this.num = res.data.surplus
+          if (res.data.surplus === 0) {
+            this.num = 0
+          } else {
+            this.numTips = ''
+            this.num = res.data.surplus
+          }
+          this.$store.commit('forcast/setBidNum', res.data.surplus)
         }
       })
+    },
+    // 计算时间差秒数
+    timeDiff (begin) {
+      var t = new Date().getTime() - begin
+      return Math.floor(t / 1000)
+    },
+    // 刚进页面需要判断有没有正在预测的项目
+    async getProForWData () {
+      const item = {
+        appVersion: '',
+        area: '',
+        budget: '',
+        buyer: '',
+        buyerContent: '',
+        city: '',
+        id: '',
+        infoid: '',
+        mobileModel: '',
+        pname: '',
+        type: 'other'
+      }
+      const res = await getForWData(item)
+      console.log(res)
+      if (res.error_code === 0) {
+        // -1:预测失败;0:默认;1:有未查看得预测数据并返回id;2:正在预测中
+        if (res.data.status === 1) {
+          this.fid = res.data.id
+          // this.$router.push({
+          //   path: '/bidforlimit',
+          //   query: {
+          //     sid: res.data.id
+          //   }
+          // })
+        } else if (res.data.status === 2) {
+          this.loading = true
+          this.readyTime = new Date().getTime()
+          this.timer = setInterval(() => {
+            if (this.timeDiff(this.readyTime) >= 120) {
+              clearInterval(this.timer)
+              this.$message.error('预测失败')
+            } else {
+              this.getProForWStatus()
+            }
+          }, 5000)
+        } else {
+          this.loading = false
+          // this.$message.error('预测失败')
+          // this.ErrorForeCast()
+        }
+      }
+    },
+    getProForWStatus () {
+      const timers = setInterval(() => {
+        getForWStatus().then(res => {
+          console.log(res)
+          if (res.error_code === 0) {
+            if (res.data.success) {
+              if (res.data.id && res.data.id !== '' && res.data.id !== undefined && res.data.id !== 'undefined') {
+                this.fid = res.data.id
+                console.log(res.data.id)
+                this.$router.push({
+                  path: '/bidforlimit',
+                  query: {
+                    sid: res.data.id,
+                    bidtype: 0
+                  }
+                })
+                clearInterval(this.timer)
+                clearInterval(timers)
+                this.loading = false
+              }
+            } else {
+              this.$message.error('您填写的信息内容不够完善,暂无法为您精准预测。')
+              clearInterval(timers)
+              clearInterval(this.timer)
+              this.loading = false
+            }
+          }
+        })
+      }, 5000)
     }
   }
 }
@@ -72,8 +179,13 @@ export default {
     color: #ffffff;
     line-height: 22px;
   }
-  ::v-deep .for_main{
-    margin-top: -60px;
+  ::v-deep {
+    .for_main{
+      margin-top: -50px;
+      .listData{
+        min-height: 500px;
+      }
+    }
   }
 }
 </style>

+ 3 - 3
src/views/bid-forecast/BidForecastLimit.vue

@@ -73,8 +73,8 @@ export default {
   data () {
     return {
       paramlist: {
-        ptid: this.$route.path.split('/')[this.$route.path.split('/').length - 2], // 项目加密id
-        sid: this.$route.path.split('/')[this.$route.path.split('/').length - 1], // 信息加密id
+        ptid: this.$route.query.pid, // 项目加密id
+        sid: this.$route.query.sid, // 信息加密id
         buyerContent: [],
         budget: 0
       },
@@ -317,7 +317,7 @@ export default {
   ::v-deep .el-dialog.el-dialog--center.perfect_dialog{
     padding: 32px;
     width: 380px!important;
-    height: 228px;
+    min-height: 228px;
     background: #ffffff;
     border-radius: 8px;
     .el-dialog__header{

+ 18 - 3
src/views/bid-policy/BidPolicy.vue

@@ -5,7 +5,7 @@
       <span class="bidfor_text" slot="proname">投标决策分析</span>
       <img class="bidfor_img" src="@/assets/images/item_5.png" alt="" slot="bidImg">
       <template v-slot:main>
-        <ForeCast type="bidpolicy" :title="type==1?'近似项目':'分析历史'" slot="main" :myPolicydata="forcast"></ForeCast>
+        <ForeCast type="bidpolicy" :title="type==1?'近似项目':'分析历史'" slot="main" :myPolicydata="getList"></ForeCast>
       </template>
     </forLayOut>
   </div>
@@ -21,11 +21,18 @@ export default {
     ForeCast,
     forLayOut
   },
+  mounted () {
+    this.$store.commit('forcast/setType', 0)
+  },
   computed: {
     ...mapState({
-      forcast: state => state.forcast.policyList,
+      forcastList: state => state.forcast.policyList,
+      forcastHistoryList: state => state.forcast.historyPolicyList,
       type: state => state.forcast.type
-    })
+    }),
+    getList () {
+      return this.type === 1 ? this.forcastList : this.forcastHistoryList
+    }
   }
 }
 </script>
@@ -42,5 +49,13 @@ export default {
     background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAATeSURBVHgB7Zs/cNRGFMa/Y9KlcZFxm4OaDKZLFznuCSlSuAqeoU/SkkJyQwv0zEDnFtzDHR1UNmM6ZrijhAYXmPbxHrsL8iGtVrurlezRb+bN3p20u0/fvv0jrQ4YGRkZGRksE/QEEW1wkrFdYVtjm+pUONZ2yPaWbT6ZTA5x3mFRMrY7bB+oPQu2B1IGzht8UTfYZhSPhZSJsw6piJlRdyzYpjiLkOpKqchxVmBn16jbqKljRkOPJnGQVNj3xYIiixRtmteOzaCm6z5Zsm3ysmCJCMQU6ICTDQyDQxboKiJwARFgce5gOOIIG9qn/iG1xhkqGQIJ7mLsxAL9jzt1LNmucnc7hidBXYzU+mOK4TJl+xcBeEcQiyM3lgcYtkCCRM9F3ygKiaDrGL44gjTkDXgSItA/6I852yOoMcaFP5ASUivmvihW/DhwzPczPPCNoAz9sMtjSWG+6NXyrmPeP+GBr0BpQ1ZxSpwSroPvFXjgK9AUaakTR/gbbmRIBaWlsPiRtyjnA1JA6nlPKgrEEcewhq4hvxnsrs63oT+7UCCuOILXTNa1QLOKMoqGPIWl/pz8GaRARU05RZvzdZ6cwkgiUNsxaGYpq0goDiEV1H7jL7eUVaQQh1LNYtrhGbXHJlJmOZZTHGZIBbnPRM4i1dSTUzzuIhWkdkx9cRKJ4oojXEcqSA3UPi8gGHKkFSfd+FO6iIcURo404ggPkBoK62aGHN2LI2TwJGhXg9TMkCEMeTL4ku03dHPHLS9fbcKTUIEyqO3mISPb0HN4ErTtoyt+hOHyMEQcIcbGoTxCeM32E4bFEhFeYgjem9f7TX9heOzEeMPDWSCOlHW2+2wXV4/pMP4Pw2G3qmvpa4i/XVUSZ58sS3Zqfs6TgsLin7kGZ5EaI4gLW+fkNtu6/ukS/3az6lz9YN11G6YLah/us8/b+HYNW64iWQWqEMdwjY9tVeXRDu7AfTsmBlLXjkWca5xsr/zsJFLtLGYRp8wtdupVTf4pJ7LEz9Atc1gGZFJj5j1L/iect/b4hZpCXcQR/qeKQVsQh/UKVqJpifgsoYTZbBDndkM51kiaVBTqKk6Ze+zkE9sJpN6MF0dCX9Wbsz2GWgQeW+qTIUDGyh/hRmUkTVYK9RHHsMcV7DWdROpPLPJsxvXey/yp5RnUfdW8KYMekLfRnu9EWhXoFie/wp8jqGh675pBC2b+7VPmizBtFnu6gSVKf4E/pxp6VaB9hCPi7HMlMcpypjRTuXapOt6z71+XMauD9BHCkVa8qRdlW+gYruOy1IV2442N5+UvVYP075xcgrrQdf05BIkoCdmjNl3PBvsoQkjESAP4jJeGE7Z3bAv9WXx8UT7B6W5e920jlqSX4Sfcc3agadq1+SHCyDjpM8ZI7xAh3uj0xKXBfoADuiCxV9pRibK2r9dKCzXOcg1+nHDdspzwEWivblFrw/dxxye0Q8SRVfcCgXAZTznx2eM6gQe+Ar1pcW40cQw+IvnW7yWQ7nIuLRJdnJIPbURq06CnCHmi+LHheGfiGFqI5NW9hBCBlpZjnYtjcBTJ248Qgd7V/J5MHIODSN7rrxCBqvp1cnEMDSL1Mgattkpv4hgsIqWPIL3oMsvy3sUxVIi0H+sWxwtSOx4xbhKjIj7pW6SRkZGRkfPKZ+LYRHOLukmdAAAAAElFTkSuQmCC) no-repeat;
     background-size: contain;
   }
+  ::v-deep {
+    .for_main{
+      margin-top: -60px;
+      .listData{
+        min-height: 500px;
+      }
+    }
+  }
 }
 </style>

+ 8 - 2
src/views/bid-policy/components/PolicyLimit.vue

@@ -184,8 +184,14 @@ export default {
       })
     },
     // 中标企业预测跳转
-    goBidForUrl (id) {
-      this.$router.push(`/ai_add/${this.baseInfo.id}/${this.baseInfo.infoid}`)
+    goBidForUrl () {
+      this.$router.push({
+        path: '/ai_add',
+        query: {
+          pid: this.baseInfo.id,
+          sid: this.baseInfo.infoid
+        }
+      })
     },
     // 开始分析
     StartAnsisy () {

+ 7 - 4
src/views/ent-intel/EntIntel.vue

@@ -5,8 +5,8 @@
       <span class="bidfor_text" slot="proname">企业情报</span>
       <img class="bidfor_img" src="@/assets/images/item_2.png" alt="" slot="bidImg">
       <template v-slot:main>
-        <ForeCast type="entintel" v-if="type==0"  title="我关注的企业" slot="main" :myDataObj="myDataObj"></ForeCast>
-        <ForeCast type="entintelRes" v-if="type==1" title="近似企业" slot="main" :entSearch="forcastSer"></ForeCast>
+        <ForeCast key="entintel" :tipText="tiptext" type="entintel" v-if="type==0"  title="我关注的企业" slot="main" :myDataObj="myDataObj"></ForeCast>
+        <ForeCast key="entintelRes" type="entintelRes" v-if="type==1" title="近似企业" slot="main" :entSearch="forcastSer"></ForeCast>
       </template>
     </forLayOut>
   </div>
@@ -28,7 +28,8 @@ export default {
       myDataObj: {
         list: [],
         total: 0
-      }
+      },
+      tiptext: ''
     }
   },
   computed: {
@@ -46,10 +47,12 @@ export default {
     getMyFollowList () {
       getFollowtList().then(res => {
         console.log(res)
-        if (res.error_code === 0 && res.data) {
+        if (res.error_code === 0 && res.data && res.data.list && res.data.list.length > 0) {
           this.myDataObj.list = res.data.list
           this.myDataObj.total = res.data.total
           // this.$store.commit('forcast/setEntFollowList', res.data)
+        } else {
+          this.tiptext = '您还没有关注企业'
         }
       })
     }

+ 1 - 1
src/views/portrayal/components/AnalysisChart.vue

@@ -10,7 +10,7 @@
       <div class="pro_info_tip">数据统计范围:2018/01/01至今</div>
     </div>
     <!-- 中国移动通信集团终端有限公司类似项目采购历史 -->
-    <ProActive :title="info.buyer + '类似项目采购历史'" :projectData="datas"></ProActive>
+    <ProActive :title="info.buyer + '类似项目采购历史'" v-if="datas.buyerHistroyList&&datas.buyerHistroyList.length>0" :projectData="datas"></ProActive>
     <!-- 类似项目标书编制周期分布 -->
     <div v-if="bidCycle.show">
       <div class="chart-title">类似项目标书编制周期分布</div>

+ 1 - 2
src/views/potential-for/PotenTial.vue

@@ -44,14 +44,13 @@ export default {
       getPotenList({ pageNum: 1 }).then(res => {
         console.log(res)
         if (res.error_code === 0) {
-          this.isSubCount = !res.data.isSubCount
+          console.log(res.data.code)
           if (res.data.code === 1) {
             this.potenObj.code = 1
           } else if (res.data.code === 2) {
             // 您设置的订阅关键词无法进行预测
             this.potenObj.code = 2
           } else {
-            this.potenObj.code = 0
             if (res.data.list && res.data.list.length && res.data.list.length > 0) {
               res.data.list.forEach(function (v, i) {
                 v.createtime = v.createtime.replace(/-/g, '/')

+ 7 - 1
src/views/project/ProjectInfo.vue

@@ -189,7 +189,13 @@ export default {
     },
     toForecast () {
       const { sid, fid } = this
-      this.$router.push(`/ai_add/${fid}/${sid}`)
+      this.$router.push({
+        path: '/ai_add',
+        query: {
+          pid: fid,
+          sid: sid
+        }
+      })
     },
     toPolicy () {
       const { sid, fid } = this