index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <!-- TODO @dhb52: 存在很多重复的 table 定义,如Customer: TodayCustomer,FollowCustomer,PutInPoolRemind -->
  2. <template>
  3. <el-row :gutter="20">
  4. <el-col :span="4" class="min-w-[200px]">
  5. <div class="side-item-list">
  6. <div
  7. v-for="(item, index) in leftSides"
  8. :key="index"
  9. :class="leftType == item.infoType ? 'side-item-select' : 'side-item-default'"
  10. class="side-item"
  11. @click="sideClick(item)"
  12. >
  13. {{ item.name }}
  14. <el-badge v-if="item.msgCount > 0" :max="99" :value="item.msgCount" />
  15. </div>
  16. </div>
  17. </el-col>
  18. <el-col :span="20" :xs="24">
  19. <TodayCustomer v-if="leftType === 'todayCustomer'" />
  20. <FollowLeads v-if="leftType === 'followLeads'" />
  21. <CheckContract v-if="leftType === 'checkContract'" />
  22. <CheckReceivables v-if="leftType === 'checkReceivables'" />
  23. <EndContract v-if="leftType === 'endContract'" />
  24. <FollowCustomer v-if="leftType === 'followCustomer'" />
  25. <PutInPoolRemind v-if="leftType === 'putInPoolRemind'" />
  26. <RemindReceivables v-if="leftType === 'remindReceivables'" />
  27. </el-col>
  28. </el-row>
  29. </template>
  30. <script lang="ts" setup>
  31. import CheckContract from './tables/CheckContract.vue'
  32. import CheckReceivables from './tables/CheckReceivables.vue'
  33. import EndContract from './tables/EndContract.vue'
  34. import FollowCustomer from './tables/FollowCustomer.vue'
  35. import FollowLeads from './tables/FollowLeads.vue'
  36. import PutInPoolRemind from './tables/PutInPoolRemind.vue'
  37. import RemindReceivables from './tables/RemindReceivables.vue'
  38. import TodayCustomer from './tables/TodayCustomer.vue'
  39. const leftType = ref('todayCustomer')
  40. const leftSides = ref([
  41. {
  42. name: '今日需联系客户',
  43. infoType: 'todayCustomer',
  44. msgCount: 1,
  45. tips: '下次跟进时间为今日的客户'
  46. },
  47. {
  48. name: '分配给我的线索',
  49. infoType: 'followLeads',
  50. msgCount: 0,
  51. tips: '转移之后未跟进的线索'
  52. },
  53. {
  54. name: '分配给我的客户',
  55. infoType: 'followCustomer',
  56. msgCount: 0,
  57. tips: '转移、领取、分配之后未跟进的客户,默认显示自己负责的客户'
  58. },
  59. {
  60. name: '待进入公海的客户',
  61. infoType: 'putInPoolRemind',
  62. msgCount: 0,
  63. tips: ''
  64. },
  65. {
  66. name: '待审核合同',
  67. infoType: 'checkContract',
  68. msgCount: 0,
  69. tips: ''
  70. },
  71. {
  72. name: '待审核回款',
  73. infoType: 'checkReceivables',
  74. msgCount: 0,
  75. tips: ''
  76. },
  77. {
  78. name: '待回款提醒',
  79. infoType: 'remindReceivables',
  80. msgCount: 4,
  81. tips: ''
  82. },
  83. {
  84. name: '即将到期的合同',
  85. infoType: 'endContract',
  86. msgCount: 20,
  87. tips: '根据“合同到期时间”及设置的“提前提醒天数”提醒'
  88. }
  89. ])
  90. /**
  91. * 侧边点击
  92. */
  93. const sideClick = (item) => {
  94. leftType.value = item.infoType
  95. }
  96. </script>
  97. <style lang="scss" scoped>
  98. .side-item-list {
  99. top: 0;
  100. bottom: 0;
  101. left: 0;
  102. z-index: 1;
  103. font-size: 14px;
  104. background-color: white;
  105. border: 1px solid #e6e6e6;
  106. border-radius: 5px;
  107. .side-item {
  108. position: relative;
  109. height: 50px;
  110. padding: 0 20px;
  111. line-height: 50px;
  112. cursor: pointer;
  113. i {
  114. color: #999;
  115. }
  116. }
  117. }
  118. .side-item-default {
  119. color: #333;
  120. border-right: 2px solid transparent;
  121. }
  122. .side-item-select {
  123. color: #409eff;
  124. background-color: #ecf5ff;
  125. border-right: 2px solid var(--el-color-primary);
  126. }
  127. .el-badge :deep(.el-badge__content) {
  128. top: 0;
  129. border: none;
  130. }
  131. .el-badge {
  132. position: absolute;
  133. top: 0;
  134. right: 15px;
  135. }
  136. </style>