<template>
	<view class="topstreet">
		<view class="">
			<view class="search-time">
				<uni-datetime-picker v-model="kewords" type="daterange" @custom="changeLog" />
			</view>
		</view>
		<view class="search-icon">
			<u-icon name="search" color="#4CB2B6" size="42" @click="changeLog"></u-icon>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			queryParams: {
				type: Object,
				required: true
			},
			getData: {
				type: Function,
				required: true
			}
		},
		data() {
			return {
				kewords: '',
			}
		},
		methods: {
			changeLog(e) {
				this.list = []
				// if (this.kewords.length > 0 && this.kewords[0].indexOf(":") === -1) {
				// 	this.kewords[0] = this.kewords[0] + ' 00:00:00'
				// 	this.kewords[1] = this.kewords[1] + ' 23:59:59'
				// }
				this.queryParams.reporttime = this.kewords
				this.$emit('date-change', this.queryParams)
			}
		}
	}
</script>

<style>
</style>