|
@@ -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;
|