index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view class="post_item">
  3. <view class="post_top">
  4. <view class="top_left">{{item.name}}</view>
  5. <view class="top_right">{{item.assignStateCode === '1' ? "已分配" : "未分配"}}</view>
  6. </view>
  7. <view class="post_info">
  8. <view class="telPhone">
  9. <view class="phone">
  10. <text>电话: </text>
  11. <show-real-text :real="item.telephone" :type='type' :style="{ color : item.repetitionOperationName ? 'red' : 'black' }"></show-real-text>
  12. <template v-if="item.telAddr">
  13. ({{item.telAddr}})
  14. </template>
  15. <text v-if="item.repetitionOperationName">( 撞 : {{ item.repetitionOperationName }})</text>
  16. </view>
  17. <view class="copy_btn" @click.stop="handleCopy(item)" v-if="type != '1'">复制</view>
  18. </view>
  19. <view class="telPhone" v-if="item.weixin">
  20. <text>微信: </text>
  21. <view class="phone">
  22. <text :style="{ color : item.repetitionOperWeixinName ? 'red' : 'black' }">{{item.weixin}}</text>
  23. <text v-if="item.repetitionOperWeixinName">( 撞 : {{ item.repetitionOperWeixinName }})</text>
  24. </view>
  25. </view>
  26. <view class="info">
  27. <view class="createTime">{{ item.createTime }}</view>
  28. <view >{{ item.appName }}</view>
  29. </view>
  30. <view class="info">
  31. <view class="owner" style="margin-right: 20px;">所属人 {{ item.clueOwnerName ? item.clueOwnerName : "-" }}</view>
  32. <view class="operation">运营人 {{ item.clueOperationName ? item.clueOperationName : "-" }}</view>
  33. </view>
  34. </view>
  35. <view class="clue_state_wrap">
  36. <view class="clue_state">
  37. <view class="state_wrap"><view class="label">线索阶段:</view>{{crm_clue_phase(item.clueState)}}</view>
  38. <view class="clueTag">
  39. <view class="label">线索标签:</view>
  40. <u-tag :text="tag.name" plain plainFill borderColor="#fff" size="mini" v-for="(tag) in item.clueTags" :key="tag.id" style="margin-right: 10px;" :bgColor="tag.color" color="#fff"></u-tag>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import {
  48. selectDictLabel
  49. } from "@/utils/util";
  50. export default {
  51. props: {
  52. item: {
  53. type: Object,
  54. required: true
  55. },
  56. dicts : {
  57. type : Object,
  58. required : true
  59. },
  60. type : {
  61. type : String | Number,
  62. required : true
  63. },
  64. },
  65. data() {
  66. return {
  67. caseStatusDicts : [],
  68. }
  69. },
  70. methods: {
  71. // 字典翻译
  72. crm_clue_phase(caseStatus){
  73. return selectDictLabel(this.dicts.caseStatusDicts,caseStatus);
  74. },
  75. handleCopy(item){
  76. uni.setClipboardData({
  77. data: item.telephone,
  78. success: function () {
  79. uni.$u.toast("复制成功");
  80. }
  81. });
  82. },
  83. },
  84. }
  85. </script>
  86. <style lang="scss" scoped>
  87. .post_item {
  88. background: #fff;
  89. border-radius: 20px;
  90. padding: 20px;
  91. margin-bottom: 20px;
  92. .post_top {
  93. display: flex;
  94. justify-content: space-between;
  95. margin-bottom: 10px;
  96. .top_left {
  97. font-size: 18px;
  98. }
  99. .top_right {
  100. color: #87bf66;
  101. }
  102. }
  103. .post_info {
  104. font-size: 14px;
  105. .telPhone {
  106. display: flex;
  107. margin-bottom: 6px;
  108. .copy_btn {
  109. color: #4fa5fe;
  110. margin-left: 10px;
  111. }
  112. }
  113. .info {
  114. display: flex;
  115. margin-bottom: 10px;
  116. .createTime {
  117. margin-right: 10px;
  118. }
  119. .copy_btn {
  120. display: flex;
  121. flex-wrap: wrap;
  122. }
  123. }
  124. }
  125. .clue_state_wrap {
  126. font-size: 14px;
  127. background: #f8f9fb;
  128. padding: 10px;
  129. color: #9b9aa2;
  130. overflow: hidden;
  131. .state_wrap{
  132. display: flex;
  133. margin-bottom: 10px;
  134. }
  135. .label{
  136. flex: 0 0 66px;
  137. }
  138. .clueTag {
  139. display: flex;
  140. }
  141. }
  142. }
  143. </style>