瀏覽代碼

中标预测清除定时器、投标决策删除D参数

TANGSHIZHE 4 年之前
父節點
當前提交
d9612d6396

+ 25 - 26
src/views/bid-forecast/BidForecast.vue

@@ -116,6 +116,7 @@ export default {
           this.loading = true
           this.readyTime = new Date().getTime()
           this.pronametip = `${res.data.pname}中标企业预测中运算很复杂,可能需要几十秒的时间,请耐心等待...`
+          clearInterval(this.timer)
           this.timer = setInterval(() => {
             if (this.timeDiff(this.readyTime) >= 120) {
               clearInterval(this.timer)
@@ -134,36 +135,34 @@ export default {
       }
     },
     getProForWStatus () {
-      console.log(this)
-      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: '/ai_add',
-                  query: {
-                    sid: res.data.id,
-                    bidtype: '1'
-                  }
-                })
-                clearInterval(this.timer)
-                clearInterval(timers)
-                this.loading = false
-              }
-            } else {
-              this.$message.error('您填写的信息内容不够完善,暂无法为您精准预测。')
-              console.log(this)
-              clearInterval(timers)
+      // this.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: '/ai_add',
+                query: {
+                  sid: res.data.id,
+                  bidtype: '1'
+                }
+              })
               clearInterval(this.timer)
+              // clearInterval(this.timers)
               this.loading = false
             }
+          } else {
+            this.$message.error('您填写的信息内容不够完善,暂无法为您精准预测。')
+            // clearInterval(this.timers)
+            clearInterval(this.timer)
+            this.loading = false
           }
-        })
-      }, 5000)
+        }
+      })
+      // }, 5000)
     }
   }
 }

+ 1 - 2
src/views/bid-policy/AnalysisResult.vue

@@ -116,8 +116,7 @@ export default {
     async getBaseInfo () {
       const data = {
         ptid: this.ptid,
-        sourceinfoid: this.sid,
-        D: 'detail'
+        sourceinfoid: this.sid
       }
       const res = await getProjectInfo(data)
       if (res.error_code === 0 && res.data) {

+ 34 - 34
src/views/bid-policy/components/PolicyLimit.vue

@@ -19,7 +19,7 @@
       <IndustrySelector ref="industrySel" :initIndustry="baseInfo.s_subscopeclass" selectorType="line">
         <div slot="header">行业分类:</div>
       </IndustrySelector>
-      <AreaSelector ref="areaSelector" selectorType="line" :initCityMap="backArea">
+      <AreaSelector ref="areaSelector" selectorType="line" :initCityMap="baseInfo.area">
         <div slot="header">选择区域:</div>
       </AreaSelector>
       <BusinessScopeSelector ref="scopeSelector" :initList="getScopeKeyList" selectorType="line">
@@ -88,7 +88,7 @@ export default {
   },
   data () {
     return {
-      backArea: {},
+      // backArea: {},
       moneySec: true,
       range: {
         maxPrice: '',
@@ -123,10 +123,10 @@ export default {
     baseInfo (newVal, oldVal) {
       if (newVal) {
         console.log(newVal)
-        if (newVal.area && newVal.area !== '') {
-          const p = this.getAreaInfo(newVal.area)
-          this.backArea = p
-        }
+        // if (newVal.area && newVal.area !== '') {
+        //   const p = this.getAreaInfo(newVal.area)
+        //   this.backArea = p
+        // }
         if (!newVal.s_subscopeclass) {
           newVal.s_subscopeclass = {}
         }
@@ -139,34 +139,34 @@ export default {
       this.baseInfo.buyerContent = data
     },
     // 判断省市
-    getAreaInfo (name) {
-      const info = {
-        level: 0,
-        province: '',
-        city: ''
-      }
-      const maplist = this.$refs.areaSelector.$refs.content.provinceListMap
-      for (const key in maplist) {
-        maplist[key].forEach(item => {
-          if (name === item.name) {
-            info.level = 1
-            info.province = item.name
-          }
-          item.children.forEach(iitem => {
-            if (name === iitem.city) {
-              info.level = 2
-              info.province = item.name
-              info.city = iitem.city
-            }
-          })
-        })
-      }
-      if (info.level === 1) {
-        return { [info.province]: [] }
-      } else if (info.level === 2) {
-        return { [info.province]: [info.city] }
-      }
-    },
+    // getAreaInfo (name) {
+    //   const info = {
+    //     level: 0,
+    //     province: '',
+    //     city: ''
+    //   }
+    //   const maplist = this.$refs.areaSelector.$refs.content.provinceListMap
+    //   for (const key in maplist) {
+    //     maplist[key].forEach(item => {
+    //       if (name === item.name) {
+    //         info.level = 1
+    //         info.province = item.name
+    //       }
+    //       item.children.forEach(iitem => {
+    //         if (name === iitem.city) {
+    //           info.level = 2
+    //           info.province = item.name
+    //           info.city = iitem.city
+    //         }
+    //       })
+    //     })
+    //   }
+    //   if (info.level === 1) {
+    //     return { [info.province]: [] }
+    //   } else if (info.level === 2) {
+    //     return { [info.province]: [info.city] }
+    //   }
+    // },
     getValueMin (e) {
       this.range.minPrice = e.replace(/[^\d{1,}\\.\d{1,}|\d{1,}]/g, '').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/\.{2,}/g, '.').replace(/^(\\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
     },

+ 1 - 1
src/views/potential-for/PotenSimilar.vue

@@ -11,7 +11,7 @@
                 <span class="pur_company">采购单位</span>
                 <span class="list_pur_name" @click="goViewPur()">{{dataInfo.buyer}}</span>
               </div>
-              <div class="list_time" @click="goViewPur()">
+              <div class="list_time" v-if="dataInfo.buyer!==''&&dataInfo.buyer" @click="goViewPur()">
                 查看采购单位画像
               </div>
             </div>