followList.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. } from '@/api/saleManage/businessOpportunity/index.js'
  20. export default {
  21. components: {
  22. followList,
  23. },
  24. data() {
  25. return {
  26. linkList: []
  27. }
  28. },
  29. computed: {
  30. },
  31. onLoad(data) {
  32. uni.$off('savefollowList')
  33. uni.$on('savefollowList', (item) => {
  34. item.contactId=this.form.contactId
  35. item.opportunityId=this.form.id
  36. savefollowList(item)
  37. })
  38. getDetail(data.id).then(async res => {
  39. this.form = res
  40. const {
  41. linkList
  42. } = await contactDetail(res.contactId)
  43. const followList = await getfollowList({
  44. pageNum: 1,
  45. size: 1000,
  46. opportunityId: res.id,
  47. })
  48. this.linkList = linkList
  49. this.$nextTick(() => {
  50. this.$refs.followListRef.init(followList.list)
  51. })
  52. })
  53. },
  54. onUnload() {
  55. uni.$off('savefollowList')
  56. },
  57. methods: {
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. .add {
  63. width: 96rpx;
  64. height: 96rpx;
  65. border-radius: 48rpx;
  66. background: #3c9cff;
  67. position: fixed;
  68. bottom: 100rpx;
  69. right: 24rpx;
  70. display: flex;
  71. align-items: center;
  72. justify-content: center;
  73. }
  74. .top-wrapper {
  75. background-color: #fff;
  76. display: flex;
  77. width: 750rpx;
  78. height: 88rpx;
  79. padding: 16rpx 32rpx;
  80. align-items: center;
  81. gap: 16rpx;
  82. /deep/.uni-section {
  83. margin-top: 0px;
  84. }
  85. /deep/.uni-section-header {
  86. padding: 0px;
  87. }
  88. .search_btn {
  89. width: 120rpx;
  90. height: 70rpx;
  91. line-height: 70rpx;
  92. padding: 0 24rpx;
  93. background: $theme-color;
  94. font-size: 32rpx;
  95. color: #fff;
  96. margin: 0;
  97. margin-left: 26rpx;
  98. }
  99. .menu_icon {
  100. width: 44rpx;
  101. height: 44rpx;
  102. margin-left: 14rpx;
  103. }
  104. }
  105. </style>