<DatePicker type="datetimerange"
ref="DatePicker"
v-model="formInline.searchTime"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择查询时间范围"
:transfer=true
@on-change="timeChange"
style="width: 100%"></DatePicker>
timeChange(time) {
if(time.length && time[0] && time[1]) {
if(this.DateUtil.format(new Date(this.formInline.searchTime[1]), 'yyyy-MM-dd hh:mm:ss').slice(-8) === '00:00:00') {
this.formInline.searchTime[1] = new Date(this.DateUtil.format(new Date(this.formInline.searchTime[1]), 'yyyy-MM-dd') + ' 23:59:59');
}
this.formInline.startTime = this.DateUtil.format(new Date(this.formInline.searchTime[0]), 'yyyy-MM-dd hh:mm:ss');
this.formInline.endTime = this.DateUtil.format(new Date(this.formInline.searchTime[1]), 'yyyy-MM-dd hh:mm:ss');
} else {
this.formInline.startTime = '';
this.formInline.endTime = '';
}
this.$refs['DatePicker'].internalValue = this.formInline.searchTime;
},