|
@@ -52,6 +52,7 @@ import BuyerclassSelector from '@/components/selector/BuyerclassSelector.vue'
|
|
import BusinessScopeSelector from '@/components/selector/BusinessScopeSelector.vue'
|
|
import BusinessScopeSelector from '@/components/selector/BusinessScopeSelector.vue'
|
|
import forLayOut from '@/components/forecast/ForLayout.vue'
|
|
import forLayOut from '@/components/forecast/ForLayout.vue'
|
|
import { setFollowEnt, setRemoveEnt, setCancelEnt } from '@/api/modules'
|
|
import { setFollowEnt, setRemoveEnt, setCancelEnt } from '@/api/modules'
|
|
|
|
+import { mapState } from 'vuex'
|
|
export default {
|
|
export default {
|
|
name: 'Potential',
|
|
name: 'Potential',
|
|
components: {
|
|
components: {
|
|
@@ -144,13 +145,13 @@ export default {
|
|
},
|
|
},
|
|
changeBusiness (item) {
|
|
changeBusiness (item) {
|
|
let tempArr = []
|
|
let tempArr = []
|
|
- this.getScopeList.forEach(v => {
|
|
|
|
|
|
+ this.scope.forEach(v => {
|
|
if (item.includes(v.key.join(' '))) {
|
|
if (item.includes(v.key.join(' '))) {
|
|
tempArr.push(v)
|
|
tempArr.push(v)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
if (item.length === 0) {
|
|
if (item.length === 0) {
|
|
- tempArr = this.getScopeList
|
|
|
|
|
|
+ tempArr = this.scope
|
|
}
|
|
}
|
|
this.filters.business_scope = tempArr
|
|
this.filters.business_scope = tempArr
|
|
},
|
|
},
|
|
@@ -172,24 +173,23 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
|
|
+ ...mapState({
|
|
|
|
+ scope: state => state.user.scope
|
|
|
|
+ }),
|
|
getTopInfo () {
|
|
getTopInfo () {
|
|
return this.topInfo[this.$route.params.type || 'c']
|
|
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 () {
|
|
getScopeKeyList () {
|
|
- return this.getScopeList.map(v => {
|
|
|
|
|
|
+ return this.scope.map(v => {
|
|
return v.key.join(' ')
|
|
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>
|
|
</script>
|