CustomerWatcher.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <!-- 商机管理我关注的客户 - 采购单位画像关注 -->
  3. <ListCard
  4. class="customer-watcher"
  5. :list="list"
  6. title="业主监控"
  7. @clickListItem="clickListItem"
  8. @linkMore="linkMore"
  9. :loading="loading"
  10. :loaded="loaded">
  11. <div slot="empty-content" class="empty-content">暂未关注任何客户</div>
  12. </ListCard>
  13. </template>
  14. <script>
  15. import { mapState, mapActions } from 'vuex'
  16. import ListCard from '../ui/ListCard'
  17. import { getPowerUrl } from '@/utils/power/redirect'
  18. import { openSelfLink } from '@/utils'
  19. export default {
  20. name: 'CustomerWatcher',
  21. components: {
  22. ListCard
  23. },
  24. computed: {
  25. ...mapState({
  26. loading: state => state.workspace.customerWatcher.loading,
  27. loaded: state => state.workspace.customerWatcher.loaded,
  28. list: state => state.workspace.customerWatcher.list
  29. })
  30. },
  31. created () {
  32. this.getList()
  33. },
  34. methods: {
  35. ...mapActions('workspace/customerWatcher', [
  36. 'getList'
  37. ]),
  38. resolveLink (link) {
  39. const { href } = this.$router.resolve(link)
  40. return href
  41. },
  42. clickListItem (item) {
  43. // this.pathVisiting(
  44. // this.createPathItem(
  45. // '/unit_portrayal/*',
  46. // `id=${item.name}`
  47. // )
  48. // )
  49. // window.open(`/entpc/unit_portrayal/${item.name}`)
  50. const { url } = getPowerUrl('buyerDesc', { id: item.name })
  51. window.open(url)
  52. },
  53. linkMore () {
  54. // window.open('/entpc/newBus/client_follow')
  55. openSelfLink(this.$router.resolve('/my_client'))
  56. }
  57. }
  58. }
  59. </script>