TANGSHIZHE преди 4 години
родител
ревизия
ae33b4847a

+ 10 - 0
src/api/modules/forecast.js

@@ -120,3 +120,13 @@ export function getBidAiused (data) {
     data: data
   })
 }
+
+// AI中标预测历史记录
+export function getBdInfoStatus (data) {
+  data = qs.stringify(data)
+  return request({
+    url: '/forecast/bdInfoStatus',
+    method: 'post',
+    data: data
+  })
+}

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

@@ -4,6 +4,7 @@
       <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>

+ 44 - 6
src/components/forecast/ForeCast.vue

@@ -151,7 +151,13 @@
         </div>
       </li>
     </ul>
-    <Empty v-if="showEmpty"></Empty>
+    <Empty v-if="showEmpty&&potenCode!==2" :tip="tips"></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>
+    </Empty>
     <div class="el-pagination-container" v-if="listState.list.length > 10">
       <el-pagination
         background
@@ -191,11 +197,12 @@ export default {
         total: 0, // 一共多少条数据
         list: [] // 查询请求返回的数据
       },
-      isFollow: '1'
+      isFollow: '1',
+      potenCode: 0,
+      tips: '' // 空状态提示
     }
   },
   created () {
-    console.log(this.type)
     // 中标企业预测
     if (this.type === 'bidfor') {
       this.initData(this.mydata, this.type)
@@ -214,7 +221,6 @@ export default {
     }
     // 我关注的企业
     if (this.type === 'entintel') {
-      console.log(this.myDataObj)
       this.entInitData(this.myDataObj)
     }
     // 企业搜索
@@ -277,6 +283,7 @@ export default {
       } else {
         this.listState.list = []
         this.listState.total = 0
+        this.tips = '暂无搜索历史'
       }
     },
     initPolicyData (list, type) {
@@ -286,6 +293,7 @@ export default {
       } else {
         this.listState.list = []
         this.listState.total = 0
+        this.tips = '暂无搜索历史'
       }
     },
     resInitData (list) {
@@ -310,7 +318,6 @@ export default {
       }
     },
     entInitData (obj) {
-      console.log(obj)
       if (obj && obj.list.length !== 0) {
         console.log(obj.total)
         this.listState.list = obj.list
@@ -318,15 +325,23 @@ export default {
       } else {
         this.listState.list = []
         this.listState.total = 0
+        this.tips = '您还没有关注企业'
       }
     },
     potenInitData (obj) {
-      if (obj.list.length !== 0) {
+      console.log(obj)
+      if (obj.list && obj.list.length !== 0) {
         this.listState.list = obj.list
         this.listState.total = obj.count
       } else {
         this.listState.list = []
         this.listState.total = 0
+        if (obj.code === 1) {
+          this.potenCode = 1
+          this.tips = '暂未预测出潜在项目'
+        } else {
+          this.potenCode = 2
+        }
       }
     },
     potenSimiData (list) {
@@ -422,6 +437,10 @@ export default {
         }
       })
     },
+    // 设置关键词
+    setKey () {
+      this.$router.push('/subscribe/config')
+    },
     // 数组对象去重
     unique (arr) {
       const res = new Map()
@@ -724,6 +743,25 @@ export default {
       }
     }
   }
+  .setKeyWords{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    margin-top: 40px;
+    width: 100%;
+    height: 46px;
+    .setBtn{
+      width: 352px;
+      height: 46px;
+      background: #2cb7ca;
+      border-radius: 6px;
+      font-size: 16px;
+      font-family: Microsoft YaHei, Microsoft YaHei-Regular;
+      font-weight: 400;
+      text-align: CENTER;
+      color: #ffffff;
+    }
+  }
   .el-pagination-container{
     margin-right: 40px;
   }

+ 6 - 6
src/store/forcast.js

