AI销管
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

148 lines
3.2 KiB

  1. <template>
  2. <view class="pages">
  3. <view class="header">
  4. <view class="items" @tap="jumpPage">
  5. 项目未标记{{ pageParams.statDateStart }}至{{ pageParams.statDateEnd }}
  6. </view>
  7. </view>
  8. <view class="wordslist">
  9. <!-- block -->
  10. <view v-for="(data, index) in pageData" class="item" :key="data.houseId" @tap="jumpPage(data, index)">
  11. <view class="items blue" :class="{noneColor: index == 0 }">{{ data.houseName }}</view>
  12. <view class="items">{{ data.unTagCustomer || 0 }}</view>
  13. <view class="items">{{ data.tagCustomer || 0 }}</view>
  14. </view>
  15. </view>
  16. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. pageParams: {
  24. statDateStart: '', //开始时间
  25. statDateEnd: '', //结束时间
  26. orgCode: '', //id
  27. messageType: '',
  28. },
  29. showTimeCalender: '选择日期', //
  30. totalTimeShow: false, // 自定义时间
  31. inParams: '', // 入参
  32. pageData: [], // 页面数据
  33. };
  34. },
  35. onLoad(option) {
  36. if (option) {
  37. this.inParams = this.params(option)
  38. }
  39. if (option.orgCode) {
  40. this.pageParams.orgCode = option.orgCode
  41. }
  42. if (option.staTime && option.endtime) {
  43. this.pageParams.statDateStart = option.staTime
  44. this.pageParams.statDateEnd = option.endtime
  45. }
  46. if (option.messageType) {
  47. this.pageParams.messageType = option.messageType
  48. }
  49. console.log(this.inParams)
  50. this.findSensitiveWordsData()
  51. },
  52. methods: {
  53. // 对象转url参数
  54. params(json) {
  55. return Object.keys(json).map(key => key + '=' + json[key]).join('&');
  56. },
  57. //
  58. jumpPage(data, index) {
  59. if (index == 0) return
  60. uni.navigateTo({
  61. url: `/pages/center/records/index?${this.inParams}&houseId=${data.houseId}`
  62. });
  63. },
  64. // findSensitiveWordsData
  65. findSensitiveWordsData() {
  66. this.$u.post('/customer/findNotMarkAdvisorCount', this.pageParams).then(res => {
  67. console.log(res)
  68. res.unshift({
  69. houseName: '项目名称',
  70. tagCustomer: this.pageParams.messageType == 1 ? '对比昨天' : '对比上一周',
  71. unTagCustomer: '未标记数量',
  72. houseId: new Date().getTime(),
  73. })
  74. this.pageData = res
  75. })
  76. },
  77. // 自定义时间
  78. totalTimeChange(e) {
  79. console.log(e)
  80. this.pageParams.statDateStart = startDate
  81. this.pageParams.statDateEnd = endDate
  82. this.findSensitiveWordsData()
  83. },
  84. }
  85. }
  86. </script>
  87. <style lang="scss">
  88. .pages {
  89. width: 100vw;
  90. min-height: 100vh;
  91. display: flex;
  92. flex-direction: column;
  93. .header {
  94. width: 100%;
  95. height: 90rpx;
  96. display: flex;
  97. align-items: center;
  98. justify-content: center;
  99. .items {
  100. height: 100%;
  101. flex-grow: 1;
  102. display: flex;
  103. align-items: center;
  104. justify-content: center;
  105. font-size: 32rpx;
  106. font-weight: bold;
  107. }
  108. }
  109. .wordslist {
  110. width: 100%;
  111. padding: 20rpx;
  112. .item {
  113. width: 100%;
  114. height: 90rpx;
  115. display: flex;
  116. align-items: center;
  117. .items {
  118. flex-grow: 1;
  119. width: 125rpx;
  120. text-align: center;
  121. font-size: 26rpx;
  122. &.blue {
  123. color: #1890FF;
  124. }
  125. &.noneColor {
  126. color: #333;
  127. }
  128. }
  129. }
  130. }
  131. }
  132. </style>