|  |  |  | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="出发时间" prop="startTime"> | 
|---|
|  |  |  | <el-date-picker @change="seleTime" v-model="time" @keypress.enter.native="search" type="datetimerange" | 
|---|
|  |  |  | <!-- <el-date-picker @change="seleTime" v-model="time" @keypress.enter.native="search" type="datetimerange" | 
|---|
|  |  |  | format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']" | 
|---|
|  |  |  | range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> | 
|---|
|  |  |  | </el-date-picker> | 
|---|
|  |  |  | </el-date-picker> --> | 
|---|
|  |  |  | <el-date-picker type="datetime" v-model="searchForm.queryStartTime" value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="请选择开始时间" @change="changeRadio" /> | 
|---|
|  |  |  | <el-date-picker type="datetime" v-model="searchForm.queryEndTime" value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="请选择结束时间" @change="changeRadio" /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-radio-group v-model="searchForm.radio" size="small" @input="changeRadio"> | 
|---|
|  |  |  | <el-radio-button label="0">当天</el-radio-button> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-button type="primary" @click="handleEx" v-permissions="['business:carusebook:exportExcel']">导出</el-button> | 
|---|
|  |  |  | </li> | 
|---|
|  |  |  | </ul> | 
|---|
|  |  |  | <el-table :max-height="tableHeight" v-loading="isWorking.search" :data="tableData.list" stripe | 
|---|
|  |  |  | <el-table :max-height="tableHeight" v-loading="isWorking.search" :data="tableData.list" stripe | 
|---|
|  |  |  | @selection-change="handleSelectionChange"> | 
|---|
|  |  |  | <el-table-column type="selection" width="55"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="carCode" label="车牌号" min-width="100px"></el-table-column> | 
|---|
|  |  |  | 
|---|
|  |  |  | searchForm: { | 
|---|
|  |  |  | memberName: '', | 
|---|
|  |  |  | companyName: '', | 
|---|
|  |  |  | queryStartTime: '', | 
|---|
|  |  |  | queryEndTime: '', | 
|---|
|  |  |  | startTime: '', | 
|---|
|  |  |  | endTime: '', | 
|---|
|  |  |  | type: null, | 
|---|
|  |  |  | status: null, | 
|---|
|  |  |  | radio: 0 | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changeRadio(e) { | 
|---|
|  |  |  | this.searchForm.radio = e | 
|---|
|  |  |  | if (e === '0') { | 
|---|
|  |  |  | this.searchForm.queryStartTime = timeForMat(0)[0] | 
|---|
|  |  |  | this.searchForm.queryEndTime = timeForMat(0)[1] | 
|---|
|  |  |  | this.time = timeForMat(0) | 
|---|
|  |  |  | } else if (e === '1') { | 
|---|
|  |  |  | this.searchForm.queryStartTime = timeForMat(6)[0] | 
|---|
|  |  |  | this.searchForm.queryEndTime = timeForMat(6)[1] | 
|---|
|  |  |  | this.time = timeForMat(6) | 
|---|
|  |  |  | } else if (e === '2') { | 
|---|
|  |  |  | this.searchForm.queryStartTime = timeForMat(29)[0] | 
|---|
|  |  |  | this.searchForm.queryEndTime = timeForMat(29)[1] | 
|---|
|  |  |  | this.time = timeForMat(29) | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.searchForm.radio = '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.searchForm.queryStartTime && this.searchForm.queryEndTime && new Date(this.searchForm.queryStartTime).getTime() > new Date(this.searchForm.queryEndTime).getTime()) { | 
|---|
|  |  |  | this.$message.error('开始时间不能大于结束时间') | 
|---|
|  |  |  | this.searchForm.queryStartTime = '' | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | reset() { | 
|---|
|  |  |  | this.$refs.searchForm.resetFields() | 
|---|
|  |  |  | this.searchForm.radio = '0' | 
|---|
|  |  |  | this.changeRadio('0') | 
|---|
|  |  |  | // this.search() | 
|---|
|  |  |  | this.searchForm = {} | 
|---|
|  |  |  | this.time = [] | 
|---|
|  |  |  | // this.searchForm.radio = '0' | 
|---|
|  |  |  | // this.changeRadio('0') | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|