@@ -3,11 +3,11 @@ export default {
   namespaced: true,
   state: () => ({
     // 中标企业预测
-    list: defaultLocalPageData('bigmember-BID_DATA', []),
-    historyList: defaultLocalPageData('bigmember-BID_DATA', []),
+    list: defaultLocalPageData('bigmember-BID_DATA-login-clear', []),
+    historyList: defaultLocalPageData('bigmember-BID_DATA-login-clear', []),
     // 投标决策分析
-    policyList: defaultLocalPageData('bigmember-POLICY_DATA', []),
-    historyPolicyList: defaultLocalPageData('bigmember-POLICY_DATA', []),
+    policyList: defaultLocalPageData('bigmember-POLICY_DATA-login-clear', []),
+    historyPolicyList: defaultLocalPageData('bigmember-POLICY_DATA-login-clear', []),
     // 企业情报-搜索
     entList: [],
     // 企业情报-我关注的项目
@@ -21,7 +21,7 @@ export default {
     },
     setHistoryList (state, list) {
       state.historyList = list.concat(state.historyList)
-      localStorage.setItem('bigmember-BID_DATA', JSON.stringify(state.historyList))
+      localStorage.setItem('bigmember-BID_DATA-login-clear', JSON.stringify(state.historyList))
     },
     setType (state, type) {
       state.type = type
@@ -32,7 +32,7 @@ export default {
     },
     setHistoryPolicyList (state, list) {
       state.historyPolicyList = list.concat(state.historyPolicyList)
-      localStorage.setItem('bigmember-POLICY_DATA', JSON.stringify(state.historyPolicyList))
+      localStorage.setItem('bigmember-POLICY_DATA-login-clear', JSON.stringify(state.historyPolicyList))
     },
     // 企业情报搜索列表
     setEntFollowSearch (state, list) {

+ 39 - 2
src/views/bid-forecast/BidForecastLimit.vue

@@ -40,13 +40,26 @@
         <el-button type="primary" @click="isperfect = false">确 定</el-button>
       </span>
     </el-dialog>
+    <el-dialog
+      title="提示信息"
+      :visible.sync="iscomplete"
+      width="30%"
+      center
+      :show-close="false"
+      custom-class="perfect_dialog"
+      >
+      <span>项目<span style="color:#2CB7CA">{{baseInfo.projectname}}</span>已完成招标,您可直接查看项目信息。</span>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="setSure()">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import ForLimit from '@/components/forecast/ForLimit.vue'
 import { Dialog, Button, Loading } from 'element-ui'
-import { getResultDetail, getProjectInfo, getForWData, getForWStatus, getForWResult } from '@/api/modules'
+import { getResultDetail, getProjectInfo, getForWData, getForWStatus, getForWResult, getBdInfoStatus } from '@/api/modules'
 import ForeCast from '@/components/forecast/ForeCast'
 export default {
   name: 'bid-forcast-limit',
@@ -72,12 +85,14 @@ export default {
       fid: '', // 预测成功返回的id
       resData: [],
       resquestData: {},
-      isperfect: false
+      isperfect: false,
+      iscomplete: false // 招标完成展示弹框
     }
   },
   created () {
     // this.getData()
     this.getBaseInfo()
+    this.getproStatus()
   },
   methods: {
     getData () {
@@ -85,6 +100,17 @@ export default {
         console.log(res)
       })
     },
+    // 项目状态查询
+    getproStatus () {
+      getBdInfoStatus({ pid: this.paramlist.ptid }).then(res => {
+        console.log(res)
+        if (res.error_code === 0) {
+          if (res.data === 1) {
+            this.iscomplete = true
+          }
+        }
+      })
+    },
     // 获取项目基本信息
     async getBaseInfo () {
       const data = {
@@ -188,6 +214,17 @@ export default {
         path: '/unitportrayal/' + name
       })
       return window.open(routeUrl.href, '_blank')
+    },
+    setSure () {
+      this.iscomplete = false
+      const routeUrl = this.$router.resolve({
+        path: '/project/info',
+        query: {
+          sid: this.baseInfo.infoid,
+          fid: this.baseInfo.id
+        }
+      })
+      return window.open(routeUrl.href, '_blank')
     }
   }
 }

+ 13 - 47
src/views/potential-for/PotenTial.vue

@@ -23,38 +23,9 @@ export default {
   data () {
     return {
       potenObj: {
-        list: [
-          // {
-          //   buyer: '北京市轨道交通建设管理有限公司',
-          //   createtime: '2021-05-08',
-          //   id: 'ABCY1wIfT1YUCk6EllycHI8MTAvDjRmdmtlPCg0PT0gWX5zfD9UCpA%3D',
-          //   results: [
-          //     {
-          //       keys: [
-          //         '道路',
-          //         '智慧交通'
-          //       ],
-          //       p_rate: '60%',
-          //       purchase_classify: '智慧交通',
-          //       purchasing: 'TOCC,智慧泊车,车辆引导系统,停车,泊车,智能交通',
-          //       stage: '后期施工',
-          //       sub_category: [
-          //         '公路工程',
-          //         '城市道路工程',
-          //         '其他道路工程',
-          //         '轨道交通工程',
-          //         '桥涵、隧道工程'
-          //       ],
-          //       time: '',
-          //       top_category: [
-          //         '土木工程'
-          //       ]
-          //     }
-          //   ],
-          //   title: '地铁27号线二期(昌平线南延)工程学清路站、上清桥站~学清路站区间施工临时用地临时开口(延期)'
-          // }
-        ], // 查询请求返回的数据
-        count: 12
+        list: [], // 查询请求返回的数据
+        count: 12,
+        code: 0
       },
       isSubCount: true
     }
@@ -74,26 +45,21 @@ export default {
         console.log(res)
         if (res.error_code === 0) {
           this.isSubCount = !res.data.isSubCount
-          if (res.data.code === 1 && !res.data.list) {
-            // 暂无设置订阅关键词,无法进行预测
-            // that.set.notKey = true
+          if (res.data.code === 1) {
+            this.potenObj.code = 1
           } else if (res.data.code === 2) {
             // 您设置的订阅关键词无法进行预测
-            // that.set.notList = true
-          } else if (res.data.code === 1 && res.data.list.length && res.data.list.length > 0) {
-            // that.set.hasListNotKey = true;
-          }
-          if (res.data.list) {
-            res.data.list.forEach(function (v, i) {
-              v.createtime = v.createtime.replace(/-/g, '/')
-            })
-            this.potenObj.list = res.data.list
-            if ($.isArray(res.data.list) && res.data.list.length !== 0) {
-              console.log('有数据')
+            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, '/')
+              })
+              this.potenObj.list = res.data.list
             }
           }
         }
-        res.data.list = this.list
       })
     }
   }