Commit 32ec2a74 authored by guoyou's avatar guoyou

车辆出行记录恢复

parent 96d86c5e
<template> <template>
<div class="app-container calendar-list-container"> <div class="app-container calendar-list-container">
<div class="filter-container"> <div class="filter-container">
<el-form> <el-form>
<el-row> <el-row>
<el-col :span="5">
<el-form-item label="车辆编码" prop="code">
<el-input type="number" style="width: 200px;" v-model.number="listQuery.code"
placeholder="请输入车辆编码"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="车牌号" prop="code">
<el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="车牌号"
v-model="listQuery.numberPlate"></el-input>
</el-form-item>
</el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="车辆编码" prop="code"> <el-form-item label="出车日期" prop="startTime">
<el-input <el-date-picker
type="number" v-model="listQuery.startTime"
style="width: 200px;" type="date"
v-model.number="listQuery.code" :editable="false"
placeholder="请输入车辆编码" format="yyyy-MM-dd"
></el-input> prop="startTime"
</el-form-item> placeholder="请选择出车日期">
</el-date-picker>
</el-form-item>
</el-col> </el-col>
<el-col :span="5">
<el-form-item label="车牌号" prop="code">
<el-input
@keyup.enter.native="handleFilter"
style="width: 200px;"
class="filter-item"
placeholder="车牌号"
v-model="listQuery.numberPlate"
></el-input>
</el-form-item>
</el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="出车日期" prop="startTime"> <el-form-item label="还车日期" prop="endTime">
<el-date-picker <el-date-picker
v-model="listQuery.startTime" v-model="listQuery.endTime"
type="date" type="date"
:editable="false" :editable="false"
format="yyyy-MM-dd" format="yyyy-MM-dd"
prop="startTime" prop="endTime"
placeholder="请选择出车日期" placeholder="请选择还车日期">
></el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="5">
<el-form-item label="分公司" prop="departureId">
<el-autocomplete
class="inline-input"
v-model="state1"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div v-show="statisticVisiable">
<el-row style="text-align: center;margin-top: 10px;margin-bottom: 10px">
<el-col :span="8">
<span class="statistic_number">{{statisticData.departureCount}}</span>
<br><br>
<span class="statistic_title">出行次数</span>
</el-col>
<el-col :span="8">
<span class="statistic_number">{{statisticData.departureDay}}</span>
<br><br>
<span class="statistic_title">出行天数</span>
</el-col>
<el-col :span="8">
<span class="statistic_number">{{statisticData.departureMileage}}</span>
<br><br>
<span class="statistic_title">公里</span>
</el-col>
</el-row>
</div>
<el-button class="filter-item" type="primary" :icon=" showMoreMoreCol ? 'caret-left' : 'caret-right' " v-waves
@click="showMoreMoreCol=!showMoreMoreCol">
更多列
</el-button>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row
style="width: 100%">
<el-table-column
type="index"
label="编号"
width="65">
</el-table-column>
<!-- <el-table-column align="center" label="编号" width="65">
--> <!--<template scope="scope">-->
<!--<span>{{scope.row.id}}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column align="center" label="车牌号" width="120">
<template scope="scope">
<span>{{scope.row.numberPlate}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="出车时间">
<template scope="scope">
<span>{{scope.row.departureTime}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" label="使用人">
<template scope="scope">
<span>{{scope.row.user}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="出车地点">
<template scope="scope">
<span>{{scope.row.departureName}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="还车时间">
<template scope="scope">
<span>{{scope.row.arrivalTime}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" label="还车人">
<template scope="scope">
<span>{{scope.row.recycleMan}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="还车地点">
<template scope="scope">
<span>{{scope.row.arrivalName}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="本次出行天数">
<template scope="scope">
<span>{{scope.row.departureDay}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="本次出行公里">
<template scope="scope">
<span>{{scope.row.mileage}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" label="验车人">
<template scope="scope">
<span>{{scope.row.checkMan}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" label="用途">
<template scope="scope">
<span>{{scope.row.use}}</span>
</template>
</el-table-column>
<el-col :span="5"> <el-table-column width="200" align="center" label="使用人电话" v-if="showMoreMoreCol">
<el-form-item label="还车日期" prop="endTime"> <template scope="scope">
<el-date-picker <span>{{scope.row.userTel}}</span>
v-model="listQuery.endTime" </template>
type="date" </el-table-column>
:editable="false"
format="yyyy-MM-dd"
prop="endTime"
placeholder="请选择还车日期"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<el-form-item label="出车公司" prop="departureId">
<el-autocomplete
class="inline-input"
v-model="state1"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="收车公司">
<el-autocomplete
class="inline-input"
v-model="arrivalBranchCompanyId"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="putCompanyChange"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="用途">
<el-select v-model="listQuery.use" filterable placeholder="请选择车辆用途">
<el-option
v-for="item in useArr"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div v-show="statisticVisiable">
<el-row style="text-align: center;margin-top: 10px;margin-bottom: 10px">
<el-col :span="8">
<span class="statistic_number">{{statisticData.departureCount}}</span>
<br />
<br />
<span class="statistic_title">出行次数</span>
</el-col>
<el-col :span="8">
<span class="statistic_number">{{statisticData.departureDay}}</span>
<br />
<br />
<span class="statistic_title">出行天数</span>
</el-col>
<el-col :span="8">
<span class="statistic_number">{{statisticData.departureMileage}}</span>
<br />
<br />
<span class="statistic_title">公里</span>
</el-col>
</el-row>
</div>
<el-button
class="filter-item"
type="primary"
:icon=" showMoreMoreCol ? 'caret-left' : 'caret-right' "
v-waves
@click="showMoreMoreCol=!showMoreMoreCol"
>更多列</el-button>
<el-table
:key="tableKey"
:data="list"
v-loading.body="listLoading"
border
fit
highlight-current-row
style="width: 100%"
>
<el-table-column type="index" label="编号" width="65"></el-table-column>
<!-- <el-table-column align="center" label="编号" width="65">
-->
<!--<template scope="scope">-->
<!--<span>{{scope.row.id}}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column align="center" label="车牌号" width="120">
<template scope="scope">
<span>{{scope.row.numberPlate}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="预约出/收车时间">
<template scope="scope">
<p>{{scope.row.book_start_date}}</p>
<p>{{scope.row.book_end_date}}</p>
</template>
</el-table-column>
<el-table-column align="center" label="实际出/收车时间">
<template scope="scope">
<p>{{scope.row.actual_start_date}}</p>
<p>{{scope.row.actual_end_date}}</p>
</template>
</el-table-column>
<el-table-column align="center" label="出/收车公司">
<template scope="scope">
<p>{{scope.row.departureName}}</p>
<p>{{scope.row.arrivalName}}</p>
</template>
</el-table-column>
<el-table-column align="center" label="出/收车人">
<template scope="scope">
<span>{{scope.row.departureTime}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="出行天数/公里数">
<template scope="scope">
<p>{{scope.row.departureDay}}</p>
<p>{{scope.row.mileage}}</p>
</template>
</el-table-column>
<el-table-column align="center" label="客户/手机号">
<template scope="scope">
<p>{{scope.row.user}}</p>
<p>{{scope.row.userTel}}</p>
</template>
</el-table-column>
<el-table-column align="center" label="用途">
<template scope="scope">
<span>{{scope.row.use}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<template scope="scope">
<span>{{scope.row.departureTime}}</span>
</template>
</el-table-column>
<!-- <el-table-column width="100" align="center" label="使用人">
<template scope="scope">
<span>{{scope.row.user}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="出车地点">
<template scope="scope">
<span>{{scope.row.departureName}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="还车时间">
<template scope="scope">
<span>{{scope.row.arrivalTime}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" label="还车人">
<template scope="scope">
<span>{{scope.row.recycleMan}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="还车地点">
<template scope="scope">
<span>{{scope.row.arrivalName}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="本次出行天数">
<template scope="scope">
<span>{{scope.row.departureDay}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="本次出行公里">
<template scope="scope">
<span>{{scope.row.mileage}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" label="验车人">
<template scope="scope">
<span>{{scope.row.checkMan}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" label="用途">
<template scope="scope">
<span>{{scope.row.use}}</span>
</template>
</el-table-column>-->
<!-- <el-table-column width="200" align="center" label="使用人电话" v-if="showMoreMoreCol"> <el-table-column width="200" align="center" label="验车人电话" v-if="showMoreMoreCol">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.userTel}}</span> <span>{{scope.row.checkManTel}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="验车人电话" v-if="showMoreMoreCol">
<template scope="scope">
<span>{{scope.row.checkManTel}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" label="开始公里数" v-if="showMoreMoreCol"> <el-table-column width="100" align="center" label="开始公里数" v-if="showMoreMoreCol">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.mileageStart}}</span> <span>{{scope.row.mileageStart}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="100" align="center" label="结束公里数" v-if="showMoreMoreCol"> <el-table-column width="100" align="center" label="结束公里数" v-if="showMoreMoreCol">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.mileageEnd}}</span> <span>{{scope.row.mileageEnd}}</span>
</template> </template>
</el-table-column>--> </el-table-column>
</el-table> </el-table>
<div v-show="!listLoading" class="pagination-container"> <div v-show="!listLoading" class="pagination-container">
<el-pagination <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
@size-change="handleSizeChange" :current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit"
@current-change="handleCurrentChange" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
:current-page.sync="listQuery.page" </div>
:page-sizes="[10,20,30, 50]"
:page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</div>
<!-- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">--> <!-- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">-->
<!-- <el-form :model="form" :rules="rules" ref="form" label-width="100px">--> <!-- <el-form :model="form" :rules="rules" ref="form" label-width="100px">-->
<!-- <el-form-item label="姓名" prop="name">--> <!-- <el-form-item label="姓名" prop="name">-->
<!-- <el-input v-model="form.name" placeholder="请输入姓名"></el-input>--> <!-- <el-input v-model="form.name" placeholder="请输入姓名"></el-input>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-form>--> <!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">--> <!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button @click="cancel('form')">取 消</el-button>--> <!-- <el-button @click="cancel('form')">取 消</el-button>-->
<!-- <el-button v-if="dialogStatus=='create'" type="primary" @click="create('form')">确 定</el-button>--> <!-- <el-button v-if="dialogStatus=='create'" type="primary" @click="create('form')">确 定</el-button>-->
<!-- <el-button v-else type="primary" @click="update('form')">确 定</el-button>--> <!-- <el-button v-else type="primary" @click="update('form')">确 定</el-button>-->
<!-- </div>--> <!-- </div>-->
<!-- </el-dialog>--> <!-- </el-dialog>-->
</div> </div>
</template> </template>
<style> <style>
.statistic_number { .statistic_number {
font-size: x-large; font-size: x-large;
font-weight: bolder; font-weight: bolder;
} }
.statistic_title { .statistic_title {
font-size: x-large; font-size: x-large;
} }
</style> </style>
<script> <script>
import { mapGetters } from 'vuex' import {mapGetters} from 'vuex';
import { import {
page, page,
statistic, statistic
findReserveType } from '../../../api/vehicle/departureLog';
} from '../../../api/vehicle/departureLog' import {
import { getAllCompany, getAll } from 'api/base_info/branch_company/' getAllCompany,
import { getAllZone } from 'api/base_info/constant/' getAll
import { getAllBranchCompanyByZoneId } from 'api/order/rentVehicle' } from 'api/base_info/branch_company/';
import { import {
toEast8Date, getAllZone
deepCopyDate, } from 'api/base_info/constant/';
newEast8Date, import {
getYMD_date getAllBranchCompanyByZoneId
} from 'utils/dateUtils' } from 'api/order/rentVehicle';
export default { import {
name: 'vehicleDepartureLog', toEast8Date,
data() { deepCopyDate,
return { newEast8Date,
showMoreMoreCol: false, getYMD_date
form: { } from 'utils/dateUtils';
id: null, export default {
numberPlate: null, name: 'vehicleDepartureLog',
vehicleId: null, data() {
use: null, return {
user: null, showMoreMoreCol: false,
userTel: null, form: {
checkMan: null, id: null,
checkManTel: null, numberPlate: null,
recycleMan: null, vehicleId: null,
recycleManTel: null, use: null,
departureTime: null, user: null,
arrivalTime: null, userTel: null,
mileageStart: null, checkMan: null,
mileageEnd: null, checkManTel: null,
state: null, recycleMan: null,
allCompaniesArr: [], recycleManTel: null,
selectArry: [] departureTime: null,
}, arrivalTime: null,
rules: { mileageStart: null,
name: [ mileageEnd: null,
{ state: null,
required: true, allCompaniesArr:[],
message: '请输入用户', selectArry: [],
trigger: 'blur' },
} rules: {
] name: [
}, {
list: null, required: true,
total: null, message: '请输入用户',
listLoading: true, trigger: 'blur'
allBranchCompany: [], }
baranchQuery: { ]
zoneId: null },
}, list: null,
allZoneArr: [], //全部片区 total: null,
state1: '', listLoading: true,
arrivalBranchCompanyId:null, allBranchCompany:[],
useArr:[],//用途 baranchQuery: {
listQuery: { zoneId:null
page: 1, },
limit: 20, allZoneArr:[],//全部片区
startTime: undefined, state1:'',
endTime: undefined, listQuery: {
numberPlate: undefined, page: 1,
departureId: undefined, limit: 20,
arrivalBranchCompanyId: null, startTime: undefined,
use:null endTime:undefined,
}, numberPlate: undefined,
dialogStatus: '', departureId:undefined,
textMap: { },
update: '编辑', dialogStatus: '',
create: '创建' textMap: {
}, update: '编辑',
tableKey: 0, create: '创建'
dialogFormVisible: null, },
statisticVisiable: true, tableKey: 0,
statisticData: { dialogFormVisible: null,
departureCount: null, statisticVisiable: true,
departureDay: null, statisticData: {
departureMileage: null departureCount: null,
} departureDay: null,
} departureMileage: null
}, }
created() { }
let t = this },
const numberPlate = this.$route.query.numberPlate created() {
if (numberPlate) { let t = this;
this.listQuery.numberPlate = numberPlate const numberPlate = this.$route.query.numberPlate;
} if (numberPlate) {
getAll().then(response => { this.listQuery.numberPlate = numberPlate;
this.allCompaniesArr = response.data }
let query = localStorage.getItem('vehicleDepartureLog') getAll() .then(response => {
if (query != 'null' && query && !numberPlate) { this.allCompaniesArr = response.data;
this.listQuery = JSON.parse(query) let query = localStorage.getItem("vehicleDepartureLog");
if (t.listQuery.departureId) { if(query !="null" && query && !numberPlate){
t.allCompaniesArr.map(function(item) { this.listQuery = JSON.parse(query);
if (item.id == t.listQuery.departureId) { if(t.listQuery.departureId){
t.state1 = item.name t.allCompaniesArr.map(function (item) {
} if(item.id == t.listQuery.departureId){
}) t.state1 = item.name;
} }
} });
t.handleFilter() }
}) }
findReserveType().then(data=>{ t.handleFilter();
console.log(data); })
}) },
}, computed: {
computed: { ...mapGetters([
...mapGetters(['elements']), 'elements'
//获取大区列表 ]),
getAllZoneList() { //获取大区列表
return getAllZone() getAllZoneList() {
} return getAllZone();
}, },
methods: { },
//收车公司筛选 methods: {
putCompanyChange(val) { /**
console.log(val) * 重置
if (val) { * */
this.listQuery.arrivalBranchCompanyId = val.id reloadPage() {
} else { this.state1='';
this.listQuery.arrivalBranchCompanyId = null this.listQuery = {
} page: 1,
}, limit: 20,
/** startTime: undefined,
* 重置 endTime:undefined,
* */ numberPlate: undefined,
reloadPage() { departureId:undefined,
this.state1 = '' };
this.arrivalBranchCompanyId = null if(this.listQuery){
this.listQuery = { localStorage.setItem("vehicleDepartureLog", JSON.stringify(this.listQuery));
page: 1, }
limit: 20, this.handleFilter();
startTime: undefined, },
endTime: undefined, handleFilter() {
numberPlate: undefined, this.listQuery.page = 1
departureId: undefined, if(this.listQuery){
arrivalBranchCompanyId: undefined, localStorage.setItem("vehicleDepartureLog", JSON.stringify(this.listQuery));
use:undefined }
} this.getList();
if (this.listQuery) { if (this.listQuery.numberPlate) {
localStorage.setItem( statistic({numberPlate: this.listQuery.numberPlate}).then(response => {
'vehicleDepartureLog', this.statisticData = response.data;
JSON.stringify(this.listQuery) });
) this.statisticVisiable = true;
} }
this.handleFilter() },
}, dateToString: function (date) {
handleFilter() { var year = date.getFullYear();
this.listQuery.page = 1 var month = (date.getMonth() + 1).toString();
if (this.listQuery) { var day = (date.getDate()).toString();
localStorage.setItem( if (month.length == 1) {
'vehicleDepartureLog', month = "0" + month;
JSON.stringify(this.listQuery) }
) if (day.length == 1) {
} day = "0" + day;
this.getList() }
if (this.listQuery.numberPlate) { var dateTime = year + "-" + month + "-" + day;
statistic({ numberPlate: this.listQuery.numberPlate }).then( return dateTime;
response => { },
if (response.status == 200) { getList() {
this.statisticData = response.data this.listLoading = true;
this.statisticVisiable = true if (!this.listQuery.numberPlate) {
} else { this.statisticVisiable = false;
this.$message(response.message) }
} if (this.listQuery.startTime) {
} this.listQuery.startTime = getYMD_date(new Date(this.listQuery.startTime));
) }
} if(this.listQuery.endTime) {
}, this.listQuery.endTime = getYMD_date(new Date(this.listQuery.endTime));
dateToString: function(date) { }
var year = date.getFullYear() if (!this.state1) {
var month = (date.getMonth() + 1).toString() this.listQuery.departureId = undefined;
var day = date.getDate().toString() }
if (month.length == 1) { page(this.listQuery)
month = '0' + month .then(response => {
} this.list = response.data.list;
if (day.length == 1) { this.total = response.data.total;
day = '0' + day this.listLoading = false;
} })
var dateTime = year + '-' + month + '-' + day },
return dateTime querySearch(queryString, cb) {
}, let selectArry = [];
getList() { let iitem = {
this.listLoading = true value: "全部",
if (!this.listQuery.numberPlate) { name: "全部"
this.statisticVisiable = false };
} selectArry.push(iitem);
if (this.listQuery.startTime) { this.allCompaniesArr.map(function (item) {
this.listQuery.startTime = getYMD_date( item.value = item.name;
new Date(this.listQuery.startTime) selectArry.push(item);
) });
} this.selectArry = selectArry;
if (this.listQuery.endTime) { var results = queryString ? selectArry.filter(this.createFilter(queryString)) : selectArry;
this.listQuery.endTime = getYMD_date( // 调用 callback 返回建议列表的数据
new Date(this.listQuery.endTime) cb(results);
) },
} createFilter(queryString) {
if (!this.state1) { return (restaurant) => {
this.listQuery.departureId = undefined return (restaurant.name.indexOf(queryString.toLowerCase()) != -1);
} };
page(this.listQuery).then(response => { },
this.list = response.data.list handleSelect(item) {
this.total = response.data.total if (item.value == "全部") {
this.listLoading = false this.listQuery.departureId = undefined;
}) } else {
}, this.listQuery.departureId = item.id;
querySearch(queryString, cb) { }
let selectArry = [] },
let iitem = { handleSizeChange(val) {
value: '全部', this.listQuery.limit = val;
name: '全部' if(this.listQuery){
} localStorage.setItem("vehicleDepartureLog", JSON.stringify(this.listQuery));
selectArry.push(iitem) }
this.allCompaniesArr.map(function(item) { this.getList();
item.value = item.name },
selectArry.push(item) handleCurrentChange(val) {
}) this.listQuery.page = val;
this.selectArry = selectArry if(this.listQuery){
var results = queryString localStorage.setItem("vehicleDepartureLog", JSON.stringify(this.listQuery));
? selectArry.filter(this.createFilter(queryString)) }
: selectArry this.getList();
// 调用 callback 返回建议列表的数据 },
cb(results) }
}, }
createFilter(queryString) {
return restaurant => {
return restaurant.name.indexOf(queryString.toLowerCase()) != -1
}
},
handleSelect(item) {
if (item.value == '全部') {
this.listQuery.departureId = undefined
} else {
this.listQuery.departureId = item.id
}
},
handleSizeChange(val) {
this.listQuery.limit = val
if (this.listQuery) {
localStorage.setItem(
'vehicleDepartureLog',
JSON.stringify(this.listQuery)
)
}
this.getList()
},
handleCurrentChange(val) {
this.listQuery.page = val
if (this.listQuery) {
localStorage.setItem(
'vehicleDepartureLog',
JSON.stringify(this.listQuery)
)
}
this.getList()
}
}
}
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment