AI销管
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

129 linhas
2.6 KiB

  1. <template>
  2. <view class="pages">
  3. <view class="header">
  4. <view class="items" @tap="totalTimeShow = true">
  5. {{ showTimeCalender }}
  6. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  7. </view>
  8. <view class="items" @tap="jumpPage">
  9. 明细
  10. </view>
  11. </view>
  12. <view class="wordslist">
  13. <!-- block -->
  14. <block v-for="(data) in pageData">
  15. <view class="item" :key="data.id" @click="jumpPage(data)">
  16. <view class="lside">{{ data.words }}</view>
  17. <view class="rside">{{ data.sumNum }}</view>
  18. </view>
  19. </block>
  20. </view>
  21. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. pageParams: {
  29. statDateStart: '',//开始时间
  30. statDateEnd: '',//结束时间
  31. projectId: uni.getStorageSync("buildingID").id,//项目id
  32. },
  33. showTimeCalender: '选择日期',//
  34. totalTimeShow: false, // 自定义时间
  35. pageData: [], // 页面数据
  36. };
  37. },
  38. onLoad() {
  39. this.findSensitiveWordsData()
  40. },
  41. methods: {
  42. //
  43. jumpPage(data) {
  44. uni.navigateTo({
  45. url: `/pages/center/prohibited/index?refresh=refresh&staTime=${this.pageParams.statDateStart}&endtime=${this.pageParams.statDateEnd}&words=${data.words}`
  46. });
  47. },
  48. // findSensitiveWordsData
  49. findSensitiveWordsData() {
  50. this.$u.post('/customer/findSensitiveWordsData', this.pageParams).then(res => {
  51. console.log(res)
  52. res.unshift({
  53. words: '违禁词',
  54. id: new Date().getTime(),
  55. sumNum: '违禁次数'
  56. })
  57. this.pageData = res
  58. console.log(this.pageData, '123321s')
  59. })
  60. },
  61. // 自定义时间
  62. totalTimeChange(e) {
  63. console.log(e)
  64. this.pageParams.statDateStart = startDate
  65. this.pageParams.statDateEnd = endDate
  66. this.findSensitiveWordsData()
  67. },
  68. }
  69. }
  70. </script>
  71. <style lang="scss">
  72. .pages {
  73. width: 100vw;
  74. min-height: 100vh;
  75. display: flex;
  76. flex-direction: column;
  77. .header {
  78. width: 100%;
  79. height: 90rpx;
  80. display: flex;
  81. align-items: center;
  82. justify-content: center;
  83. .items {
  84. height: 100%;
  85. flex-grow: 1;
  86. display: flex;
  87. align-items: center;
  88. justify-content: center;
  89. color: #666666;
  90. font-size: 28rpx;
  91. }
  92. }
  93. .wordslist {
  94. width: 100%;
  95. padding: 20rpx;
  96. .item {
  97. width: 100%;
  98. height: 90rpx;
  99. font-size: 32rpx;
  100. display: flex;
  101. align-items: center;
  102. .lside {
  103. flex-grow: 1;
  104. }
  105. .rside {
  106. flex-shrink: 0;
  107. width: 125rpx;
  108. text-align: center;
  109. }
  110. }
  111. }
  112. }
  113. </style>