Compare commits

..

2 Commits

1 changed files with 5 additions and 3 deletions

View File

@ -26,7 +26,7 @@
<!--起始日期 @keyup.enter.native="getDataList()"--> <!--起始日期 @keyup.enter.native="getDataList()"-->
<el-form-item> <el-form-item>
<span>日期</span> <span>日期</span>
<el-date-picker v-model="value1" type="datetimerange" range-separator="" start-placeholder="开始日期" <el-date-picker v-model="value1" type="daterange" range-separator="" start-placeholder="开始日期"
end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -909,8 +909,10 @@ export default {
// //
getDataList() { getDataList() {
if (this.value1 && this.value1.length > 0) { if (this.value1 && this.value1.length > 0) {
this.startDate = this.handleTime(this.value1[0], 'yyyy-MM-dd') // this.startDate = this.handleTime(this.value1[0], 'yyyy-MM-dd')
this.endDate = this.handleTime(this.value1[1], 'yyyy-MM-dd') // this.endDate = this.handleTime(this.value1[1], 'yyyy-MM-dd')
this.startDate = this.value1[0]
this.endDate = this.value1[1]
} else { } else {
this.startDate = '' this.startDate = ''
this.endDate = '' this.endDate = ''