|
@@ -36,6 +36,7 @@
|
|
|
<potential-list :key="filters.listKey" @goDetail="goDetail"
|
|
|
@follow="changeFollow"
|
|
|
@remove="changeRemove"
|
|
|
+ @delete="changeDelete"
|
|
|
:title="getTopInfo.desc || getTopInfo.text" :filters="filters" ref="pushList" :showMore="false"></potential-list>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -50,7 +51,8 @@ import IndustrySelector from '@/components/selector/IndustrySelector.vue'
|
|
|
import BuyerclassSelector from '@/components/selector/BuyerclassSelector.vue'
|
|
|
import BusinessScopeSelector from '@/components/selector/BusinessScopeSelector.vue'
|
|
|
import forLayOut from '@/components/forecast/ForLayout.vue'
|
|
|
-import { setFollowEnt, setRemoveEnt } from '@/api/modules'
|
|
|
+import { setFollowEnt, setRemoveEnt, setCancelEnt } from '@/api/modules'
|
|
|
+import { mapState } from 'vuex'
|
|
|
export default {
|
|
|
name: 'Potential',
|
|
|
components: {
|
|
@@ -97,6 +99,13 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
changeRemove (item) {
|
|
|
+ setCancelEnt({ entId: item.entId }).then(res => {
|
|
|
+ if (!(res && res.error_code === 0 && res.data === 'success')) {
|
|
|
+ this.$refs.pushList.doQuery(this.filters)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ changeDelete (item) {
|
|
|
setRemoveEnt({ entId: item.entId }).then(res => {
|
|
|
if (!(res && res.error_code === 0 && res.data && res.data.success)) {
|
|
|
this.$refs.pushList.doQuery(this.filters)
|
|
@@ -119,11 +128,11 @@ export default {
|
|
|
let routeUrl = {}
|
|
|
if (this.filters.pcor === 'C') {
|
|
|
routeUrl = this.$router.resolve({
|
|
|
- path: `/unitportrayal/${item.Buyer}`
|
|
|
+ path: `/unit_portrayal/${item.Buyer}`
|
|
|
})
|
|
|
} else {
|
|
|
routeUrl = this.$router.resolve({
|
|
|
- path: `/entportrayal/${item.entId}`
|
|
|
+ path: `/ent_portrait/${item.entId}`
|
|
|
})
|
|
|
}
|
|
|
window.open(routeUrl.href, '_blank')
|
|
@@ -136,13 +145,13 @@ export default {
|
|
|
},
|
|
|
changeBusiness (item) {
|
|
|
let tempArr = []
|
|
|
- this.getScopeList.forEach(v => {
|
|
|
- if (item.includes(v.key.join(','))) {
|
|
|
+ this.scope.forEach(v => {
|
|
|
+ if (item.includes(v.key.join(' '))) {
|
|
|
tempArr.push(v)
|
|
|
}
|
|
|
})
|
|
|
if (item.length === 0) {
|
|
|
- tempArr = this.getScopeList
|
|
|
+ tempArr = this.scope
|
|
|
}
|
|
|
this.filters.business_scope = tempArr
|
|
|
},
|
|
@@ -164,24 +173,23 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapState({
|
|
|
+ scope: state => state.user.scope
|
|
|
+ }),
|
|
|
getTopInfo () {
|
|
|
return this.topInfo[this.$route.params.type || 'c']
|
|
|
},
|
|
|
- getScopeList () {
|
|
|
- const scopeData = this.$store.state.user.scope
|
|
|
- if (scopeData[0] && scopeData[0].a_key) {
|
|
|
- return scopeData[0].a_key
|
|
|
- }
|
|
|
- return []
|
|
|
- },
|
|
|
getScopeKeyList () {
|
|
|
- return this.getScopeList.map(v => {
|
|
|
- return v.key.join(',')
|
|
|
+ return this.scope.map(v => {
|
|
|
+ return v.key.join(' ')
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
- this.filters.business_scope = this.getScopeList
|
|
|
+ async created () {
|
|
|
+ if (!this.scope.length) {
|
|
|
+ await this.$store.dispatch('user/getKeywordsList')
|
|
|
+ }
|
|
|
+ this.filters.business_scope = this.scope
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -223,6 +231,10 @@ export default {
|
|
|
.border-box {
|
|
|
border: 1px solid #ececec;
|
|
|
border-radius: 5px;
|
|
|
+ ::v-deep .selector-card .selector-card-content .j-button-item.active {
|
|
|
+ color: #fff;
|
|
|
+ background-color: #2cb7ca;
|
|
|
+ }
|
|
|
}
|
|
|
.content-list-box {
|
|
|
margin-top: 16px;
|