index.vue 3.5 KB

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