Quellcode durchsuchen

Merge branch 'dev' of ssh://192.168.3.207:10022/jianyu/page_bigmember_pc into dev

yangfeng vor 4 Jahren
Ursprung
Commit
0e048b3add

+ 3 - 3
src/components/forecast/ForLayout.vue

@@ -91,7 +91,8 @@ export default {
             if (data.events === 'select') {
               // 联想跳转
               if (this.bidnum !== 0) {
-                const result = data.data.list
+                // const result = data.data.list
+                const result = [data.data]
                 this.$store.commit('forcast/setHistoryList', result)
                 this.$router.push({
                   path: '/ai_add',
@@ -110,7 +111,6 @@ export default {
       } else if (this.searchConfig.type === 'bidpolicy') {
         // 中标预测、投标决策分析列表
         getProjectList({ pName: data.text }).then(res => {
-          console.log(res)
           if (res.error_code === 0) {
             // 投标决策分析
             // 键盘Enter事件
@@ -121,7 +121,7 @@ export default {
               // 联想跳转
               const result = [data.data]
               this.$store.commit('forcast/setHistoryPolicyList', result)
-              this.$router.push(`/analysis_result/${data.data.s_id}/${data.data.sourceinfoid}`)
+              this.$router.push(`/analysis_result?ptid=${data.data.s_id}&sid=${data.data.sourceinfoid}`)
             } else {
               // 点击搜索按钮
               // const result = []

+ 39 - 3
src/components/forecast/ForLimit.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="forlimit">
     <div class="limit_head">
-      {{baseInfo.projectname}}
+      <span>{{baseInfo.projectname}}</span>
+      <div class="action-button" type="primary" v-if="actionShow"  @click="toPolicy"><span class="icon_toubiao"></span><span>投标决策分析</span></div>
     </div>
     <div class="limit_main">
       <!-- 采购内容 -->
@@ -57,13 +58,15 @@
 
 <script>
 import AreaSelector from '@/components/selector/AreaSelector.vue'
+import { Button } from 'element-ui'
 import { getBidAssociation } from '@/api/modules/'
 import { moneyUnit } from '@/utils'
 export default {
   props: ['baseInfo', 'setDisabled'],
   name: 'forlimit',
   components: {
-    AreaSelector
+    AreaSelector,
+    [Button.name]: Button
   },
   data () {
     return {
@@ -78,7 +81,8 @@ export default {
       AssoList: [],
       ptid: '', // 项目加密id
       sourceinfoid: '', // 信息加密id
-      backArea: {}
+      backArea: {},
+      actionShow: false
     }
   },
   created () {
@@ -113,6 +117,10 @@ export default {
     }
   },
   methods: {
+    // 投标决策分析
+    toPolicy () {
+      this.$router.push(`/analysis_result?ptid=${this.baseInfo.id}&sid=${this.baseInfo.infoid}`)
+    },
     // 判断省市
     getAreaInfo (name) {
       const info = {
@@ -217,6 +225,8 @@ export default {
     startFore () {
       this.isClick = true
       this.area = this.baseInfo.area
+      this.area = this.getCitys()
+      console.log(this.area)
       const limitparams = {
         buyerContent: this.content,
         buyer: this.unitValue,
@@ -260,6 +270,8 @@ export default {
       line-height: 24px;
     }
     .limit_head{
+      display: flex;
+      justify-content: space-between;
       padding-bottom: 20px;
       width: 100%;
       font-size: 18px;
@@ -267,6 +279,30 @@ export default {
       color: #1d1d1d;
       line-height: 28px;
       border-bottom: 1px solid #ececec;
+      .action-button{
+        cursor: pointer;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        width: 144px;
+        height: 32px;
+        background: #2cb7ca;
+        border-radius: 4px;
+        font-size: 14px;
+        font-family: Microsoft YaHei, Microsoft YaHei-Regular;
+        font-weight: 400;
+        text-align: CENTER;
+        color: #ffffff;
+        line-height: 22px;
+        .icon_toubiao{
+          margin-right: 4px;
+          display: flex;
+          width: 16px;
+          height: 16px;
+          background: url('~@/assets/images/icon/toubiaojuece.png') no-repeat;
+          background-size: contain;
+        }
+      }
     }
     .limit_main{
       ::v-deep .selector-card.s-line{

+ 14 - 3
src/components/forecast/ForeCast.vue

@@ -123,7 +123,11 @@
           </div>
           <div class="pur_unit poten_unit poten_margin">
             <span class="unit_label poten_label"><span class="point"></span>预测采购内容</span>
-            <span class="unit_name poten_name">该单位将<span v-for="(data, i) in item.results" :key="i">{{data.purchasing}}</span></span>
+            <span class="unit_name poten_name">
+              <span v-for="(data, i) in item.results" :key="i">
+                <span v-for="(sum, index) in data.keys" :key="index">{{sum}}</span>
+              </span>
+            </span>
           </div>
         </div>
       </li>
@@ -160,7 +164,7 @@
         </div>
       </div>
     </Empty>
-    <div class="el-pagination-container" v-if="listState.list.length >= listState.pageSize">
+    <div class="el-pagination-container" v-if="getShowPagination">
       <el-pagination
         background
         layout="prev, pager, next, ->"
@@ -258,6 +262,13 @@ export default {
     showEmpty () {
       return !this.listState.list.length
     },
+    getShowPagination () {
+      let show = true
+      if (this.listState.pageNum === 1 && this.listState.list.length < this.listState.pageSize) {
+        show = false
+      }
+      return show
+    },
     getTipText () {
       return this.tips
     },
@@ -420,7 +431,7 @@ export default {
     goForcast (data) {
       const result = [data]
       this.$store.commit('forcast/setHistoryPolicyList', result)
-      this.$router.push(`/analysis_result/${data.s_id}/${data.sourceinfoid}`)
+      this.$router.push(`/analysis_result?ptid=${data.s_id}&sid=${data.sourceinfoid}`)
     },
     goViewEnt (id) {
       this.$router.push(`/ent_portrait/${id}`)

+ 8 - 1
src/components/push-list/PotentialList.vue

@@ -48,7 +48,7 @@
         </div>
       </empty>
     </div>
-    <div class="el-pagination-container" v-if="listState.list.length >= listState.pageSize">
+    <div class="el-pagination-container" v-if="getShowPagination">
       <el-pagination
         background
         layout="prev, pager, next, ->"
@@ -101,6 +101,13 @@ export default {
     showEmpty () {
       return this.listState.list.length === 0 && this.listState.loaded
     },
+    getShowPagination () {
+      let show = true
+      if (this.listState.pageNum === 1 && this.listState.list.length < this.listState.pageSize) {
+        show = false
+      }
+      return show
+    },
     getFilters () {
       return this.filters
     },

+ 15 - 12
src/components/report-data/SelectMonth.vue

@@ -31,6 +31,9 @@ export default {
     [Icon.name]: name
   },
   props: {
+    queryDate: {
+      type: Object
+    },
     getTypeTime: {
       type: Object,
       default () {
@@ -59,9 +62,9 @@ export default {
     this.getFirst()
   },
   methods: {
+    changeActive (time) {},
     getFirst () {
       getReportStartTime().then((res) => {
-        console.log(res)
         if (res.data) {
           if (res.data.month_firsttime !== 0) {
             this.month_starttime = res.data.month_firsttime
@@ -84,12 +87,10 @@ export default {
       } else {
         week = date.slice(4, 6)
       }
-      console.log(week)
       for (let a = week; a <= 12; a++) {
         var weeks = a
         aloneWeek.push(weeks + '')
       }
-      console.log(aloneWeek)
       // 月报不需要展示当月,加class隐藏
       const _this = this
       // aloneWeek.forEach(function (time, i) {
@@ -121,29 +122,32 @@ export default {
       }
       this.listWeek.push(aloneWeek)
       this.listWeek[0].forEach(function (item, index) {
-        console.log(item)
         if (item === nowweek) {
           _this.lastIndex = index
           _this.listWeek[0] = _this.listWeek[0].splice(0, index + 1)
         }
       })
       // 高亮处理
-      if (this.getTypeTime.judgeTime === 'month') {
-        this.isActive = this.listWeek[0].length - 2
-        this.isIndexActive = 0
+      const tempData = {
+        year: 0,
+        month: 0
+      }
+      if (this.queryDate && Object.keys(this.queryDate).length) {
+        tempData.year = this.listYear.indexOf(this.queryDate.year) || 0
+        tempData.month = this.listWeek[tempData.year].indexOf(this.queryDate.month) || (this.listWeek[tempData.year].length - ((this.getTypeTime.judgeTime === 'month') ? 2 : 1))
       } else {
-        this.isActive = this.listWeek[0].length - 1
-        this.isIndexActive = 0
+        tempData.year = 0
+        tempData.month = (this.listWeek[tempData.year].length - ((this.getTypeTime.judgeTime === 'month') ? 2 : 1))
       }
+      this.isActive = tempData.month
+      this.isIndexActive = tempData.year
     },
     getWeek (index, i, month) {
-      console.log(index, i, month)
       this.isActive = i
       this.isIndexActive = index
       if (month < 10) {
         month = '0' + month
       }
-      console.log(month)
       this.$emit('selectYear', this.listYear[index])
       this.$emit('selectYm', this.listYear[index] + month)
     },
@@ -191,7 +195,6 @@ export default {
       .week_year{
         display: flex;
         margin-bottom: 16px;
-        width: 44px;
         height: 30px;
         opacity: 1;
         font-size: 13px;

+ 3 - 1
src/components/selector/BusinessScopeSelectorContent.vue

@@ -98,8 +98,10 @@ export default {
         this.bScopeList[0].selected = false
         item.selected = !item.selected
 
+        // 子项全部选中则全部按钮选中,子项如果一个没有被选中,则全部按钮被选中
         const { allSelected, allNotSelected } = this.checkAllSelectedState()
-        if (allSelected || allNotSelected) {
+        // if (allSelected || allNotSelected) {
+        if (allNotSelected) {
           this.setState()
         }
       }

+ 1 - 1
src/router/routers.js

@@ -93,7 +93,7 @@ export default [
   },
   // 投标决策分析结果页
   {
-    path: '/analysis_result/:ptid/:sourceinfoid',
+    path: '/analysis_result',
     name: 'analysis_result',
     component: () => import('@/views/bid-policy/AnalysisResult.vue')
   },

+ 2 - 1
src/views/bid-forecast/BidForecast.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="bid-forcast"
   v-loading="loading"
+  style="font-size:30px"
   :element-loading-text="pronametip"
   element-loading-spinner="el-icon-loading"
   element-loading-background="rgba(0, 0, 0, 0.8)"
@@ -154,7 +155,7 @@ export default {
                 this.loading = false
               }
             } else {
-              // this.$message.error('您填写的信息内容不够完善,暂无法为您精准预测。')
+              this.$message.error('您填写的信息内容不够完善,暂无法为您精准预测。')
               console.log(this)
               clearInterval(timers)
               clearInterval(this.timer)

+ 4 - 5
src/views/bid-forecast/BidForecastLimit.vue

@@ -140,7 +140,6 @@ export default {
       if (res.error_code === 0 && res.data) {
         console.log(res.data)
         if (res.data.buyerContent && res.data.buyerContent.length > 0) {
-          debugger
           const newKeyArr = []
           res.data.buyerContent.forEach(function (item, i) {
             console.log(item)
@@ -258,12 +257,12 @@ export default {
               if (res.data.id !== '') {
                 this.fid = res.data.id
                 this.getProForWResult(res.data.id)
-                clearInterval(timer)
+                clearInterval(this.timer)
                 this.loading = false
                 this.$refs.forlimits.isClick = false
               }
             } else {
-              clearInterval(timer)
+              clearInterval(this.timer)
               this.isperfect = true
               this.loading = false
               this.proShow = false
@@ -282,6 +281,7 @@ export default {
             this.resData = res.data.responseData
             this.loading = false
             this.$refs.forlimits.isClick = false
+            this.$refs.forlimits.actionShow = true
           }
         }
       })
@@ -297,8 +297,7 @@ export default {
       const routeUrl = this.$router.resolve({
         path: '/pro_follow_detail',
         query: {
-          sid: this.baseInfo.infoid,
-          fid: this.baseInfo.id
+          sid: this.baseInfo.infoid
         }
       })
       return window.open(routeUrl.href, '_blank')

+ 11 - 7
src/views/bid-policy/AnalysisResult.vue

@@ -92,12 +92,15 @@ export default {
       },
       // 刚开始隐藏项目摘要和tab切换
       proShow: false,
-      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: '', // 项目加密id
+      sid: '' // 信息加密id
     }
   },
   computed: {},
   created () {
+    const { ptid, sid } = this.$route.query
+    if (ptid) this.ptid = encodeURIComponent(ptid)
+    if (sid) this.sid = encodeURIComponent(sid)
     this.getBaseInfo()
   },
   mounted () {},
@@ -120,8 +123,8 @@ export default {
       if (res.error_code === 0 && res.data) {
         if (res.data.s_subscopeclass) {
           res.data.s_subscopeclass = this.initIndustryData(res.data.s_subscopeclass.split(','))
-          console.log(res.data.s_subscopeclass)
         }
+        this.ptid = res.data.id
         this.baseInfo = res.data
         this.getEntIsFollow(res.data.infoid)
       } else {
@@ -130,7 +133,6 @@ export default {
     },
     // 处理数据为行业选择页面所需格式
     initIndustryData (data) {
-      console.log(data)
       var arr = []
       var obj = {}
       if (data) {
@@ -184,10 +186,8 @@ export default {
     },
     // 关注项目
     entFollow () {
-      console.log()
       if (this.follow.type === 0) {
         addFollow({ sid: this.baseInfo.infoid }).then(res => {
-          console.log(res)
           if (res.data) {
             this.follow.classActive = 'icon_heart_red'
             this.follow.text = '已关注'
@@ -196,7 +196,6 @@ export default {
         })
       } else {
         cancelFollow({ sid: this.baseInfo.infoid }).then(res => {
-          console.log(res)
           if (res.data && res.data === 'success') {
             this.follow.classActive = 'icon_heart_gray'
             this.follow.text = '关注'
@@ -213,6 +212,11 @@ export default {
     // 获取分析结果
     async getResult (item) {
       // this.proShow = true
+      if (item.scope.length === 0) {
+        this.$message.error('采购内容不能为全部')
+        this.$refs.isChildData.isClick = false
+        return
+      }
       this.loading = true
       const data = {
         appVersion: '',

+ 13 - 1
src/views/portrayal/components/ProActive.vue

@@ -5,7 +5,7 @@
     </div>
     <div class="pro_ul" v-if="!isShow">
       <div class="pro_list" v-for="(item, index) in listState.list.slice((listState.pageNum - 1) * listState.pageSize, listState.pageNum * listState.pageSize)" :key="index">
-        <div class="pro_li_title">{{item.projectname}}</div>
+        <div class="pro_li_title" @click="setLink(item)">{{item.projectname}}</div>
         <div class="pro_li_info">
           <div class="li_left">
             <span class="tags">{{item.area}}</span>
@@ -82,6 +82,17 @@ export default {
         this.isShow = true
       }
     },
+    setLink (data) {
+      console.log(data)
+      const routeUrl = this.$router.resolve({
+        path: '/pro_follow_detail/',
+        query: {
+          sid: data.infoid
+          // fid: data._id
+        }
+      })
+      return window.open(routeUrl.href, '_blank')
+    },
     onPageChange (p) {
       this.listState.pageNum = p
     }
@@ -120,6 +131,7 @@ export default {
         color: #1d1d1d;
         line-height: 24px;
         text-shadow: 0px -1px 0px 0px rgba(0,0,0,0.05) inset;
+        cursor: pointer;
       }
       .pro_li_info{
         display: flex;

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

@@ -11,7 +11,8 @@
 
 <script>
 import forLayOut from '@/components/forecast/ForLayout.vue'
-import ForeCast from '@/components/forecast/ForeCast.vue'
+// import PotenList from './components/potenList'
+import ForeCast from '@/components/forecast/ForeCast'
 import { getPotenList } from '@/api/modules'
 import { mapState } from 'vuex'
 export default {
@@ -24,9 +25,10 @@ export default {
     return {
       potenObj: {
         list: [], // 查询请求返回的数据
-        count: 12,
+        total: 0,
         code: 0
       },
+      pageNum: 1,
       isSubCount: true
     }
   },
@@ -54,7 +56,12 @@ export default {
               res.data.list.forEach(function (v, i) {
                 v.createtime = v.createtime.replace(/-/g, '/')
               })
+              let tempTotal = res.data.count
+              if (p !== 1) {
+                tempTotal = this.potenObj.count
+              }
               this.potenObj = res.data
+              this.potenObj.count = tempTotal
             }
           }
         }

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

@@ -204,7 +204,7 @@ export default {
     },
     toPolicy () {
       const { sid, fid } = this
-      this.$router.push(`/analysis_result/${fid}/${sid}`)
+      this.$router.push(`/analysis_result?sid=${sid}`)
     },
     toUnitportrayal () {
       const { buyer } = this.projectInfo

+ 56 - 10
src/views/reportData/pageWeek.vue

@@ -3,7 +3,7 @@
     <div class="page_week_main">
       <!-- 选择周报时间 -->
       <div class="week_time">
-        <SelectMonth @selectYm="getSelectTime"></SelectMonth>
+        <SelectMonth ref="selectMonth" :queryDate="getQueryTime" @selectYm="getSelectTime"></SelectMonth>
         <div class="select_report">
           <div class="week_report" v-for="(item, index) in weekList" :key="index" @click="selectWeek(index, item)" :class="{weekActive:index==isWeekIndex}">
             <div class="week_report_main">
@@ -111,6 +111,7 @@ export default {
   },
   data () {
     return {
+      canQuery: true,
       isWeekIndex: 0,
       start: 0,
       end: 0,
@@ -174,17 +175,37 @@ export default {
       }
     }
   },
-  created () {
+  mounted () {
     const nowtime = dateFormatter(new Date(), 'yyyyMM')
     this.getReportList(nowtime)
     if (this.$refs.weekitempoint && this.$refs.weekitempoint.length > 0) {
       this.$refs.weekitempoint[0].style.display = 'none'
     }
   },
+  computed: {
+    getQueryTime () {
+      const paramsDate = this.$route.query.start
+      if (paramsDate) {
+        const paramsData = {
+          year: dateFormatter(paramsDate * 1000, 'yyyy'),
+          month: Number(dateFormatter(paramsDate * 1000, 'MM')).toString(),
+          ym: dateFormatter(paramsDate * 1000, 'yyyyMM'),
+          start: this.$route.query.start,
+          end: this.$route.query.end
+        }
+        return paramsData
+      }
+      return false
+    }
+  },
   methods: {
     dateFormatter,
     // 周报列表
-    getReportList (time) {
+    getReportList (yearMonth) {
+      let time = yearMonth
+      if (this.getQueryTime) {
+        time = this.getQueryTime.ym
+      }
       getReportIndex({ ym: time }).then((res) => {
         console.log(res)
         if (res.data && res.data.list && res.data.list.length !== 0) {
@@ -201,9 +222,25 @@ export default {
             }
           })
           this.weekList = res.data.list
-          this.getDetail(res.data.list[0].startdate, res.data.list[0].enddate)
-          this.start = res.data.list[0].startdate
-          this.end = res.data.list[0].enddate
+          const queryData = {
+            start: res.data.list[0].startdate,
+            end: res.data.list[0].enddate
+          }
+          if (this.canQuery && this.getQueryTime) {
+            if (this.getQueryTime.ym === time) {
+              queryData.start = this.getQueryTime.start
+              queryData.end = this.getQueryTime.end
+              this.weekList.forEach((v, index) => {
+                if (String(v.startdate) === queryData.start) {
+                  this.isWeekIndex = index
+                }
+              })
+            }
+            this.canQuery = false
+          }
+          this.getDetail(queryData.start, queryData.end)
+          this.start = queryData.start
+          this.end = queryData.end
           this.nodata = true
         } else {
           this.weekList = []
@@ -218,7 +255,7 @@ export default {
     // 选择周报
     selectWeek (index, item) {
       if (this.$refs.weekitempoint && this.$refs.weekitempoint.length > 0) {
-        this.$refs.weekitempoint[index].style.display = 'none'
+        // this.$refs.weekitempoint[index].style.display = 'none'
       }
       this.isWeekIndex = index
       this.clickindex = index
@@ -276,9 +313,18 @@ export default {
           } else {
             this.projectAmount.show = false
           }
-          this.nextweek_bidopen = res.data.nextweek_bidopen
-          this.follow_ent = res.data.follow_ent
-          this.follow_project = res.data.follow_project
+          // 下周开标提醒
+          if (res.data.nextweek_bidopen && res.data.nextweek_bidopen.length > 0) {
+            this.priority.nextweek_bidopen = res.data.nextweek_bidopen
+          }
+          // 重点关注企业
+          if (res.data.follow_ent && res.data.follow_ent.length > 0) {
+            this.priority.follow_ent = res.data.follow_ent
+          }
+          // 重点关注项目
+          if (res.data.follow_project && res.data.follow_project.length > 0) {
+            this.priority.follow_project = res.data.follow_project
+          }
         }
       })
     },