index.vue 924 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view class="topstreet">
  3. <view class="">
  4. <view class="search-time">
  5. <uni-datetime-picker v-model="kewords" type="daterange" @custom="changeLog" />
  6. </view>
  7. </view>
  8. <view class="search-icon">
  9. <u-icon name="search" color="#4CB2B6" size="42" @click="changeLog"></u-icon>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. props: {
  16. queryParams: {
  17. type: Object,
  18. required: true
  19. },
  20. getData: {
  21. type: Function,
  22. required: true
  23. }
  24. },
  25. data() {
  26. return {
  27. kewords: '',
  28. }
  29. },
  30. methods: {
  31. changeLog(e) {
  32. this.list = []
  33. // if (this.kewords.length > 0 && this.kewords[0].indexOf(":") === -1) {
  34. // this.kewords[0] = this.kewords[0] + ' 00:00:00'
  35. // this.kewords[1] = this.kewords[1] + ' 23:59:59'
  36. // }
  37. this.queryParams.reporttime = this.kewords
  38. this.$emit('date-change', this.queryParams)
  39. }
  40. }
  41. }
  42. </script>
  43. <style>
  44. </style>