followList.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="mainBox">
  3. <uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back" title="跟进记录"
  4. @clickLeft="back">
  5. </uni-nav-bar>
  6. <followList ref="followListRef" :linkList="linkList" pageName="businessOpportunity">
  7. </followList>
  8. </view>
  9. </template>
  10. <script>
  11. import followList from "@/pages/saleManage/contact/components/followList.vue"
  12. import {
  13. contactDetail,
  14. } from '@/api/saleManage/contact/index.js'
  15. import {
  16. getfollowList,
  17. savefollowList,
  18. getDetail,
  19. deletefollowList,
  20. } from '@/api/saleManage/businessOpportunity/index.js'
  21. export default {
  22. components: {
  23. followList,
  24. },
  25. data() {
  26. return {
  27. linkList: []
  28. }
  29. },
  30. computed: {
  31. },
  32. onLoad(data) {
  33. uni.$off('savefollowList')
  34. uni.$on('savefollowList', (item) => {
  35. item.contactId=this.form.contactId
  36. item.opportunityId=this.form.id
  37. savefollowList(item)
  38. })
  39. uni.$off('delFollowList')
  40. uni.$on('delFollowList', (item) => {
  41. deletefollowList([item.id])
  42. })
  43. getDetail(data.id).then(async res => {
  44. this.form = res
  45. const {
  46. linkList
  47. } = await contactDetail(res.contactId)
  48. const followList = await getfollowList({
  49. pageNum: 1,
  50. size: 1000,
  51. opportunityId: res.id,
  52. })
  53. this.linkList = linkList
  54. this.$nextTick(() => {
  55. this.$refs.followListRef.init(followList.list)
  56. })
  57. })
  58. },
  59. onUnload() {
  60. uni.$off('savefollowList')
  61. uni.$off('delFollowList')
  62. },
  63. methods: {
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .add {
  69. width: 96rpx;
  70. height: 96rpx;
  71. border-radius: 48rpx;
  72. background: #3c9cff;
  73. position: fixed;
  74. bottom: 100rpx;
  75. right: 24rpx;
  76. display: flex;
  77. align-items: center;
  78. justify-content: center;
  79. }
  80. .top-wrapper {
  81. background-color: #fff;
  82. display: flex;
  83. width: 750rpx;
  84. height: 88rpx;
  85. padding: 16rpx 32rpx;
  86. align-items: center;
  87. gap: 16rpx;
  88. /deep/.uni-section {
  89. margin-top: 0px;
  90. }
  91. /deep/.uni-section-header {
  92. padding: 0px;
  93. }
  94. .search_btn {
  95. width: 120rpx;
  96. height: 70rpx;
  97. line-height: 70rpx;
  98. padding: 0 24rpx;
  99. background: $theme-color;
  100. font-size: 32rpx;
  101. color: #fff;
  102. margin: 0;
  103. margin-left: 26rpx;
  104. }
  105. .menu_icon {
  106. width: 44rpx;
  107. height: 44rpx;
  108. margin-left: 14rpx;
  109. }
  110. }
  111. </style>