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.
 
 
 
 

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