Commit bc9b79e5 authored by guoyou's avatar guoyou

拉代码

parents bd99d247 4530a491
......@@ -384,7 +384,7 @@ export const asyncRouterMap = [{
component: _import('vehicle/vehicleCount/index'),
name: '车辆出行统计',
authority: 'vehicleCount'
},
}
// {
// path: 'dispatchApply',
// component: _import('vehicle/dispatchApply/index'),
......
......@@ -188,6 +188,10 @@
}
},
created() {
let query = localStorage.getItem("memberOrderInfo");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
}
this.getList();
this.btn_del = this.elements['branchCompany/stockApply:btn_delete'];
},
......@@ -297,16 +301,19 @@
if(this.listQuery.endTime){
this.listQuery.endTime = this.listQuery.endTime.getTime();
}
if(this.listQuery.name == '1') {
this.listQuery.name = "普通会员"
} else
if(this.listQuery.name == '2') {
this.listQuery.name = "黄金会员"
} else
if(this.listQuery.name == '3') {
this.listQuery.name = "钻石会员"
} else {
this.listQuery.name = null
// if(this.listQuery.name == '1') {
// this.listQuery.name = "普通会员"
// } else
// if(this.listQuery.name == '2') {
// this.listQuery.name = "黄金会员"
// } else
// if(this.listQuery.name == '3') {
// this.listQuery.name = "钻石会员"
// } else {
// this.listQuery.name = null
// }
if(this.listQuery){
localStorage.setItem("memberOrderInfo", JSON.stringify(this.listQuery));
}
page(this.listQuery)
.then(response => {
......
......@@ -643,6 +643,12 @@ export default {
};
},
created() {
let query = localStorage.getItem("rentVehicleInfo");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
this.listQuery.zoneId = undefined;
this.listQuery.startCompanyId = undefined;
}
this.getList();
this.btn_del = this.elements["branchCompany/stockApply:btn_delete"];
this.order_btn_order_violcation_save = this.elements[
......@@ -1066,6 +1072,9 @@ export default {
// if(this.listQuery.endTime){
// this.listQuery.endTime = this.listQuery.endTime.getTime();
// }
if(this.listQuery){
localStorage.setItem("rentVehicleInfo", JSON.stringify(this.listQuery));
}
page(this.listQuery).then(response => {
if (response.data.data) {
response.data.data.map(function(el) {
......@@ -1098,6 +1107,9 @@ export default {
},
handleSizeChange(val) {
this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("rentVehicleInfo", JSON.stringify(this.listQuery));
}
this.getList();
},
dateFormat(timestamp) {
......@@ -1106,6 +1118,9 @@ export default {
},
handleCurrentChange(val) {
this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("rentVehicleInfo", JSON.stringify(this.listQuery));
}
this.getList();
},
......
......@@ -286,6 +286,12 @@
}
},
created() {
let query = localStorage.getItem("tourOrderInfo");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
this.listQuery.zoneId = undefined;
this.listQuery.startCompanyId = undefined;
}
this.getList();
this.btn_del = this.elements['branchCompany/stockApply:btn_delete'];
},
......@@ -424,6 +430,9 @@
// if(this.listQuery.endTime){
// this.listQuery.endTime = this.listQuery.endTime.getTime();
// }
if(this.listQuery){
localStorage.setItem("tourOrderInfo", JSON.stringify(this.listQuery));
}
page(this.listQuery)
.then(response => {
this.list = response.data.data;
......
......@@ -235,10 +235,14 @@ import { staffImport } from 'src/api/admin/UserMember/index'
import { getAll } from 'api/base_info/branch_company'
export default {
created() {
this.getList()
this.postionsFn()
this.getAllFn()
this.jobsFn()
let query = localStorage.getItem("employeesInput");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
}
this.getList();
this.postionsFn();
this.getAllFn();
this.jobsFn();
},
computed: {
...mapGetters(['elements']),
......@@ -336,8 +340,7 @@ export default {
getAll().then(data => {
if (data.status == 200) {
this.companyList = data.data;
this.companyList.unshift({name:'全部',id:''})
console.log(this.companyList);
this.companyList.unshift({name:'全部',id:''});
}
})
......@@ -431,26 +434,40 @@ export default {
})
},
handleSizeChange(val) {
this.listQuery.limit = val
this.getList()
this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("employeesInput", JSON.stringify(this.listQuery));
}
this.getList();
},
handleCurrentChange(val) {
this.listQuery.page = val
this.getList()
this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("employeesInput", JSON.stringify(this.listQuery));
}
this.getList();
},
//搜索
handleFilter() {
if(this.listQuery){
localStorage.setItem("employeesInput", JSON.stringify(this.listQuery));
}
this.getList()
},
//清空搜索条件
cleaningQuery() {
this.listQuery.page = 1
this.listQuery.limit = 10
this.listQuery.name = ''
this.listQuery.phone = ''
this.listQuery.status = ''
this.listQuery.companyId = ''
this.listQuery.companyName = ''
this.listQuery = {
name: '',
phone: '',
status: null,
page: 1,
limit: 10,
companyId: '',
companyName: ''
};
if(this.listQuery){
localStorage.setItem("employeesInput", JSON.stringify(this.listQuery));
}
this.getList()
},
//新增员工
......
......@@ -36,6 +36,7 @@
<el-button class="filter-item" style="margin-left: 10px;" @click="bulkUpload"
type="primary" icon="edit" v-if="memberEnter_btn_addIn">批量导入会员
</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row
style="width: 100%">
......@@ -302,6 +303,11 @@
this.memberEnter_btn_add=this.elements['memberEnter:btn_add'];//添加一条
this.memberEnter_btn_del=this.elements['memberEnter:btn_del'];//删除
this.memberEnter_btn_addIn=this.elements['memberEnter:btn_addIn'];//批量上传
let query = localStorage.getItem("memberEnter");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
}
this.getList();
this. getMembersLevel()
} ,
......@@ -441,7 +447,6 @@
* 获取用户列表
*/
getList() {
let query = this.listQuery;
console.log(typeof this.listQuery.startTime);
if(this.listQuery.startTime && (typeof this.listQuery.startTime == "object")){
......@@ -450,6 +455,9 @@
if(this.listQuery.endTime && (typeof this.listQuery.endTime == "object")){
this.listQuery.endTime = this.listQuery.endTime.getTime();
}
if(this.listQuery){
localStorage.setItem("memberEnter", JSON.stringify(this.listQuery));
}
getMemberEntryList(query)
.then(response => {
let totalCountRs = undefined;
......@@ -467,6 +475,22 @@
this.listLoading = false;
})
},
/**
* 重置
* */
reloadPage() {
this.listQuery = {
page: 1,
limit: 20,
startTime: undefined,
username: undefined,
endTime: undefined,
};
if(this.listQuery){
localStorage.setItem("memberEnter", JSON.stringify(this.listQuery));
}
this.getList();
},
/**
* 搜索
*/
......@@ -475,10 +499,16 @@
},
handleSizeChange(val) {
this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("memberEnter", JSON.stringify(this.listQuery));
}
this.getList();
},
handleCurrentChange(val) {
this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("memberEnter", JSON.stringify(this.listQuery));
}
this.getList();
},
handleCreate() {
......
......@@ -810,6 +810,10 @@
this.userList_btn_unmute = this.elements['userList:btn_unmute'];//取消禁用
this.userList_btn_del = this.elements['userList:btn_del'];//删除
this.admin_btn_user_postion_put = this.elements['admin:btn:user_postion:put'];//身份设置
let query = localStorage.getItem("userList");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
}
this.getList();
this.getMembersLevel();
}
......@@ -1026,6 +1030,9 @@
*查询
*/
handleFilter() {
if(this.listQuery){
localStorage.setItem("userList", JSON.stringify(this.listQuery));
}
this.getList();
}
,
......@@ -1378,6 +1385,9 @@
this.listQuery.registrationTimeEnd = undefined
this.listQuery.registrationTimeBegin = undefined
this.listQuery.postionState = undefined
if(this.listQuery){
localStorage.setItem("userList", JSON.stringify(this.listQuery));
}
},
change() {
this.$forceUpdate()
......
......@@ -61,6 +61,7 @@
></el-date-picker>
</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>
</div>
......@@ -73,19 +74,19 @@
highlight-current-row
style="width: 100%"
>
<el-table-column align="center" label="车牌号" width="120">
<el-table-column align="center" label="车牌号" width="110">
<template scope="scope">
<span>{{scope.row.numberPlate}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="申请状态">
<el-table-column align="center" label="申请状态" width="100">
<template scope="scope">
<span>{{getBookRecordStatus(scope.row)}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="使用人/联系方式" width="250">
<el-table-column align="center" label="使用人/联系方式">
<template scope="scope">
<span>{{scope.row.vehicleUsername}}/{{scope.row.vehicleUserPhone}}</span>
</template>
......@@ -1051,18 +1052,26 @@ export default {
}
},
created() {
this.getList()
let t = this;
getAll().then(response => {
this.allCompaniesArr = response.data
// response.data.map(function(item) {
// item.value = item.name
// this.allCompaniesArr.push(item)
// })
})
this.allCompaniesArr = response.data;
let query = localStorage.getItem("bookRecord");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
if(t.listQuery.liftCompany){
t.allCompaniesArr.map(function (item) {
if(item.id == t.listQuery.liftCompany){
t.listQuery.liftCompanyName = item.name;
}
});
}
}
this.getList()
});
getAllCompany(codeAndBranchCompany => {
//初始化公司列表
this.allCompanies = codeAndBranchCompany
})
});
this.bookRecord_btn_prove = this.elements['bookRecord:btn_prove']
this.bookRecord_btn_reject = this.elements['bookRecord:btn_reject']
this.bookRecord_btn_unbook = this.elements['bookRecord:btn_unbook']
......@@ -1098,6 +1107,26 @@ export default {
}
},
methods: {
/**
* 重置
* */
reloadPage() {
this.listQuery = {
page: 1,
limit: 20,
flag: false,
zoneId: undefined,
liftCompany: undefined,
numberPlate: undefined,
selectedMonth: undefined,
status: undefined,
bookType: undefined
};
if(this.listQuery){
localStorage.setItem("bookRecord", JSON.stringify(this.listQuery));
}
this.getList();
},
confirm() {
if (this.returnForm.retCompany == '') {
this.$notify({
......@@ -1531,6 +1560,9 @@ export default {
this.listQuery.page = 1
this.$refs.queryForm.validate(valid => {
if (valid) {
if(this.listQuery){
localStorage.setItem("bookRecord", JSON.stringify(this.listQuery));
}
this.getList()
} else {
return false
......
......@@ -52,6 +52,7 @@
<el-button class="filter-item" type="primary" @click="downloadExcel">
导出
</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</el-row>
</el-form>
<el-table id = "out-table" :key='tableKey' :data="list" border fit highlight-current-row style="width: 100%">
......@@ -161,18 +162,36 @@
}
},
created() {
this.handlerSearch()
},
computed: {
let query = localStorage.getItem("vehicleCount");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
}
this.handlerSearch();
},
methods: {
/**
* 重置
* */
reloadPage() {
this.listQuery = {
type: null,
startTime: new Date(),
endTime:new Date()
};
if(this.listQuery){
localStorage.setItem("vehicleCount", JSON.stringify(this.listQuery));
}
this.handlerSearch();
},
handlerSearch() {
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));
}
if(this.listQuery){
localStorage.setItem("vehicleCount", JSON.stringify(this.listQuery));
}
get(this.listQuery).then(response => {
if (response.status === 200) {
......
......@@ -55,11 +55,11 @@
<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">
......@@ -295,14 +295,25 @@
}
},
created() {
let t = this;
const numberPlate = this.$route.query.numberPlate;
if (numberPlate) {
this.listQuery.numberPlate = numberPlate;
}
this.handleFilter();
getAll()
.then(response => {
getAll() .then(response => {
this.allCompaniesArr = response.data;
let query = localStorage.getItem("vehicleDepartureLog");
if(query !="null" && query && !numberPlate){
this.listQuery = JSON.parse(query);
if(t.listQuery.departureId){
t.allCompaniesArr.map(function (item) {
if(item.id == t.listQuery.departureId){
t.state1 = item.name;
}
});
}
}
t.handleFilter();
})
},
computed: {
......@@ -315,7 +326,28 @@
},
},
methods: {
/**
* 重置
* */
reloadPage() {
this.state1='';
this.listQuery = {
page: 1,
limit: 20,
startTime: undefined,
endTime:undefined,
numberPlate: undefined,
departureId:undefined,
};
if(this.listQuery){
localStorage.setItem("vehicleDepartureLog", JSON.stringify(this.listQuery));
}
this.handleFilter();
},
handleFilter() {
if(this.listQuery){
localStorage.setItem("vehicleDepartureLog", JSON.stringify(this.listQuery));
}
this.getList();
if (this.listQuery.numberPlate) {
statistic({numberPlate: this.listQuery.numberPlate}).then(response => {
......@@ -388,10 +420,16 @@
},
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();
},
}
......
......@@ -155,7 +155,7 @@
@click="showMoreMoreCol=!showMoreMoreCol">
更多列
</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">刷新</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</div>
......@@ -1249,12 +1249,22 @@
}
},
created() {
this.getList();
this.getAllVehicleType();//获取全部车型
getAll()
.then(response => {
let t = this;
getAll().then(response => {
this.allCompaniesArr = response.data;
})
let query = localStorage.getItem("vehicleInfo");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
if(t.listQuery.subordinateBranch){
t.allCompaniesArr.map(function (item) {
if(item.id == t.listQuery.subordinateBranch){
t.state1 = item.name;
}
});
}
}
t.getAllVehicleType();//获取全部车型
});
getAllCompany(codeAndBranchCompany => {
this.allCompanies = codeAndBranchCompany;
});
......@@ -1466,16 +1476,29 @@
* 获取全部车型
* */
getAllVehicleType() {
let t = this;
getAllVehicleList().then(response => {
let listRs = undefined;
if (!this.$utils.isEmpty(response.data)) {
listRs = response.data;
}
this.allVehicleList = listRs;
let query = localStorage.getItem("vehicleInfo");
if(query !="null" && query){
let queryJson = JSON.parse(query);
if(queryJson.modelId){
t.allVehicleList.map(function (item) {
if(item.id == queryJson.modelId){
t.vehicleArr = item.name;
}
});
}
}
t.getList();
});
},
/**
* 刷新
* 重置
* */
reloadPage() {
this.state1 = "";
......@@ -1503,6 +1526,9 @@
notBookedEndDate: undefined,
code: undefined
};
if(this.listQuery){
localStorage.setItem("vehicleInfo", JSON.stringify(this.listQuery));
}
this.getList();
},
/**
......@@ -1991,9 +2017,16 @@
return regions[0].name + ' ' + regions[1].name + ' ' + regions[2].name + ' ';
},
handleFilter() {
let t = this;
let query = localStorage.getItem("vehicleInfo");
if(query =="null" || !query){
this.listQuery.page = 1;
}
this.$refs.queryForm.validate(valid => {
if (valid) {
if(t.listQuery){
localStorage.setItem("vehicleInfo", JSON.stringify(this.listQuery));
}
this.getList();
} else {
return false;
......@@ -2002,10 +2035,16 @@
},
handleSizeChange(val) {
this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("vehicleInfo", JSON.stringify(this.listQuery));
}
this.getList();
},
handleCurrentChange(val) {
this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("vehicleInfo", JSON.stringify(this.listQuery));
}
this.getList();
},
handleCreate() {
......
......@@ -48,6 +48,7 @@
></el-autocomplete>
</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-row>
<!-- <el-row> -->
<!-- <el-col :span="8">
......@@ -90,7 +91,7 @@
<!-- </el-row> -->
</el-form>
</div>
<el-form label-width="100px" v-if="countTJ">
<el-form label-width="100px" v-if="countTJ" style="margin: 10px 0;">
<el-row :gutter="20">
<el-col :span="2"><el-form-item label="车辆概况"></el-form-item></el-col>
<el-col :span="5" v-for="(item, index) in countTJ" :key="item.id">
......@@ -476,12 +477,12 @@
}
},
created() {
let t = this;
const numberPlate = this.$route.query.numberPlate;
if (numberPlate) {
this.listQuery.numberPlate = numberPlate;
}
this.getList();
this.getAllVehicleType();
let currentMonth = getCurrentMonth();
this.currentMonth = parseInt(currentMonth);
if(this.currentMonth < 12){
......@@ -492,10 +493,21 @@
this.firstTime = "日期("+this.currentMonth+"~"+this.nextMonth+")"
this.getTempDayList();
this.mar = setInterval(this.showMarquee, 2000);
getAll()
.then(response => {
getAll().then(response => {
this.allCompaniesArr = response.data;
})
let query = localStorage.getItem("vehicleSchedulManage");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
if(t.listQuery.parkBranchCompanyId){
t.allCompaniesArr.map(function (item) {
if(item.id == t.listQuery.parkBranchCompanyId){
t.listQuery.parkBranchCompanyName = item.name;
}
});
}
}
this.getAllVehicleType();
});
getAllCompany(codeAndBranchCompany => {
this.allCompanies = codeAndBranchCompany;
});
......@@ -512,16 +524,53 @@
},
},
methods: {
/**
* 重置
* */
reloadPage() {
this.state1='';
this.listQuery = {
page: 1,
limit: 10,
parkBranchCompanyId: undefined,//停靠分公司id
parkBranchCompanyName: undefined,//停靠分公司名称
subordinateBranch: undefined,//所属分公司
subordinateBranchName: undefined,//所属分公司名称
zoneId: undefined,//所属片区
startTime: undefined,
endTime:undefined,
status: undefined,//车辆状态
useType:undefined,//用途
modelId:undefined,//车型
};
if(this.listQuery){
localStorage.setItem("vehicleSchedulManage", JSON.stringify(this.listQuery));
}
this.getList();
},
/**
* 获取全部车型
* */
getAllVehicleType() {
let t = this;
getAllVehicleList().then(response => {
let listRs = undefined;
if (!this.$utils.isEmpty(response.data)) {
listRs = response.data;
}
this.allVehicleList = listRs;
let query = localStorage.getItem("vehicleSchedulManage");
if(query !="null" && query){
let queryJson = JSON.parse(query);
if(queryJson.modelId){
t.allVehicleList.map(function (item) {
if(item.id == queryJson.modelId){
t.vehicleArr = item.name;
}
});
}
}
t.getList();
});
},
/**
......@@ -904,6 +953,9 @@
}
this.$refs.queryForm.validate(valid => {
if (valid) {
if(this.listQuery){
localStorage.setItem("vehicleSchedulManage", JSON.stringify(this.listQuery));
}
this.getList();
} else {
return false;
......@@ -912,10 +964,16 @@
},
handleSizeChange(val) {
this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("vehicleSchedulManage", JSON.stringify(this.listQuery));
}
this.getList();
},
handleCurrentChange(val) {
this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("vehicleSchedulManage", JSON.stringify(this.listQuery));
}
this.getList();
},
/**
......
......@@ -12,6 +12,7 @@
placeholder="选择月">
</el-date-picker>
<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>
</div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row
style="width: 100%">
......@@ -161,6 +162,7 @@
listQuery: {
page: 1,
limit: 20,
code: undefined,
selectedMonth: "",
numberPlate: undefined
},
......@@ -198,10 +200,33 @@
mounted() {
this.listQuery.selectedMonth = this.$route.query.selectedMonth;
this.listQuery.numberPlate = this.$route.query.numberPlate;
let query = localStorage.getItem("vehicleRecords");
if(query !="null" && query && !this.$route.query.selectedMonth && !this.$route.query.numberPlate){
this.listQuery = JSON.parse(query);
}
this.getList();
},
methods: {
/**
* 重置
* */
reloadPage() {
this.listQuery = {
page: 1,
limit: 20,
selectedMonth: "",
code: undefined,
numberPlate: undefined
};
if(this.listQuery){
localStorage.setItem("vehicleRecords", JSON.stringify(this.listQuery));
}
this.getList();
},
handleFilter() {
if(this.listQuery){
localStorage.setItem("vehicleRecords", JSON.stringify(this.listQuery));
}
this.getList();
},
/**
......
......@@ -5,6 +5,7 @@
v-model="listQuery.numberPlate"></el-input>
<el-input type="number" style="width: 200px;" v-model.number="listQuery.code" class="filter-item" placeholder="请输入车辆编码"></el-input>
<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>
</div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row
style="width: 100%">
......@@ -111,13 +112,18 @@
listQuery: {
page: 1,
limit: 20,
numberPlate: undefined
numberPlate: undefined,
code: undefined
},
tableKey: 0,
dialogFormVisible: false
}
},
created() {
let query = localStorage.getItem("vehicleUpkeepLog");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
}
this.getList();
},
methods: {
......@@ -129,7 +135,23 @@
}
});
},
/**
* 重置
* */
reloadPage() {
this.state1='';
this.listQuery = {
page: 1,
limit: 20,
numberPlate: undefined,
code: undefined
};
this.handleFilter();
},
handleFilter() {
if(this.listQuery){
localStorage.setItem("vehicleUpkeepLog", JSON.stringify(this.listQuery));
}
this.getList();
},
getList() {
......@@ -142,10 +164,16 @@
},
handleSizeChange(val) {
this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("vehicleUpkeepLog", JSON.stringify(this.listQuery));
}
this.getList();
},
handleCurrentChange(val) {
this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("vehicleUpkeepLog", JSON.stringify(this.listQuery));
}
this.getList();
}
}
......
......@@ -27,6 +27,7 @@
@click="handleCreate"
type="primary" icon="edit">添加
</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</el-form>
</div>
......@@ -233,6 +234,10 @@
}
},
created() {
let query = localStorage.getItem("vehicleWarningMsg");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
}
this.getList();
getAll()
.then(response => {
......@@ -255,6 +260,24 @@
])
},
methods: {
/**
* 重置
* */
reloadPage() {
this.state1='';
this.listQuery = {
page: 1,
limit: 10,
numberPlate: undefined,
vehicleCode: undefined,
type: undefined,
colorType:undefined,
};
if(this.listQuery){
localStorage.setItem("vehicleWarningMsg", JSON.stringify(this.listQuery));
}
this.getList();
},
getTypeName: function(type) {
if (this.$utils.isEmpty(this.vehicleWarningMsgType[type])) {
return '未知';
......@@ -276,8 +299,12 @@
})
},
handleFilter() {
let t = this;
this.$refs.queryForm.validate(valid => {
if (valid) {
if(t.listQuery){
localStorage.setItem("vehicleWarningMsg", JSON.stringify(t.listQuery));
}
this.getList();
} else {
return false;
......@@ -286,10 +313,16 @@
},
handleSizeChange(val) {
this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("vehicleWarningMsg", JSON.stringify(this.listQuery));
}
this.getList();
},
handleCurrentChange(val) {
this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("vehicleWarningMsg", JSON.stringify(this.listQuery));
}
this.getList();
},
/**
......
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