修改代码路径:pages/uni-stat/event/event.vue
改动后效果
可以根据事件ID、设备标识查询,以及解决了uniCloud数据库时区问题导致无法查询到当天统计数据问题
改动点
改动代码
#21 - <uni-datetime-picker type="daterange" :end="new Date().getTime()" v-model="query.create_time"
#21 + <uni-datetime-picker type="daterange" :end="new Date().getTime()" :value="query.create_time"
#26 + <view class="flex" style="padding-left: 32rpx;">
#27 + <view class="my-label-text">搜索条件:</view>
#28 + <input v-model="query.event_key" placeholder="事件ID" style="color: #a8a7a7; margin-right: 20rpx;"/>
#29 + <input v-model="query.device_id" placeholder="设备标志" style="color: #a8a7a7"/>
#30 + </view>
#96 + device_id: '', // 设备标志
#97 + event_key: '', // 事件ID
#147 + useDatetimePicker(e) {
#148 = this.currentDateTab = -1
#149 + this.query.create_time = [e[0], e[1] + 24 * 3600000]
#150 = },
#163 + end = getTimeOfSomeDayAgo(0)
#275 + .my-label-text {
#276 + font-size: 14px;
#277 + font-weight: bold;
#278 + color: #555;
#279 + margin-top: 17px;
#280 + margin-bottom: 17px;
#281 + margin-right: 5px;
#282 + }